Forwarding & Routing Flashcards
Key network layer functions
- forwarding: move packets from router’s input to appropriate router output
- routing: determine route taken by packets from source to dest.
- forwarding: process of getting on the right flight at the airport
- routing: process of planning whole trip from source to destination
Interplay between routing and forwarding
Router architecture overview
High-level overview
Input port functions
Output port functions
- Buffering required when datagrams arrive from switch fabric faster than the outgoing transmission rate
- A scheduling discipline chooses among queued datagrams for next transmission
Destination-based forwarding (CIDR)
- Question: address 128.42.222.198 matches four rows
¤ Which destination interface do we forward to? - Answer: use longest prefix matching (so, dest. 1 in this case)
¤ Use the matching row with the longest string of 1’s in the mask
¤ This is the most specific match
Longest prefix matching: an analogy
- I want to fly to Orange County, California
- I arrive at Manchester Airport (without a ticket, apparently!)
- I look at the departure board…
– Flight to London, “gateway to the world”, departs gate 5- Destination is OK but very general – cf. 128.0.0.0/8
– Flight to LA, California departs gate 6 - Destination is more specific – cf. 128.42.128.0/16
– Flight to Orange County, California departs gate 7 - Destination is most specific – cf. 128.42.222.0/24
- Destination is OK but very general – cf. 128.0.0.0/8
- These are ordered least specific to most specific – analogous to shortest to longest mask length
- I pick the most specific match (longest mask) => gate 7
Longest prefix matching: a second example
Per-router control plane
Routing algorithm components in each and every router interact with each other in control plane to build forwarding tables
Logically centralised control plane
A distinct (typically remote) controller interacts with local control agents (CAs) in routers to compute forwarding tables
Routing algorithms
- Goal: determine a “good” path through the network from source to destination
- What is “good”?
¤ Usually means shortest
¤ And/or Load balanced
¤ And/or lowest $$$ cost
Problem setup
- Network is modeled as a graph
¤ Nodes are routers (can be subnets!)
¤ Edges are links
¤ Edge (link) cost:
- delay, congestion level, etc. - Initially, each node only knows
¤ Its local neighbors
¤ The cost to reach each neighbor - How does each node learn the best path to every other node?
Intra-domain routing protocols
- Distance vector
¤ Routing Information Protocol (RIP), based on Bellman-Ford algorithm
¤ Routers periodically exchange reachability information with neighbors - Link state
¤ Open Shortest Path First (OSPF), based on Dijkstra’s algorithm
¤ Each network periodically floods its immediate reachability information to all other routers
¤ The Bellman-Ford and Dijkstra algorithms are alternative ways to find shortest paths between nodes in weighted digraphs
Distance vector routing algorithm (BF)
Distance vector initialization