As you know by now, IP Addressing is an integral part of networking and given the complexity of addressing and subnetting, it is common to have IP addressing errors in the network. So it is essential for you to be able to troubleshoot common problems related to IP Addressing. Before troubleshooting a network, you have to understand the below given common protocols and utilities that are used to troubleshoot:
- Packet InterNet Grouper (PING) – Ping is one of the most commonly used utility that is used to troubleshoot addressing and connectivity problems. This utility is available in almost all operating systems, including Cisco devices and can be accessed by the command line interface using the ping command. It uses the ICMP protocol to check if the destination host is live or not.
- Traceroute – Traceroute is another common utility that is available with all operating systems. In some operating systems the utility can be access using the tracert or traceroute command on the CLI. It is used to find each hop between the source and destination hosts and is useful to see the path taken by a packet.
- ARP table – Sometimes it is useful to look at the ARP table of a system. This table contains the MAC address to IP address bindings learned by the system. On most operating systems the ARP table can be viewed using the arp –a command. On a Cisco device the arp table can be viewed using the show ip arp command.
- IP config – Sometimes, you need to verify the IP address, subnet mask, default gateway and DNS addresses the host is using. On a windows machine all this information can be seen in the output of the ipconfig /all command. On a unix based system, this information can be seen using the ifconfig command.
For the following section consider the network shown in Figure 2-6. In this network, HostA is trying to reach ServerA and ServerB but is not able to.
Before looking at the IP addressing, you should quickly check network connectivity using four steps that Cisco recommends:
1. Ping 127.0.0.1, the loopback address from the Host. You will need to open a terminal window of your operating system to use the ping utility. If you get an output similar to the following, it shows that the IP stack in the host is working well:
ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.073 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.096 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.095 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.145 ms
Figure 2-6 Troubleshooting IP Addressing Scenario
2. Ping the IP address of the host itself. If its successful then it shows that the host’s NIC is working well.
>ping 192.168.1.50
PING 192.168.1.50 (192.168.1.50): 56 data bytes
64 bytes from 192.168.1.50: icmp_seq=0 ttl=64 time=0.075 ms
64 bytes from 192.168.1.50: icmp_seq=1 ttl=64 time=0.096 ms
64 bytes from 192.168.1.50: icmp_seq=2 ttl=64 time=0.155 ms
64 bytes from 192.168.1.50: icmp_seq=3 ttl=64 time=0.151 ms
3. Ping the default gateway from the host. If the ping works it shows that your host is able to communicate with the network and the default gateway.
>ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=0.075 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.096 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.155 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.151 ms
4. Finally ping the remote host, ServerA or ServerB in our case. If the ping is successful, this means there is a DNS or application layer protocol problem between the host and ServerA. However, in our case the ping fails.
>ping 192.168.2.65
PING 192.168.2.65 (192.168.2.65): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Now that you have used the Cisco recommended way to determine that the problem lies in the network, it is time to look at the addressing. In this exercise, you need to look at the IP address, subnet mask and default gateway configured (as shown in Figure 2-6) to see if they are correctly configured. You can simply look at the subnet mask and see which are valid host addresses in that subnet to see if valid IP addresses have been configured. Take a step-by-step approach as shown below to narrow down the problem area:
- The Host has an IP address of 192.168.1.50/25. A mask of /25 shows that the host lies in the 192.168.1.0/25 subnet (/25 = 255.255.255.128, which gives two subnets – 0 and 128). So the IP address given to the host is a valid host address.
- The Gateway address on the host is 192.168.1.1 and that is the IP address on the Router interface connected to the network. The IP address lies in the same subnet range as the host address. Step 1 and Step 2 eliminate addressing problem in the network segment to which the host is connected.
- The next network segment is the point-to-point link between RouterA and RouterB. The subnet mask of /30 gives subnets 0,4,8,12….128. The valid host addresses in the network 192.168.1.128/30 are 192.168.1.129 and 192.168.1.130. So the point-to-point links have valid addresses.
- The next network segment is the one to which ServerA is connected. /26 mask converts to 255.255.255.192. 192 deducted from 256 leaves 64. This means the valid subnets are 192.168.2.0, 192.168.2.64, 192.168.2.128, 192.168.2.192. ServerA’s address is a valid address in the 192.168.2.64 subnet but the default gateway and the router’s address is in the 192.168.2.0 subnet. So ServerA’s address is in the wrong subnet and needs to be changed to a valid address in the 192.168.2.0 subnet. This explains why HostA is not able to reach ServerA.
- The final segment is the one to which ServerB connects. From the calculations done in the previous step, you can see that ServerB’s address lies in the 192.168.2.128 subnet. The valid host addresses in this subnet are 129 to 190. 191 is the broadcast address of the subnet. While the router (default gateway) is configured with a valid address, ServerB has been assigned the broadcast address, which needs to be changed. This explains why HostA is not able to reach ServerB.
If you are careful about going step-by-step and finding out valid addresses in each subnet, you can figure out any addressing problem in no time. Lets take a look at another example two examples. For these examples, we will use the network shown in Figure 2-7.
Figure 2-7 Troubleshooting IP Address – Example #2 & #3
Example #2
Problem: HostB is able to reach HostD but it is not able to reach HostA
Solution: The question tells us two things. First that HostB is able to reach HostD, that means the network from HostB all the way to HostD is working fine. Second, HostB is not able to reach HostA. It is simple to figure out that there is a problem at HostA. To find the problem, take a look at the IP address information given for HostA:
- A subnet mask of /27 coverts to 255.255.255.224.
- Deducting 224 from 256 gives us 32. So the valid host subnets are 0, 32, 64 and so on.
- HostB and RouterA’s address are in the 192.168.1.0/27 subnet that has a valid host range of 1 to 30. The broadcast address for this subnet is 192.168.1.31.
- You will notice that HostA has an IP address of 192.168.1.31/27, which is the broadcast address of this subnet and not a valid host address. Hence, HostA cannot be reached from the network.
Example #3
Problem: HostD is able to reach HostB but not HostC.
Solution: Again this problem statement tells us that the network from HostD to HostB is working well. So the problem requires a look at HostC’s addressing:
- Again, a mask of /27 gives us subnets 0, 32, 64, 96, 128 and so on.
- HostD and RouterB’s addresses lie in the 192.168.1.64/27 network. The valid host addresses for this subnet are 192.168.1.65-94. The broadcast address for the subnet is 192.168.1.95.
- The next subnet is 192.168.1.94/27 that has a valid host range of 192.168.1.95-192.168.1.127.
- You will notice that the IP address of HostC lies in the 192.168.1.94/27 subnet and not the 192.168.1.64/27 subnet. It lies it a different subnet that the default gateway (RouterB) and HostD. Hence, HostD is not able to reach HostC.
Broadcast Addresses
Broadcast and broadcast addresses are discussed many times in Chapter 1 and Chapter 2. Broadcast is a generic term meaning message or data sent to all hosts in a network while broadcast address is a generic term meaning an address to which broadcasts are sent. It is important to understand that not all broadcasts are same. They can be divided into two different types:
- Layer 2 broadcasts – These broadcasts are sent at layer 2 and are limited to a LAN. These do not cross the boundary of a LAN, which is defined by a router.
- Layer 3 broadcasts – These broadcasts are sent at layer 3 and go to the network.
You already know what unicast and multicast are but just to put them into perspective of broadcasts, these terms are defined below again:
- Unicast – Messages or data sent to a single host are called unicast.
- Multicast – Messages or data sent to a group of devices is called multicast.
Like broadcasts, broadcast addresses also differ based on the layer. The different types are discussed below:
- Layer 2 Broadcast Address – Layer 2 address are 48bit hexadecimal values. An example of layer 2 addresses is a3.4c.56.ea.f5.aa. Similarly, a layer 2 broadcast is a hexadecimal value of all Fs or a binary value of all 1s – FF.FF.FF.FF.FF.FF
- Layer 3 Broadcast Address – This chapter showed you that the last address of a subnet is a broadcast address such as 192.168.1.255/24. These addresses have all host bits on and refer to all hosts in that subnet. An address with all its bits turned on – 255.255.255.255 – is a special broadcast address that refers to all hosts in all networks.
A good example to understand how broadcast addresses are used, consider the following example of how a host requests IP address from a DHCP server:
- When a host boots up and needs to get an IP address from the DHCP server, it does not know if the DHCP server in this same LAN segment or across a router. So it sends a DHCP request with the destination IP address set to 255.255.255.255 and the destination MAC address set to FF.FF.FF.FF.FF.FF
- The layer 2 broadcast goes out to the LAN and if a DHCP server is connected to the segment, it will respond back.
- If the DHCP server is not on the segment, the router will see the packet and covert it into a unicast message and send it to the DHCP server. The router needs to be configured for this though.
- The DHCP will reply back with a unicast.
As the above example demonstrates, broadcast is very useful and can be converter to unicast when required.
Summary
This chapter is one of the most important chapters in this book and covers the most fundamental blocks of a network. IP Address Classes, Private and Public addresses and subnetting are very important for both the CCNA exam as well as for understanding the rest of the topics coming up
I cannot stress enough the importance of these topics and would strongly suggest you to go through it again and clarify any doubts you might have before moving ahead.