Академический Документы
Профессиональный Документы
Культура Документы
4. 1 Introduction
4.2 Virtual circuit and
datagram networks
4.3 Whats inside a
router
4.4 IP: Internet
Protocol
Datagram format
IPv4 addressing
ICMP
IPv6
Internet
RIP
OSPF
BGP
multicast routing
Hierarchical OSPF
Perhaps some routers dont need to know about every link.
E
C
G
A
ABR
ABR
ABR
ABR
C
G
C
G
A
B
D
ABR C announces to Area 1 that it can reach Area 2 in 1 hops (and
C
G
A
B
D
ABR G tells all routers in the Backbone that it can reach D in 2 hop.
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
ABR F tells all routers in Area 1 that it can reach D in 1 hop
A decides B is the best next hop toward D
link CG to Area 1.
Notice that C gets a summary from G,
which is distances to destinations, like
distance vector.
C uses the distances from G to
determine its distances.
C announces these distances to Area 1
This is like a one hop distance vector
protocol
C
G
A
B
D
A in 1 hop
B in 2 hops
Area 1
A in 4 hop
B in 5 hops
A in 2 hop
B in 3 hops
Area 3
Area 2
vector protocol
Convergence time: 1
Loops are not possible
datagram networks
4.3 Whats inside a
router
4.4 IP: Internet
Protocol
Datagram format
IPv4 addressing
ICMP
IPv6
Internet
RIP
OSPF
BGP
multicast routing
Recall: Subnets
223.1.1.2
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.2.1
223.1.3.27
223.1.2.2
223.1.3.1
223.1.3.2
IP addressing: CIDR
CIDR: Classless InterDomain Routing
subnet portion of address of arbitrary length
address format: a.b.c.d/x, where x is # bits in
subnet portion of address
Subnet part or
CIDR-block
host
part
ISP's block
200.23.16.0/20
Organization 0
Organization 1
Organization 2
...
200.23.16.0/23
200.23.18.0/23
200.23.20.0/23
.
Organization 7
200.23.30.0/23
200.23.16.0/23
Organization 1
200.23.18.0/23
Organization 2
200.23.20.0/23
Organization 7
.
.
.
.
.
.
ISP1
Send me anything
with addresses
beginning
200.23.16.0/20
Border Router
200.23.30.0/23
ISP2
Send me anything
with addresses
beginning
199.31.0.0/16
This way, the whole 32 bit address does not need to be examined
Internet
200.23.16.0/23
Organization 2
200.23.20.0/23
Organization 7
.
.
.
.
.
.
ISP1
Send me anything
with addresses
beginning
200.23.16.0/20
Border Router
200.23.30.0/23
ISP2
Organization 1
200.23.18.0/23
Send me anything
with addresses
beginning 199.31.0.0/16
or 200.23.18.0/23
Internet
Link Interface
0
1
1
2
200.23.16.0/23
Organization 1
200.23.18.0/23
Organization 2
200.23.20.0/23
Organization 7
.
.
.
.
.
.
ISP1
Send me anything
with addresses
beginning
Border Router
200.23.30.0/23
ISP2
Send me anything
with addresses
beginning
..
Internet
Hierarchical Routing
Our routing study thus far has been an idealization
all routers identical
network flat
not true in practice
scale: with 200 million destinations:
administrative autonomy
Trade secret
Improves security
Hierarchical Routing
UD is an AS
Some companies have routers but
are not Ass
Gateway router
Direct link to router in another
AS
Gateway routers run a common
inter-networking routing protocol
Simple example
Connections to other ASs and the rest of the Internet
AS2
Forwarding table
Interface
Prefix
4
10.1.1.0/24
3
10.1.2.0/24
2
10.1.4.0/22
10.1.1.0/24
4 C
3
1
B
2
Forwarding table
Prefix
3
10.1.1.0/24
3
10.1.2.0/24
2
10.1.4.0/22
AS1
3
A
2
10.1.2.0/24
10.1.4.0/22
Forwarding table
Interface
Prefix
3
10.1.1.0/24
3
10.1.2.0/24
2
10.1.4.0/22
AS2
Forwarding table
Interface
Prefix
4
10.1.1.0/24
3
10.1.2.0/24
2
10.1.4.0/22
1
0.0.0.0/0
10.1.1.0/24
4 C
3
1
B
2
Forwarding table
Prefix
3
10.1.1.0/24
3
10.1.2.0/24
2
10.1.4.0/22
1
0.0.0.0/0
3
A
2
10.1.2.0/24
10.1.4.0/22
Forwarding table
Interface
Prefix
3
10.1.1.0/24
3
10.1.2.0/24
2
10.1.4.0/22
1
0.0.0.0/0
AS1
AS2
10.1.1.0/24
1
B
4 C 1
2
3
3
10.1.1.1/24
10.1.4.0/22
Forwarding table
Prefix
3
10.1.1.0/24
3
10.1.2.0/24
2
10.1.4.0/22
1
A
2
AS1
Forwarding table
Interface
Prefix
3
10.1.1.0/24
3
10.1.2.0/24
2
10.1.4.0/22
AS3
2.2.0.0/16
Interconnected ASes
3c
3a
3b
AS3
1a
2a
1c
1d
1b
Intra-AS
Routing
algorithm
2c
AS2
AS1
Inter-AS
Routing
algorithm
Forwarding
table
2b
forwarding table
configured by both
intra- and inter-AS
routing algorithm
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)
Alternatively, 1d has two table entries
3c
3a
3b
AS3
1a
x
2a
1c
1d
1b AS1
2c
2b
AS2
3c
3a
3b
AS3
1a
2a
1c
1d
1b
2c
AS2
AS1
2b
AS1
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?
Determine from
forwarding table the
Interface that leads
to least-cost gateway.
Enter (x,I) in
forwarding table
the de
facto standard
BGP provides each AS a means to:
1.
2.
3.
BGP basics
pairs of routers (BGP peers) exchange routing info over semi-
eBGP session
3c
3a
3b
AS3
1a
AS1
iBGP session
2a
1c
1d
1b
2c
AS2
2b
eBGP session
3c
3a
3b
AS3
1a
AS1
iBGP session
2a
1c
1d
1b
2c
AS2
2b
Aggregation Problem
1.1.1.0/24
1.1.2.0/24
1.1.0.0/22
ISP
ISP
Y
1.1.3.0/24
1.1.4.0/24
1.1.0.0/22
ISP
W
1.1.4.0/24
ISP
1.1.4.0/24
ISP
ISP
ISP
X
1.
2.
3.
4.
BGP messages
BGP messages exchanged using TCP.
BGP messages:
B
W
provider
network
customer
network:
C
Y
B
W
provider
network
customer
network:
C
Y
A advertises path AW to B
B advertises path BAW to X
Should B advertise path BAW to C?
Router to withdraw
Attributes of routes to prefixes in NLRI
NLRI
The NLRI is a list of prefixes that the list of attributes applies to. If two prefixes have
different attributes, then these two prefixes need to be announced with different
UPDATE messages.
In OSPF each path is a list of routes and a total cost (two attributes). In BGP, routes have
many attributes, the cost (in AS hops) is only one of the attributes
configuration
from
peers
input
policy routing
engine decision
configuration
routing
table
output
policy
engine
to
peers
RIBs
peer
Adj-rib-in
Adj-rib-out
peer
Adj-rib-in
Adj-rib-out
peer
Adj-rib-out
peer
Adj-rib-out
peer
peer
peer
Adj-rib-in
Adj-rib-in
Input
Policy
engine
BGP
Loc-RIB
decision
Input
Policy
engine
peer
AS1
AS3
to AS3
192.213.1.0/24
0/0
AS2
input
policy
engine
192.213.1.0/24
193.214.10.0/24
0/0
decision
process
routes
Use
Use
Use
Use
output
policy
engine
metric=10
172.16.10.0/24 path=(AS5)
172.16.10.0/24 path=(AS5)
192.213.1.0/24 path=(AS5 AS1)
AS4
announcements
One way to use routeviews is with dig
Answer section:
4.128.aspath.routeviews.org 600 IN TXT 5056 1238 174 34
128.4.0.0 16
Syntax = ASPath Prefix prefix length
Open bgp030408p39.Partial
http://www.eecis.udel.edu/~bohacek/Classes/ELEG651Spring2008/bgp030508p39.Partial
An old (2003) partial list of BGP announcements received by several routers
Scale:
hierarchical routing saves table size, reduced update
traffic
Performance:
Intra-AS: can focus on performance
Inter-AS: policy may dominate over performance