1 of 12

Linux Network Configuration and Troubleshooting Commands

2 of 12

ifconfig/ ip addr

Used to initialize an interface, assign IP Address to interface and enable or disable interface on demand. With this command you can view IP Address and Hardware / MAC address

ifconfig with interface (eth0) command only shows specific interface details like IP Address, MAC Address etc. with -a options will display all available interface details if it is disable also.

3 of 12

Ping command

PING (Packet Internet Groper) command is the best way to test connectivity between two nodes. Whether it is Local Area Network (LAN) or Wide Area Network (WAN). Ping use ICMP (Internet Control Message Protocol) to communicate to other devices. You can ping host name of ip address using below command

4 of 12

Tracepath command

This is a network troubleshooting utility which shows number of hops taken to reach destination also determine packets traveling path. Below we are tracing route to global DNS server IP Address and able to reach destination also shows path of that packet is traveling.

5 of 12

Hostname command

hostname is to identify in a network. Execute hostname command to see the hostname of your box. You can set hostname permanently in /etc/sysconfig/network. Need to reboot box once set a proper hostname.

6 of 12

Netstat command

netstat command allows you a simple way to review each of your network connections and open sockets. netstat with head output is very helpful while performing web server troubleshooting.

7 of 12

Dig command

Dig (domain information groper) query DNS related information like A Record, CNAME, MX Record etc. This command mainly use to troubleshoot DNS related query.

8 of 12

Nslookup command

Nslookup stands for “name server lookup”. It queries to DNS (Domain Name Server) and get the dns records for any domain for ip address.

You can also use ip address for reverse dns lookup. It will resolve the corresponding domain with IP address. Remember that this is different records configured in reverse zone of domain.

9 of 12

Iwconfig command

Iwconfig is similar to ifconfig(8), but is dedicated to the wireless� interfaces. It is used to set the parameters of the network interface� which are specific to the wireless operation (for example : the fre-� quency).

10 of 12

W command

w prints a summary of the current activity on the system, including what each user is doing, and their processes. Also list the logged in users and system load average for the past 1, 5, and 15 minutes.

11 of 12

Telnet command

The telnet command is used to communicate with another host using the TELNET protocol. If telnet is invoked without the host argument, it enters command mode, indicated by its prompt (telnet> ) In this mode, it accepts and executes the commands.

12 of 12

Thank you!