Presentation is loading. Please wait.

Presentation is loading. Please wait.

Rick Graziani Cabrillo College

Similar presentations


Presentation on theme: "Rick Graziani Cabrillo College"— Presentation transcript:

1 Rick Graziani Cabrillo College graziani@cabrillo.edu
1 - Routing Concepts Rick Graziani Cabrillo College

2 Layer 3 Forwarding Concepts and Routing Principles
Rick Graziani Cabrillo College

3 How does a packet get forwarded from source to destination?
MAC Src MAC Source Destination FCS /24 /24 /24 /24 /24 How does a packet get forwarded from source to destination?

4 C 192.168.1.0/24 is directly connected, FastEthernet0/0
Each routing entry has a prefix (network address) and prefix length (subnet mask) The prefix length indicates the minimum number of left-most bits that need to match the destination IP address for the entry to be considered a match. The routing entry with the longest match (the entry with the longest prefix length) is used. Default route (/0) is a 0 bit match and is used as the gateway of last resort. Dest MAC Src MAC Source Destination FCS /24 /24 /24 /24 /24 C /24 is directly connected, FastEthernet0/0 C /24 is directly connected, Serial0/0/0 S /24 [1/0] via 1. Examines its destination IP address 2. Searches the IP routing table with it's list of network addresses (prefixes) for the longest match

5 C 192.168.1.0/24 is directly connected, FastEthernet0/0
Source Destination /24 /24 /24 /24 /24 C /24 is directly connected, FastEthernet0/0 C /24 is directly connected, Serial0/0/0 S /24 [1/0] via 3. Determine the routing entry's egress interface to be used to forward the packet If the routing entry only has an next-hop IP address, a recursive lookup may be required if CEF (Cisco Express Forwarding) or similar technique is not used.

6 C 192.168.1.0/24 is directly connected, FastEthernet0/0
Data Link Header Source Destination Data Link Trailer /24 /24 /24 /24 /24 C /24 is directly connected, FastEthernet0/0 C /24 is directly connected, Serial0/0/0 S /24 [1/0] via 4. Encapsulates the IP packet into the data link frame of the outgoing or exit interface

7 C 192.168.1.0/24 is directly connected, FastEthernet0/0
Dest Add Src Add Source Destination FCS /24 ARP Cache IPv MAC ? /24 /24 /24 /24 C /24 is directly connected, FastEthernet0/0 C /24 is directly connected, FastEthernet0/1 S /24 [1/0] via 4. Encapsulates the IP packet into the data link frame of the outgoing or exit interface If the exit interface is a multaccess network such as Ethernet, the router will need to determine the destination MAC address for the next-hop IP address (or destination IP address). Check ARP cache and if necessary send an ARP Request

8 C 192.168.1.0/24 is directly connected, FastEthernet0/0
Dest Add Src Add Source Destination FCS /24 /24 /24 /24 /24 C /24 is directly connected, FastEthernet0/0 C /24 is directly connected, Serial0/0/0 S /24 [1/0] via 5. The packet is then forwarded toward its destination. May be the next-hop router or the final destination of the packet.

9 Process Switching Earliest switching method.
Control Plane IP Routing Table CPU 1st Packet 2nd Packet 3rd Packet 4th Packet 5th Packet Ingress Interface Data Plane Egress Interface Analogy: Process switching solves a problem by doing math long hand, even if it is the identical problem. Earliest switching method. This is an older packet forwarding mechanism. When a packet arrives on an interface, it is forwarded to the control plane where the CPU examines the routing table, determines the exit interface and forwards the packet. It does this for every packet, even if the destination is the same for a stream of packets.

10 Fast Switching Control Plane IP Routing Table CPU 1st Packet 2nd Packet 3rd Packet 4th Packet 5th Packet Ingress Interface Data Plane Egress Interface Fast Forward Cache Analogy: Fast switching solves a problem by doing math long hand one time and remembering the answer for subsequent identical problems. As routers had to process more packets, it was determined process switching was not fast enough. Next evolution in packet switching was Fast Switching. The first packet is process-switched (CPU + routing table) but it also uses a fast-switching cache to store next-hop information of the flow. The next packets in the flow are forwarded using the cache and without CPU intervention.

11 Control Plane CEF Switching CPU Ingress Interface Data Plane Egress Interface 1st Packet 2nd Packet 3rd Packet 4th Packet 5th Packet FIB and Adjacency Table Analogy: CEF solves every possible problem ahead of time in a spreadsheet. Preferred and default Cisco IOS packet-forwarding mechanism CEF copies the routing table to the Forwarding Information Base (FIB) CEF creates an adjacency table which contains all the layer 2 information a router would have to consider when forwarding a packet such as Ethernet destination MAC address. The adjacency table is created from the ARP table.

12 Alex Zinin’s Routing Table Principles
I know about my remote networks but it is not my responsibility if R2 and R3 know about their remote networks. Principle 1: Every router makes its decision alone, based on the information it has in its own routing table. Principle 1: Every router makes its decision alone, based on the information it has in its own routing table. R1 has three static routes in its routing table and makes forwarding decisions based solely on the information in the routing table. R1 does not consult the routing tables in any other routers, nor does it know whether those routers have routes to other networks. Making each router aware of remote networks is the responsibility of the network administrator.

13 Alex Zinin’s Routing Table Principles
Just because I know how to get to R3’s LAN, /24 and I send that packet to R2, doesn’t mean R2 knows how to get there. ??? Principle 2: The fact that one router has certain information in its routing table does not mean that other routers have the same information. Principle 2: The fact that one router has certain information in its routing table does not mean that other routers have the same information. R1 does not know what information other routers have in their routing table. For example, R1 has a route to the /24 network through Router R2. Any packets that match this route belong to the /24 network and will be forwarded to Router R2. R1 does not know whether R2 has a route to the /24 network. Again, the network administrator would be responsible for ensuring that the next-hop router also has a route to this network. Using Principle 2, you still need to configure the proper routing on the other routers (R2 and R3) to make sure that they have routes to these three networks.

14 Alex Zinin’s Routing Table Principles
And if the packet for R3’s LAN reaches /24, I don’t know if R3 has a route back to /24 for any return traffic. ??? Principle 3: Routing information about a path from one network to another does not provide routing information about the reverse, or return, path. Principle 3: Routing information about a path from one network to another does not provide routing information about the reverse, or return, path. Most of the communication over networks is bidirectional. This means that packets must travel in both directions between the end devices involved. A packet from PC1 can reach PC3 because all the routers involved have routes to the destination network /24. However, the success of any returning packets going from PC3 to PC1 depends on whether the routers involved have a route to the return path, PC1’s /24 network. Using Principle 3 as guidance, you will configure proper static routes on the other routers to make sure that they have routes back to the /24 network.

15 Layer 3 Forwarding Concepts and Routing Principles
Rick Graziani Cabrillo College

16 Rick Graziani Cabrillo College graziani@cabrillo.edu
Populating an IP Routing Table, Administrative Distance, and Load Balancing Rick Graziani Cabrillo College

17 IP Routing tables are populated by:
Directly connected networks At least one directly connected network is required When an IP prefix/prefix length are configured on the router, similar to an end-device Remote networks: Static Routes: Manually configured Dynamic routing protocol: Learned automatically

18 Topology: IPv4 and IPv6 :1 :2

19 Configuring Directly Connected Networks
R1(config)# interface gigabitethernet 0/0 R1(config-if)# description Link to LAN 1 R1(config-if)# ip address R1(config-if)# ipv6 address 2001:db8:acad:1::1/64 R1(config-if)# ipv6 address fe80::1 link-local R1(config-if)# no shutdown R1(config-if)# exit R1(config)#

20 R1(config)# interface gigabitethernet 0/1
R1(config-if)# description Link to LAN 2 R1(config-if)# ip address R1(config-if)# ipv6 address 2001:db8:acad:2::1/64 R1(config-if)# ipv6 address fe80::1 link-local R1(config-if)# no shutdown R1(config-if)# exit R1(config)#

21 R1(config)# interface serial 0/0/0
R1(config-if)# description Link to R2 R1(config-if)# ip address R1(config-if)# ipv6 address 2001:db8:acad:3::1/64 R1(config-if)# ipv6 address fe80::1 link-local R1(config-if)# clockrate ! Lab only R1(config-if)# no shutdown R1(config-if)# exit *Jan 30 23:01:17.323: %LINK-3-UPDOWN: Interface Serial0/0/0, changed state to down ! Will be down until other side has been configured Media Description: Use NB A as the basis but display as indicated.

22 Gateway of last resort is not set
R1# show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP <output omitted. Gateway of last resort is not set /24 is variably subnetted, 2 subnets, 2 masks C /24 is directly connected, GigabitEthernet0/0 L /32 is directly connected, GigabitEthernet0/0 /24 is variably subnetted, 2 subnets, 2 masks C /24 is directly connected, GigabitEthernet0/1 L /32 is directly connected, GigabitEthernet0/1 /24 is variably subnetted, 2 subnets, 2 masks C /30 is directly connected, Serial0/0/0 L /32 is directly connected, Serial0/0/0 R1# Network Address Interface Address Network Address Interface Address Network Address Interface Address Media Description: Use the topology from NB A. Add a highlighted glow around R1 and arrow pointing to it. Add the indicated configuration and highlight as indicated.

23 IPv6 Routing Table - default - 7 entries
R1# show ipv6 route IPv6 Routing Table - default - 7 entries Codes: C - Connected, L - Local, S - Static, U - Per-user Static <output omitted> C :DB8:ACAD:1::/64 [0/0] via GigabitEthernet0/0, directly connected L :DB8:ACAD:1::1/128 [0/0] via GigabitEthernet0/0, receive C :DB8:ACAD:2::/64 [0/0] via GigabitEthernet0/1, directly connected L :DB8:ACAD:2::1/128 [0/0] via GigabitEthernet0/1, receive C :DB8:ACAD:3::/64 [0/0] via Serial0/0/0, directly connected L :DB8:ACAD:3::1/128 [0/0] via Serial0/0/0, receive L FF00::/8 [0/0] via Null0, receive R1# :1 :2 Network Address Interface Address Media Description: Create the following graphic.

24 Example of Configuring a Static Route
Assuming other routers have been configured R1(config)# ip route R1(config)# ipv6 route 2001:db8:acad:4::/ :db8:acad:3::2 R1# show ip route <partial output> S [1/0] via R3#show ipv6 route S :DB8:ACAD:4::/64 [1/0] via 2001:DB8:ACAD:3::2

25 Example of Configuring Dynamic Routing
Assuming other routers have been configured R1(config)# router ospf 1 R1(config-router)# network area 0 R1(config-router)# network area 0 R1(config-router)# network area 0 R1(config-router)# end R1# show ip route O /24 [110/648] via , 00:06:03, Serial0/0/0 O /24 [110/648] via , 00:06:03, Serial0/0/0

26 Administrative Distance
Only a directly connected route can have an AD of 0 Administrative Distance (AD) is used when the router has multiple sources (connected, static, dynamic) for a route with the same prefix/prefix length. Cisco AD represents the “trustworthiness” of the route source - the lower the AD, the more trustworthy the source of the route If multiple paths to a destination are offered to the routing table, the path with the lowest AD is installed. Administrative Distance

27 R1(config)# router ospf 1
R1(config-router)# network area 0 R1(config-router)# network area 0 R1(config-router)# network area 0 R1(config-router)# end R1# show ip route O /24 [110/648] via , 00:06:03, Serial0/0/0 O /24 [110/648] via , 00:06:03, Serial0/0/0 R1# config t R1(config)# ip route <partial output> S /24 [1/0] via

28 Which path is my “best path”?
Router’s determine best-path to a network: Depends on the routing protocol A protocol used to between routers to determine “best path” Routing protocols use their own rules and metrics. A metric: Quantitative value used to measure the distance to a given route. Best path: Path with the lowest metric. Router’s best-path determination involves evaluating multiple paths to the same destination network and selecting the optimum or “shortest” path to reach that network. Depends upon routing protocol. RIP uses hop count whereas OSPF uses bandwidth (Cisco’s implementation of OSPF). Dynamic routing protocols use their own rules and metrics to build and update routing tables. A metric is the quantitative value used to measure the distance to a given route. The best path to a network is the path with the lowest metric. For example, a router will prefer a path that is five hops away over a path that is ten hops away. Comparing Dynamic Routing Protocols: RIP and OSPF RIP uses hop count R1 to R3 Fewer links but much slower OSPF uses bandwidth R1 to R2 to R3 More routers but much faster links

29 To reach the 192.168.1.0/24 network it is 2 hops via R2 and 2 hops via R4.
Load Balancing ? ? /24 What happens if a routing table has two or more paths with the same metric to the same destination network? (equal-cost metric) Router will perform equal-cost load balancing. All routing protocols (RIP, EIGRP, OSPF) support equal cost load balancing; EIGRP also supports unequal cost load balancing. What happens if a routing table has two or more paths with the same metric to the same destination network? (equal-cost metric) Router will perform equal-cost load balancing. The router will forward packets using the multiple exit interfaces as listed in the routing table. Static routes and all dynamic routing protocols perform equal cost load balancing. (More later)

30 <partial output>
R1# show ip route static <partial output S /24 [1/0] via R1# show ip route ospf <partial output> O /24 [110/648] via , 00:06:03, Serial0/0/0 Routing Source Remote network AD Route Metric IPv4 address of next-hop router Egress (Exit) Interface

31 Rick Graziani Cabrillo College graziani@cabrillo.edu
Populating an IP Routing Table, Administrative Distance, and Load Balancing Rick Graziani Cabrillo College


Download ppt "Rick Graziani Cabrillo College"

Similar presentations


Ads by Google