0% found this document useful (0 votes)
27 views68 pages

Chapter5 2021

Chapter 5 focuses on the network layer's control plane, detailing traditional routing algorithms and their implementations such as OSPF and BGP. It discusses routing protocols, including link-state and distance vector algorithms, and introduces Dijkstra's and Bellman-Ford algorithms for finding least-cost paths. The chapter also addresses the challenges of routing in dynamic environments and the importance of efficient routing protocols in the Internet.

Uploaded by

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

Chapter5 2021

Chapter 5 focuses on the network layer's control plane, detailing traditional routing algorithms and their implementations such as OSPF and BGP. It discusses routing protocols, including link-state and distance vector algorithms, and introduces Dijkstra's and Bellman-Ford algorithms for finding least-cost paths. The chapter also addresses the challenges of routing in dynamic environments and the importance of efficient routing protocols in the Internet.

Uploaded by

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

Chapter 5

Network Layer: Control Plane


Chapter 5: Goals
understand principles behind network control plane
 traditional routing algorithms
 Routing algorithms

and their instantiation, implementation in the


Internet:
 OSPF, BGP
Chapter 5: outline
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
Network-layer functions
Recall: two network-layer functions:
 forwarding: move
packets from router’s data plane
input to appropriate
router output
 routing: determine route
taken by packets from control plane
source to destination

wo approaches to structuring network control plane


per-router control (traditional)
ogically centralized control (software defined networking)
Routing protocols

Routing protocol goal: determine “good”


paths (equivalently, routes), from sending hosts
to receiving host, through network of routers
path: sequence of routers packets will traverse

in going from given initial source host to given


final destination host
“good”: least “cost”, “fastest”, “least congested”

routing: a “top-10” networking challenge!


Graph abstraction
5
3
v w 5
2
u 2 1 z
3
1 2
x 1
y
graph: G = (N,E)

N = set of routers = { u, v, w, x, y, z }

E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }

aside: graph abstraction is useful in other network contexts, e.g.,


P2P, where N is set of peers and E is set of TCP connections
Graph abstraction: costs
5
c(x,x’) = cost of link (x,x’)
3 e.g., c(w,z) = 5
v w 5
2
u cost could always be 1, or
2
3
1 z inversely related to bandwidth,
1 2 or inversely related to
x 1
y
congestion

cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp)

key question: what is the least-cost path between u and z ?


outing algorithm: algorithm that finds that least cost path
Routing algorithm
classification
Q: global or decentralized Q: static or dynamic?
information?
static:
global:  routes change slowly over
 all routers have complete
time
topology, link cost info
 “link state” algorithms dynamic:
 routes change more
decentralized:
 router knows physically-
quickly
connected neighbors, link costs  periodic update
to neighbors  in response to link cost
 iterative process of changes
computation, exchange of info
with neighbors
 “distance vector” algorithms
Chapter 5: outline
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
A Link-State Routing
Algorithm
Dijkstra’s algorithm notation:
 net topology, link costs  c(x,y): link cost from
known to all nodes node x to y; = ∞ if not
 accomplished via “link state direct neighbors
broadcast”  D(v): current value of
 all nodes have same info cost of path from source
 computes least cost paths to dest. v
from one node (‘source”)  p(v): predecessor node
to all other nodes along path from source to
 gives forwarding table for v
that node  N': set of nodes whose
 iterative: after k least cost path definitively
iterations, know least cost known
path to k dest.’s
Dijsktra’s Algorithm
1 Initialization:
2 N' = {u}
3 for all nodes v
4 if v adjacent to u
5 then D(v) = c(u,v)
6 else D(v) = ∞
7
8 Loop
9 find w not in N' such that D(w) is a minimum
10 add w to N'
11 update D(v) for all v adjacent to w and not in N' :
12 D(v) = min( D(v), D(w) + c(w,v) )
13 /* new cost to v is either old cost to v or known
14 shortest path cost to w plus cost from w to v */
15 until all nodes in N'
Dijkstra’s algorithm: example
D(v) D(w) D(x) D(y) D(z)
Step N' p(v) p(w) p(x) p(y) p(z)
0 u 7,u 3,u 5,u ∞ ∞
1 uw 6,w 5,u 11,w ∞
2 uwx 6,w 11,w 14,x
3 uwxv 10,v 14,x
4 uwxvy 12,y
5 uwxvyz x
9

notes: 5 7
4
 construct shortest path
tree by tracing 8
predecessor nodes 3
u w y z
 ties can exist (can be 2
broken arbitrarily)
3
7 4
v
Dijkstra’s algorithm: another example
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2 uxy 2,u 3,y 4,y
3 uxyv 3,y 4,y
4 uxyvw 4,y
5 uxyvwz

5
3
v w 5
2
u 2 1 z
3
1 2
x 1
y
Dijkstra’s algorithm: example (2)
resulting shortest-path tree from u:

v w
u z
x y

resulting forwarding table in u:


destination link
v (u,v)
x (u,x)
y (u,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)
oscillations possible:
 e.g., support link cost equals amount of carried traffic:

1
A 1+e A A A
2+e 0 0 2+e 2+e 0
D 0 0 B D 1+e 1 B D B D 1+e 1 B
0 0
0 e 0 0
1
C C 0 1
C 1+e C 0
1
e
given these costs, given these costs, given these costs,
initially find new routing…. find new routing….find new routing….
resulting in new costs resulting in new cost
resulting in new costs
Chapter 5: outline
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
Distance vector algorithm
Bellman-Ford equation (dynamic
programming)

let
dx(y) := cost of least-cost path from x to
y
then v

dx(y) = min {c(x,v) +neighbor


cost from dv(y) }v to destination
cost to neighbor v

min taken over all neighbors v of x


Bellman-Ford example
5
3
clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3
v w 5
2
u 2 1 z B-F equation says:
3
1 2 du(z) = min { c(u,v) + dv(z),
x 1
y
c(u,x) + dx(z),
c(u,w) + dw(z) }
= min {2 + 5,
1 + 3,
5 + 3} = 4
ode achieving minimum is next
op in shortest path, used in forwarding table
Distance vector algorithm
 Dx(y) = estimate of least cost from x to y
 x maintains distance vector Dx = [Dx(y): y є N ]
 node x:
 knows cost to each neighbor v: c(x,v)
 maintains its neighbors’ distance vectors. For
each neighbor v, x maintains
Dv = [Dv(y): y є N ]
Distance vector algorithm
key idea:
 from time-to-time, each node sends its own
distance vector estimate to neighbors
 when x receives new DV estimate from neighbor,
it updates its own DV using B-F equation:
Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N

 under minor, natural conditions, the estimate


Dx(y) converge to the actual least cost dx(y)
Distance vector algorithm
iterative, asynchronous: each node:
each local iteration
caused by:
 local link cost change wait for (change in local link
cost or msg from neighbor)
 DV update message from
neighbor
distributed: recompute estimates
 each node notifies
neighbors only when its
DV changes if DV to any dest has
 neighbors then notify their changed, notify neighbors
neighbors if necessary
Dx(z) = min{c(x,y) +
Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)}
= min{2+0 , 7+1} = 2 Dy(z), c(x,z) + Dz(z)}
= min{2+1 , 7+0} = 3
node x cost to cost to
table x y z x y z
x 0 2 7 x 0 2 3

from
from

y ∞∞ ∞ y 2 0 1
z ∞∞ ∞ z 7 1 0

node y cost to
table x y z y
2 1
x ∞ ∞ ∞
x z
from

y 2 0 1 7
z ∞∞ ∞

node z cost to
table x y z
x ∞∞ ∞
from

y ∞∞ ∞
z 7 1 0
time
Dx(z) = min{c(x,y) +
Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)}
= min{2+0 , 7+1} = 2 Dy(z), c(x,z) + Dz(z)}
= min{2+1 , 7+0} = 3
node x cost to cost to cost to
table x y z x y z x y z
x 0 2 7 x 0 2 3 x 0 2 3

from
from

y ∞∞ ∞ y 2 0 1 y 2 0 1

from
z ∞∞ ∞ z 7 1 0 z 3 1 0
node y cost to cost to cost to
table x y z x y z x y z y
2 1
x ∞ ∞ ∞ x 0 2 7 x 0 2 3 x z
from

from

y 2 0 1 y 2 0 1 7

from
y 2 0 1
z ∞∞ ∞ z 7 1 0 z 3 1 0

node z cost to cost to cost to


table x y z x y z x y z

x ∞∞ ∞ x 0 2 7 x 0 2 3
from

from

y 2 0 1 y 2 0 1
from

y ∞∞ ∞
z 7 1 0 z 3 1 0 z 3 1 0
time
Distance vector: link cost changes
link cost changes: 1
 node detects local link cost change 4
y
1
 updates routing info, recalculates x z
distance vector 50
 if DV changes, notify neighbors

“good t0 : y detects link-cost change, updates its DV, informs its


news neighbors.
travels t1 : z receives update from y, updates its table, computes new
fast” least cost to x , sends its neighbors its DV.

t2 : y receives z’s update, updates its distance table. y’s least costs
do not change, so y does not send a message to z.
Distance vector: link cost changes
link cost changes: 60
 node detects local link cost change 4
y
1
 bad news travels slow - “count to x z
infinity” problem! 50
 44 iterations before algorithm
stabilizes: see text
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)
 will this completely solve count to infinity problem?
Distance Vector: link cost increases
Dy(x) = min{c(y,x) + Dx(x), c(y,z) + Dz(x)}
= min{60+0 , 1+5} = 6
node y table
cost to when y detects
cost to
x y z
x y z
y 4 0 1
y 6 0 1
from

x 0 4 5
from
x
z 5 1 0
z
node z table
cost to cost to
x y z x y z
z 5 1 0 z 7 1 0
from

y 4 0 1 from
y
x 0 4 5 x
node x table
cost to 60
Dz(x) = min{c(z,y) + Dy(x), c(z,x) + Dx(x)} y
x y z 4 1
= min{1+6, 50+0} = 7
x 0 4 5 x z
50
from

y 4 0 1
z 5 1 0 Network Layer
Distance Vector: link cost increases

node y table Dy(x) = min{c(y,x) + Dx(x), c(y,z) + Dz(x)}


cost to when y detects
= min{60+0 , 1+7} = 8
cost to cost to
x y z
x y z x y z
y 4 0 1
y 6 0 1
from

x 0 4 5 y 8 0 1
from
x

from
z 5 1 0 x
z z
node z table
cost to cost to
x y z cost to
x y z x y z
z 5 1 0 z 7 1 0 z 9 1 0
from

y 4 0 1 from y

from
x 0 4 5 y
x x
node x table
cost to 60
Dz(x) = min{c(z,y) + Dy(x), c(z,x) + Dx(x)} y
x y z 4 1
= min{1+8, 50+0} = 9
x 0 4 5 x z
50
from

y 4 0 1
z 5 1 0 Network Layer
Comparison of LS and DV algorithms
message complexity robustness: what happens if
 LS: with n nodes, E links, O(nE) router malfunctions?
msgs sent LS:
 DV: exchange between neighbors  node can advertise incorrect
only link cost
 convergence time varies  each node computes only its
own table
speed of convergence DV:
 LS: O(n2) algorithm requires O(nE)  DV node can advertise
msgs
 may have oscillations incorrect path cost
 each node’s table used by
 DV: convergence time varies others
 may also have oscillations • error propagate thru
 may be routing loops network
 count-to-infinity problem
Chapter 5: outline
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
Hierarchical routing
our routing study thus far - idealization
 all routers identical
 network “flat”

… not true in practice

scale: with 600 million administrative autonomy


destinations:  internet = network of
 can’t store all dest’s in networks
routing tables!  each network admin may
 routing table exchange want to control routing in
would swamp links! its own network
Hierarchical routing
 aggregate routers into gateway router:
regions, “autonomous  at “edge” of its own AS
systems” (AS)  has link to router in
another AS
 routers in same AS run
same routing protocol
 “intra-AS” routing
protocol
 routers in different AS
can run different intra-
AS routing protocol
Interconnected ASes

3c
3a 2c
3b 2a
AS3 2b
1c AS2
1a 1b AS1
1d  forwarding table
configured by both intra-
and inter-AS routing
Intra-AS Inter-AS algorithm
Routing Routing
algorithm algorithm  intra-AS sets entries
Forwarding
for internal dests
table  inter-AS & intra-AS sets
entries for external
dests
Inter-AS tasks
 suppose router in AS1 AS1 must:
receives datagram 1. learn which dests are
destined outside of AS1: reachable through AS2,
 router should forward which through AS3
packet to gateway 2. propagate this
router, but which one? reachability info to all
routers in AS1
job of inter-AS routing!

3c
3a
3b
AS3 2c other
1c 2a networks
other 1a 2b
networks 1b AS2
AS1 1d
Example: setting forwarding table in
router 1d
 suppose AS1 learns (via inter-AS protocol) that subnet x
reachable via AS3 (gateway 1c), but not via AS2
 inter-AS protocol propagates reachability info to all internal
routers
 router 1d determines from intra-AS routing info that its interface
I is on the least cost path to 1c
 installs forwarding table entry (x,I)

3c … x
3a
3b
AS3 2c other
1c 2a networks
other 1a 2b
networks 1b AS2
AS1 1d
Example: choosing among multiple ASes
 now suppose AS1 learns from inter-AS protocol that subnet
x is reachable from AS3 and from AS2.
 to configure forwarding table, router 1d must determine
which gateway it should forward packets towards for dest x
 this is also job of inter-AS routing protocol!

3c … x …
3b
3a …
AS3 2c other
1c 2a networks
other 1a 2b
networks 1b AS2
AS1 1d
?
Example: choosing among multiple ASes
 now suppose AS1 learns from inter-AS protocol that subnet
x is reachable from AS3 and from AS2.
 to configure forwarding table, router 1d must determine
towards which gateway it should forward packets for dest x
 this is also job of inter-AS routing protocol!
 hot potato routing: send packet towards closest of two
routers.

use routing info determine from


learn from inter-AS hot potato routing: forwarding table the
from intra-AS
protocol that subnet choose the gateway interface I that leads
protocol to determine
x is reachable via that has the to least-cost gateway.
costs of least-cost
multiple gateways smallest least cost Enter (x,I) in
paths to each
of the gateways forwarding table
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 (IS-IS protocol
essentially same as OSPF)
 IGRP: Interior Gateway Routing Protocol (Cisco
proprietary for decades, until 2016)
OSPF (Open Shortest Path First)
 “open”: publicly available
 uses link-state algorithm
 link state packet dissemination
 topology map at each node
 route computation using Dijkstra’s algorithm
 router floods OSPF link-state advertisements to all
other routers in entire AS
 carried in OSPF messages directly over IP (rather than TCP
or UDP
 link state: for each attached link
 IS-IS routing protocol: nearly identical to OSPF
Hierarchical OSPF
boundary router
backbone router

backbone
area
border
routers

area 3

internal
routers
area 1
area 2
Hierarchical OSPF
 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.
Chapter 5: outline
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
Internet inter-AS routing: BGP
 BGP (Border Gateway Protocol): the de
facto inter-domain routing protocol
 “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 rest of Internet: “I am here”
eBGP & iBGP routers

2b

2a 2c

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

AS 1 eBGP connectivity AS 3
iBGP connectivity

1c gateway routers run both eBGP and iBGP protools


BGP routers exchange messages

Establish session on
TCP port 179 AS1
eBGP router

BGP session
Exchange all
eBGP router
active routes
AS2

Exchange incremental
While connection is ALIVE,
updates exchange route UPDATE
messages
BGP message types
 Exchanged over TCP connection among two BGP
routers (“peers”)

 BGP message types:


 OPEN: opens TCP connection to peer and
authenticates sender
 UPDATE: advertises new path (or withdraws old)
 KEEPALIVE: keeps connection alive in absence of
UPDATES; also ACKs OPEN request
 NOTIFICATION: reports errors in previous msg;
also used to close connection
BGP basics
 BGP session: 2 BGP routers exchange BGP messages over semi-
permanent TCP connection:
• 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 that it forwards pkts towards X
AS 3 3b
AS 1 1b
3a 3c
1a 1c
AS 2 2b 3d X
1d
BGP advertisement:
2a 2c AS3, X

2d
AS Numbers (ASNs)
 ASNs are 4-byte #s now; denote units of routing policy
 ASN once was 2-byte before 2007.
 AS 4200000000 ~ 4294967294 (94,967,295 ASes) are
reserved for private usage (not visible in the Internet).
• Level 3 Communications, Inc: 1
• MIT: 3
• UCB: 25
• USC: 47
• UCLA: 52
• JPL: 127

• AT&T: 2386, 2686, 7018, 5074, 5075, …


• UUNET: 701, 702, 284, 12199, …
• Sprint: 1239, 1240, 6211, 6242, …
Source:
ASes are well connected! (AS Graphs)

The subgraph showing all ASes that have more than 100 neighbors in full
graph of 11,158 nodes. July 6, 2001. Point of view: AT&T route-server
4-48
Path attributes and BGP routes
 advertised prefix includes BGP attributes
 prefix + attributes = “route”
 two important attributes:
 AS-PATH: contains ASs through which prefix advertisement
has passed: e.g., AS 67, AS 17
 NEXT-HOP: indicates specific internal-AS router to next-hop
AS. (may be multiple links from current AS to next-hop-AS)
 Policy-based routing: BGP routers
receive, accept/reject based on “policies”,
and advertise
 e.g., never route through AS x
Select best route using Attributes

path advertisement
192.0.2.0/24
pick me! Given multiple
path advertisement path advertisement
routes to the same
192.0.2.0/24 192.0.2.0/24
prefix, a BGP router
pick me! pick me! must pick at most one
“best route”
192.0.2.0/24
pick me! (Note: it could reject
path advertisement
them all!)
4-50
Route selection criteria in BGP
 Select route based on:
1. local preference value: policy decision
2. shortest AS-PATH
3. closest NEXT-HOP router
4. ……

More details later


BGP path advertisement
AS3 3b
AS1 1b
3a 3c
1a 1c
AS2 2b 3d X
1d AS3,X
AS2,AS3,X
2a 2c

2d

 AS2 router 2c receives path advertisement AS3,X (via eBGP)


from AS3 router 3a
 Based on AS2 policy, AS2 router 2c accepts path AS3,X,
propagates (via iBGP) to all AS2 routers
 Based on AS2 policy, AS2 router 2a advertises (via eBGP) path AS2, AS3, X to
AS1 router 1c
BGP path advertisement
AS3 3b
AS1 1b AS3,X
3a 3c
1a 1c
AS2 2b 3d X
1d AS3,X
AS2,AS3,X
2a 2c

2d
gateway router may learn about multiple paths to
destination:
 AS1 gateway router 1c learns path AS2,AS3,X from 2a
 AS1 gateway router 1c learns path AS3,X from 3a
 Based on policy, AS1 gateway router 1c chooses path
AS3,X, and advertises path within AS1 via iBGP
Another example: How AS path is formed
135.207.0.0/16 AS 1129
AS Path = 1755 1239 7018 6341
Global Access

135.207.0.0/16
AS 1755 135.207.0.0/16
AS Path = 1129 1755 1239 7018 6341
AS Path = 1239 7018 6341 Ebone
135.207.0.0/16
AS Path = 1239 3549 7018 6341

AS 1239 135.207.0.0/16 AS3 AS 1239


Sprint
Sprint AS Path = 7018 6341

AS7018 135.207.0.0/16
135.207.0.0/16 AS Path = 3549 7018 6341
AS Path = 6341
AT&T

AS 6341 135.207.0.0/16
AS 3549
AT&T Research AS Path = 7018 6341 Global Crossing

135.207.0.0/16
Prefix Originated Network Layer 5-54
An Example of BGP Routing Table
show ip bgp
BGP table version is 111849680, local router ID is 203.62.248.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

. . .
*>i192.35.25.0 134.159.0.1 50 0 16779 1 701 703 i
*>i192.35.29.0 166.49.251.25 50 0 5727 7018 14541 i
*>i192.35.35.0 134.159.0.1 50 0 16779 1 701 1744 i
*>i192.35.37.0 134.159.0.1 50 0 16779 1 3561 i
*>i192.35.39.0 134.159.0.3 50 0 16779 1 701 80 i
*>i192.35.44.0 166.49.251.25 50 0 5727 7018 1785 i
*>i192.35.48.0 203.62.248.34 55 0 16779 209 7843 225 225 225 225 225 i
*>i192.35.49.0 203.62.248.34 55 0 16779 209 7843 225 225 225 225 225 i
*>i192.35.50.0 203.62.248.34 55 0 16779 3549 714 714 714 i
*>i192.35.51.0/25 203.62.248.34 55 0 16779 3549 14744 14744 14744 14744 14744 14744 14744

14744 i
. . .

Thanks to Geoff Huston. http://www.telstra.net/ops on July 6, 2001

 Use “whois” queries to associate an ASN with “owner” (for


example, http://www.arin.net/whois/arinwhois.html)
 7018 = AT&T Worldnet, 701 =Uunet, 3561 = Cable & Wireless, …
 BGP table size: 881264 prefixes (5/13/2021)
Network Layer 4-55
BGP Routing Table Size

Data by 5/13/2021
 BGP table size: 881264 prefixes
 # of ASes in routing system: 71490
 # of ASes announcing only one prefix: 25059
 Largest number of prefixes announced by an AS:
8563
 AS8151: Uninet S.A. de C.V., MX
 In the US, VIASAT-SP-BACKBONE (AS7155) has
4027 prefixes; CableOne (AS11492) has 4771
prefixes; Amazon-2 (AS16509) has 5135 prefixes

Source: https://www.cidr-report.org/as2.0/

Network Layer 4-56


BGP table size evolution over time (this week)

Source: https://www.cidr-report.org/as2.0/

Network Layer 4-57


BGP, OSPF, forwarding table entries
Q: how does router set forwarding table entry to distant prefix?

AS3 3b
AS1 1b AS3,X
1 AS3,X
3a 3c
1a 2 1c
local link AS2 2b 3d X
interfaces 2 1d 1 AS3,X
at 1a, 1d AS2,AS3,X
2a 2c
physical link
2d

dest interface  recall: 1a, 1b, 1c learn about dest X via iBGP from 1c:
… … “path to X goes through 1c”
X 1  1d: OSPF intra-domain routing: to get to 1c,
… … forward over outgoing local interface 1
BGP, OSPF, forwarding table entries
Q: how does router set forwarding table entry to distant prefix?

AS3 3b
AS1 1b
1
3a 3c
1a 2 1c
AS2 2b 3d X
1d
2a 2c

2d

dest interface  recall: 1a, 1b, 1c learn about dest X via iBGP from 1c:
… … “path to X goes through 1c”
X 2  1d: OSPF intra-domain routing: to get to 1c,
… … forward over outgoing local interface 1
 1a: OSPF intra-domain routing: to get to 1c,
forward over outgoing local interface 2
BGP route selection
 BGP router may learn about more than 1
route to destination AS, selects route based
on:
1. local preference value attribute: policy
decision
2. shortest AS-PATH
3. closest NEXT-HOP router: hot potato routing
4. additional criteria
Hot Potato Routing
AS3 3b
AS1 1b
3a 3c
1a 1c
AS2 2b 3d X
1d 112
AS3,X
152
AS1,AS3,X 2a 263 2c
201
OSPF link weights
2d

 2d learns (via iBGP) it can route to X via 2a or 2c


 hot potato routing: choose local gateway that has least intra-domain cost (e.g., 2d
chooses 2a, even though more AS hops to X): don’t worry about inter-domain cost!
BGP: achieving policy via advertisements
legend: provider
B network
X
W A
customer
C network:

 A,B,C are provider networks


 X,W,Y are customer (of provider networks)
 X is dual-homed: attached to two networks
 X does not want to route from B via X to C
 .. so X will not advertise to B a route to C
BGP: achieving policy via advertisements
legend: provider
B network
X
W A
customer
C network:

Y
 A advertises path AW to B
 B advertises path BAW to X
 Should B advertise path BAW to C?
 No way! B gets no “revenue” for routing CBAW since neither W nor C
are B’s customers
 B wants to force C to route to w via A
 B wants to route only to/from its customers!
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
 inter-AS: policy may dominate over performance
Chapter 5: outline
5.1 introduction 5.5 The SDN control
5.2 routing protocols plane
 link state 5.6 ICMP: The Internet
 distance vector Control Message
Protocol
5.3 intra-AS routing in the
Internet: OSPF 5.7 Network management
and SNMP
5.4 routing among the ISPs:
BGP

Network Layer: Control Plane 5-65


ICMP: internet control message
protocol
 used by hosts & routers
to communicate Type Code description
network-level 0 0 echo reply (ping)
information 3 0 dest. network unreachable
 error reporting: 3 1 dest host unreachable
unreachable host, 3 2 dest protocol unreachable
network, port, protocol 3 3 dest port unreachable
 echo request/reply (used 3 6 dest network unknown
by ping) 3 7 dest host unknown
 network-layer “above” 4 0 source quench (congestion
IP: control - not used)
 ICMP msgs carried in IP 8 0 echo request (ping)
datagrams 9 0 route advertisement
 ICMP message: type, 10 0 router discovery
code plus first 8 bytes 11 0 TTL expired
of IP datagram causing 12 0 bad IP header
error
Network Layer: Control Plane 5-66
Traceroute and ICMP
 source sends series of UDP  when ICMP message
segments to destination arrives, source records
 first set has TTL =1 RTTs
 second set has TTL=2, etc.
 unlikely port number stopping criteria:
 when datagram in nth set  UDP segment
arrives to nth router: eventually arrives at
 router discards datagram and destination host
sends source ICMP message  destination returns
(type 11, code 0) ICMP “port
 ICMP message include name unreachable” message
of router & IP address (type 3, code 3)
 source stops

3 probes 3 probes

3 probes
Network Layer: Control Plane 5-67
Chapter 5: summary
we’ve learned a lot!
 approaches to network control plane
 per-router control (traditional)
 logically centralized control (software defined networking)
 traditional routing algorithms
 implementation in Internet: OSPF, BGP
 Internet Control Message Protocol

next stop: link layer!


Network Layer: Control Plane 5-68

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy