Redhat – Basic network troubleshooting commands

redhat

 

The way to configure network settings have drastically changes in versions after RHEL 7. The earlier method can be found in the below link:

 

Check the available network links, the devices connected and their status

  • [root@centos9vm ~]# ip link show

Check the devices and the IP addresses assigned:

  • [root@centos9vm ~]# ip addr

Verify IP address and details of a specific interface

  • [root@centos9vm ~]# ip addr show ens160

View statics of traffic on the interface

  • [root@centos9vm ~]# ip -s link show ens160

View static routes in the routing table.

  • [root@centos9vm ~]# ip route

View the route taken via network devices to reach a destination

  • [root@centos9vm ~]# tracepath shijuvarghese.com

Review connections to a host

  • [root@centos9vm ~]# netstat -na

Tool used to dump socket statistics and displays information. It may be used as an alternative to netstat

  • [root@centos9vm ~]# ss
  • [root@centos9vm ~]# ss -ta  {t = TCP and a=all}