TCP/IP Troubleshooting: A Linux Guide for Network Administrators, Lecture notes of Computer Communication Systems

A comprehensive guide for network administrators on troubleshooting network issues using various linux commands such as ping, ifconfig, arp, route, netstat, and traceroute. It covers common network problems, their causes, and solutions.

Typology: Lecture notes

2022/2023

Uploaded on 12/29/2023

gadisa-adamu
gadisa-adamu 🇪🇹

3 documents

1 / 24

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
By Yoobsan B 1
TCP/IP Troubleshooting
Upon completion of this chapter students will
able to:
oTroubleshoot network by:
Ping,
ifconfig,
Arp,
Route,
Netstat and
Trace route commands on Unix.
12/30/2019
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18

Partial preview of the text

Download TCP/IP Troubleshooting: A Linux Guide for Network Administrators and more Lecture notes Computer Communication Systems in PDF only on Docsity!

TCP/IP Troubleshooting

 Upon completion of this chapter students will

able to:

o (^) Troubleshoot network by:  (^) Ping ,  (^) ifconfig,  (^) Arp,  (^) Route,  (^) Netstat and  (^) Trace route commands on Unix.

Cont.…..

o (^) Computers are connected in a network to exchange information or resources each other. o (^) Two or more computer connected through network media called computer network. o (^) There are number of network devices or media are involved to form computer network. o (^) Computer loaded with Linux Operating System can also be a part of network whether it is small or large network by its multitasking and multiuser natures. o (^) Maintaining of system and network up and running is a task of System / Network Administrator’s job.

Cont.…..

o (^) Network problems are usually unique and sometimes difficult to resolve. o (^) Troubleshooting is an important part of maintaining a stable, reliable network service. o (^) However, having only a good tools are not enough. No troubleshooting tool is effective if applied haphazardly. o (^) Effective troubleshooting requires a methodical approach to the problem, and a basic understanding of how the network works. o (^) In this topic we are going to review ways to approach a network problem and frequently used network troubleshoot commands in Linux.

Approaching a Problem

o (^) To approach a problem properly, you need a basic understanding of TCP/IP. o (^) Once you understand the true nature of the problem, the solution to the problem is often obvious. o (^) First, gather detailed information about exactly what’s happening. o (^) When a user reports a problem, talk to her/him. o (^) Find out which application failed. o (^) What is the remote host’s name and IP address? o (^) What is the user’s hostname and address? o (^) What error message was displayed?

Cont.…..

o (^) Does the problem occur with only one remote host, all remote hosts, or only certain “groups” of remote hosts? o (^) If only one remote host is involved, the problem could easily be with that host. o (^) If all remote hosts are involved, the problem is probably with the user’s system (particularly if no other hosts on your local network are experiencing the same problem). o (^) If only hosts on certain subnets or external networks are involved, the problem may be related to routing. o (^) Does the problem occur on other local systems?

Cont.…..

o (^) Make sure you check other systems on the same subnet. o (^) If the problem occurs only on the user’s host, concentrate testing on that system. o (^) If the problem affects every system on a subnet, concentrate on the router for that subnet. o (^) Once you know the symptoms of the problem, visualize each protocol and device that handles the data. o (^) Visualizing the problem will help you avoid oversimplification, and keep you from assuming that you know the cause even before you start testing. o (^) Using your TCP/IP knowledge, narrow your attack to the most likely causes of the problem, but keep an open mind.

Cont.…..

o When ifconfig is entered with an interface name and

no other arguments, it displays the current values

assigned to that interface.

o For example, checking interface dnet0 on a Solaris 8

system gives this report:

% ifconfig dnet

dnet0: flags=1000843<UP, BROADCAST, RUNNING, MULTICAST, IPv4> mtu 1500 index 2 inet 172.16.55.105 netmask ffffff00 broadcast 172.16.55.

o The ifconfig command displays two lines of output.

o The first line of the display shows the interface’s

name and its characteristics.

Cont.…..

UP o (^) The interface is enabled for use. If the interface is “down,” have the system’s super user bring the interface “up” with the ifconfig command (e.g., ifconfig dnet0 up). o (^) If the interface won’t come up, replace the interface cable and try again. If it still fails, have the interface hardware checked. RUNNING o (^) This interface is operational. o (^) If the interface is not “running,” the driver for this interface may not be properly installed. o (^) The system administrator should review all of the steps necessary to install this interface, looking for errors or missed steps.

Cont.…..

o (^) However, if the host part of the address is wrong, the problem can be more difficult to detect. o (^) A small system, such as a PC that only connects out to other systems and never accepts incoming connections, can run for a long time with the wrong address without its user noticing the problem. o (^) Additionally, the system that suffers the ill effects may not be the one that is misconfigured. o (^) It is possible for someone to accidentally use your IP address on his system, and for his mistake to cause your system intermittent communications problems. o (^) An example of this problem is discussed later. o (^) This type of configuration error cannot be discovered by ifconfig because the error is on a remote host. o (^) The arp command is used for this type of problem.

Troubleshooting with the PING Command

o (^) PING (Packet INternet Groper) command is the best way to test connectivity between two nodes. o (^) Whether it is Local Area Network (LAN) or Wide Area Network (WAN). o (^) Ping use ICMP (Internet Control Message Protocol) to communicate to other devices. o (^) is a simple utility that will tell you whether the connection is working and the basic setup is correct. o (^) It takes a remote hostname or IP address as its argument.

Troubleshooting with the TRACEROUTE

Command

o Trace route is a network troubleshooting

utility which shows number of hops taken to

reach destination also determine packets

traveling path.

o Below we are tracing route to global DNS

server IP Address and able to reach destination

also shows path of that packet is traveling.

traceroute 4.2.2.

Troubleshooting with the NETSTAT

Command

o (^) Netstat (Network Statistic) command display connection info, routing table information etc. o (^) It is a command line tool for monitoring network connections both incoming and outgoing as well as viewing routing tables, interface statistics etc. o (^) It is available on all Unix-like Operating Systems and also available on Windows OS as well. o (^) is very useful in terms of network troubleshooting and performance measurement. o (^) is one of the most basic network service debugging tools, telling you what ports are open and whether any programs are listening on ports.

Troubleshooting with the ROUTE Command

o (^) Route command also shows and manipulate IP routing table. o (^) To see default routing table in Linux, type the following command. route o (^) Adding, deleting routes and default Gateway with following commands. o (^) Route Adding route add -net 10.10.10.0/24 gw 192.168.0. o (^) Route Deleting route del -net 10.10.10.0/24 gw 192.168.0. o (^) Adding default Gateway route add default gw 192.168.0.

Troubleshooting with the arp Command

o (^) The arp command is used to analyze problems with IP-to-Ethernet address translation. o (^) The arp command has three useful options for troubleshooting:

  • a Display all ARP entries in the table.
  • d hostname Delete an entry from the ARP table.
  • s hostname ether-address Add a new entry to the table. o (^) With these three options you can view the contents of the ARP table, delete a problem entry, and install a corrected entry. o (^) The ability to install a corrected entry is useful in “buying time” while you look for the permanent fix.