Professional Documents
Culture Documents
Hierarchical and BGP
Hierarchical and BGP
Hierarchical and BGP
B
D
B
•Notice the C does not announce the
D link CG to Area 1.
•Notice that C gets a summary from G,
which is distances to destinations, like
distance vector.
•ABR G tells all routers in the Backbone that it can reach D in 2 hop. •C uses the distances from G to
•ABR F tells all routers in the Backbone that it can reach D in 1 hops
•ABR C tells all routers in Area 1 that it can reach D in 3 hops
determine its distances.
•ABR F tells all routers in Area 1 that it can reach D in 1 hop •C announces these distances to Area 1
•A decides B is the best next hop toward D •This is like a one hop distance vector
protocol
Area Border Router Summaries
The backbone is completely connected
because each router essentially sends
area border router
distance vector updates directly to its
E neighbor
F F
A in 1 hop A in 4 hop
C B in 2 hops
…
2 1 B in 5 hops
…
… 3 …
G
C 2
A 1 G
A in 2 hop
B in 3 hops
… Area 3
…
B Area 1
Area 2
D
223.1.1.1 223.1.1.4
223.1.1.3
223.1.9.2 223.1.7.0
223.1.9.1 223.1.7.1
223.1.8.1 223.1.8.0
223.1.2.6 223.1.3.27
Organization 0
200.23.16.0/23
Organization 1
“Send me anything
200.23.18.0/23 with addresses
Organization 2 beginning
200.23.20.0/23 . ISP1 200.23.16.0/20”
.
. .
. Internet
Organization 7 . Border Router
200.23.30.0/23
“Send me anything
ISP2
with addresses
beginning
199.31.0.0/16”
This way, the whole 32 bit address does not need to be examined
Hierarchical addressing: more specific
routes
ISP2 has a more specific route to Organization 1
Organization 0
200.23.16.0/23
“Send me anything
with addresses
Organization 2 beginning
200.23.20.0/23 . ISP1 200.23.16.0/20”
.
. .
. Internet
Organization 7 . Border Router
200.23.30.0/23
“Send me anything
ISP2 with addresses
Organization 1 beginning 199.31.0.0/16
or 200.23.18.0/23”
200.23.18.0/23
Longest prefix matching
Border Router Forwarding Table
Organization 0
200.23.16.0/23
Organization 1
“Send me anything
200.23.18.0/23 with addresses
Organization 2 beginning
200.23.20.0/23 . ISP1 ……”
.
. .
. Internet
Organization 7 . Border Router
200.23.30.0/23
“Send me anything
ISP2
with addresses
beginning
…..
Hierarchical Routing
Our routing study thus far has been an idealization
r all routers identical
r network “flat”
… not true in practice
AS2
Service provider of AS1 (e.g., AS1=UD and AS2=cogent)
E
(Recall that ASs (ISPs) sometimes
meet at NAPs. E.g., google: MAE-East)
An AS could also meet its provider at
The rest of the internet a POP.
to the rest of
the Internet
1.2.0.0/16
1.1.0.0/16 AS2 E
10.1.1.1/24
A 10.1.1.0/24 3
3
10.1.2.0/24
2 4 10.1.4.0/22 2
10.1.4.0/22
D
AS3 2.2.0.0/16
Interconnected ASes
3c
3a 2c
3b 2a
AS3 2b
1c AS2
1a 1b
1d AS1
r forwarding table
configured by both
intra- and inter-AS
Intra-AS
Routing
Inter-AS
Routing routing algorithm
intra-AS sets entries
algorithm algorithm
m
Forwarding for internal dests
inter-AS & intra-As
table
m
sets entries for
external dests
Example: Setting forwarding table in router 1d
r suppose AS1 learns (via inter-AS protocol) that subnet x is reachable via AS3
(gateway 1c) but not via AS2.
r inter-AS protocol propagates reachability info to all internal routers.
r router 1d determines from intra-AS routing info that its interface I is on the least
cost path to 1c.
m installs forwarding table entry (x,I)
r Alternatively, 1d has two table entries
m One entry says x is reachable via 1c (determined by IBGP)
m A second entry says which is the next hop to reach 1c (determined by intra-routing protocol)
x
3c
3a 2c
3b 2a
AS3 2b
1c AS2
1a 1b AS1
1d
Example: Choosing among multiple ASes
r now suppose AS1 learns from inter-AS protocol that subnet x
is reachable from AS3 and from AS2.
r to configure forwarding table, router 1d must determine
towards which gateway it should forward packets for dest x.
m this is also job of inter-AS routing protocol!
m If both gateways are equivalent, then the intra-AS routing
protocol will route packets to the best gateway
• This is called hot potato routing: send packet towards closest of two
routers.
x
3c
3a 2c
3b 2a
AS3 2b
1c AS2
1a 1b
1d AS1
Hot Potato Routing
128.4.0.0/16
AS1
A B
AS2
•AS2 could give send the pkt to gateway B – hot potato routing.
•But AS1 would prefer AS2 to carry its own traffic.
•So AS1 might require that AS2 gives higher priority to gateway A.
•But how can AS1 enforce AS2 to do this?
Example: Choosing among multiple ASes
r now suppose AS1 learns from inter-AS protocol that
subnet x is reachable from AS3 and from AS2.
r to configure forwarding table, router 1d must
determine which gateway it should forward packets
for dest x.
m this is also job of inter-AS routing protocol!
r hot potato routing: send packet towards closest of
two routers.
eBGP session
3c iBGP session
3a 2c
3b 2a
AS3 2b
1c AS2
1a 1b
AS1 1d
Aggregation Problem
1.1.1.0/24
1.1.0.0/22 1.1.0.0/22
1.1.2.0/24
ISP
ISP
1.1.3.0/24 ISP
Y
W
1.1.4.0/24
1.1.4.0/24 1.1.4.0/24
ISP ISP
ISP ISP X
r A advertises path AW to B
r B advertises path BAW to X
r Should B advertise path BAW to C?
m No way! B gets no “revenue” for routing CBAW
since neither W nor C are B’s customers
m B wants to force C to route to w via A
m B wants to route only to/from its customers!
BGP route processing
configuration configuration
Adj-rib-out peer
peer Adj-rib-in
Sample routing environment
•deny 0/0 from AS1
•Give 192.213.1.0/24 from •Do not propagate 0/0
AS3
AS1 AS1 better preference •Do not send 193.214.10.0/24 to AS4
•Accept other routes •Give 192.213.1.0/24 with metric = 10
to AS3
•193.214.10.0/24 path=(AS5, AS2)
•192.213.1.0/24 path=(AS5, AS1)
192.213.1.0/24
metric=10
0/0
input output •172.16.10.0/24 path=(AS5)
decision
policy routes policy
process
engine engine
•172.16.10.0/24 path=(AS5)
•192.213.1.0/24 path=(AS5 AS1)
•Use 0/0 from AS2
192.213.1.0/24 •Use 192.213.1.0/24 from AS1
AS2
193.214.10.0/24
0/0
•Use 193.214.10.0/24 from AS2
•Use 172.16.10.0/24 from AS5 (this
AS4
AS)
Fun with BGP
Policy:
r Inter-AS: admin wants control over how its traffic
routed, who routes through its net.
r Intra-AS: single admin, so no policy decisions needed
Scale:
r hierarchical routing saves table size, reduced update
traffic
Performance:
r Intra-AS: can focus on performance
r Inter-AS: policy may dominate over performance