28
Border Gateway Protocol (BGP)

Border Gateway Protocol (BGP)

  • Upload
    dutch

  • View
    55

  • Download
    1

Embed Size (px)

DESCRIPTION

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: - PowerPoint PPT Presentation

Citation preview

Page 1: Border Gateway Protocol (BGP)

Border Gateway Protocol (BGP)

Page 2: Border Gateway Protocol (BGP)

2

• CORE, PEERs

• Autonomous Systems

• BGP Basic Operations

• The BGP Routing Process

Page 3: Border Gateway Protocol (BGP)

3

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

Page 4: Border Gateway Protocol (BGP)

4

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.

Page 5: Border Gateway Protocol (BGP)

5

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.

Page 6: Border Gateway Protocol (BGP)

6

Why Exterior Gateway Protocol?

• Interior protocol is limited by—propagation delay, traffic overhead

• Hidden network

Page 7: Border Gateway Protocol (BGP)

7

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

Page 8: Border Gateway Protocol (BGP)

8

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

Page 9: Border Gateway Protocol (BGP)

9

• 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

Exterior Gateway Protocol (EGP)

Page 10: Border Gateway Protocol (BGP)

10

• 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

EGP weaknesses

Page 11: Border Gateway Protocol (BGP)

11

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

Page 12: Border Gateway Protocol (BGP)

12

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

Page 13: Border Gateway Protocol (BGP)

13

BGP - Why use it? (cont.)

•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.

Exterior Routing

Page 14: Border Gateway Protocol (BGP)

14

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…..

Page 15: Border Gateway Protocol (BGP)

15

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

Page 16: Border Gateway Protocol (BGP)

16

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

Page 17: Border Gateway Protocol (BGP)

17

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.

Page 18: Border Gateway Protocol (BGP)

18

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

Page 19: Border Gateway Protocol (BGP)

19

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

Page 20: Border Gateway Protocol (BGP)

20

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.

Page 21: Border Gateway Protocol (BGP)

21

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

Page 22: Border Gateway Protocol (BGP)

22

Telnet Client

Switch

Atlanta

OrlandoTelnet Server

BGP

IdleConnect Openrequest

Initializing

IdleConnect

Open request

TCP TCP

Initializing

SynSent

ListenSyn

Syn Ack

AckEstablished Established

opened opened

open

Open Sent OpenOpen Sent

Keep Alive

Open Confirm Keep AliveEstablished Open Confirm

Update Established

Update

Page 23: Border Gateway Protocol (BGP)

23

Marker Length BGPType

Data

Source Port DestinationPort = 179

SequenceNumber

Acknowledgement Number

DataOffset

Flags-urgent pointer-acknowledgement-push-no reset-no Syn-no fin

Window Checksum No TCPOptions

Data

Version Header Length Type of Service Length Flag Flag Offset

Time to Live

Protocol ID 06 = TCP

HeaderChecksum

Source ID Address

Destination Address

Options Padding

Data

DSAP=06

SSAP=06

Control Information n

Preamble SFD DA SA Length Data Pad Chksum

IEEE 802.3 HEADER

LLC PDU

IP HEADER

TCP HEADER

BGP HEADER

BGP HEADER

Page 24: Border Gateway Protocol (BGP)

24

Marker Length BGP Type = 1 Open

Data

Source Port DestinationPort = 179

SequenceNumber

Acknowledgement Number

DataOffset

Flags-urgent pointer-acknowledgement-push-no reset-no Syn-no fin

Window Checksum No TCPOptions

Data

Version Header Length Type of Service Length Flag Flag Offset

Time to Live

Protocol ID 06 = TCP

HeaderChecksum

Source ID Address

Destination Address

Options Padding

Data

DSAP=06

SSAP=06

Control Information n

IEEE 802.3 HEADER

LLC PDU

IP HEADER

TCP HEADER

Version =4

Autonomous System

Hold - Time BGPIdentifier

Parameter Length

OperationalParameter

BGP OPEN message format

Page 25: Border Gateway Protocol (BGP)

25

Marker Length BGP Type = 2 Data

Source Port DestinationPort = 179

SequenceNumber

Acknowledgement Number

DataOffset

Flags-urgent pointer-acknowledgement-push-no reset-no Syn-no fin

Window Checksum No TCPOptions

Data

Version Header Length Type of Service Length Flag Flag Offset

Time to Live

Protocol ID 06 = TCP

HeaderChecksum

Source ID Address

Destination Address

Options Padding

Data

DSAP=06

SSAP=06

Control Information n

IEEE 802.3 HEADER

LLC PDU

IP HEADER

TCP HEADER

UnfeasibleRouters Length

WithdrawnRoutes

Total PathAttribute length

Path Attributes

Network LayerReachability Info

BGP Update message

Page 26: Border Gateway Protocol (BGP)

26

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.

Page 27: Border Gateway Protocol (BGP)

27

BGP Routing

• A BGP router only sends routing updates when there are changes to the BGP routing table

Page 28: Border Gateway Protocol (BGP)

28

BGP Keepalives

• Instead of full routing updates, BGP relies on keepalive messages to decide if a peer is up.