Discontiguous Networks Using RIP and IGRP

In Figure 3-2, network 168.71.0.0 is no longer contiguous. It is separated by a serial link that has a different major network—168.72.0.0. This will cause both routers to summarize their subnets of 168.71.0.0 when sending advertisements. Summarization is explained in more detail later in this chapter.

Figure 3-2. Simplified network using different major network addresses.


For RIP, this means that neither router can reach the other's subnet of 168.71.0.0. The section on RIP that follows demonstrates this concept.

Note

For IGRP, the answer should have been the same as for RIP—neither router should have been able to reach the other's subnet of 168.71.0.0. However, while I was writing this book, an anomaly was discovered in IGRP that has since been fixed. This anomaly allowed IGRP to accept summarized routes for major networks when it should not have done so. The section on IGRP and discontiguous networks was left as originally written, with the anomaly still in effect.

The nature of the anomaly provides a great opportunity to discuss some interesting and fairly subtle IP connectivity problems and the methodologies used to track them down. More information on the anomaly is provided at the end of the IGRP section.


Before proceeding any further on the effects of discontiguous networks, the following fundamental principles need to be introduced:

  • Understanding how a router derives the correct masks

  • Understanding summarization

  • Understanding subnet 0

  • Summarized routes versus subnet 0

  • Summarization caused by discontiguous networks in action

Understanding How a Router Derives the Correct Masks

Even when they are not dealing with discontiguous networks, routers running RIP V1 and IGRP must determine which masks to associate with the networks and subnetworks for which they receive route advertisements. When discontiguous networks are added to the picture, this process takes on even more significance. The normal methods these two protocols use to derive masks do not work properly with discontiguous networks. Later sections in this chapter explain these problems in more detail.

Routers receiving a RIP V1 or IGRP routing advertisement use two methods for deriving the correct mask to associate in the advertisement, as follows:

  1. Advertisements for subnets that are part of the same major network as the IP address of the interface they are received over will have the subnet mask of the receiving interface applied to them.

  2. All other networks in the advertisement should be for major networks, not subnets. This is because the router sending the advertisement should have summarized the subnets down to the major network before sending the advertisement. Therefore, the masks for all other networks should be the default mask for the class of address received.

In Figure 3-3, RouterA sends an advertisement for subnet 168.71.5.0 to RouterB as an example of what can go wrong when a router advertises subnets over a major net boundary. RouterB sees that 168.71.5.0 is in a different major net than its IP address on serial 0. RouterB knows that 168.71.5.0 is not a major net because it has bits set in the third byte (Class B address major net advertisements should have bits set only in the first two bytes).

Figure 3-3. Advertising a subnet by mistake.


RouterB has a few choices: ignore the route advertisement; install it with a mask of 255.255.255.255, indicating that it is a host route (has a full mask); or try to guess what mask should be used.

Attempting to guess the correct mask is difficult due to the many possible ways a subnet advertisement can be masked. Mask ambiguity is a situation in which a router can use many different masks on a subnet for which it receives an advertisement (see Figure 3-4).

Figure 3-4. Many possible masks.


RouterB would analyze subnet 168.71.5.0, as shown in Figure 3-5. The bits for 1 and 4 must be set in the mask because these bits are set in the route advertisement and therefore must be set in the associated mask as well. Remember that 00000101 equals 5 in decimal notation. Subnet 168.71.5.0 can be masked in 65 ((26 )+1) additional ways because 6 bits are left in the third byte that may be either 0 or 1. The +1 is added to the formula because all eight bits can be set to 1 as well. The number 65 assumes that the mask on the fourth octet is made up of all 0s.

Figure 3-5 shows an example of a mask that uses non-contiguous bits and does not work from left to right. This is a valid mask as far as IP addressing is concerned. However, as of 9.1, Cisco IOS supports only contiguous masks working from left to right.

Figure 3-5. Masking from right to left instead of left to right.


Some vendors' implementations of IP masks do not have to be created working from left to right and do not have to utilize contiguous bits. However, it is highly discouraged to create masks that are not based on this model.

Note

RFCs 950 and 1219 are good references on subnet allocation. RFC 1219 states the following: "While RFC 950 allows the ones in the subnet mask to be non-contiguous, RFC 950 recommends that 1) they be contiguous and 2) that they occupy the most significant bits of the host portion of the Internet address." RFC 1219 also states that "RFC 950 did not specify whether different subnets of the same network may have different masks. This ambiguity was unfortunate, as it resultedin the development of routing protocols that do not support different masks"—specifically, RIP V1 and IGRP.

When deriving a major net mask, there is very little ambiguity in interpreting an advertised route if only the major network bits are used. In Figure 3-6, the only two choices are that 168.71.0.0 is a major network advertisement or that it is an advertisement of subnet 0. Subnet 0 is explained in the next section.


Figure 3-6. Deriving a mask for a major net.


Understanding Summarization (Summarized Routes)

Summarization is the process of advertising only the major network portion of subnets in a routing table. Figure 3-7 shows routers summarizing subnets.

Figure 3-7. Routers summarizing subnets.


Routers running RIP V1 or IGRP make decisions on whether to summarize a subnet based on the following rules:

  1. If a network or subnet in the table is part of the same network address space (major net) and has the same mask as the outbound interface, it is advertised over the interface.

  2. If a network or subnet is part of the same major net as the outbound interface but has a different mask, it is not advertised.

  3. If a network or subnet is part of a different address space, the outbound interface mask is ignored and only the summarized major network portion of the route is advertised.

Understanding Subnet 0

Subnet 0 refers to the use of 0s in the subnet portion of an address covered by the subnet mask. In the following simple example of subnet 0, the subnet mask covers all bits in the third octet:

Network address 168.71.0.0 = 10101000.01000111.00000000.00000000
Possible mask 255.255.255.0 = 11111111.11111111.11111111.00000000

The IP address in this minitable is an example of subnet 0 because none of the bits in the third octet are turned on. If a router had this address configured on an interface and needed to advertise it with either RIP or IGRP, it would send out only the major network 168.71.0.0. A more complicated example of subnet 0 is shown in the following minitable. Here, the subnet mask covers all bits in the third octet and six of the bits in the fourth octet:

Network address 220.220.220.2 = 11011100.11011100.11011100.00000010
Possible mask 255.255.255.252 = 11111111.11111111.11111111.11111100

The preceding minitable shows a more complicated example of subnet 0 because bits within the first three octets are already used as part of the Class C Internet address. This means that subnets must be created using only the fourth byte. In this case, subnet 0 means that none of the 6 bits in the fourth byte covered by the mask of 252 are set to 1.

If a router advertised this subnet using RIP V1 or IGRP, the advertisement would be 220.220.220.0—the same as for the major net.

Summarized Routes Versus Subnet 0

Summarized routes look exactly like subnet 0 to routers running RIP V1 and IGRP. In Figure 3-8 and Table 3-1, you can see that as far as RouterA is concerned, the two advertisements are identical. This is because, as previously mentioned, neither RIP V1 nor IGRP includes a mask with the routes it advertises.

Figure 3-8. Sending a summarized route.


From a routing perspective, there is no difference between subnet 0 and the summarized route for 168.71.0.0, as shown in Table 3-1.

Table 3-1. Binary Example of Subnet 0 Versus a Summarized Route
Subnet 0
Network address 168.71.0.0 = 10101000.01000111.00000000.00000000
Subnet 0 mask 255.255.255.0 = 11111111.11111111.11111111.00000000
Summarized Route
Network address 168.71.0.0 = 10101000.01000111.00000000.00000000
Summarised mask 255.255.0.0 = 11111111.11111111.00000000.00000000

Summarization Caused by Discontiguous Networks in Action

This section provides real-life examples of summarization in action using RIP and IGRP.

Both routers have their configuration modified for the additional major network (see Figure 3-9). The show interface commands below the configuration commands show the new major net in place.

Figure 3-9. A reminder that a new major net has been configured on the serial link.



RouterA#conf t
RouterA#-config#interface s0
RouterA#-config-if# ip address 168.72.6.1 255.255.255.0
RouterA#-config-if#^Z
RouterA#

RouterA#show interface serial 0
Serial0 is up, line protocol is up
 Hardware is HD64570
 Internet address is 168.72.6.1 255.255.255.0
 MTU 1500 bytes, BW 128 Kbit, DLY 20000 usec, rely 255/255, load 1/255

RouterB#conf t
RouterB#-config#interface s0
RouterB#-config-if# ip address 168.72.6.2 255.255.255.0
RouterB#-config-if#^Z
RouterB#

RouterB#show interface serial 0
Serial0 is up, line protocol is up
 Hardware is HD64570
 Internet address is 168.72.6.2 255.255.255.0
 MTU 1500 bytes, BW 128 Kbit, DLY 20000 usec, rely 255/255, load 1/255

The portion of the configuration for adding 168.72.0.0 to the routing tables is the same for both routers. It is as follows:


!
router rip
network 168.71.0.0
network 168.72.0.0
!

RIP Cannot Reach Discontiguous Subnets

Routers running RIP ignore summarized routes for networks to which they have connections, which is one reason why RIP doesn't work with discontiguous networks (see Figure 3-10).

Figure 3-10. Summarized routes being advertised.


Recall that routers running RIP examine the network number and mask associated with an interface before advertising routes from the routing table over it. This was discussed previously in the section on understanding summarized routes.

In the following output of debug ip rip from RouterA, you can see RouterA sending and receiving advertisements for 168.71.0.0 with a metric of 1:


RouterA#deb ip rip
RIP: received update from 168.72.6.2 on Serial0
   168.71.0.0 in 1 hops
RIP: sending update to 255.255.255.255 via Serial0 (168.72.6.1)
   network 168.71.0.0, metric 1

In the following routing table from RouterA, you can see that RouterA does not have a route installed to 168.71.0.0, even though RouterB is advertising it:


RouterA#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
   D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
   E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
   i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default

Gateway of last resort is 171.68.207.129 to network 10.0.0.0

168.72.0.0 255.255.255.0 is subnetted, 1 subnets
C    168.72.6.0 is directly connected, Serial0
   168.71.0.0 255.255.255.0 is subnetted, 1 subnets
C    168.71.5.0 is directly connected, Ethernet0
RouterA#

In the following output of debug ip rip from RouterB, you can see RouterB sending and receiving advertisements for 168.71.0.0 with a metric of 1:


RouterB#deb ip rip
RIP: received update from 168.72.6.1 on Serial0
   168.71.0.0 in 1 hops
RIP: sending update to 255.255.255.255 via Serial0 (168.72.6.2)
   network 168.71.0.0, metric 1

In the following routing table from RouterB, you can see that RouterB does not have a route installed to 168.71.0.0, even though RouterA is advertising it:


RouterB#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
   D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
   E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
   i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default

Gateway of last resort is 168.72.6.1 to network 0.0.0.0

  168.72.0.0 255.255.255.0 is subnetted, 1 subnets
C   168.72.6.0 is directly connected, Serial0
C  168.71.0.0 is directly connected, TokenRing0
RouterB#

In the following output of the show interface command from RouterB, you can see that RouterB has 168.71.0.1 configured on Token Ring 0:


RouterB#show interface tokenring 0
TokenRing0 is up, line protocol is up
  Hardware is TMS380, address is 0000.3062.676d (bia 0000.3062.676d)
  Internet address is 168.71.0.1 255.255.255.0
  MTU 4464 bytes, BW 16000 Kbit, DLY 630 usec, rely 255/255, load 1/255

In the following output from RouterA, you can see that RouterA cannot ping 168.71.0.1, even though RouterB is advertising 168.71.0.0:


RouterA#ping 168.71.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 168.71.0.1, timeout is 2 seconds:
…..
Success rate is 0 percent (0/5)
RouterA#

This section has explained why using discontiguous networks with RIP does not work.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.147.124