Network commands in Windows Command Prompt
Network commands allow you to find the physical address, IP address of network interfaces of your system. These commands are also useful in finding out the network connections and troubleshooting any network issues as well.
ipconfig command is used to find the IP address of the system. Below command shows detailed information of network interfaces.
We can release the existing IP address using below command.
Below command will assign new IP address to your system.
To Flush DNS resolver cache, you can use below command.
ping and pathping command
To check the connection with specific host, we can use ping and pathping commands.
By default, ping command sends 4 packets to the remote host and waits for reply
If you want to ping continuously, you can use below command.
ping -t www.softpost.org
Below command also sends the pings to the host but also shows the intermediate nodes
To view the physical addresses of each network adapter, you can use below command
Below command is used to trace the route to specific host.
netstat -ab ->This command shows all ports that are in use along with application name.
You may encounter error saying “The requested operation requires elevation” when executing above command. To avoid it, you have to launch the command prompt as an administrator.
netstat -an -> This command shows all open ports
netstat -an | find “LISTENING” -> This command shows all LISTENING ports.
telnet command is used to login to remote system and execute commands.
The telnet client isn’t installed by default in Windows. You can install it from control panel as shown in below image.
ARP stands for Address resolution protocol and used to map the IP address to physical address.
Below command shows the table mapping IP addresses and physical addresses
nbtstat command displays TCP/IP connection details
net use – displays network connections
net user <user-name> – shows user account details
nslookup command is used to look up domain information.
set command to view user domain information
set U – This command shows details of current user like domain, user name, user profile
set L – This command shows the details of logon server and local app data.
netsh is a very powerful utility to manage the network configuration in windows system.