Chapter 7: Routing Dynamically Routing & Switching
The Evolution of Dynamic Routing Protocols Dynamic routing protocols used in networks since the late 1980s Newer versions support the communication based on IPv6 Routing Protocols Classification 2
Purpose of Dynamic Routing Protocols Routing Protocols are used to facilitate the exchange of routing information between routers. The purpose of dynamic routing protocols includes: Network discovery Update and maintain routing tables Choosing the best path to destination networks Ability to find a new best path if the current path is no longer available 3
Purpose of Dynamic Routing Protocols Main components of dynamic routing protocols include: Data structures - Routing protocols typically use tables or databases for its operations. This information is kept in RAM. Routing protocol messages - Routing protocols use various types of messages to discover neighboring routers, exchange routing information, and other tasks to learn and maintain accurate information about the network. Algorithm - Routing protocols use algorithms for facilitating routing information for best path determination. 4
The Role of Dynamic Routing Protocols Advantages of dynamic routing include: Automatically share information about remote networks. Suitable in all topologies where multiple routers are required. Automatically adapts topology to reroute traffic if possible. Determine the best path to each network and add this information to their routing tables. Compared to static routing, dynamic routing protocols require less administrative overhead. Generally independent of the network size. Best for large networks. Help the network administrator manage the time-consuming process of configuring and maintaining static routes. 5
The Role of Dynamic Routing Protocols Disadvantages of dynamic routing include: Part of a router s resources are dedicated for protocol operation, including CPU time and network link bandwidth. Requires additional CPU, RAM, and link bandwidth. Times when static routing is more appropriate. Can be more complex to implement. Less secure. Additional configuration settings are required to secure. Route depends on the current topology. 6
Dynamic verses Static Routing Networks typically use a combination of both static and dynamic routing. Static routing has several primary uses: Providing ease of routing table maintenance in smaller networks that are not expected to grow significantly. Routing to and from a stub network. A network with only one default route out and no knowledge of any remote networks. Accessing a single default router. This is used to represent a path to any network that does not have a match in the routing table. Less routing overhead. 7
The Role of Static Routing Protocols Advantages of static routing include: Easy to implement in a small network. Very secure. No advertisements are sent as compared to dynamic routing protocols. No routing algorithm or update mechanism required. Extra resources (CPU or RAM) are not required. Disadvantages of static routing include: Suitable only for simple topologies or for special purposes such as a default static route. Configuration complexity increases dramatically as network grows. Manual intervention required to re-route traffic. 8
Dynamic Routing Protocol Operation In general, the operations of a dynamic routing protocol can be described as follows: 1. The router sends and receives routing messages on its interfaces. 2. The router shares routing messages and routing information with other routers that are using the same routing protocol. 3. Routers exchange routing information to learn about remote networks. 4. When a router detects a topology change the routing protocol can advertise this change to other routers. 9
Cold Start Routers running RIPv2 R1 adds the 10.1.0.0 network available through interface FastEthernet 0/0 and 10.2.0.0 is available through interface Serial 0/0/0. R2 adds the 10.2.0.0 network available through interface Serial 0/0/0 and 10.3.0.0 is available through interface Serial 0/0/1. R3 adds the 10.3.0.0 network available through interface Serial 0/0/1 and 10.4.0.0 is available through interface FastEthernet 0/0. 10
Network Discovery Routers running RIPv2 R1: Sends an update about network 10.1.0.0 out the Serial0/0/0 interface. Sends an update about network 10.2.0.0 out the FastEthernet0/0 interface. Receives update from R2 about network 10.3.0.0 with a metric of 1. Stores network 10.3.0.0 in the routing table with a metric of 1. 11
Network Discovery Routers running RIPv2 R2: Sends an update about network 10.3.0.0 out the Serial 0/0/0 interface. Sends an update about network 10.2.0.0 out the Serial 0/0/1 interface. Receives an update from R1 about network 10.1.0.0 with a metric of 1. Stores network 10.1.0.0 in the routing table with a metric of 1. Receives an update from R3 about network 10.4.0.0 with a metric of 1. Stores network 10.4.0.0 in the routing table with a metric of 1. 12
Network Discovery Routers running RIPv2 R3: Sends an update about network 10.4.0.0 out the Serial 0/0/1 interface. Sends an update about network 10.3.0.0 out the FastEthernet0/0. Receives an update from R2 about network 10.2.0.0 with a metric of 1. Stores network 10.2.0.0 in the routing table with a metric of 1. 13
Exchanging the Routing Information Routers running RIPv2 R1: Sends an update about network 10. 1. 0. 0 out the Serial 0/0/0 interface. Sends an update about networks 10. 2. 0. 0 and 10. 3. 0. 0 out the FastEthernet0/0 interface. Receives an update from R2 about network 10. 4. 0. 0 with a metric of 2. Stores network 10. 4. 0. 0 in the routing table with a metric of 2. Same update from R2 contains information about network 10. 3. 0. 0 with a metric of 1. There is no change; therefore, the routing information remains the same. 14
Exchanging the Routing Information Routers running RIPv2 R2: Sends an update about networks 10. 3. 0. 0 and 10. 4. 0. 0 out of Serial 0/0/0 interface. Sends an update about networks 10. 1. 0. 0 and 10. 2. 0. 0 out of Serial 0/0/1 interface. Receives an update from R1 about network 10. 1. 0. 0. There is no change; therefore, the routing information remains the same. Receives an update from R3 about network 10. 4. 0. 0. There is no change; therefore, the routing information remains the same. 15
Exchanging the Routing Information Routers running RIPv2 R3: Sends an update about network 10. 4. 0. 0 out the Serial 0/0/1 interface Sends an update about networks 10. 2. 0. 0 and 10. 3. 0. 0 out the FastEthernet0/0 interface Receives an update from R2 about network 10. 1. 0. 0 with a metric of 2 Stores network 10. 1. 0. 0 in the routing table with a metric of 2 Same update from R2 contains information about network 10. 2. 0. 0 with a metric of 1. There is no change; therefore, the routing information remains the same. 16
Achieving Convergence The network is converged when all routers have complete and accurate information about the entire network: Convergence time is the time it takes routers to share information, calculate best paths, and update their routing tables. the amount of time for the routing tables to achieve a consistent state after a topology change. A network is not completely operable until the network has converged. Convergence properties include the speed of propagation of routing information and the calculation of optimal paths. The speed of propagation refers to the amount of time it takes for routers within the network to forward routing information. Generally, older protocols, such as RIP, are slow to converge, whereas modern protocols, such as EIGRP and OSPF, converge more quickly. 17
Classifying Routing Protocols 18
IGP and EGP Routing Protocols Interior Gateway Protocols (IGP) - Used for routing within an AS Include RIP, EIGRP, OSPF, and IS-IS Exterior Gateway Protocols (EGP) - Used for routing between AS Official routing protocol used by the Internet 19
Distance Vector Routing Protocols For R1, 172.16.3.0/24 is one hop away (distance). It can be reached through R2 (vector). Distance vector IPv4 IGPs: RIPv1 - First generation legacy protocol RIPv2 - Simple distance vector routing protocol IGRP - First generation Cisco proprietary protocol (obsolete) EIGRP - Advanced version of distance vector routing 20
Distance Vector or Link-State Routing Protocols Distance vector protocols use routers as sign posts along the path to the final destination. A link-state routing protocol is like having a complete map of the network topology. The sign posts along the way from source to destination are not necessary, because all linkstate routers are using an identical map of the network. A link-state router uses the link-state information to create a topology map and to select the best path to all destination networks in the topology. 21
Link-State Routing Protocols Link-state IPv4 IGPs: OSPF - Popular standards based routing protocol IS-IS - Popular in provider networks. 22
Border Gateway Protocol BGP was developed as an exterior gateway protocol to interconnect different Internet providers. 23
Classful Routing Protocols Classful routing protocols do not send subnet mask information in their routing updates: Only RIPv1 and IGRP are classful. Created when network addresses were allocated based on classes (class A, B, or C). Cannot provide variable length subnet masks (VLSMs) and classless interdomain routing (CIDR). Create problems in discontiguous networks 24
Classless Routing Protocols Classless routing protocols include subnet mask information in the routing updates: RIPv2, EIGRP, OSPF, and IS_IS Support VLSM and CIDR IPv6 routing protocols 25
Routing Protocol Characteristics 26
Routing Protocol Metrics A metric is a measurable value that is assigned by the routing protocol to different routes based on the usefulness of that route: Used to determine the overall cost of a path from source to destination. Routing protocols determine the best path based on the route with the lowest cost. 27
Distance Vector Technologies Distance vector routing protocols: Share updates between neighbors Not aware of the network topology Some send periodic updates to broadcast IP 255.255.255.255 even if topology has not changed Updates consume bandwidth and network device CPU resources RIPv2 and EIGRP use multicast addresses EIGRP will only send an update when topology has changed 28
Distance Vector Algorithm RIP uses the Bellman-Ford algorithm as its routing algorithm. IGRP and EIGRP use the Diffusing Update Algorithm (DUAL) routing algorithm developed by Cisco. 29
Routing Information Protocol Routing updates broadcasted every 30 seconds Updates use UDP port 520 RIPng is based on RIPv2 with a 15 hop limitation and the administrative distance of 120 30
Enhanced Interior-Gateway Routing Protocol EIGRP: Is bounded triggered updates Uses a Hello keepalives mechanism Maintains a topology table Supports rapid convergence Is a multiple network layer protocol support 31
Router RIP Configuration Mode Advertising Networks 32
Examining Default RIP Settings 33
RIP Which route is the best match for a packet entering a router with a destination address of 10.16.0.2? S 10.16.0.0/24 [1/0] via 192.168.0.9 What two actions result from entering the network 192.168.1.0 command in RIP configuration mode on a router? The network address 192.168.1.0 is advertised to the neighbor routers. Routing updates are sent through all the interfaces belonging to 192.168.1.0. 34
Enabling RIPv2 35
Disabling Auto Summarization Similarly to RIPv1, RIPv2 automatically summarizes networks at major network boundaries by default. To modify the default RIPv2 behavior of automatic summarization, use the no auto-summary router configuration mode command. This command has no effect when using RIPv1. When automatic summarization has been disabled, RIPv2 no longer summarizes networks to their classful address at boundary routers. RIPv2 now includes all subnets and their appropriate masks in its routing updates. The show ip protocols now states that automatic network summarization is not in effect. 36
RIP Based on the partial output from the show ip route command, what two facts can be determined about the RIP routing protocol? A. RIP version 2 is running on this router and its RIP neighbor. B. The metric to the network 172.16.0.0 is 120. C. RIP version 1 is running on this router and its RIP neighbor. D. The command no auto-summary has been used on the RIP neighbor router. E. RIP will advertise two networks to its neighbor. 37
RIP Based on the partial output from the show ip route command, what two facts can be determined about the RIP routing protocol? (Choose two.) A. RIP version 2 is running on this router and its RIP neighbor. B. The metric to the network 172.16.0.0 is 120. C. RIP version 1 is running on this router and its RIP neighbor. D. The command no auto-summary has been used on the RIP neighbor router. E. RIP will advertise two networks to its neighbor. 38
Configuring Passive Interfaces Allows a router to receive routing updates on an interface but not send updates via that interface Sending out unneeded updates on a LAN impacts the network in three ways: Wasted Bandwidth Wasted Resources Security Risk 39
Advertising IPv6 Networks (RIPng) 40
Examining the RIPng Configuration 41
RIP What command instructs the router to propagate a static default route. default-information originate What command is used in RIP router configuration mode to enable the sending of subnet masks with the routing updates. version 2 42
Open Shortest Path First Protocols Which two events will trigger the sending of a link-state packet by a link-state routing protocol? A change in the topology The initial startup of the routing protocol process 43
Link-State Dijkstra s Algorithm Calculates its metric using bandwidth Uses Dijkstra's algorithm to build the SPF tree 44
Link-State Routing Process Which two requirements are necessary before a router configured with a link-state routing protocol can build and send its link-state packets? The router has determined the costs associated with its active links. The router has established its adjacencies. 45
Link and Link-State The first step in the link-state routing process is that each router learns about its own links and its own directly connected networks. 46
Link-State Updates Say Hello The second step in the link-state routing process is that each router is responsible for meeting its neighbors on directly connected networks. 47
Link-State Updates Say Hello The third step in the link-state routing process is that each router builds a link-state packet (LSP) containing the state of each directly connected link. 1. R1; Ethernet network 10.1.0.0/16; Cost 2 2. R1 -> R2; Serial point-topoint network; 10.2.0.0/16; Cost 20 3. R1 -> R3; Serial point-topoint network; 10.7.0.0/16; Cost 5 4. R1 -> R4; Serial point-topoint network; 10.4.0.0/16; Cost 20 48
Flooding the LSP The fourth step in the link-state routing process is that each router floods the LSP to all neighbors, who then store all LSPs received in a database. 49
Building the Link-State Database The final step in the link-state routing process is that each router uses the database to construct a complete map of the topology and computes the best path to each destination network. 50
Building the SPF Tree 51
Building the SPF Tree 52
Adding OSPF Routes to the Routing Table 53
OSPF OSPF is used in the network. Which path will be chosen by OSPF to send data packets from Net A to Net B? R1, R3, R5, R7 54
OSPF Which interface will be the exit interface to forward a data packet with the destination IP address 172.16.0.66? Serial0/0/1 55
Why Use Link-State Protocols? Advantages of Link-State Routing Protocols: Each router build its own topological map of the network to determine the shortest path. Immediate flooding of LSPs achieves faster convergence. LSPs are sent only when there is a change in the topology and contain only the information regarding that change. Hierarchical design used when implementing multiple area. 56
Why Use Link-State Protocols? Disadvantages of Link-State Routing Protocols: Maintaining a link-state database and SPF tree requires additional memory. Calculating the SPF algorithm also requires additional CPU processing. Bandwidth can be adversely affected by link-state packet flooding. 57
Disadvantages of Link-State Protocols 58
Protocols that Use Link-State There are only two link-state routing protocols: Open Shortest Path First (OSPF) most popular began in 1987 two current versions OSPFv2 - OSPF for IPv4 networks OSPFv3 - OSPF for IPv6 networks IS-IS was designed by International Organization for Standardization (ISO ) 59
Routing Table Entries 60
Routing Table Entries Which two requirements are used to determine if a route can be considered as an ultimate route in a router's routing table? contain an exit interface contain a next-hop IP address 61
Directly Connected Entries 62
Remote Network Entries 63
Routing Table Terms Routes are discussed in terms of: Ultimate route Level 1 route Level 1 parent route Level 2 child routes What is different between IPv6 routing table entries compared to IPv4 routing table entries? By design IPv6 is classless so all routes are effectively level 1 ultimate routes. 64
Ultimate Route An ultimate route is a routing table entry that contains either a next-hop IP address or an exit interface. Directly connected, dynamically learned, and link local routes are ultimate routes. Which route will a router use to forward an IPv4 packet after examining its routing table for the best match with the destination address? A level 1 ultimate route 65
Level 1 Route 66
Level 1 Parent Route & Level 2 Child Route 67
The Routing Table Route Lookup Process 1. If the best match is a level 1 ultimate route, then this route is used to forward the packet. 2. If the best match is a level 1 parent route, proceed to the next step. 3. The router examines child routes (the subnet routes) of the parent route for a best match. 4. If there is a match with a level 2 child route, that subnet is used to forward the packet. 5. If there is not a match with any of the level 2 child routes, proceed to the next step. 6. The router continues searching level 1 supernet routes in the routing table for a match, including the default route, if there is one. 7. If there is now a lesser match with a level 1 supernet or default routes, the router uses that route to forward the packet. 8. If there is not a match with any route in the routing table, the router drops the packet. 68
Best Route = Longest Match 69
IPv6 Routing Table Entries Components of the IPv6 routing table are very similar to the IPv4 routing table (directly connected interfaces, static routes, and dynamically learned routes). IPv6 is classless by design, all routes are effectively level 1 ultimate routes. There is no level 1 parent of level 2 child routes. 70
IPv6 Directly Connected Entries 71
Remote IPv6 Network Entries 72
73