570 likes | 635 Views
Chapter 3 Routing Dynamically. CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Version 6. Chapter 3. 3.1 Dynamic Routing Protocols 3.2 Distance Vector Dynamic Routing 3.3 RIP and RIPng Routing 3.4 Link-State Dynamic Routing
E N D
Chapter 3Routing Dynamically CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Version 6
Chapter 3 • 3.1 Dynamic Routing Protocols • 3.2 Distance Vector Dynamic Routing • 3.3 RIP and RIPng Routing • 3.4 Link-State Dynamic Routing • 3.5 The Routing Table • 3.6 Summary
Chapter 3: Objectives • Explain the basic operation of dynamic routing protocols. • Compare and contrast dynamic and static routing. • Determine which networks are available during an initial network discovery phase. • Define the different categories of routing protocols. • Describe the process by which distance vector routing protocols learn about other networks. • Identify the types of distance-vector routing protocols. • Configure the RIP routing protocol. • Configure the RIPng routing protocol. • Explain the process by which link-state routing protocols learn about other networks.
Types of Routing Protocols Exterior Gateway Protocols Interior Gateway Protocols Distance Vector Link State Path Vector IPv4 IPv6 * OSPFv3 supports routing both IPv4 and IPv6.
Distance Vector Routing Protocol Operation • What does a street sign like this tell you? • How far (distance) • Which way (direction) • Distance vector • Routes are advertised as vectors of distance and direction. • Distance is defined in terms of a metric • Such as hop count • Direction is simply the: • Nexthop router or • Exit interface • Typically use the Bellman-Ford algorithm for the best-path (shortest) route determination
Distance Vector Routing Protocol Operation • Routing protocol • Does not know the topology of an internetwork. • Only knows the routing information received from its neighbors. • Does not know if another path would actually be faster. I don’t have a map of the network. Would another path that is longer actually be faster? (speed limit) All I know is how far and which direction (to next hop router) Distance Vector routing protocols are like signposts along the path to the final destination.
Distance Vector Routing Protocols • Routing Information Protocol (RIP) • Thee versions: IPv4 RIPv1 and RIPv2. RIPng for IPv6. • Uses hop counts as its metric. • Still around but don't use. • Interior Gateway Routing Protocol (IGRP) • Legacy Cisco Proprietary protocol. • Uses bandwidth and delay as its metric. • Enhanced IGRP (EIGRP) • Cisco Proprietary protocol. • Uses bandwidth and delay as its metric.
Link-State Protocol Operation OR • Link-state routing protocol can create a “complete view,” or topology, of the network. • Link-state protocols are associated with Shortest Path First (SPF) calculations. • A link-state router uses the link-state information to: • Create a topology map • Select the best path to all destination networks in the topology. • Each router makes the decision! Link State routing protocols is like having a complete map of the network topology
Link-State Protocol Operation • Link-state protocols work best in situations where • The network design is hierarchical, usually occurring in large networks. • The administrators have a good knowledge of the implemented link-state routing protocol. • Fast convergence of the network is crucial.
Link-State Routing Protocols • Open Shortest Path First (OSPF) • Popular standards based routing protocol • Intermediate System-to-Intermediate System (IS-IS) • Popular in provider networks
Evolution of Dynamic Routing Protocols Classful Routing Protocols Classless Routing Protocols BGP-MP & OSPFv3 OSPFv2 RIPng RIPv2 EGP IS-ISv6 RIPv1 BGP IGRP IS-IS EIGRP
Purpose of Dynamic Routing Protocols Dynamic Routing Protocol Add dynamic routing protocol… • The purpose of dynamic routing protocols includes: • Discovery of remote networks • Maintaining up-to-date routing information • Choosing the best path to destination networks • Ability to find a new best path if the current path is no longer available No changes!
Main Components of Routing Protocols Data Structures • Neighbor table • Topology table • Neighbortable • Topology table EIGRP Hello EIGRP Update Routing Protocol Messages Algorithm I will use the EIGRP DUAL algorithm to identify what the best routes are. I will use the EIGRP DUAL algorithm to identify what the best routes are.
Dynamic Routing Protocol Operation Update Update Update Update Update Update • In general, the operations of a dynamic routing protocol can be described as follows: • The router sends and receives routing messages on its interfaces. • The router shares routing messages and routing information with other routers that are using the same routing protocol. • Routers exchange routing information to learn about remote networks. • When a router detects a topology change the routing protocol can advertise this change to other routers.
Using Static Routing R2(config)# ip route 172.16.3.0 255.255.255.0 172.16.2.2 • Static routing has several primary uses: • Best for smaller networks that are not expected to grow significantly. • Routing to and from a stub network. • A default route. • Networks typically use a combination of both static and dynamic routing. R1(config)# ip route 0.0.0.0 0.0.0.0 172.16.2.1
Dynamic Routing Scenario • Dynamic routing is the best choice for large networks • Dynamic routing protocols help the network administrator manage the network: • Providing redundant paths • Automatically implementing the alternate path when a link goes down. Networks often use both static and dynamic routing.
Reaching Remote Networks Dynamically • Hey I’m R1 and I’m using EIGRP to let my neighbors know that I’m directly connected to networks: • 192.168.10.0/24 • 192.168.11.0/24 • 209.165.200.224/30 Internet • Hey I’m R2 and I’m using EIGRP to let my neighbors know that I’m the gateway to the Internet (I have a default route to the Internet) and that I’m directly connected to: • 10.1.1.0/24 • 10.1.2.0/24 • 209.165.200.224/30
Why RIP? • RIP is rarely used in modern networks! • However, it’s useful as a foundation for understanding basic network routing. • This section provides a brief overview of how to configure basic RIP settings and to verify RIPv2.
RIP Reference Topology 192.168.3.0/24 192.168.5.0/24 192.168.1.0/24 .1 G0/0 DCE DCE .1 .1 S0/0/1 S0/0/0 S0/0/0 S0/0/1 R2 R3 G0/0 R1 G0/0 .1 .2 .2 .1 192.168.2.0/30 192.168.4.0/30 G0/0 G0/0 G0/0
Dynamic versus Static RoutingRouter RIP Configuration Mode • Use the router rip command to enable RIP v1 • Use the no router rip command to disable RIP
Configuring the RIP ProtocolAdvertise Networks • The network network-address router configuration mode command: • Enables RIP on all interfaces that belong to a specific network • Advertises the network in RIP routing updates sent to other routers every 30 seconds. Note: RIPv1 is a classful routing protocol for IPv4.
Configuring the RIP ProtocolVerify RIP Routing show ip route – displays RIP routes installed in the routing table. show ip protocols – displays IPv4 routing protocols configured on the router.
Configuring the RIP ProtocolEnable and Verify RIPv2 • Use the version 2 router configuration mode command to enable RIPv2 • Use the show ip protocols command to verify that RIPv2 is configured. • Use the show ip route command to verify the RIPv2 routes in the routing table.
Configuring the RIP ProtocolDisable Auto Summarization • RIPv2 automatically summarizes networks at major network boundaries. • Use the no auto-summary router configuration mode command to disable auto summarization. • Use the show ip protocols command to verify that auto summarization is off.
Configuring the RIP ProtocolConfigure Passive Interfaces • RIP updates: • Are forwarded out all RIP-enabled interfaces by default. • Only need to be sent out interfaces that are connected to other RIP-enabled routers. • Sending RIP updates to LANs wastes bandwidth, wastes resources, and is a security risk. • Use the passive-interface router configuration command to stop routing updates out the interface. Still allows that network to be advertised to other routers.
Configuring the RIP ProtocolPropagate a Default Route • In the diagram a default static route to the Internet is configured on R1. • The default-information originate router configuration command instructs R1 to send the default static route information in the RIP updates.
RIP Passive Interfaces 192.168.3.0/24 192.168.5.0/24 192.168.1.0/24 .1 G0/0 DCE DCE .1 .1 S0/0/1 S0/0/0 S0/0/0 S0/0/1 R2 R3 G0/0 R1 G0/0 .1 .2 .2 .1 192.168.2.0/30 192.168.4.0/30 • Sending out unneeded updates on a LAN: • Wastes Bandwidth • Wastes Resources • Security Risk • The passive-interface • Stops routing updates out the specified interface. • The network that the specified interface belongs to is still advertised in routing updates that are sent out other interfaces. • Should be configured on interfaces which do not connect to other RIP routers.
Understanding the IPv4 Routing Table • For more details: Cisco IP Routing, by Alex Zinin (ISBN 0-201-60473-6)
Back in the day…. When you got classful address, you got the whole thing Class A 10.0.0.0/8 Class B 172.16.0.0/16 Class C 192.168.1.0/24 Class B 172.17.0.0/16 Class C 192.168.2.0/24 Class A 11.0.0.0/8 Class A 12.0.0.0/8 Class B 172.18.0.0/16 Class C 192.168.3.0/24
R1#show ip route S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1 is directly connected, Serial0/0/1 172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks C 172.16.1.0/24 is directly connected, GigabitEthernet0/0 L 172.16.1.1/32 is directly connected, GigabitEthernet0/0 R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0 209.165.200.0/24 is variably subnetted, 5 subnets, 2 masks C 209.165.200.224/30 is directly connected, Serial0/0/0 L 209.165.200.225/32 is directly connected, Serial0/0/0 R 209.165.200.228/30 [120/1]via209.165.200.226,0:0:12,Serial0/0/0 C 209.165.200.232/30 is directly connected, Serial0/0/1 L 209.165.200.233/30 is directly connected, Serial0/0/1 R1# • So, the IPv4 routing table is organized by classful addresses
Level 1 route • A level 1 route is a route with a subnet mask equal to or less than the classful mask of the network address.
R1#show ip route S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1 is directly connected, Serial0/0/1 172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks C 172.16.1.0/24 is directly connected, GigabitEthernet0/0 L 172.16.1.1/32 is directly connected, GigabitEthernet0/0 R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0 209.165.200.0/24 is variably subnetted, 5 subnets, 2 masks C 209.165.200.224/30 is directly connected, Serial0/0/0 L 209.165.200.225/32 is directly connected, Serial0/0/0 R 209.165.200.228/30 [120/1]via209.165.200.226,0:0:12,Serial0/0/0 C 209.165.200.232/30 is directly connected, Serial0/0/1 L 209.165.200.233/30 is directly connected, Serial0/0/1 R1# • Level 1 Ultimate route: a route with a subnet mask equal to or less than the classful mask of the network address.
R1#show ip route S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1 is directly connected, Serial0/0/1 172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks C 172.16.1.0/24 is directly connected, GigabitEthernet0/0 L 172.16.1.1/32 is directly connected, GigabitEthernet0/0 R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0 209.165.200.0/24 is variably subnetted, 5 subnets, 2 masks C 209.165.200.224/30 is directly connected, Serial0/0/0 L 209.165.200.225/32 is directly connected, Serial0/0/0 R 209.165.200.228/30 [120/1]via209.165.200.226,0:0:12,Serial0/0/0 C 209.165.200.232/30 is directly connected, Serial0/0/1 L 209.165.200.233/30 is directly connected, Serial0/0/1 R1# • Level 1 Parent route: A parent route is a heading: • Indicates the presence oflevel 2 routes, also known as child routes. • Level 1 parent route is automatically created any time a subnet is added to the routing table. • A parent route is created whenever a route with a mask greater than the classful mask is entered into the routing table.
If Classful Parent matches, check Children for more specific match. If no Children match look for a lesser match. RTC# show ip route Gateway of last resort is 192.168.1.1 to network 0.0.0.0 R 192.168.10.0/24 [120/1] via 192.168.1.1, 00:00:02, Serial1 C 192.168.1.0/24 is directly connected, Serial1 C 192.168.2.0/24 is directly connected, Ethernet0 172.30.0.0/24 is subnetted, 3 subnets C 172.30.2.0 is directly connected, Loopback2 C 172.30.3.0 is directly connected, Loopback3 C 172.30.1.0 is directly connected, Loopback1 S* 0.0.0.0/0 [1/0] via 192.168.1.1 RTC# ping 172.30.4.1 Sending 5, 100-byte ICMP Echoes to 172.30.4.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5),round-trip min/avg/max=56/57/60 ms Packet’s Destination IP Address: 172.30.4.1
Routing Table Lookup Process IP Packet Routing Table • /prefix-length in the route indicates the number of bits that must match the destination IPv4 address for this route to be a match Find “best match”
A packet is destined for 172.16.0.10 • The router has three possible routes that match this packet: • 172.16.0.0/12 • 172.16.0.0/18 • 172.16.0.0/26 • Of the three routes, 172.16.0.0/26 has the longest match and is therefore chosen to forward the packet.
R1#show ip route | begin Gateway Gateway of last resort is 209.165.200.234 to network 0.0.0.0 S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1 is directly connected, Serial0/0/1 172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks C 172.16.1.0/24 is directly connected, GigabitEthernet0/0 L 172.16.1.1/32 is directly connected, GigabitEthernet0/0 R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0 209.165.200.0/24 is variably subnetted, 5 subnets, 2 masks C 209.165.200.224/30 is directly connected, Serial0/0/0 L 209.165.200.225/32 is directly connected, Serial0/0/0 R 209.165.200.228/30 [120/1]via209.165.200.226,0:0:12,Serial0/0/0 C 209.165.200.232/30 is directly connected, Serial0/0/1 L 209.165.200.233/30 is directly connected, Serial0/0/1 R1# 192.168.1.100 • Packet with Destination IPv4 address 192.168.1.100 • One Level 1 Ultimate Routes to choose from. • 192.168.0.0/16 is the best (only) match, the longest match (coming). • Longest match: Most left-most bits that match between destination IP address and route in routing table • At a minimum it must match the number of bits in the route as indicated by the subnet mask.
R1#show ip route | begin Gateway Gateway of last resort is 209.165.200.234 to network 0.0.0.0 S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1 is directly connected, Serial0/0/1 172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks C 172.16.1.0/24 is directly connected, GigabitEthernet0/0 L 172.16.1.1/32 is directly connected, GigabitEthernet0/0 R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0 209.165.200.0/24 is variably subnetted, 5 subnets, 2 masks C 209.165.200.224/30 is directly connected, Serial0/0/0 L 209.165.200.225/32 is directly connected, Serial0/0/0 R 209.165.200.228/30 [120/1]via209.165.200.226,0:0:12,Serial0/0/0 C 209.165.200.232/30 is directly connected, Serial0/0/1 L 209.165.200.233/30 is directly connected, Serial0/0/1 R1# 172.16.3.10 • Packet with Destination IPv4 address 172.16.3.10 • No Level 1 Ultimate Routes match • Matches Level 1 Parent Route (minimum match is classful mask). • Look for matching Child route • At a minimum it must match the number of bits in the route as indicated by the subnet mask. • If more than one child route matches choose routes with longest match.
R1#show ip route | begin Gateway Gateway of last resort is 209.165.200.234 to network 0.0.0.0 S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1 is directly connected, Serial0/0/1 172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks C 172.16.1.0/24 is directly connected, GigabitEthernet0/0 L 172.16.1.1/32 is directly connected, GigabitEthernet0/0 R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0 209.165.200.0/24 is variably subnetted, 5 subnets, 2 masks C 209.165.200.224/30 is directly connected, Serial0/0/0 L 209.165.200.225/32 is directly connected, Serial0/0/0 R 209.165.200.228/30 [120/1]via209.165.200.226,0:0:12,Serial0/0/0 C 209.165.200.232/30 is directly connected, Serial0/0/1 L 209.165.200.233/30 is directly connected, Serial0/0/1 R1# 172.16.5.10 • Packet with Destination IPv4 address 172.16.5.10
R1#show ip route | begin Gateway Gateway of last resort is 209.165.200.234 to network 0.0.0.0 S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1 is directly connected, Serial0/0/1 172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks C 172.16.1.0/24 is directly connected, GigabitEthernet0/0 L 172.16.1.1/32 is directly connected, GigabitEthernet0/0 R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0 209.165.200.0/24 is variably subnetted, 5 subnets, 2 masks C 209.165.200.224/30 is directly connected, Serial0/0/0 L 209.165.200.225/32 is directly connected, Serial0/0/0 R 209.165.200.228/30 [120/1]via209.165.200.226,0:0:12,Serial0/0/0 C 209.165.200.232/30 is directly connected, Serial0/0/1 L 209.165.200.233/30 is directly connected, Serial0/0/1 R1# 10.1.2.3 • Packet with Destination IPv4 address 10.1.2.3 • No Level 1 Ultimate Routes to choose match • No Level 1 Parent Routes match • Look for Level 1 supernet route (mask less than classful mask), including default • Choose longest match. • Default route always matches because 0 bits have to match. • 0 matching bits makes it the “gateway of last resort”
R1#show ip route | begin Gateway 172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks C 172.16.1.0/24 is directly connected, GigabitEthernet0/0 L 172.16.1.1/32 is directly connected, GigabitEthernet0/0 R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0 R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0 209.165.200.0/24 is variably subnetted, 5 subnets, 2 masks C 209.165.200.224/30 is directly connected, Serial0/0/0 L 209.165.200.225/32 is directly connected, Serial0/0/0 R 209.165.200.228/30 [120/1]via209.165.200.226,0:0:12,Serial0/0/0 C 209.165.200.232/30 is directly connected, Serial0/0/1 L 209.165.200.233/30 is directly connected, Serial0/0/1 R1# 10.1.2.3 • Packet with Destination IPv4 address 10.1.2.3 • No default route • No Level 1 Ultimate Routes to choose match • No Level 1 Parent Routes match • No supernet routes match • Drop packet