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

ipconfig command is used to find the IP address of the system. Below command shows detailed information of network interfaces.
 
ipconfig /all

We can release the existing IP address using below command.
 
ipconfig /release

Below command will assign new IP address to your system.
 
ipconfig /renew

To Flush DNS resolver cache, you can use below command.
 
ipconfig /flushdns

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
 
ping www.softpost.org

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 pathping

getmac command

To view the physical addresses of each network adapter, you can use below command
 
getmac /v

tracert command

Below command is used to trace the route to specific host.
 
tracert www.softpost.org

netstat command
 
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

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 command

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
 
arp -a

nbtstat command

nbtstat command displays TCP/IP connection details

net command

 
net use  – displays network connections
net user <user-name> – shows user account details

nslookup command

nslookup command is used to look up domain information.
 
nslookup www.softpost.org
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 commands
netsh is a very powerful utility to manage the network configuration in windows system.

Web development and Automation testing

solutions delivered!!