Classless Routing


Currently, the most acceptable method of routing is classless routing, which is deployed on the Internet. Classless routing differs from classful routing in that the IP addresses consist of a network number that is a combination of the network number and the subnet mask.

In the classless routing protocol, the subnet mask being advertised with the network information is not restricted to those defined by the address classes but can contain a variable number of bits to represent a network number. This further leads to aggregation of several networks into a single entry in a routing table and significantly reduces the routing overheads.

Classless routing protocols do not abide by the bit boundaries of the IP address class, which is different from classful routing protocols. Also, classless routing protocols have a field specifically to carry the subnet mask of the routes being advertised. Consider the example shown in Figure 6.4.

click to expand
Figure 6.4: RIPv2 configuration.

In Figure 6.4, three routers—Router1, Router2, and Router3—are configured in a RIPv2 configuration. The configuration of Router1 is shown in Listing 6.27.

Listing 6.27 Configuration of Router1

start example
Router1#conf t Router1(global)#interface fa0/0 Router1(global-if)#ip address 192.168.1.2 255.255.255.0 Router1(global-if)#no shut Router1(global)#interface loopback 1 Router1(global-if)#ip address 11.0.1.1 255.255.255.0 Router1(global)#interface loopback 2 Router1(global-if)#ip address 11.0.2.1 255.255.255.0 Router1(global-if)#exit Router1(global)#router rip Router1(global-router)#version 2 Router1(global-router)#network 192.168.1.0 Router1(global-router)#network 11.0.0.0
end example

The configuration of Router2 is shown in Listing 6.28.

Listing 6.28 Configuration of Router2

start example
Router2#conf t Router2(global)#interface fa0/0 Router2(global-if)#ip address 192.168.1.1 255.255.255.0 Router2(global-if)#no shut Router2(global)#interface fa0/1 Router2(global-if)#ip address 192.168.2.1 255.255.255.0 Router2(global-if)#no shut Router2(global-if)#exit Router2(global)# router rip Router2(global-router)#version 2 Router2(global-router)#network 192.168.1.0 Router2(global-router)#network 192.168.2.0
end example

The configuration of Router3 is shown in Listing 6.29.

Listing 6.29 Configuration of Router3

start example
Router3#conf t Router3(global)#interface fa0/0 Router3(global-if)#ip address 192.168.2.2 255.255.255.0 Router3(global-if)#no shut Router3(global)#interface loopback 1 Router3(global-if)#ip address 10.0.1.1 255.255.255.0 Router3(global)#interface loopback 2 Router3(global-if)#ip address 10.0.2.1 255.255.255.0 Router3(global)#interface loopback 3 Router3(global-if)#ip address 10.0.3.1 255.255.255.0 Router3(global)#interface fa0/1 Router3(global-if)#ip address 10.0.4.1 255.255.255.0 Router3(global-if)#no shut Router3(global-if)#exit Router3(global)# router rip Router3(global-router)#version 2 Router3(global-router)#network 192.168.2.0 Router3(global-router)#network 10.0.0.0
end example

To verify the RIPv2 protocol configuration, use the command show ip protocols. It also displays the RIP version packets that are being advertised and received by the routers, as shown in Listing 6.30.

Listing 6.30 Verifying RIPv2 Protocol Configuration

start example
Router1#sh ip protocols Routing Protocol is "rip" Sending updates every 30 seconds, next due in 21 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing:   rip Default version control: send version 2, receive version 2     Interface        Send  Recv   Key-chain     FastEthernet0      2     2 Routing for Networks:     192.168.1.0     11.0.0.0 Routing Information Sources:     192.168.1.1           120      00:00:0 Distance: (default is 120)
end example

Listing 6.31 shows the verifying of RIPv2 protocol configuration using the command show ip protocols for Router2.

Listing 6.31 Verifying RIPv2 Protocol Configuration Using the Command show ip protocols for Router2

start example
Router2#sh ip protocols Routing Protocol is "rip"   Sending updates every 30 seconds, next due in 31 seconds   Invalid after 180 seconds, hold down 180, flushed after 240   Outgoing update filter list for all interfaces is   Incoming update filter list for all interfaces is   Redistributing:   rip   Default version control: send version 2, receive version 2       Interface        Send Recv   Key-chain     FastEthernet0      2     2     FastEthernet0      2     2   Routing for Networks:     192.168.1.0     192.168.2.0   Routing Information Sources:     192.168.1.2           120      00:00:03     192.168.2.2           120      00:00:06   Distance: (default is 120)
end example

Listing 6.32 shows the verifying of RIPv2 protocol configuration using the command show ip protocols for Router3.

Listing 6.32 Verifying RIPv2 Protocol Configuration for Router3

start example
Router3#sh ip protocols Routing Protocol is "rip" Sending updates every 30 seconds, next due in 19 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing:   rip Default version control: send version 2, receive version 2 Interface      Send  Recv   Key-chain FastEthernet0  2     2 FastEthernet0  2     2 Routing for Networks: 10.0.0.0 192.168.2.0 Routing Information Sources: 192.168.2.1   120    00:00:09 Distance: (default is 120)
end example

Listing 6.33 shows debugging messages from Router1, Router2, and Router3 that display the way these routers multicast their routing updates to the multicast address 224.0.0.9. The command to debug a router RIP message is debug ip rip.

Listing 6.33 Debugging Using the debug ip rip Command on Router1

start example
Router1#debug ip rip RIP protocol debugging is on Router1# 00:23:43: RIP: received v2 update from 192.168.1.1 on fa0/0 00:23:44:   192.168.2.0/24 via 0.0.0.0 in 1 hops 00:23:44:   10.0.0.0/24 via 0.0.0.0 in 2 hops 00:23:50: RIP: sending v2 update to 224.0.0.9 via fa0/0  (192.168.1.2) 00:23:50: RIP: build update entries 00:23:50:   11.0.0.0/24 via 0.0.0.0, metric 1, tag 0
end example

Listing 6.34 shows the output of debug ip rip command for Router2.

Listing 6.34 Debugging Using debug ip rip Command on Router2

start example
Router2#debug ip rip RIP protocol debugging is on Router2# 00:23:43: RIP: received v2 update from 192.168.1.1 on fa0/0 00:23:44:   11.0.0.0/24 via 0.0.0.0 in 1 hops 00:23:43: RIP: received v2 update from 192.168.2.2 on fa0/0 00:23:44:   10.0.0.0/24 via 0.0.0.0 in 1 hops 00:23:50: RIP: sending v2 update to 224.0.0.9 via fa0/0  (192.168.1.1) 00:23:50: RIP: build update entries 00:23:50:   192.168.2.0/24 via 0.0.0.0, metric 1, tag 0 00:23:50: RIP: sending v2 update to 224.0.0.9 via fa0/0  (192.168.2.1) 00:23:50: RIP: build update entries 00:23:50:   192.168.1.0/24 via 0.0.0.0, metric 1, tag 0
end example

Listing 6.35 shows the output of debug ip rip command for Router3.

Listing 6.35 Debugging Using debug ip rip Command on Router3

start example
Router3#debug ip rip RIP protocol debugging is on Router3# 00:23:43: RIP: received v2 update from 192.168.2.1 on fa0/0 00:23:44:   192.168.1.0/24 via 0.0.0.0 in 1 hops 00:23:44:   11.0.0.0/24 via 0.0.0.0 in 2 hops 00:23:50: RIP: sending v2 update to 224.0.0.9 via fa0/0  (192.168.2.2) 00:23:50: RIP: build update entries 00:23:50:   10.0.0.0/24 via 0.0.0.0, metric 1, tag 0

In these debug messages, via 0.0.0.0 shows that the advertising router interface address is the best address through which to reach the advertise network.

To verify whether these routers were able to learn the topology using the RIPv2 protocol, check their routing tables. To check the routing tables of these routers, use the command show ip route, as shown in Listing 6.36.

end example

isting 6.36 Using the show ip route Command

start example
Router1#sh 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        U - per-user static route Gateway of last resort is not set   C  11.0.1.0/24 is directly connected, Loopback1   C  192.168.1.0/24 is directly connected, FastEthernet0/0   C  11.0.2.0/24 is directly connected, Loopback2   R  192.168.2.0/24 [120/1] via 192.168.1.1, 00:06:29, FastEthernet0/0   R  10.0.1.0/24 [120/2] via 192.168.1.1, 00:08:29, FastEthernet0/0   R  10.0.2.0/24 [120/2] via 192.168.1.1, 00:03:36, FastEthernet0/0   R  10.0.3.0/24 [120/2] via 192.168.1.1, 00:02:15, FastEthernet0/0   R  10.0.4.0/24 [120/2] via 192.168.1.1, 00:06:23, FastEthernet0/0   R  10.0.5.0/24 [120/3] via 192.168.1.1, 00:02:43, FastEthernet0/0
end example

Listing 6.36 shows the routing table calculated by Router1 for the topology being discussed. You cannot identify whether the router tracked the routes using an RIPv1 or RIPv2 routing protocol. All the routes tracked by the router will be identified using R.

RIPv2 Cannot Reach Discontiguous Networks

This section discusses the default state of autosummarization, which is active in the case of RIPv2. The scenario shows that RIPv2 using its default configuration cannot reach a discontiguous network. To facilitate communication between these discontiguous networks, you should disable the autosummary (by default, autosummary is active in RIPv1 and RIPv2). To understand this, take, for example, the scenario presented in Figure 6.5.

click to expand
Figure 6.5: Scenario depicting a discontiguous network.

In this scenario, Router1 is connected to networks belonging to a major network 10.0.0.0, and similarly, Router3 is connected to some subnets of the same network. The problem faced here is that Router3 is unable to ping 10.0.1.0 or 10.0.2.0 networks.

The configurations of the routers according to Figure 6.5 are discussed, followed by debug messages between them with their routing table. Listing 6.37 shows the configuration for Router1.

Listing 6.37 Configuration for Router1

start example
Router1#conf t Router1(config)#router rip Router1(config-router)#network 192.168.1.0 Router1(config-router)#network 10.0.0.0 Router1(config-router)#version 2
end example

Listing 6.38 shows the configuration for Router2.

Listing 6.38 Configuration for Router2

start example
Router2#conf t Router2(config)#router rip Router2(config-router)#network 192.168.1.0 Router2(config-router)#network 192.168.2.0 Router2(config-router)#version 2
end example

Listing 6.39 shows the configuration for Router3.

Listing 6.39 Configuration for Router3

start example
Router3#conf t Router3(config)#router rip Router3(config-router)#network 10.0.0.0 Router3(config-router)#network 192.168.2.0 Router3(config-router)#version 2
end example

Listing 6.40 shows the debug messages from the routers.

Listing 6.40 Debug messages for Router1

start example
Router1#debug ip rip 00:23:43: RIP: received v2 update from 192.168.1.1 on fa0/0 00:23:44:   10.0.0.0/24 via 0.0.0.0 in 2 hops 00:23:44:   192.168.2.0/24 via 0.0.0.0 in 1 hops 00:23:50: RIP: sending v2 update to 224.0.0.9 via fa0/0  (192.168.1.2) 00:23:50: RIP: build update entries 00:23:50:   10.0.0.0/24 via 0.0.0.0, metric 1, tag 0
end example

The debug messages in the Listing 6.40 for Router1 indicate that Router1 is advertising the major class network id (summarized network id) in its routing update, which is sent via the interface connected to a different major network id. Router1 also receives the routing update from Router2, which would carry the same summarized route but sent by Router3 to Router2. It will ignore the route information about network 10.0.0.0 sent by Router2, because it already has its interface connected to the 10.0.0.0 network.

Listing 6.41 shows the debug messages for Router3.

Listing 6.41 Debug Messages for Router3

start example
Router3#debug ip rip 00:23:43: RIP: received v2 update from 192.168.2.1 on fa0/0 00:23:44:   10.0.0.0/24 via 0.0.0.0 in 2 hops 00:23:44:   192.168.1.0/24 via 0.0.0.0 in 1 hops 00:23:50: RIP: sending v2 update to 224.0.0.9 via fa0/0  (192.168.2.2) 00:23:50: RIP: build update entries 00:23:50:   10.0.0.0/24 via 0.0.0.0, metric 1, tag 0
end example

Similarly, Router3 sends the summarized major network id in its update and receives the same from the update advertised by Router2. It will ignore the route information about network 10.0.0.0 sent by Router2, because it already has its interface connected to the 10.0.0.0 network. To understand the debug messages, let us look at the routing tables of the routers in Listings 6.42 and 6.43.

Listing 6.42 Routing Table for Router1

start example
Router1#sh 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        U - per-user static route Gateway of last resort is not set      10.0.0.0 is subnetted, 2 subnets   C  10.0.1.0/24 is directly connected, Loopback1   C  10.0.2.0/24 is directly connected, Loopback2   C  192.168.1.0/24 is directly connected, FastEthernet0/0   R  192.168.2.0/24 [120/1] via 192.168.1.1, 00:06:29, FastEthernet0/0
end example

Listing 6.43 shows the routing table for Router3.

Listing 6.43 Routing Table for Router3

start example
Router1#sh 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        U - per-user static route Gateway of last resort is not set      10.0.0.0 is subnetted, 3 subnets   C  10.0.3.0/24 is directly connected, Loopback1   C  10.0.4.0/24 is directly connected, Loopback2   C  10.0.5.0/24 is directly connected, Loopback2   C  192.168.2.0/24 is directly connected, FastEthernet0/0   R  192.168.1.0/24 [120/1] via 192.168.2.1, 00:06:29, FastEthernet0/0
end example

While sending the routing update to their neighbors, both Router1 and Router3 send major classful route information about network 10.0.0.0. These routers send this information because the interface used to send these updates belongs to a different major network than the advertised networks. Due to this, Router1 and Router3 assume that network boundaries for 10.0.0.0 end with them (classful routing property). Therefore, if you try and ping the IP address 10.0.1.1 or 10.0.2.1 from Router3, it is not successful.

Listing 6.44 shows the pinging IP address 10.0.1.1 for Router3.

Listing 6.44 Pinging IP Address 10.0.1.1 for Router3

start example
Router3#ping 10.0.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.0.1.1, timeout is 2 seconds: ..... Success rate is 0 percent (0/5), round-trip min/avg/max = 1/2/4 ms
end example

The debug messages indicate that the routing updates sent by Router1 and Router3 for networks like 10.0.1.0, 10.0.2.0, and so on are summarized to 10.0.0.0. As a result, routers do not maintain a proper routing table, which they should in case of RIPv2 protocol. To rectify this, configure every router with the command no auto-summary to avoid summarization of the routes. Configure this change in the router configuration mode. After the changes are made, the routers will receive the routing updates with the right subnet mask information and update the routing table. After the configuration changes, Router3 will communicate with the 10.0.1.0 and 10.0.2.0 networks. Listing 6.45 shows successful pinging of IP address 10.0.1.1 for Router3.

Listing 6.45 Pinging IP Address 10.0.1.1 for Router3 Successfully

start example
Router3#ping 10.0.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.0.1.1, timeout is 2 seconds: !!!!! Success rate is 0 percent (0/5), round-trip min/avg/max = 1/2/4 ms
end example

Compatibility Between RIPv1 and RIPv2

As per the scenario depicted in Figure 6.6, Router2 is running RIPv2 and Router1 is running RIPv1. The problem with this topology is that Router2 and Router1 are not learning their partner routes. Both these routers are ignoring the routing updates advertised by the peer router because they are different versions of routing protocols. This is more evident on observing the debug messages from these routers.

click to expand
Figure 6.6: Scenario in which Router1 is configured with RIPv1 and Router2 is configured with RIPv2.

Listing 6.46 shows the output of the debug ip rip command.

Listing 6.46 Debugging Router1 Using the debug ip rip Command

start example
Router1#debug ip rip RIP protocol debugging is on Router1# 00:23:43: RIP:  ignored v2 packet from 192.168.1.1 on fa0/0 00:23:50: RIP:  sending v1 update to 255.255.255.255 via fa0/1                 (192.168.1.2)                Subnet 11.0.0.0, metric 1
end example

Listing 6.47 shows the output of the debug ip rip command.

Listing 6.47 Debugging Router2 using the debug ip rip Command

start example
Router2#debug ip rip RIP protocol debugging is on Router2# 00:23:43: RIP:     ignored v1 packet from 192.168.1.2 on fa0/0 00:23:50: RIP: sending v2 update to 224.0.0.9 via fa0/0                 (192.168.1.2)                Subnet 10.0.0.0, metric 1
end example

These debug messages make it very clear that the routers are ignoring the routing updates sent by each other. To resolve this issue, configure one of the routers to advertise in the format the peer router will understand and also understand the routing update sent by the peer router. Listing 6.48 shows the changes made to the configuration of Router2 to send and receive the routing updates in the RIPv1 format while continuing to send and receive the original configured version, that is, the RIPv2 routing updates.

Listing 6.48 Reconfiguration for Router2

start example
Router2#conf t Router2(config)#router rip Router2(config-router)#network 10.0.0.0 Router2(config-router)#network 192.168.1.0 Router2(config-router)#exit Router2(config)#interface fa0/0 Router2(config-if)#ip rip send version 1 2 Router2(config-if)#ip rip receive version 1 2
end example

The configuration shown in Listing 6.48 ensures that both the routers will communicate and understand the other routing updates. Commands that can resolve compatibility issues between RIPv1 and RIPv2 are described in Table 6.4.

Table 6.4 : Commands to Resolve Compatibility Issues Between RIPv1 and RIPv2

Command

Utility

Router(config-router) #version {1 | 2}

Configures the software to receive and send only RIPv1 or only RIPv2 packets.

Router(config-if)#ip rip send version 1

Configures an interface to send only RIPv1 packets.

Router(config-if)#ip rip send version 2

Configures an interface to send only RIPv2 packets.

Router(config-if)#ip rip send version 1 | 2

Configures an interface to send RIPv1 and RIPv2 packets.

Router(config-if)# ip rip receive version 1

Configures an interface to accept only RIPv1 packets.

Router(config-if)# ip rip receive version 2

Configures an interface to accept only RIPv2 packets.

Router(config-if)# ip rip receive version 1|2

Configures an interface to accept either RIPv1 or RIPv2 packets.




Cisco IP Routing Protocols(c) Trouble Shooting Techniques
Cisco IP Routing Protocols: Trouble Shooting Techniques (Charles River Media Networking/Security)
ISBN: 1584503416
EAN: 2147483647
Year: 2006
Pages: 130

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net