Vous êtes sur la page 1sur 28

Lecture 2

EGP - exterior gateway protocols


Lecturer: Alexander Pyattaev alexander.pyattaev@tut.fi

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

Routing algorithm would never

converge

Choosing the internal routing algorithm Hiding the networks internals

Hierarchical Routing
aggregate routers into

regions, autonomous systems (AS) routers in same AS run same routing protocol

Gateway router Direct link to router in another AS

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

Intra-AS Routing algorithm

Inter-AS Routing algorithm

configured by both intraand inter-AS routing algorithm


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

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

1c 1a 1d

x
2a 1b AS1 2c AS2 2b

3a 3b AS3

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!

3c 3b

3a AS3

1c 1a 1d

2a 1b AS1 2c

AS2

2b

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.

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

Now obsolete replaced by BGP v4

Overview of Operation
Responsible for communication of network

reachability info between neighboring routers

Routers may or may not be in different ASs

Each EGP router maintains a database of

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.

Why not EGP?

Update transport problem

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

* Reliance on Core routers

Refer to the RFC 823 for Gateway-Gateway protocol

BGP
Hierarchical routing EGP BGP

Internet inter-AS routing: BGP


BGP (Border Gateway Protocol):

facto standard BGP provides each AS a means to:


1. 2. 3.

the de

Allows subnet to advertise its existence to

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.

the rest of Internet: I am here

BGP basics
Current version BGP-4, defined in RFC 4271,

RFC 4274, RFC 4276 Application layer protocol, runs on top of TCP (port 179)

TCP connection called BGP session, created between two BGP-peers


eBGP session routers belong to different ASs iBGP session routers belong to the same AS

Created to replace the Exterior Gateway

Protocol (EGP) Allows for fully decentralized routing

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

eBGP session iBGP session

2c 2a 2b

1b

AS2

Distributing reachability info


using eBGP session between 3a and 1c, AS3 sends prefix

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

eBGP session iBGP session

2c 2a 2b

1b

AS2

Path attributes & 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

when gateway router receives route

NEXT-HOP: indicates specific internal-AS router to next-hop AS. (may be multiple links from current AS to next-hop-AS)

E.g. used for avoiding loops and choosing a shorter path

advertisement, uses import policy to accept/decline it.

BGP route selection


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

BGP routing policy


B
W

legend:
X

provider network customer network:

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

BGP routing policy (2)


B
W

legend:
X

provider network customer network:

A C

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 Bs customers B wants to force C to route to w via A B wants to route only to/from its customers!

Why different Intra- and Inter-AS routing ? Policy:


Inter-AS: admin wants control over how its traffic is

routed, who routes through its net. Intra-AS: single admin, so no policy decisions needed

Scale:

hierarchical routing saves table size, reduces update

traffic (AS becomes too big -> split it!) Performance: Intra-AS: can focus on performance Inter-AS: policy may dominate over performance

BGP functional procedures


BGP procedures:

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)

Vous aimerez peut-être aussi