technical skills grow

Responsive Ads Here

Saturday, July 24, 2021

Network troubleshoot nmtui | setup | nmcli | dig | host | nslookup | ip route | netstat | hostname | ifconfig | ping

 

Q:- How to troubleshoot if the network is not reaching?
(i) First check the network cable is connected or not by 

# ethtool <NIC device name> 

if connected then check the IP address is assigned or not by 

# ifconfig <NIC device name>
(ii) Then check the system uptime by

 # uptime

(iii) Then check the network services status by # service network status and

 # service NetworkManager  status 

(iv) Then check the network service at Run Level by 

# Chkconfig --list network

(v) Then check whether the source network and destination network are in the same domain or
(v) Then finally check the routing table by 

# route -n 

Other useful commands :

# ping <IP address or hostname>  (to check the pinging)

Normally the ping command pings continuously until a stop signal reaches by Ctrl + c, so to avoid continuous pinging by

# ping -c <number><IP address>  (to ping upto the specified no of times)

# ipcalc -m <IP address) (to find the subnet mask for that specified IP address)

Normally IP addresses are assigned by ISP (Internet Service Provider) and managed by IANA (Internet Assign Number Authority)

# ifconfig   (to see or check all the NIC device names and IP addresses)

# ethtool <NIC device name> (to check the network cable is connected or not)

# miitool <NIC device name>  (It is also used to check the network cable but it works on physical system not on virtual system and supports in RHEL - 6 only)

# ip addr show (to show all NIC devices present on the system)

# hostname  (to see the hostname with fully qualified domain name) 

# hostname -i      (to see the IP address of the system)

# hostname -d    (to check the domain name of the system)

# hostname -s    (to check the hostname without domain name)

# netstat -r         (to check the default gateway and routing table)

# route               (to check the default gateway with routing table)

# ip route           (to display the NIC device with default  gateway)

# dig or # host or

 #nslookup  (all are used to resolve the name to IP and IP to name)

# nslookup <IP address>   (to resolve IP to name)


# nslookup <hostname>    (to resolve name to IP)
 

# host <IP address>           (to resolve IP to name)
 

# host <fully qualified domain name> (to resolve name to IP address)
 

# dig -x <IP address>      (to resolve IP address to name)
 

# dig <fully qualified domain name> (to resolve name to IP address)
 

# nmcli (Network Manager Command Line Interface used to configure the network setup in RHEL - 7)
 

# setup    (to setup the static network in RHEL - 2, 3, 4, 5 and 6)
 

# nmtui   (to setup the static network in GUI mode for  RHEL - 7)
 

# nmcli device show  (It displays all the NIC devices network information of the system )
 

# nmcli device show eth0 (to see all the network devices information of the eth0)
 

# nmcli connection or nmcli connection show (to see all the network connection names)
 

# nmcli connection add con-name <connection name> ifname <NIC device name> type ethernet (to create a new connection name for eth0)
 

# nmcli connection show --activate (it shows which connection is active currently)
 

# nmcli connection add con-name <connection name> ifname <NIC device name> type ethernet 


No comments:

Post a Comment

Powered by Blogger.

Labels

Contact Form

Name

Email *

Message *

Search This Blog

Blog Archive

Ad Code

Responsive Advertisement

Recent Posts