To ensure the proper network connection in the system, we do the following three types of checking:
--- Check the NIC card
---Check whether we have an IP or not or our gateway is active or not by a ping test
----- Check if the port no or the service is active or not
To check the connection go to command prompt and enter the commands
>ping localhost
then NIC working.
>ping 172.29.0.1
then gateway working
>ipconfig
In computing, ipconfig (internet protocol configuration) is a console application (command line tool) in Microsoft Windows used to control the network connections on windows.It displays all current TCP/IP network configuration values and can modify DHCP and DNS settings.
Usually, ipconfig command is used with the command-line switch /all.
> ipconfig /all
This command shows the various network configurations, MAC address, default gateway and IP addresses of different servers on the network like dns, DHCP etc.
> ipconfig /release
This command forcefully releases the IP address of the system and the ipconfig command does not show any IP address of the device.
> ipconfig /renew
This command sends a request to the DHCP server requesting a new logical address (IP address) for the device and is allocated a new IP by the DHCP server.
> ipconfig /displaydns
This command displays the contents of the Domain Name System (DNS) resolver cache.A DNS cache makes browsing faster because it keeps a record of any website visited before.
If we want to make a connection to the previously visited websites then our computer doesn't need to make an external request for the IP address and the conversion from domain name to IP address is done in milliseconds.
> ipconfig /flushdns
This command purges the DNS resolver cache. Simply this command as the name seems clears the entire DNS cache.
If the IP address of a website changes before the DNS cache updates in the system, then the system may not be able to load the webpage.To avoid this above command is used.
> netstat
OR
> netstat –an
Netstat is one of a number of command-line tools available to check the functioning of a network. It provides a way to check if various aspects of TCP/IP are working and what connections are present.
> netstat –na | find “:135”
>netstat –na | find “:137”
The arguments with the netstat command are used to find the results of ‘netstat’ command of given ports in the arguments.
> tracert
This command is used to trace where the hops require diagnosis. It displays stepwise tracing of sent packets through various hops.
> pathping
The pathping tool is a route tracing tool that combines features of Ping and Tracert with additional information that neither of those tools provides. pathping sends packets to each router on the way to a final destination over a period of time and then computes results based on the packets returned from each hop.It pings all routers for 25s.
> nslookup
Displays information that you can use to diagnose Domain Name System (DNS) infrastructure. The nslookup command-line tool is available only if you have installed the TCP/IP protocol.
It is used by any computer user to enter a hostname(ex defit.com) and find out the corresponding IP address, and vice versa.
> arp –a
This command is used for IP to MAC binding. In ARP table, a list is maintained where a system with an IP has its MAC address corresponding to it in a record.