Escolar Documentos
Profissional Documentos
Cultura Documentos
Routing
Outline
Introduction
- Router operation - Metric vs. policy based routing - Shortest path computation - Distance vector and link-state algorithms and protocols - Border Gateway Protocol (BGP)
Metric-based routing
Policy-based routing
John Chuang
Packet forwarding
Algorithms for computing shortest paths (e.g., Dijkstras) Policies that reflect business agreements (use BGP)
- For each packet received on an incoming link, forward it to an outgoing link according to the routing table
3
John Chuang
Routing of Atoms
John Chuang
Routing of Bits
Backbone
MAN
Local loop
Ethernet
Host A
Host B
12.2.14.60
John Chuang
128.32.226.87
5
Connects to
- Other packet switches - End hosts
Store-and-forward paradigm
Stores packet in memory Examines packets destination address Looks up next-hop in routing table Forwards packets toward destination (hop-by-hop)
6
John Chuang
Data Plane
Destination Outgoing Address Link
w.x.y.z
C
Control Plane
Routing table
John Chuang
Control plane of a router communicates with its counterparts at other routers using routing protocols (e.g., RIP, OSPF, BGP)
A network domain, also known as an autonomous system (AS), is a collection of IP networks and routers, usually under the control of a single administrative entity, that presents a common routing policy to the Internet
- Examples: ISPs, corporations, universities
John Chuang
Outline
Introduction
- Router operation - Metric vs. policy based routing - Shortest path computation - Distance vector and link-state algorithms and protocols - Border Gateway Protocol (BGP)
Metric-based routing
Policy-based routing
John Chuang
10
Note that each node has different view of the network, and therefore different routing table
John Chuang 11
Example:
John Chuang
12
Link state
- Switches exchange link status info
Link-State Routing
Pair of switches periodically
- Test link between them - Broadcast link status message to all switches in network
Switch
- Receives link status messages - Computes new routes (using Dijkstras algorithm)
John Chuang
14
Dijkstras Algorithm
Shortest Path First (SPF) algorithm Greedy algorithm Input: graph with nodes and weighted edges Output: shortest paths from source node i to every other node; cost of each path
John Chuang
15
Dijkstras Algorithm
John Chuang
Algorithm Intuition
Start at source node Move outward At each step:
- Find node u that
- has not been considered before; and - is closest to source
- Compute:
- Distance from u to each neighbor v - If distance shorter, make path to v go through u
John Chuang
17
Distance Predecessor
John Chuang
18
D
E
D (1)
D (2)
F
John Chuang
D (4)
19
Routing Dynamics
Dijkstras Algorithm has a run-time of O(|V|2+|E|), but the routers run the algorithm continuously to keep their routing tables updated Link states constantly updated
- New links can be added to network - Latency can change continuously - if link goes down, cost = infinity
Outline
Introduction
- Router operation - Metric vs. policy based routing - Shortest path computation - Distance vector and link-state algorithms and protocols - Border Gateway Protocol (BGP)
Metric-based routing
Policy-based routing
John Chuang
21
Intra-AS or intra-domain Metric-based routing (e.g., hops, latency, cost) AS free to choose IGP and metric Examples: RIP, OSPF, IBGP
- Inter-AS or inter-domain - Policy-based routing - All ASs have to use the same EGP (currently BGP v4)
22
John Chuang
Route Advertisement
Instead of computing shortest paths based on DV or LS information, inter-domain routing is based on advertisements of routes
Network Interconnection
transit
Backbone A AS 1 Backbone C AS 3
AS 2 Backbone B
peering Transit
John Chuang
24
AS 3 Backbone B
Backbone A
AS 4 Backbone B
Transit
AS 5 Backbone B
Transit
Backbone A
Transit
Backbone C
AS 1 Backbone B
Transit
AS 2 Backbone B
25
John Chuang
Reliable transport
- Two BGP peers establish TCP session
John Chuang 26
BGP Attributes
Community attribute (no-advertise, no-export, internet) controls propagation of advertisement
John Chuang
27
Community Attribute
No Advertise
No Export
Internet
John Chuang 28
BGP Attributes
Community attribute (no-export, no-advertise, internet) controls propagation of advertisement Other attributes used for selecting best path among multiple paths to same destination:
Weight (local to a router) Local preference (propagated throughout AS) Multi-exit discriminator (suggestion to external AS) Origin (IGP, EGP, Incomplete) AS_Path (AS hop count, loop detection) Next hop (IP Address)
29
John Chuang
John Chuang
30
Summary
Packet switching as key network layer responsibility Packet switching = routing + packet forwarding Internet uses combination of metric-based routing (intra-domain) and policy-based routing (inter-domain)
- Metric-based routing: shortest path computation based on distance vector or link state algorithms - Policy-based routing: route advertisements
John Chuang 31