Verifying virtual machine TCP/IP settings
search cancel

Verifying virtual machine TCP/IP settings

book

Article ID: 344317

calendar_today

Updated On:

Products

VMware Cloud Director VMware Desktop Hypervisor VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

This article provides steps to verify TCP/IP settings and to verify that the NIC is communicating with the host.
After you complete the steps in this article, see Troubleshooting virtual machine default gateway connection issues (1007910) to confirm the LAN connection.


Resolution

Verifying TCP/IP configuration

 
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. For example, a virtual machine may not be able to ping its own IP address.
 
If you are having communication problems, verify your TCP/IP settings.
 
To verify TCP/IP settings:
 
  1. 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. . . . . . . . . . . . : 10.10.10.30
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . : 10.10.10.1

    On a Linux virtual machine, run the command:

    # ifconfig

    You see output similar to:

    eth0 Link encap:Ethernet HWaddr 00:##:##:##:##:5F
    inet addr:192.168.48.128 Bcast:192.168.48.255 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.

  2. From the output of the ipconfig or the ifconfig command, verify that the IP address and subnet mask are correct.

    Note: If you are unsure of 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:

    # dhclient -r
    # 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.

Pinging the virtual machine IP address

If you can successfully ping the loopback address, try to ping your own IP address. From a command prompt, run the command:

ping IP_address, where IP_address is your computer's IP address

For example:

ping 10.10.10.30

The output of the ping looks similar to:

Pinging 10.10.10.30 with 32 bytes of data:
Reply from 10.10.10.30: bytes=32 time=2ms TTL=128
Reply from 10.10.10.30: bytes=32 time<1ms TTL=128<br>Reply from 10.10.10.30: bytes=32 time<1ms TTL=128<br>Reply from 10.10.10.30: bytes=32 time<1ms TTL=128</span>
 
Note: If you receive an error message when you try to ping your own IP address, there may be a communication problem between the host and your NIC. For more information, see Verifying virtual network adapter is present and connected to the virtual machine (1003786).



Additional Information

For related troubleshooting information, see Troubleshooting virtual machine TCP/IP connection issues(1007842).