Friday 14 March 2014

RIPv1, RIPv2, EIGRP, OSPF summary

RIPv1

RIP (version 1) is a classful, distance vector routing protocol. RIPv1 was one of the first routing protocols developed for routing IP packets. RIP uses hop count for its metric, with a metric of 16 hops meaning that route is unreachable. As a result, RIP can only be used in networks where there are no more than fifteen routers between any two networks.

RIP messages are encapsulated in a UDP segment, with source and destination ports of 520. RIP routers send their complete routing tables to their neighbors every 30 seconds except for those routes which are covered by the split horizon rule.

RIP is enabled by using the router rip command at the global configuration prompt. The network command is used to specify which interfaces on the router will be enabled for RIP along with the classful network address for each directly connected network. The network command enables the interface to send and receive RIP updates and also advertises that network in RIP updates to other routers.

The debug ip rip command can be used to view the RIP updates that are sent and received by the router. To prevent RIP updates from being sent out an interface, such on a LAN where there are no other routers, the passive-interface command is used.

RIP entries are displayed in the routing table with the source code of R and have an administrative distance of 120. Default routes are propagated in RIP by configuring a static default route and using the default-information originate command in RIP.

RIPv1 automatically summarizes subnets to their classful address when sending an update out an interface that is on a different major network than the subnetted address of the route. Because RIPv1 is a classful routing protocol, the subnet mask is not included in the routing update. When a router receives a RIPv1 routing update, RIP must determine the subnet mask of that route. If the route belongs to the same major classful network as the update, RIPv1 applies the subnet mask of the receiving interface. If the route belongs to a different major classful network than the receiving interface, RIPv1 applies the default classful mask.

The show ip protocols command can be used to display information for any routing protocol enabled on the router. Regarding RIP, this command displays timer information, status of automatic summarization, which networks are enabled on this router for RIP, and other information.

Because RIPv1 is a classful routing protocol, it does not support discontiguous networks or VLSM. Both of these topics are discussed in Chapter 7, "RIPv2".

RIPv2

RIPv2 is a classless, distance vector routing protocol, that is defined in RFC 1723. Because RIPv2 is a classless routing protocol, it includes the subnet mask with the network addresses in the routing updates. As with other classless routing protocols, RIPv2 supports CIDR supernets, VLSM and discontiguous networks.

We saw that classful routing protocols like RIPv1 can not support discontiguous networks because they automatically summarize at major network boundaries. A router that receives routing updates from multiple routers advertising the same classful summary route cannot determine which subnets belong to which summary route. This inability leads to unexpected results including misrouted packets.

The default version of RIP is version 1. The command version 2 is used to modify RIP to RIPv2.

Similar to RIPv1, RIPv2 automatically summarizes at major network boundaries. However, with RIPv2 automatic summarization can be disabled with the no auto-summary command. Automatic summarization must be disabled to support discontiguous networks. RIPv2 also supports CIDR supernets and VLSM because the specific subnet mask is included with the network address in every routing update. You can use the debug ip rip command to view the RIP update sending the subnet mask with the network address as part of the route entry.

The show ip protocols command will display that RIP is now sending and receiving version 2 updates and whether or not automatic summarization is in effect.

EIGRP
EIGRP (Enhanced Interior Gateway Routing Protocol) is a classless, distance vector routing protocol released in 1992 by Cisco Systems. EIGRP is a Cisco proprietary routing protocol and an enhancement of another Cisco propriety protocol IGRP (Interior Gateway Routing Protocol). IGRP is a classful, distance vector routing protocol which is no longer supported by Cisco. EIGRP uses the source code of "D" for DUAL in the routing table. EIGRP has a default administrative distance of 90 for internal routes and 170 for routes imported from an external source, such as default routes.

EIGRP used PDMs (Protocol Dependent Modules) giving it the capability to support different layer 3 protocols including IP, IPX and AppleTalk. EIGRP uses RTP (Reliable Transport Protocol) as the transport layer protocol for the delivery of EIGRP packets. EIGRP uses reliable delivery for EIGRP updates, queries and replies; and uses unreliable delivery for EIGRP hellos and acknowledgments. Reliable RTP means an EIGRP acknowledgment must be returned.

Before any EIGRP updates are sent, a router must first discover their neighbors. This is done with EIGRP hello packets. On most networks EIGRP sends hello packets every 5 seconds. On multipoint nonbroadcast multiaccess networks (NBMA) such as X.25, Frame Relay, and ATM interface with access links of T1 (1.544 Mbps) or slower, Hellos are sent every 60 seconds. The hold time is three times the hello, or 15 seconds on most networks and 180 seconds on low speed NBMA networks.

The hello and hold-down values do not need to match for two routers to become neighbors. The show ip eigrp neighbors command is used to view the neighbor table and verify that EIGRP has established an adjacency with its neighbors.

EIGRP does not send periodic updates like RIP. EIGRP sends partial or bounded updates, which includes only the route changes and only to those routers that are affected by the change. EIGRP composite metric uses bandwidth, delay, reliability and load to determine best path. By default only bandwidth and delay are used. The default calculation is the slowest bandwidth plus the sum of the delays of the outgoing interfaces from the router to the destination network.

At the center of EIGRP is DUAL (Diffusing Update Algorithm). The DUAL finite state machine is used to determine best path and potential backup paths to every destination network. The successor is a neighboring router that is used to forward the packet using the least-cost route to the destination network. Feasible distance (FD) is the lowest calculated metric to reach the destination network through the successor. A feasible successor (FS) is a neighbor who has a loop-free backup path to the same network as the successor, and also meets the feasibility condition. The feasibility condition (FC) is met when a neighbor's reported distance (RD) to a network is less than the local router's feasible distance to the same destination network. The reported distance is simply an EIGRP neighbor's feasible distance to the destination network.

EIGRP is configured with the router eigrpautonomous-system command. The autonomous-system value is actually a process-id and must be the same on all routers in the EIGRP routing domain. The network command is similar to that used with RIP. The network is the classful network address of the directly connected interfaces on the router. A wildcard mask is an optional parameter that can be used to include only specific interfaces.

There are several ways to propagate a static default route with EIGRP. The redistribute static command in EIGRP router mode is a common method.


OSPF

OSPF (Open Shortest Path First) is a classless, link-state routing protocol. The current version of OSPF for IPv4 is OSPFv2 introduced in RFC 1247 and updated in RFC 2328 by John Moy. In 1999, OSPFv3 for IPv6 was published in RFC 2740.

OSPF has a default administrative distance of 110, and is denoted in the routing table with a route source code of O. OSPF is enabled with the router ospf process-id global configuration command. The process-id is locally significant, which means that it does not have to match other OSPF routers in order to establish adjacencies with those neighbors.

The network command used with OSPF has the same function as when used with other IGP routing protocols, but with slightly different syntax.

Router(config-router)#network network-address wildcard-mask area area-id

The wildcard-mask is the inverse of the subnet mask, and the area-id should be set to 0.

OSPF does not use a transport layer protocol, as OSPF packets are sent directly over IP. The OSPF Hello packet is used by OSPF to establish neighbor adjacencies. By default, OSPF Hello packets are sent every 10 seconds on multiaccess and point-to-point segments and every 30 seconds on non-broadcast multiaccess (NBMA) segments (Frame Relay, X.25, ATM). The Dead interval is the period of time an OSPF router will wait before terminating adjacency with a neighbor. The Dead interval is four times the Hello interval, by default. For multiaccess and point-to-point segments, this period is 40 seconds. For NBMA networks, the Dead interval is 120 seconds.

For routers to become adjacent, their Hello interval, Dead interval, network types and subnet masks must match. The show ip ospf neighbors command can be used to verify OSPF adjacencies.

The OSPF router ID is used to uniquely identify each router in the OSPF routing domain. Cisco routers derive the router ID based on three criteria and with the following precedence:

1. Use the IP address configured with the OSPF router-id command.

2. If the router-id is not configured, the router chooses highest IP address of any of its loopback interfaces.

3. If no loopback interfaces are configured, the router chooses highest active IP address of any of its physical interfaces.

RFC 2328 does not specify which values should be used to determine the cost. Cisco IOS uses the cumulative bandwidths of the outgoing interfaces from the router to the destination network as the cost value.

Multiaccess networks can create two challenges for OSPF regarding the flooding of LSAs, including the creation of multiple adjacencies - one adjacency for every pair of routers, and extensive flooding of LSAs (Link-State Advertisements). OSPF elects a DR (Designated Router) to act as collection and distribution point for LSAs sent and received in the multiaccess network. A BDR (Backup Designated Router) is elected to take over the role of the DR should the DR fail. All other routers are known as DROthers. All routers send their LSAs to the DR, which then floods the LSA to all other routers in the multiaccess network.

The router with the highest router ID is the DR, and the router with the second highest router ID is the BDR. This can be superseded by the ip ospf priority command on that interface. By default, the ip ospf priority is "1" on all multiaccess interfaces. If a router is configured with a new priority value, the router with the highest priority value is the DR, and next-highest the BDR. A priority value of "0" means the router is ineligible to become the DR or BDR.

A default route is propagated in OSPF similar to that of RIP. The OSPF router mode command, default-information originate is used to propagate a static default route.

The show ip protocols command is used to verify important OSPF configuration information, including the OSPF process ID, the router ID and the networks the router is advertising.

No comments:

Post a Comment