Linux Network Troubleshooting FAQs

Call +91 984545 1006 or Email sales@navigatorsystem.com

How do you see have the list of users who have currently logged on to the system?

By issuing the command who, the output looks as shown below:

[root@bigboy tmp]# who

root     pts/0       Jun 19 09:26 (reggae.my-site.com)

[root@bigboy tmp]#

How do you check the list of users who have logged in to the linux system in the past?

You can issue the command last to check.

You can truncate the output by providing the –n (n is a numerical) to display only n lines.

For eg:

[root@bigboy tmp]# last -100

root     pts/0       reggae.my-site.co Thu Jun 19 09:26   still logged in

root     pts/0       reggae.my-site.co Wed Jun 18 01:07 – 09:26 (1+08:18)

reboot   system boot   2.4.18-14         Wed Jun 18 01:07         (1+08:21)

root     pts/0       reggae.my-site.co Tue Jun 17 21:57 – down   (03:07)

root     pts/0       reggae.my-site.co Mon Jun 16 07:24 – 00:35 (17:10)

wtmp begins Sun Jun 15 16:29:18 2003

[root@bigboy tmp]#

How do you check the status of firewall on a Linux system?

You can use the following commands:

Service iptables status

OR

Iptables –L

How do you check for open ports on the remote host?

Use the command nmap with –O option.

Which commands are used to test the network connectivity?

Ping & traceroute

Name the commands used to check the network packet details:

Tcpdump, mtr, tshark

What is the use of nslookup command?

Nslookup command is used for DNS queries. You can check the IP address of the server by passing the DNS name and vice-a-versa.

What needs to be checked if telnet to SSH port give error “Connection refused”?

You need to check if SSH application is running on the remote system or

If there is a firewall blocking and rejecting the connection attempt

How do you check if SSH is running on a remote system (eg: 192.168.1.102)?

Telnet to port 22 give a Connection successful output as shown below:

[root@bigboy tmp]# telnet 192.168.1.102 22

Trying 192.168.1.102…

Connected to 192.168.1.102.

Escape character is ‘^]’.

SSH-1.99-OpenSSH_3.4p1

^]

telnet> quit

Connection closed.

[root@ bigboy tmp]#

When do you get the error Destination Host Unreachable?

If you are trying to ping a host on remote network:

The network device doesn’t have a route in its routing table to the destination network and sends an ICMP reply type 3 which triggers the message. The resulting message might be Destination Host Unreachable or Destination Network Unreachable.

What are the common commands to test network status report?

mii-tool

ethtool

ifconfig

netstat

ping

telnet

How to view the network interface details?

Run the following command from the command prompt:

Ifconfig -a

What are the reasons for network slowness?

NIC duplex and speed incompatibilities

Network congestion

Poor routing

Bad cabling

Electrical interference

An overloaded server at the remote end of the connection

Mis-configured DNS