0% found this document useful (0 votes)
48 views49 pages

W11 Routing - 8th Ed Final

Uploaded by

ahmedemadsaid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views49 pages

W11 Routing - 8th Ed Final

Uploaded by

ahmedemadsaid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

Computer Networking: A Top Down

Approach
Eighth Edition

Chapter 5
Network Layer:
Control Plane

Slides in this presentation contain hyperlinks.


JAWS users should be able to get a list of links
by using INSERT+F7

Copyright © 2020, 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved
Ch. 5: The Network Layer Control Plane
5.1 Introduction
5.2 Routing protocols
‒ link state
‒ distance vector
5.3 Intra-AS routing in the Internet: OSPF
5.4 Routing among the ISPs: BGP
5.5 The SDN control plane
5.6 ICMP: The Internet Control Message Protocol
5.7 Network management and SNMP
Network-Layer Functions
Recall: Two key network-layer functions:
• Forwarding: move packets
from router’s input to data plane
appropriate router output
• Routing: determine route control plane
taken by packets from source
to destination
Two approaches to structuring the network control plane:
• per-router control (traditional – Internet today)
• logically centralized control (software defined networking)
Interplay between Routing and Forwarding
1. Per-Router Control Plane (Classic Internet)
Individual routing algorithm components in each and
every router (Control Agents) interact with each other
in the control plane to compute forwarding tables
2. Logically Centralized Control Plane
Software-Defined Networking (SDN)
A distinct (typically remote) Central Controller interacts
with local control agents (CAs) in routers to compute
forwarding tables
Ch. 5: The Network Layer Control Plane
5.1 Introduction
5.2 Routing protocols
– Link state
– Distance vector
5.3 Intra-AS routing in the Internet: OSPF
5.4 Routing among the ISPs: BGP
5.5 The SDN control plane
5.6 ICMP: The Internet Control Message Protocol
5.7 Network management and SNMP
Routing Protocols
Routing protocol goal: determine
“good” paths (equivalently, routes),
from sending hosts to receiving
hosts, through a network of
intermediate routers
• path: sequence of routers packets
will traverse en route from a given
initial source host to the final
destination host
• But, what is “good”? least
“cost”, “fastest”, “least congested”
Graph Abstraction of a Network

Graph: G = (N, E)
N = set of routers (nodes or vertices) = {u, v, w, x, y, z}
E = set of links (edges) = { (u,v), (u,x), (u,w), (v,x), (v,w), (x,w),
(x,y), (w,y), (w,z), (y,z) }
Remark: Graph abstraction is useful in other network contexts

Example: P2P, where N is a set of peers and E is a set of TCP connections


Graph Abstraction: Link Cost

c ( x,x¢ ) = cost of link ( x,x¢ ) e.g., c ( w,z ) = 5

cost could always be 1, or


inversely related to bandwidth,
or related to congestion

cost of path (x1, x 2 , x 3 ,…,x p ) = c(x1,x 2 ) + c(x 2,x 3 ) + … + c(xp-1, xp )

Key Question: What’s the least-cost (shortest) path between u and z ?

Routing algorithm: finds the shortest path


Routing Algorithm Classification
Ch. 5: The Network Layer Control Plane
5.1 Introduction
5.2 Routing protocols
– Link state
– Distance vector
5.3 Intra-AS routing in the Internet: OSPF
5.4 Routing among the ISPs: BGP
5.5 The SDN control plane
5.6 ICMP: The Internet Control Message Protocol
5.7 Network management and SNMP
5.2.1. A Link-State Routing Algorithm
Dijkstra’s algorithm Notation:
• Global info.: net topology and link • c(x,y): link cost from node
costs known to all nodes x to y; = ¥ if not direct
– accomplished via “link state neighbors
broadcast”
– all nodes have the same info. • D(v): current value of cost of
path from source to dest v
• computes least cost paths from one
node (‘source”) to all other nodes • p(v): predecessor node along
– Builds the forwarding table for that path from source to v
node
• N': set of nodes whose least
• iterative: after k iterations, know least cost path has been determined
cost path to k destinations (Initially, has only the source
node, ‘u’)
Dijsktra’s Link-State Routing Algorithm
/* compute least cost path from u to all other nodes */

/* u initially knows direct-path-cost only to direct neighbors */


/* but may not be minimum cost! */
Dijkstra’s Algorithm: Example 1

Notes:
• Construct shortest path tree by
tracing back predecessor nodes
• Ties may exist (broken arbitrarily)
Dijkstra’s Algorithm: Example 2

v 3 w
2 5
u 2 1 z
3
1 2
x y
1
* Check out the online interactive exercises for more examples:
http://gaia.cs.umass.edu/kurose_ross/interactive/
Dijkstra’s Algorithm: Example 2
Resulting shortest-path tree from node u:

Resulting forwarding table at node u:

destination Link
V (u,v) route from u to v directly

X (u,x)
Y (u,x) route from u to all other
destinations via x
W (u,x)
Z (u,x)
Dijkstra’s Algorithm, Discussion
Algorithm complexity: n nodes
• each iteration: need to check all nodes, w, not in N’

• n ( n+1) /2 comparisons: O (n2 )


• more efficient implementations possible: O(nlogn)

Route oscillations possible:


• e.g., link cost = amount of carried traffic
Ch. 5: The Network Layer Control Plane
5.1 Introduction
5.2 Routing protocols
– Link state
– Distance vector
5.3 Intra-AS routing in the Internet: OSPF
5.4 Routing among the ISPs: BGP
5.5 The SDN control plane
5.6 ICMP: The Internet Control Message Protocol
5.7 Network management and SNMP
5.2.2. Distance Vector Algorithm (1 of 7)
Bellman-Ford update equation
Bellman-Ford Example
clearly, dv ( z ) =5, dx ( z ) =3, dw ( z ) =3

B-F equation says:

du ( z ) = min { c(u,v) + dv ( z ) ,
c(u,x) + dx ( z ) ,
c(u,w) + dw ( z ) }
= min {2 + 5,
1 + 3,
5 + 3} = 4

The neighbor achieving the minimum is the next hop


in the shortest path, used in the forwarding table
Distance Vector Algorithm (2 of 7)
• Dx ( y ) = estimate of least cost from x to y
– x maintains distance vector Dx = éëD x ( y ) : y ∈Nùû

• node x:
– knows cost to each neighbor v: c(x,v)
– maintains its neighbors’ distance vectors
– For each neighbor v, x receives and maintains
D v = éëD v ( y ) : y ∈ Nùû
Distance Vector Algorithm (3 of 7)
Key Idea:
• Each node sends, periodically, its own distance vector
estimate to its neighbors
• when x receives new DV estimate from a neighbor, it
updates its own DV using the B-F update equation:

D x (y)
Dx(y) min
← min v {c(x,
v{c x,v + v)+D
Dv(y)}v (y)}
for for each
each node
node y ∊y N
∈N

• under minor, natural conditions, the estimate Dx ( y )


converges to the actual least cost dx ( y )
Distance Vector Algorithm (4 of 7)
Iterative, asynchronous: Each node:
each local iteration is caused
by:
• local link cost change
• DV update message from a
neighbor
Distributed:
• each node notifies neighbors
only when its DV changes
– neighbors then notify their
neighbors - only if necessary
– no notification received, no
actions taken!
Distance Vector Algorithm (5 of 7)
Distance Vector Algorithm (6 of 7)
Distance Vector Algorithm (7 of 7)
Distance Vector: Link Cost Changes (1 of 4)
In this example, x is the destination
Before the link cost change, Dy(x) = 4 and
Dz(x) = 5
• When link yx cost changes:
• Dy(x) = min. (1+0, 1+ 5 (going thru Z)) =
1 (picks the correct SP)
• Dy(x) goes down to 1 since it is < 6.
• Then Y sends its DV to neighbors
• Z updates its DV to be: Dz(x) = min. ( 50
+0, 1+1) = 2 and sends it to Y
• Y updates its DV, Dy(x) = min. (1+0, 1 +
2) = 1
• It converges after 2 iterations, with no
more changes (good news travels fast)
– no loops
Distance Vector: Link Cost Changes (2 of 4)
Link cost changes:
• node detects local link cost change
• updates routing info, recalculates
distance vector
• if DV changes, notify neighbors
t0 : y detects link-cost change, updates its DV, informs its neighbors.
“good t1 : z receives update from y, updates its table, computes new least
news cost to x, sends its neighbors its DV.
travels t2 : y receives z’s update, updates its distance table. y's least costs do
fast” not change, so y does not send a message to z.

Takes only two iterations for the DV algorithm to reach a


quiescent state!
* Check out the online interactive exercises for more examples:
http://gaia.cs.umass.edu/kurose_ross/interactive/
Distance Vector: Link Cost Changes (3 of 4)
x is the destination
Before the link cost change, Dy(x) = 4 and
Dz(x) = 5
• When link yx cost changes:
• Dy(x) = min. (60+0, 1+ 5 (going thru z))
= 6 (picks wrong SP) – creates a loop!
• Dy(x) goes up to 6 since it is < 60.
• Then Y sends its DV to neighbors
• Z updates its DV to be: Dz(x) = min. (50
+0, 1+6) = 7 (wrong!) and sends it to Y
• Y updates its DV, Dy(x) = min. (60+0, 1
+ 7) = 8
• It doesn’t converge, takes 44 iterations
to converge (difference between correct
Dz(x) = 50 and 6)
Distance Vector: Link Cost Changes (4 of 4)
Link cost changes:
• good news travels fast – node
detects local link cost change
• bad news travels slow – “count
to infinity” problem!
• 44 iterations before algorithm
stabilizes: see the textbook
Poisoned reverse:
• If Z routes through Y to get to X:
– Z tells Y its (Z’s) distance to X is infinite (so Y won’t route to X via Z)
• Q: Will this completely solve the count to infinity problem?

Takes 44 iterations for the DV algorithm to reach a


correct (loop-free) shortest path route
Comparison of LS and DV Algorithms
Message complexity (overhead) Robustness: what happens if a
• LS: with n nodes, E links, O(n router malfunctions?
E) msgs sent LS:
• DV: exchange between • node can advertise incorrect link
neighbors only cost
– convergence time varies • each node computes only its own
table
Speed of convergence
DV:
• LS: O ( n2 ) algorithm requires
• DV node can advertise incorrect
O(nE) msgs
path cost
– may have oscillations • each node’s table used by others
• DV: convergence time varies – error propagate thru network
– may be routing loops
– count-to-infinity problem
Ch. 5: The Network Layer Control Plane
5.1 Introduction
5.2 Routing protocols
– link state
– distance vector
5.3 Intra-AS routing in the Internet: OSPF
5.4 Routing among the ISPs: BGP
5.5 The SDN control plane
5.6 ICMP: The Internet Control Message Protocol
5.7 Network management and SNMP
Making Routing Scalable
Our routing study thus far is idealized
• all routers identical
• The network is “flat”
… not true in practice

scale: with billions of administrative autonomy


destinations: • Internet = network of networks
• can’t store all destinations in • each network admin may want to
routing tables! control routing in its own network
• routing table exchange would
swamp links!
Internet Approach to Scalable Routing
aggregate routers into regions known as “Autonomous
Systems” (AS) (a.k.a. “domains”)
Intra-AS Routing (intra-domain) Inter-AS Routing (inter-domain)
• routing among hosts, routers in • routing among AS’s
same AS (“network”) • Gateways perform inter-domain
• all routers in AS must run same routing (as well as intra-domain
intra-domain protocol routing)
• routers in different AS can run
different intra-domain routing
protocols
• Gateway router: at “edge” of its
own AS, has link(s) to router(s) in
other AS’s
Interconnected ASs

• The forwarding table is


configured by both intra- and
inter-AS routing algorithms
– Intra-AS routing determine
table entries for
destinations within AS
– Inter-AS & intra-AS
determine table entries for
external destinations
Inter-AS Tasks
• suppose router in AS1 AS1 must:
receives datagram 1. learn which dests are
destined outside of AS1: reachable through AS2 and
– router should forward which through AS3
packet to gateway router, 2. propagate this reachability
but which one? info. to all routers in AS1
Job of inter-AS routing!
5.3. Intra-AS Routing
• also known as Interior gateway protocols (IGP)
• most common intra-AS routing protocols:
– RIP: Routing Information Protocol
– OSPF: Open Shortest Path First – IETF RFC 2328
– IGRP: Interior Gateway Routing Protocol (Cisco proprietary for
decades, until 2016)
Intra-AS Routing:
OSPF (Open Shortest Path First)
• “open”: publicly available
• Uses link-state routing
– link state packet dissemination
– topology map at each node
– route computation using Dijkstra’s shortest path algorithm

• router floods OSPF link-state advertisements to all other


routers within the entire AS
– carried in OSPF messages directly over IP
– link state: for each attached link
Hierarchical OSPF (1 of 2)
Hierarchical OSPF (2 of 2)
• two-level hierarchy: local area, backbone
– link-state advertisements only in area
– each node has detailed area topology; only know direction
(shortest path) to nets in other areas

• area border routers: “summarize” distances to nets in


own area, advertise to other Area Border routers
• backbone routers: run OSPF routing limited to
backbone
• boundary routers: connect to other AS’s
Ch. 5: The Network Layer Control Plane
5.1 Introduction
5.2 Routing protocols
– link state
– distance vector
5.3 Intra-AS routing in the Internet: OSPF
5.4 Routing among (across) the ISPs: BGP
5.5 The SDN control plane
5.6 ICMP: The Internet Control Message Protocol
5.7 Network management and SNMP
5.4. Inter-AS Routing: BGP
• BGP (Border Gateway Protocol): the de facto inter-domain routing
protocol in the Internet
– “glue that holds the Internet together”

• BGP provides each AS a means to:


– eBGP: obtain subnet reachability information from neighboring ASs
– iBGP: propagate reachability information to all AS-internal routers
– determine “good” routes to other networks based on reachability
information and policy

• Allows subnet to advertise its existence to the rest of the Internet:


“I am here”
eBGP, iBGP Connections

2b

2a 2c

1b 3b
2d
1a 1c ∂
3a 3c
AS 2
1d 3d

AS 1 eBGP connectivity AS 3
logical iBGP connectivity

1c gateway routers run both eBGP and iBGP protocols


BGP Basics
• BGP session: two BGP routers (“peers”) exchange BGP
messages:
– advertising paths to different destination network prefixes (BGP
is a “path vector” protocol)

• When AS3 Gateway Router 3a advertises path AS3, X to AS2


Gateway Router 2c:
– AS3 promises to AS2 it will forward datagrams towards X
Policy-based Routing

• Policy-based routing:
– gateway receiving route advertisement uses import policy to
accept/decline path (e.g., never route through AS Y)
– AS policy also determines whether to advertise path to other
other neighboring ASes
BGP: Achieving Policy Via
Advertisements (1 of 2)

Suppose an ISP only wants to route traffic to/from its customer


networks (does not want to carry transit traffic between other ISPs)

• A,B,C are provider networks

• X,W,Y are customer (of provider networks)

• X is dual-homed: attached to two networks

• policy to enforce: X does not want to route from B to C via X


– .. so X will not advertise to B a route to C
BGP: Achieving Policy Via
Advertisements (2 of 2)

Suppose an ISP only wants to route traffic to/from its customer


networks (does not want to carry transit traffic between other ISPs)
• A advertises path Aw to B and to C
• B chooses not to advertise BAw to C:
– B gets no “revenue” for routing CBAw, since none of C,A, w are B’s
customers
– C does not learn about CBAw path
• C will route CAw (not using B) to get to w
Why Different Intra-, Inter-AS Routing?
Policy:
• Inter-AS: admin wants control over how its traffic routed, who routes
through its net.
• Intra-AS: single admin, so no policy decisions needed

Scale:
• hierarchical routing saves table size, reduced update traffic

Performance:
• Intra-AS: can focus on performance (SP routes)
• Inter-AS: policy may dominate over performance

You might also like