Verifying virtual machine TCP/IP settings
search cancel

Verifying virtual machine TCP/IP settings

book

Article ID: 344317

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

When the TCP/IP protocol is used, incorrect TCP/IP settings (such as an incorrect IP address or an incorrect subnet mask) can cause communication problems, and the VM network will not be working as expected.

For example, a VM may not be able to ping its own IP address, its gateway, or other IPs.

Resolution

Verifying TCP/IP configuration

If you are having communication problems, verify your TCP/IP settings.
 
  1. To verify TCP/IP settings:

    • To determine basic TCP/IP settings for Windows, run the command:

      ipconfig

      You see output similar to:

      Ethernet adapter Local Area Connection 1:
      Connection-specific DNS Suffix . :
      IP Address. . . . . . . . . . . . : #.#.#.#
      Subnet Mask . . . . . . . . . . . : 255.255.255.0
      Default Gateway . . . . . . . . . : #.#.#.#

    • On a Linux virtual machine, run the command:

      ifconfig

      You see output similar to:

      eth0 Link encap:Ethernet HWaddr ##:##:##:##:##:##
      inet addr:192.168.#.# Bcast:192.168.#.# Mask:255.255.255.0
      UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
      RX packets:14 errors:0 dropped:0 overruns:0 frame:0
      TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:2080 (2.0 KiB) TX bytes:7037 (6.8 KiB)

      lo Link encap:Local Loopback
      inet addr:127.0.0.1 Mask:255.0.0.0
      UP LOOPBACK RUNNING MTU:16436 Metric:1
      RX packets:1453 errors:0 dropped:0 overruns:0 frame:0
      TX packets:1453 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:2294308 (2.1 MiB) TX bytes:2294308 (2.1 MiB)

      Note: If the ipconfig or the ifconfig command does not produce any output, ensure that the NIC is enabled, and/or contact your OS vendor to obtain the correct command(s).

  2. From the output of the ipconfig or the ifconfig command, verify that the IP address and subnet mask are correct.  If they are not correct, set them to the expected values.

    Note: If you are unsure of the correct values, or you need assistance setting the correct values, contact your network administrator.

  3. If DHCP is configured, confirm that DHCP is assigning the IP address correctly by renewing the IP address.
    • From the command prompt in Windows, run the command:
      • ipconfig /renew
    • From a Linux virtual machine renew the DHCP address with:
      1. # dhclient -r
      2. # dhclient eth0
        • Where eth0 is the network interface from the ifconfig output using DHCP. If the dhclient command is not available or does not work, see your Operating System documentation for the procedure to release DHCP address on your version on Linux.
        • Note: lo is a loopback interface and will have the IP 127.0.0.1 which is normal.

Additional Information

For related troubleshooting information, see: