Network Commands
Network Commands
Network Commands
These commands are used to troubleshoot internet issues and local networking hang-ups.
ipconfig /all
ipconfig /release
ipconfig /renew
ipconfig /displaydns
ipconfig /flushdns
ipconfig /registerdns
This command is used to find out your current TCP/IP settings. With IPCONFIG you can find
out your IP Address, Default Gateway and Subnet Mask. This is a very handy network tool for
finding your local IP address as well as many other secrets.
ipconfig /all
To display all your IP information for all adapters. With ipconfig /all you can also find out your
DNS Server and MAC Address. This will show your full TCP/IP configuration for all adapters
on your Windows machine. You can find out your own IP Address as well as your default
gateway.
ipconfig /release
To release your current IP information and obtain a new IP Address from the DHCP server.
ipconfig /renew
Used to renew your IP Address if you have it set to obtain IP Address automatically.
ipconfig /displaydns
This shows your current DNS Resolver Cache Logs.
ipconfig /flushdns
The Flush DNS Command flushes or clears your current DNS Resolver Cache Logs.
ipconfig /registerdns
The register DNS command updates the DNS settings on the Windows computer. It doesn’t just
access the local DNS cache, it initiates communication with the DNS server and the DHCP
server so it can re-register the network address. You can use this for troubleshooting problems
with connection to the ISP (Internet Service Provider), like failing to obtain a dynamic IP address
from the DHCP Server or failing to connect to the ISP DNS server.
PING Commands List
Ping command is used to check connectivity between your computer and some other computer or
device in local network or internet.
ping xxx.xxx.xxx.xxx
To Ping an IP Address you would type the following DOS Command in the Windows Command
Prompt. Ping followed by an IP address.
ping xxx.xxx.xx.xx -t
Continuous Ping – It will keep on pinging forever until you hit Ctrl + C to stop it. This can be
great for troubleshooting intermittent connections.
ping xxx.xxx.xx.xx -n 10
Number of Pings – The N Switch is simply for setting the number of pings. By default the ping
cmd sends out 4 packets at 32 bytes each.
ping -a xxx.xxx.xx.xx
Resolves Hostname Address – This is a great one if you are helping someone else and need to
find out what router model they are using. You can resolve the host of an IP Address with this
command. Try pinging your router or your local computer with it. ping -a 127.0.0.1. Note that
this switch will only work in front of the IP Address.
ping -S x.x.x.x x.x.x.x
the ip address followed by –S is the source address. S is uppercase.
ping -4 x.x.x.x
Force using IPv6, and -6 forces using IPv6.
pathping x.x.x.x
just like tracert.
nslookup site.com
nslookup xxx.xxx.xxx.xxx
nslookup is a way to get the IP address for a domain name. You can also do a reverse lookup
from Domain Name to IP Address. It can be a way to find out if your DNS is properly working
or if the site is having problems. You can obtain an IP from a site and try to visit the IP directly,
bypassing the Domain Name Servers that would usually resolve the Domain name to IP name.
netstat
netstat can be used to view your active network connections and TCP/IP connections. You can
determine what ports are open and being used, what programs are using your ports and what kind
of TCP and UDP connections are present. Looking in here for the first time may scare the hell
out of you.
netstat Switches
netstat -a Displays all active TCP connections. And TCP / UDP ports.
getmac
To get your computers local MAC address.
arp -a
To get the MAC address of your router or other devices on your local network, you may use the
arp -a command. With this information, you can find out what type of router you are connected
to by using this website. Simply plug in the MAC Address of your default gateway(found from
IPCONFIG) and you can get the brand name of your router without looking at it. Pretty neat.
Helpful in some situations.
netsh − Powerful utility that can adjust many network and interface settings.