Module 14

Module Objectives

  • Module Title: Routing Concepts
  • Module Objective: Explain how routers use information in packets to make forwarding decisions.

Topic Objectives

  • Path Determination: Explain how routers determine the best path.
  • Packet Forwarding: Explain how routers forward packets to the destination.
  • Basic Router Configuration Review: Configure basic settings on a router.
  • IP Routing Table: Describe the structure of a routing table.
  • Static and Dynamic Routing: Compare static and dynamic routing concepts.

Path Determination

Two Functions of a Router

  • Routers receive IP packets and determine the forwarding interface using routing.
  • Primary router functions:
    • Determine the best path from the routing table.
    • Forward packets towards their destination.

Best Path Equals Longest Match

  • The best path is known as the longest match, referring to the maximum number of matching bits in the routing table.
  • Routing table entries consist of a prefix (network address) and prefix length.
  • The longest match is always the preferred route and must match a minimum number of far-left bits, defined by the prefix length.

IPv4 Longest Match Example

  • Destination IPv4 address: (172.16.0.10)
  • Matching routing table entries:
    1. (172.16.0.0/12)
    2. (172.16.0.0/18)
    3. (172.16.0.0/26)
  • Chosen route: (172.16.0.0/26) (provides the longest match).

IPv6 Longest Match Example

  • Destination IPv6 address: (2001:db8:c000::99)
  • Valid matches from route entries:
    1. (2001:db8:c000::/40)
    2. (2001:db8:c000::/48)
    3. (2001:db8:c000:5555::/64) (not a match).
  • Chosen route: (2001:db8:c000::/48) (longest match).

Build the Routing Table

  • Directly Connected Networks: Automatically added to the routing table when an IP address is configured on an active interface.
  • Remote Networks:
    • Learned via static routes (manually configured) or dynamic routing protocols.
  • Default Route: A /0 prefix that serves as a gateway of last resort when no specific route matches.

Packet Forwarding

Packet Forwarding Decision Process

  1. Data link frame with encapsulated IP packet arrives.
  2. Router examines the destination IP and consults its routing table.
  3. Longest matching prefix is found.
  4. Packet encapsulated in a data link frame and forwarded out the egress interface.
  5. If no match, packet is dropped.

Packet Forwarding Mechanisms

  • Process Switching: Older method; processes each packet in the control plane.
  • Fast Switching: Uses a cache for next-hop information; faster than process switching.
  • Cisco Express Forwarding (CEF): Most efficient; utilizes a Forwarding Information Base (FIB) built from network topology changes.

Basic Router Configuration Review

Configuration Commands

Router> enable  
Router# configure terminal  
Router(config)# hostname R1  
Router(config)# enable secret class  
Router(config)# line console 0  
Router(config-line)# password cisco  
Router(config-line)# login  
... 

Verification Commands

  • Common commands include:
    • show ip interface brief
    • show running-config
    • ping

IP Routing Table

Route Sources

  • Routes identified as L (locally connected), C (connected), S (static), O (OSPF learned), etc.

Routing Table Principles

  1. Each router makes decisions based on its own routing table.
  2. Routing table entries include route source, destination network, administrative distance (AD), and metric.
  3. Static routes define explicit paths manually and are not automatically updated.

Default Route

  • A default route can be static or dynamically learned, specified by an IPv4 route entry of (0.0.0.0/0) or IPv6 entry of (::/0).

Administrative Distance

  • Determines the trustworthiness of a route. Lower AD is more trustworthy.
  • Examples include:
    • Directly connected (0), Static (1), OSPF (110), RIP (120).

Static and Dynamic Routing

Differences Between Static and Dynamic Routing

  • Static Routing: Administrator-defined, secure but less adaptable to changes.
  • Dynamic Routing: Automatically adjusts, scalable for larger networks, utilizing protocols like RIP, OSPF, EIGRP.

Load Balancing

  • Enabled when equal cost metrics exist for multiple paths to a destination; can improve network performance.

Conclusion

  • Routers determine paths based on their routing tables, where the longest match indicates the preferred route.
  • Static and dynamic routing each have distinct use cases and benefits, with dynamic protocols adjusting to changes automatically.