You are on page 1of 7

Border Gateway Protocol

• Routing Protocol used to exchange routing
information between networks
exterior gateway protocol
• Described in RFC1771
work in progress to update
Introduction to BGP www.ietf.org/internet-drafts/draft-ietf-idr-bgp4-23.txt
• The Autonomous System is BGP’s fundamental
ISP/IXP Workshops operating unit
It is used to uniquely identify networks with common
routing policy

Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 1 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 2

BGP Path Vector Protocol

• BGP is classified as a path vector routing
• Path Vector Protocol
protocol (see RFC 1322)
• Incremental Updates
A path vector protocol defines a route as a
• Many options for policy enforcement pairing between a destination and the
• Classless Inter Domain Routing (CIDR) attributes of the path to that destination.

• Widely used for Internet backbone
• Autonomous systems 12.6.126.0/24 207.126.96.43 1021 0 6461 7018 6337 11268 i

AS Path
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 3 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 4

Path Vector Protocol Definitions

AS11268 • Transit – carrying traffic across a network,
AS6337
usually for a fee
AS7018 • Peering – exchanging routing information and
traffic
• Default – where to send traffic when there is
AS500 no explicit match in the routing table

AS6461

AS600

Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 5 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 6

1

provider C and therefore do not need to use A and B can peer. 9 Cisco ISP Workshops © 2003. Backbone of Internet routers which have West Provider D explicit routing information provider B about the rest of the Internet. Cisco Systems. Inc. All rights reserved. Inc. Cisco Systems. 7 Cisco ISP Workshops © 2003. Inc. Default Free Zone Peering and Transit example provider A The default free zone is made up IXP-East IXP. All rights reserved. All rights reserved. All rights reserved. Inc. 8 Autonomous System (AS) Autonomous System Number (ASN) AS 100 • An ASN is a 16 bit number 1-64511 are assigned by the RIRs 64512-65534 are for private use and should never appear on the Internet 0 and 65535 are reserved • 32 bit ASNs are coming soon • Collection of networks with same routing policy www. Inc. Cisco Systems. arrangements with D to get packets to/from C Cisco ISP Workshops © 2003. All rights reserved. Cisco Systems. but need transit a default route. 11 Cisco ISP Workshops © 2003.ietf. Inc.txt • Single routing protocol • ASNs are distributed by the Regional Internet Registries Also available from upstream ISPs who are members of one • Usually under single ownership.org/internet-drafts/draft-ietf-idr-as4bytes-07. trust and of the RIRs administrative control Current ASN allocations up to 32767 have been made to the RIRs • Identified by a unique number Cisco ISP Workshops © 2003. 10 Demarcation Zone (DMZ) BGP Basics A C Peering DMZ AS 100 Network AS 101 A C B D AS 100 AS 101 B D E E AS 102 BGP speakers are AS 102 called peers • Shared network between ASes Cisco ISP Workshops © 2003. All rights reserved. Cisco Systems. Cisco Systems. 12 2 .

Inc. 16 BGP/IGP model used in ISP networks External BGP Peering (eBGP) • Model representation A AS 100 AS 101 eBGP eBGP eBGP C B iBGP iBGP iBGP iBGP IGP IGP IGP IGP • Between BGP speakers in different AS • Should be directly connected • Never run an IGP between eBGP peers Cisco ISP Workshops © 2003. 14 Constructing the Forwarding Table eBGP & iBGP discarded in BGP in • BGP used internally (iBGP) and externally process accepted (eBGP) everything • iBGP used to carry bgp BGP forwarding some/all Internet prefixes across ISP backbone peer table table ISP’s customer prefixes best paths • eBGP used to BGP out out exchange prefixes with other ASes process implement routing policy Cisco ISP Workshops © 2003. All rights reserved. 13 Cisco ISP Workshops © 2003. All rights reserved. 15 Cisco ISP Workshops © 2003. Inc. All rights reserved. All rights reserved. All rights reserved. Cisco Systems. Inc. Cisco Systems. All rights reserved. Inc. BGP General Operation Constructing the Forwarding Table • BGP “in” process • Learns multiple paths via internal receives path information from peers and external BGP speakers results of BGP path selection placed in the BGP table • Picks the best path and installs in “best path” flagged the forwarding table • BGP “out” process • Policies applied by influencing the announces “best path” information to peers best path selection • Best paths installed in forwarding table if: prefix and prefix length are unique lowest “protocol distance” Cisco ISP Workshops © 2003. Cisco Systems. Cisco Systems. Inc. Inc. 17 Cisco ISP Workshops © 2003. Cisco Systems. Cisco Systems. 18 3 .

10. All rights reserved.2 remote-as 100 Remote ASN neighbor 222.255.8.7.255.10.222.240 ! Local ASN ! Local ASN router bgp 100 router bgp 101 network 220.2 remote-as 100 Local ASN neighbor 215.3 remote-as 100 neighbor 215.10. Configuring External BGP Configuring External BGP ip address on ip address on ethernet interface ethernet interface Router A in AS100 Router C in AS101 interface ethernet 5/0 interface ethernet 1/0/0 ip address 222.7.10.10. Inc.1.222.1 255. All rights reserved.3 update-source loopback0 • iBGP session is not dependent on state of a single ! interface ip address of Router B loopback interface • iBGP session is not dependent on physical topology Cisco ISP Workshops © 2003. Inc. 19 Cisco ISP Workshops © 2003.255.0 neighbor 222. Cisco Systems. Inc. 22 Peering to Loop-back Address Configuring Internal BGP AS 100 ip address on loopback interface Router A in AS100 interface loopback 0 ip address 215.10. All rights reserved.10.2 255. 23 Cisco ISP Workshops © 2003. Cisco Systems. Inc.8.255.10.222.222.10.0 mask 255.220.7.255.220.10.222.10.7.222.252. All rights reserved.1 remote-as 101 Remote ASN neighbor 222.7.255.0 mask 255.2 prefix-list RouterA in neighbor 222.1 prefix-list RouterC in neighbor 222.1 255.2 update-source loopback0 Loop-back interface does not go down – ever! neighbor 215. Cisco Systems. Inc.220. 24 4 .10.2 prefix-list RouterA out ! ! ip address of Router C Inbound and ip address of Router A Inbound and ethernet interface outbound filters ethernet interface outbound filters Cisco ISP Workshops © 2003. All rights reserved. 21 Cisco ISP Workshops © 2003. Cisco Systems. All rights reserved.0 • Peer with loop-back address neighbor 215.255.240 ip address 222.0 network 220.255 ! router bgp 100 Local ASN network 220. 20 Internal BGP (iBGP) Internal BGP Peering (iBGP) • BGP peer within the same AS AS 100 D • Not required to be directly connected A B IGP takes care of inter-BGP speaker connectivity • iBGP speakers need to be fully meshed they originate connected networks E • Topology independent they do not pass on prefixes learned from • Each iBGP speaker must peer with other iBGP speakers every other iBGP speaker in the AS Cisco ISP Workshops © 2003. Cisco Systems.222.222. Inc.252.255. Cisco Systems.10.1 prefix-list RouterC out neighbor 222.

1 update-source loopback0 neighbor 215. Inc.1 remote-as 100 neighbor 215. Configuring Internal BGP Inserting prefixes into BGP ip address on loopback interface Router B in AS100 interface loopback 0 • Two ways to insert prefixes into BGP ip address 215.10.10. Cisco Systems. All rights reserved.255. Cisco Systems. 26 Inserting prefixes into BGP – Inserting prefixes into BGP – redistribute static redistribute static • Configuration Example: • Care required with redistribute! router bgp 100 redistribute <routing-protocol> means everything redistribute static in the <routing-protocol> will be transferred into ip route 222. Cisco Systems.255 ! Local ASN redistribute static router bgp 100 network 220. 27 Cisco ISP Workshops © 2003.0 255. Cisco Systems.0 Local ASN network command neighbor 215.10.255. All rights reserved.255.32.0 serial0 the current routing protocol • Static route must exist before redistribute Will not scale if uncontrolled command will work Best avoided if at all possible • Forces origin to be “incomplete” redistribute normally used with “route-maps” and • Care required! under tight administrative control Cisco ISP Workshops © 2003. Cisco Systems. All rights reserved.0 redistribute static ip route 222.10.2 255. 25 Cisco ISP Workshops © 2003.10.32. 30 5 .0 255. Inc.3 remote-as 100 neighbor 215.254.0 mask 255. All rights reserved.7.254.7.1. Inc.32.7. 29 Cisco ISP Workshops © 2003.10.7. Inc. Inc.220. 28 Inserting prefixes into BGP – network command Configuring Aggregation • Configuration Example router bgp 100 • Three ways to configure route aggregation network 222.255. All rights reserved.10. Cisco Systems. Inc.254.255.0 serial0 aggregate-address • A matching route must exist in the routing network command table before the network is announced • Forces origin to be “IGP” Cisco ISP Workshops © 2003. All rights reserved.10.3 update-source loopback0 ! ip address of Router A loopback interface Cisco ISP Workshops © 2003.7.

Configuring Aggregation – Configuring Aggregation Network Command • Configuration Example: router bgp 100 • Configuration Example redistribute static router bgp 100 ip route 222.0.0. Cisco Systems. Inc.10. Inc. All rights reserved.0 mask 255.252. Cisco Systems.0 mask 255. or iBGP is used across backbone • no synchronization & no auto-summary router bgp 100 no synchronization Cisco ISP Workshops © 2003.10.0.10.0 aggregate-address 222. or • announcing prefixes & aggregates All transit routers in AS run BGP. Inc.255.0.255.0 null0 250 network 222. All rights reserved. All rights reserved.0. Inc.32.0 255.0 255. All rights reserved.0 [ summary-only ] from another routing protocol • Requires more specific prefix in routing table before Example: aggregate is announced 61.10.0/22 → 61.0.10. Inc.0 null0 250 packets only sent here if there is no more specific match in • A matching route must exist in the routing table the routing table before the network is announced distance of 250 ensures this is last resort static • Easiest and best way of generating an aggregate care required – see previously! Cisco ISP Workshops © 2003. 34 Historical Defaults – Synchronisation Summary • Disable historical default 2 • In Cisco IOS. 33 Cisco ISP Workshops © 2003.0.8. 31 Cisco ISP Workshops © 2003.0.255.0 255.0. Cisco Systems. 36 6 .0. Cisco Systems.255.0/8 • {summary-only} keyword optional keyword which ensures that only the summary • Must be turned off for any Internet connected is announced if a more specific prefix exists in the site using BGP routing table router bgp 100 no auto-summary Cisco ISP Workshops © 2003. BGP does not advertise a • BGP4 – path vector protocol route before all routers in the AS have learned it via an IGP • iBGP versus eBGP • Disable synchronisation if: • stable iBGP – peer with loopbacks AS doesn’t pass traffic from one AS to another. 35 Cisco ISP Workshops © 2003.10. All rights reserved. Cisco Systems. 32 Configuring Aggregation – aggregate-address command Historical Defaults – Auto Summarisation • Disable historical default 1 • Configuration Example • Automatically summarises subprefixes to the router bgp 100 classful network when redistributing to BGP network 222. Inc. All rights reserved. Cisco Systems.0 • static route to “null0” is called a pull up route ip route 222.255.

Cisco Systems. 37 7 . All rights reserved. Inc. Introduction to BGP ISP/IXP Workshops Cisco ISP Workshops © 2003.