Beruflich Dokumente
Kultur Dokumente
Outline
Hierarchical routing refresher EGP BGP
Slides derived from the book Computer Networking by Kurose and Ross
Confusing names
In the early days of the Internet routers were
often usually called gateways Hence the ERP (exterior router protocol) and IRP (interior router protocol) were often referred to as exterior (or interior) gateway protocol, abbreviated as EGP and IGP Since EGP is also a name of an actual protocol, it may be better to stick to ERP and IRP names... But the world is not perfect.
Hierarchical Routing
Routing idealization: all routers identical network flat not true, not possible in practice
scale: with 200 million destinations:
administrative autonomy
internet = network of networks
cant store all dests in routing tables! routing table exchange would swamp links!
each network admin may want to control routing in its own network
converge
Hierarchical Routing
aggregate routers into
regions, autonomous systems (AS) routers in same AS run same routing protocol
intra-AS routing protocol routers in different AS can run different intraAS routing protocol
Interconnected ASes
3c 3b 3a AS3 1a Routers 1b, 1c, 2a and 3a are gateway routers AS1, 2 and 3 can use different IRPs 2a 1c 1d 1b AS1 2c
AS2
2b
forwarding table
Forwarding table
intra-AS sets entries for internal dests inter-AS & intra-As sets entries for external destinations
Inter-AS tasks
suppose router in AS1
receives datagram destined outside of AS1: router should forward packet to gateway router, but which one?
AS1 must: 1. learn which dests are reachable through AS2, which through AS3 2. propagate this reachability info to all routers in AS1 Job of inter-AS routing!
3c 3b
3a AS3 1a
2a 1c 1d 1b AS1
2c
AS2
2b
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
1c 1a 1d
x
2a 1b AS1 2c AS2 2b
3a 3b AS3
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!
3c 3b
3a AS3
1c 1a 1d
2a 1b AS1 2c
AS2
2b
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.
Learn from inter-AS protocol that subnet x is reachable via multiple gateways
Use routing info from intra-AS protocol to find costs of least-cost paths to each of the gateways
Hot potato routing: Choose the gateway that has the smallest least cost
Determine from forwarding table the interface I that leads to least-cost gateway. Enter (x,I) in forwarding table
Outline
Hierarchical routing EGP (obsolete, history lesson, will not be on exam) BGP
EGP
Specified in 1992 in RFC 827 and RFC
904
EGP (Exterior Gateway Protocol) version 3 Utilizes a tree-like topology Simple reachability protocol
Overview of Operation
Responsible for communication of network
networks it can reach and how to reach them. The info is propagated to all the directly connected routers, who update their databases and propagate it further, until the entire network is updated (as in RIP)
Operations
Neighbor Acquisition Sent to establish a connection to a neighboring router. A neighbor confirms the connection by sending a Neighbor Acquisition Confirm, or rejects by sending a Neighbor Acquisition Refuse. Neighbor Reachability
To ensure the neighbor is reachable and active, EGP Hello messages are sent periodically. Neighbors reply with an I Heard You (IHU) message. (Yo dawg, I herd u said hello so I herd you herd that I herd you...)
Network Reachability Update A router periodically sends Poll messages to all neighbors. Each neighbor responds with an Update message with the networks that it can to reach, which is then used to update routing table of the device that sent the Poll.
In EGP a complete EGP announcement of routes was contained in a single IP datagram. Eventually with growth of Internet, the announcement had to be fragmented to fit over the available link MTU. and there was a concern on the maximum size datagram that could be transmited, fragemented and then reassembled at the EGP peer successfully - loss of a single fragment would cause the loss of the entire multi-fragement update.
Routing loops
EGP was very prone to creation of routing loops through conflicting with IGP operations
BGP
Hierarchical routing EGP BGP
the de
Obtain subnet reachability information from neighboring ASs. Propagate reachability information to all ASinternal routers. Determine good routes to subnets based on reachability information and policy.
BGP basics
Current version BGP-4, defined in RFC 4271,
RFC 4274, RFC 4276 Application layer protocol, runs on top of TCP (port 179)
BGP basics
pairs of routers (BGP peers) exchange routing info over
semi-permanent TCP connections: BGP sessions BGP sessions need not correspond to physical links. when AS2 advertises a prefix to AS1: AS2 promises it will forward datagrams towards that prefix. AS2 can aggregate prefixes in its advertisement
3c 3b 3a AS3 1a AS1 1c 1d
2c 2a 2b
1b
AS2
reachability info to AS1. 1c can then use iBGP do distribute new prefix info to all routers in AS1 1b can then re-advertise new reachability info to AS2 over 1b-to-2a eBGP session when router learns of new prefix, it creates entry for prefix in its forwarding table.
3c 3b 3a AS3 1a AS1 1c 1d
2c 2a 2b
1b
AS2
NEXT-HOP: indicates specific internal-AS router to next-hop AS. (may be multiple links from current AS to next-hop-AS)
router may learn about more than 1 route to some prefix. Router must select route. elimination rules:
1. 2. 3. 4.
local preference value attribute: policy decision shortest AS-PATH closest NEXT-HOP router: hot potato routing additional criteria - whatever implementor puts there
legend:
X
A C
A,B,C are provider networks X,W,Y are customers (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
legend:
X
A C
No way! B gets no revenue for routing CBAW since neither W nor C are Bs customers B wants to force C to route to w via A B wants to route only to/from its customers!
routed, who routes through its net. Intra-AS: single admin, so no policy decisions needed
Scale:
traffic (AS becomes too big -> split it!) Performance: Intra-AS: can focus on performance Inter-AS: policy may dominate over performance
Neighbor acquisition: if two router are attached to the same network, but located in different Ass, they perform the neighbor acquisition before exchanging routing data Neighbor reachability: maintaining the neighbor relationship (make sure the neighbor is still alive) Network reachability: broadcasting UPDATE messages to all the neighbors to build up and maintain the routing information
BGP messages
BGP messages exchanged using TCP. BGP messages:
OPEN: opens TCP connection to peer and authenticates sender (neighbor acquisition) UPDATE: advertises new path (or withdraws old) KEEPALIVE keeps connection alive in absence of UPDATES (neighbor reachability); also ACKs OPEN request (neighbor acquisition) NOTIFICATION: reports errors in previous msg; also used to close connection
Outcomes
Autonomous systems (Important!) History lessons - what are the main requirements for EGP protocol BGP functions, features Policies in Internet routing FYI: There is a lab on BGP in TLT-2506 Communication Networks Laboratory course (timeless)