330 likes | 539 Views
Border Gateway Protocol (BGP). CORE, PEERs Autonomous Systems BGP Basic Operations The BGP Routing Process. Default routes. Default routes => partial information Routers/hosts with default routes rely on other routers to complete the picture. In general routing information should be:
E N D
CORE, PEERs • Autonomous Systems • BGP Basic Operations • The BGP Routing Process
Default routes • Default routes => partial information • Routers/hosts with default routes rely on other routers to complete the picture. • In general routing information should be: • Consistent, I.e., if packet is sent off in one direction then another direction should not be more optimal • Complete, I.e., should be able to reach all destinations
Core • A small set of routers that have consistent & complete information about all destinations. • Outlying routers can have partial information provided they point default routes to the core • Partial info allows site administrators to make local routing changes independently. • Initially, core routers were under a central authority and were synchronized for consistency => single backbone. • Internet quickly outgrew single backbone (ARPANET + NSFNET). Core architecture does not scale well.
Peers • Initially NSFNET had only one connection to ARPANET (router in Pittsburg) => only one route between the two. • Addition of multiple interconnections => multiple possible routes => need for dynamic routing decision • Single core replaced by a network of peer backbones => more scalable • Today there are over 30 backbones! • The routing protocol used by cores & peers was called Gateway-Gateway Protocol (GGP). Replaced by EGP and now by BGP-4.
Why Exterior Gateway Protocol? • Interior protocol is limited by—propagation delay, traffic overhead • Hidden network
Autonomous Systems – definition • Any set of routers sharing similar routing policies and operating within a single administrative domain. • Each AS has an identifying number, assigned by an Internet registry or a service provider, between 1 and 65,535. • 65,512 through 65,535 are reserved for private use
Autonomous Systems-types • Traffic types: Local = traffic originating or terminating at AS. Transit = non-local traffic • AS types: • Stub AS => only single connection to one other AS => it carries only local traffic. • Multihomed AS: Connected to multiple AS, but does not allow transit traffic • Transit AS: carries transit traffic under policy restrictions
Exterior Gateway Protocol (EGP) • A mechanism that allows non-core routers to learn routes from core routers so that they can choose optimal backbone routes • A mechanism for non-core routers to inform core routers about hidden networks • Autonomous System (AS) has the responsibility of advertising reachability info to other ASs. • One or more routers may be designated per AS. • Important that info propagates to core routers
EGP weaknesses • EGP does not interpret the distance metrics in routing update messages => cannot be compute shorter of two routes • As a result it restricts the topology to a (possibly non-optimal) tree structure, with the core as the root • Rapid growth => many networks may be temporarily unreachable • Only one path to destination => no load sharing
BGP Overview • BGP is the Internet. • Without BGP, the Internet could not be as large as it is. • BGP is slower than all of the IGPs, but it is also more scalable
BGP - Why use it? • Scalability • Internet has more than 110,000 routes and is still growing • Secure routing information • Routers from other Autonomous Systems (AS) cannot be trusted • Tight filters (policies) are required • Authentication is desirable
BGP - Why use it? (cont.) Exterior Routing • Considerer 3 companies: X, Y AND Z. They have their networks connected to each other (for whatever reason) – X is connected to Y, and Y is connected to both, X and Z. • Company X is running EIGRP on its routers, Y is running RIP and Z is running OSPF. • Company Y’s router that connects to X’s network is performing two-way redistribution between EIGRP and RIP, Y’s router that connects to Z is performing two-way redistribution between OSPF and RIP.
BGP - Why use it? (cont.) • Consider this requirement:Z has decided that they no longer want to communicate with X (they don’t want to accept routes from X), but they still want to communicate with Y. How can Z configure the router that connects to Y so that it will not accept any routes coming from X? • Possible non scalable solution: • Z could put a distribute list on its routers that blocks all of the networks assigned to X. Problems with this approach? • How does Z know which networks belong to X?What if X is an ISP with 200+ networks assigned to it? • Z would have to write a 200+ line access list to apply to the distribute list – and what if after Z performs this configuration, X gets another network assigned to it…..
BGP - Why use it? (cont.) • With BGP companies X, Y, and Z each have an AS number assigned to them. • When Company Z receives a BGP advertisement, each route is tagged with the AS Path that it traveled through to reach its destination. So instead we have: • From there, it is a (relatively) simple matter to configure AS 103 not to accept routes originated from AS 101 • NOTE: because BGP operates based on that path that packets take, it is sometimes called – a path vector protocol
Autonomous Systems – IGP & EGP • IGP – an Interior Gateway protocol is run inside an autonomous system • EGP – an Exterior Gateway protocol is run between autonomous systems to enable routing policies and improve security • BGP is an EGP
Autonomous Systems - Single-homed • Large customer or small ISP connecting to the Internet • Can be configured with a default route to reach outside networks, in which case BGP is not required and the customer is part of the ISP’s AS. • If the customer wants to use a different routing policy than the provider’s, then BGP is necessary.
Autonomous Systems- Multihomed non-transit • Transit traffic (any traffic that has a source and destination outside the AS) does not pass through it. • Customers (large corporate) connecting to several service providers but does not wish to pass traffic through. • BGP is almost mandatory for multihomed customers • Multihomed customers have to use public AS numbers • Routes are filtered based on their AS Path to prevent the AS from becoming a transit AS
Autonomous Systems - Multihomed transit • Exchanges BGP routing information with other autonomous systems and forward information received from one AS to another AS • The entire Internet can use your network as a transit AS
Autonomous Systems - When not to use BGP • When the routing policy that is implemented in an AS is consistent with the ISP's policy. • Connectivity can be achieved through a combination of static routes and default routes. • Note: In general, it is necessary to use BGP to connect to an ISP only when you have different policy requirements than the ISP.
BGP Basic Operations • BGP makes routing decisions based on network policies and optimal routes • BGP updates are carried using TCP on port 179 • Before routing information is exchanged, a TCP 3-way handshake occurs • BGP message types: --OPEN --Update --Notification --Keep alive
Telnet Server Telnet Client Switch Orlando Atlanta TCP BGP TCP Idle Connect Idle Connect Open request Initializing Open request Syn Sent Listen Syn Initializing Syn Ack Ack Established Established opened opened open Open Sent Open Open Sent Keep Alive Open Confirm Keep Alive Established Open Confirm Update Established Update
BGP Type Data Marker Length BGP HEADER TCP HEADER Data Offset Destination Port = 179 Sequence Number Acknowledgement Number Source Port Flags -urgent pointer -acknowledgement -push -no reset -no Syn -no fin Window No TCP Options Checksum Data IP HEADER Version Flag Offset Header Length Type of Service Length Flag Time to Live Protocol ID 06 = TCP Header Checksum Source ID Address Destination Address Options Padding Data LLC PDU DSAP =06 SSAP =06 Control Information n IEEE 802.3 HEADER Length Data Pad Chksum Preamble SFD DA SA BGP HEADER
Version =4 Autonomous System Hold - Time BGP Identifier Parameter Length Operational Parameter BGP Type = 1 Open Marker Length Data TCP HEADER Data Offset Destination Port = 179 Sequence Number Acknowledgement Number Source Port Flags -urgent pointer -acknowledgement -push -no reset -no Syn -no fin Window No TCP Options Checksum Data IP HEADER Version Flag Offset Header Length Type of Service Length Flag Time to Live Protocol ID 06 = TCP Header Checksum Source ID Address Destination Address Options Padding Data LLC PDU DSAP =06 SSAP =06 Control Information n IEEE 802.3 HEADER BGP OPEN message format
Unfeasible Routers Length Withdrawn Routes Total Path Attribute length Path Attributes Network Layer Reachability Info Marker Length BGP Type = 2 Data TCP HEADER Data Offset Destination Port = 179 Sequence Number Acknowledgement Number Source Port Flags -urgent pointer -acknowledgement -push -no reset -no Syn -no fin Window No TCP Options Checksum Data IP HEADER Version Flag Offset Header Length Type of Service Length Flag Time to Live Protocol ID 06 = TCP Header Checksum Source ID Address Destination Address Options Padding Data LLC PDU DSAP =06 SSAP =06 Control Information n IEEE 802.3 HEADER BGP Update message
BGP Rule of Split Horizon • A BGP Router will not accept a route whose AS path includes the router’s AS number • If a router in AS 100 receives a route with 100 in its AS path, then that route, if accepted, would create a routing loop.
BGP Routing • A BGP router only sends routing updates when there are changes to the BGP routing table
BGP Keepalives • Instead of full routing updates, BGP relies on keepalive messages to decide if a peer is up.