This topic describes how to resolve the issue that the IP address of a network interface controller (NIC) is missing on a Windows Elastic Compute Service (ECS) instance.
Problem description
When a network connectivity issue occurs on a Windows instance, you confirm that the NIC driver is properly installed after connecting to the instance by using Virtual Network Computing (VNC) and checking Device Manager. When you run the ipconfig command on the terminal, you can still view NIC information. However, you cannot find the IP address configured for the NIC in the adapter settings.
Solution
Obtain the name, IPv4 address, and subnet mask of the NIC whose IP address is missing.
ipconfigThe following command output is returned:
Windows IP Configuration Ethernet adapter Ethernet: Connection-specific DNS Suffix . . . . : Link-local IPv6 Address . . . . . . . . : fe80::xxxx:xxxx:xxxx:5339%10 IPv4 Address. . . . . . . . . . . . . . : 172.16.0.144 Subnet Mask . . . . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . . . . : 172.16.0.253Add the NIC.
netsh interface ip set address name="<$Name>" source=static addr=<$IP> mask=<$Mask>NoteReplace <$Name> with the NIC name displayed by the
ipconfigcommand output.Replace <$IP> with the IPv4 address displayed by the
ipconfigcommand output.Replace <$Mask> with the subnet mask displayed by the
ipconfigcommand output.