Analyzing the Network

Roughly half of all the problems that your server can have are network related. So if your user complains that some important application cannot be reached, you need to check the availability of the network. This check contains different steps:

1. See whether your server has an IP address.

2. Check routing and DNS information.

3. Check your firewall.

Verifying IP Configuration

The first check to do when you have a problem with network connectivity is to check the IP address configuration. You should be aware that you can use two commands for that. First, you can use the ifconfig command, but you can also use the ip command. The funny thing is that these two do not always give the same result. Both will do fine with displaying the primary (or only) IP address that is assigned to an interface. For example, use ifconfig eth0 to find out what IP address eth0 is using, or use ip address show eth0 to do the same with the ip command. Both commands will give the same result. The difference occurs when more than one IP address is added to the same interface. An address added with the ifconfig command won't show when you use the ip command to check the current configuration, and an IP address that's added with the ip command doesn't show when checking it with the ifconfig command (check Figure 34-1 to see this happening). Therefore, if you are checking IP address configuration and you really want to be sure that you see it all, use both tools.

File Edit View Terminal Tabs Help

SLC:~ # ip address add dev ethO 192.168.0.10 SLC:~ # ip address show

1: lo: <L00PBACKTUP> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ethO: -¬°BROADCAST .MULTICAST TUP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:Oc:29:la:a8:ed brd ff:ff:ff:ff:ff:ff inet 192.168.1.18/24 brd 192.168.1.255 scope global ethO inet 192.168.0.10/32 scope global ethO inet6 feSO::20c:29ff:fela:a8ed/64 scope link valid_lft forever preferred_lft forever 3: sitO: <N0ARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 SLC:~ # ifconfig ethO

Link encap:Ethernet HWaddr 00:OC:29:1A:AS:ED

inet addr:192.168.1.18 Beast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fela:aSed/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:! RX packets',941 errors:0 dropped:0 overruns:0 frame'.O TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000

HX bytes:59371 (57.9 Kb) TX bytes:956 (956.0 b) Interrupt:177 Base address:0x1400

Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/12B Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:!

RX packets:376 errors:0 dropped:0 overruns:0 frame:0

TX packets:376 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

Figure 34-1. A secondary IP address added with the ip command doesn't show up with the ifconfig command.

Was this article helpful?

0 0

Post a comment