In this article, We will know top network Network Troubleshooting command-line Tools that can help to solve Networking Issues.
Network Troubleshooting command-line Tools:
- PING Command:
PING stands for Packet Internet Groper most basic TCP/IP utility for stacks for the most platform. The PING command used to find out if the host is responding and to find out if you can reach a host.
In other words, the PING command used to check connectivity between two networking devices or nodes. You can do the PING from the Hosts name or IP address of the host.
If you ping any station that has an IP address, the ICMP that’s part of that particular host’s TCP/IP stack will respond to the request. The ICMP test and response looks something like this-
Syntax:-
- ping Hostname(www.conceptsall.com).
- ping IP address (162.0.229.38).
Pinging conceptsall.com [162.0.229.38] with 32 bytes of data:
Reply from 162.0.229.38: bytes=32 time=276ms TTL=49
Reply from 162.0.229.38: bytes=32 time=272ms TTL=49
Reply from 162.0.229.38: bytes=32 time=272ms TTL=49
Reply from 162.0.229.38: bytes=32 time=271ms TTL=49
Ping statistics for 162.0.229.38:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 271ms, Maximum = 276ms, Average = 272ms
PING command Provides several types of information such as Count, Timeout, Size, TTL, IPv4 or IPv6, etc.
Ping command syntax for Windows:
Syntax | Descriptions |
-t | Pings the specified host until stopped. To see statistics and continue, press Ctrl+Break; to stop, press Ctrl+C. |
-a | Resolves addresses to hostnames. |
-n count | Specifies the number of echo requests to send. |
-l size | Sends the buffer size. |
-f | Sets the Don’t Fragment flag in the packet (IPv4 only). |
-i TTL | Time To Live. |
-v TOS | Type Of Service (IPv4-only. This setting has been deprecated and has no effect on the type of service field in the IP Header). |
-r count | Record route for count hops (IPv4-only). |
-s count | Timestamp for count hops (IPv4-only). |
-j host-list | Loose source route along host-list (IPv4-only). |
-k host list | Uses a strict source route along with the host list (IPv4 only). |
-w timeout | Specifies the time-out to wait for each reply in milliseconds. |
-R | Uses the routing header to test the reverse route also (IPv6 only). |
-S srcaddr | Specifies the source address to use. |
-p | Ping a Hyper-V Network Virtualization provider address. |
-4 | Forces using IPv4. |
-6 | Forces using IPv6. |
PING Error:
The Following error found some times when try to PING from Host-
- Destination Host Unreachable– The Destination Node cannot be found.
- Request Time Out- Indicates that host not received the ICMP.
- PING request could not Find Host- PING was unable to find the IP address from the HOST name provided.
2. NSLOOKUP
NSLOOKUP is one of the Network Troubleshooting command-line Tools that allows you to query a name server and quickly find out which name resolves to which IP address.
C:\Users\Deepak> nslookup
Default Server: conceptsallcomputer.local
Address: 192.168.1.1
3. IPCONFIG
IPCONFIG is one of the best commands for the Windows Operating system that provides information on the current configuration of TCP/IP on a given workstation—including the current IP address, DNS configuration, Windows Internet Naming Service (WINS) configuration, and
default gateway.
C:\Users\Gmts-Deepak>ipconfig
Windows IP Configuration
Ethernet adapter Ethernet 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter Ethernet 3:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Local Area Connection* 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Local Area Connection* 3:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter VMware Network Adapter VMnet1:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::7036:aa2b:a561:e6a2%25
Autoconfiguration IPv4 Address. . : 169.254.230.162
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
Ethernet adapter VMware Network Adapter VMnet8:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::4595:1231:ac0:5f19%11
Autoconfiguration IPv4 Address. . : 169.254.95.25
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
Wireless LAN adapter WiFi 3:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::2978:40fb:95a3:7467%3
IPv4 Address. . . . . . . . . . . : 192.168.0.105
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
IPCONFIG command syntax :
- /all: Display Full Information.
- /release: Release the IP address of IPv4.
- /release6: Release the IP address of IPv6.
- /renew: Renew the IP address of IPv4.
- /renew6: Renew the IP address of IPv6.
- /flushdns: Purges the DNS Resolver cache
- /displaydns: Display the contents of the DNS Resolver Cache.
- /showclassid: Displays all the DHCP class IDs allowed for adapter.
- /setclassid : Modifies the DHCP class id
4. IFCONFIG
IPCONFIG is one of the best commands for the Linux Operating System that provides information on the current configuration of TCP/IP on a given workstation—including the current IP address, DNS configuration, Windows Internet Naming Service (WINS) configuration, and
default gateway.
5. IPTABLES
IPTABLES is one of the best Network Troubleshooting command-line Tools for Firewall utility for Linux Operating system that used to allow or disallow the traffic.
IPTABLES provide three different types of chain to control traffic-
- Input: Control behavior for incoming connections.
- Output: Control behavior for outgoing connections.
- Forward: Used for incoming connections that aren’t being delivered locally.
Examples of iptables–
To block a connection from the device at 192.168.1.19
Use Following Command to Block-
iptables -A INPUT -s 192.168.1.19 -j DROP
In Red Hat/CentOS, use either of the following commands:
/sbin/service iptables save
/etc/init.d/iptables save
The following command is used to save the changes in Ubuntu:
sudo /sbin/iptables-save
Thanks For reading, Have a Nice Day.
You May Also Read..
You are a great writer!