From the course: Networking Foundations: Protocols and CLI Tools
Using ipconfig and ifconfig to verify IP settings - Windows Server Tutorial
From the course: Networking Foundations: Protocols and CLI Tools
Using ipconfig and ifconfig to verify IP settings
- [Instructor] In Windows, one of the first network troubleshooting tools you will use is IP config. It allows you to quickly verify IP information configured on network interfaces. I start by opening a command prompt. I can select start and type CMD and then hit enter. Typing IP config with no additional parameters shows me all of the network interfaces on my computer, along with IPV six addresses, IPV four addresses, sub-net mask and default gateway. Any interfaces that are unplugged show up as media disconnected. I'm going to go ahead and clear the screen. There is quite a bit more information that can be shown by typing IP config/all. This shows the same output as the previous command but also gives the physical address or Mac address for each interface, whether DHCP is enabled or not, when the DHCP and lease was obtained, and when it will expire. /all also lists the IP address of the DHCP and or manually configured DNS servers. If DHCP is enabled on my network there are additional control commands I can use with IP config. If there's an IP address assigned via DHCP to an interface IP config/release will remove it. By default, if I enter the command without specifying a specific interface it will release the DHCP leases assigned to all interfaces. I can use wildcards in the interface name to make it easier. These are simply asterix. On this machine I've got wireless land adaptor wifi, so I'll type IPconfig/release*FI. Once the IPS have been released, I can query for new ones by issuing IPconfig/renew. In this case, I'm just going to hit the up arrow and change my command to renew. Again, I can choose to specify an interface or not. For you IPV six lovers out there, IPconfig/release6 and IPconfig/renew6 will control V6 DCP IP addresses. There are also a few DNS commands that are great troubleshooting tools. I can flush the local DNS cache with IPconfig/flushDNS. Alternately if I want to view the DNS cache I can issue IPconfig/displayDNS. Display DNS shows each entry, the type of record that it is, be it a record or C name, it's TTL, and ultimately what it resolved to. An A record will be a direct DNS to IP mapping, where a C name is a DNS entry that points to another DNS entry for ultimate resolution. Linux isn't wholly different. To list the IP addresses present on the server I simply type IP ADDR. To view the routing table information like the default gateway the IP route command can be entered. These simple commands are used daily in the world of network support and administration.