Introduction to BGP. ISP Workshops. Last updated 30 October 2013

Similar documents
Introduction to BGP. ISP/IXP Workshops

APNIC elearning: BGP Basics. 30 September :00 PM AEST Brisbane (UTC+10) Revision: 2.0

Introduction to BGP ISP/IXP Workshops

BGP Attributes and Path Selection

Contents. Introduction. Prerequisites. Requirements. Components Used

BGP on IOS: Getting Started

BGP Support for 4-byte ASN

Module 6 Implementing BGP

Introduction to BGP. BGP Basics BGP. Border Gateway Protocol. Path Vector Protocol. Path Vector Protocol INET 2000 NTW

Configuring IPv6 Provider Edge over MPLS (6PE)

BGP FlowSpec Route-reflector Support

BGP Attributes and Policy Control

BGP Attributes and Policy Control

BGP Attributes and Policy Control

BGP Enhancements for IPv6. ISP Training Workshops

Ravi Chandra cisco Systems Cisco Systems Confidential

Rev External BGP

Border Gateway Protocol - BGP

internet technologies and standards

Configuring a BGP Route Server

LAB1: BGP IPv4. BGP: Initial Config. Disclaimer

Multiprotocol BGP Extensions for IP Multicast Commands

MPLS VPN Multipath Support for Inter-AS VPNs

Chapter 6 Lab 6-3, Configuring IBGP and EBGP Sessions, Local Preference, and MED

Configuring BGP. Cisco s BGP Implementation

Internetwork Expert s CCNP Bootcamp. Border Gateway Protocol (BGP) What Is BGP?

Connecting to a Service Provider Using External BGP

BGP Protocol & Configuration. Scalable Infrastructure Workshop AfNOG2008

Routing Basics ISP/IXP Workshops

Routing Concepts. IPv4 Routing Forwarding Some definitions Policy options Routing Protocols

BGP Tutorial. APRICOT 2004, Kuala Lumpur February Philip Smith APRICOT , Cisco Systems, Inc. All rights reserved.

Routing Basics. Routing Concepts. IPv4. IPv4 address format. A day in a life of a router. What does a router do? IPv4 Routing

Introduction. Keith Barker, CCIE #6783. YouTube - Keith6783.

BGP Nonstop Routing was made a default feature.

Table of Contents. Chapter 1 Border Gateway Protocol (BGP) 1. Chapter 3 Enhanced Interior Gateway Routing 91 Protocol (EIGRP)

Routing Basics. ISP Workshops. Last updated 10 th December 2015

BGP for Internet Service Providers

BGP Multihoming. ISP/IXP Workshops

Page1. Cisco IOS Software, Linux Software (I86BI_LINUX-ADVENTERPRISEK9-M), Version 15.2(4)M1, DEVELOPMENT TEST SOFTWARE

BGP Techniques for ISP. Terutaka Komorizono

Connecting to a Service Provider Using External BGP

Deploy MPLS L3 VPN. APNIC Technical Workshop October 23 to 25, Selangor, Malaysia Hosted by:

BGP Tutorial. APRICOT 2003, Taipei February Philip Smith APRICOT , Cisco Systems, Inc. All rights reserved.

Inter-Domain Routing: BGP

BGP for Internet Service Providers

Configuring a Basic BGP Network

Configuring a Basic BGP Network

Internet Routing Protocols Lecture 01 & 02

BGP can also be used for carrying routing information for IPv6 prefix over IPv6 networks.

LACNIC XIII. Using BGP for Traffic Engineering in an ISP

BGP Configuration for a Transit ISP

BGP and the Internet. Enterprise Multihoming. Enterprise Multihoming. Medium/Large ISP Multihoming. Enterprise Multihoming. Enterprise Multihoming

Routing Basics. Campus Network Design & Operations Workshop

TELE 301 Network Management

ibgp Multipath Load Sharing

Module 16 An Internet Exchange Point

Multihoming Complex Cases & Caveats

BGP Policy Lab - Partial Routing

BGP Attributes and Policy Control. BGP Attributes. BGP Attributes. Agenda. What Is an Attribute? AS-Path. ISP/IXP Workshops.

Vendor: Alcatel-Lucent. Exam Code: 4A Exam Name: Alcatel-Lucent Border Gateway Protocol. Version: Demo

Unit 3: Dynamic Routing

scope scope {global vrf vrf-name} no scope {global vrf vrf-name} Syntax Description

CS 457 Networking and the Internet. The Global Internet (Then) The Global Internet (And Now) 10/4/16. Fall 2016

BGP Route Reflector Commands

Routing Basics. ISP Workshops

BGP Routing and BGP Policy. BGP Routing. Agenda. BGP Routing Information Base. L47 - BGP Routing. L47 - BGP Routing

Configuring a Basic BGP Network

BGP Scaling (RR & Peer Group)

Laura McDonnell 11 th June 2008

BGP-4 Border Gateway Protocol 4 (BGP-4) Primer

South America Workshop WALC 2006 (Quito, Ecuador July 06)

Chapter 7 Lab 7-1, Configuring BGP with Default Routing

Table of Contents 1 MSDP Configuration 1-1

BGP Multihoming ISP/IXP Workshops

Simple Multihoming. ISP Workshops. Last updated 9 th December 2015

BGP and the Internet

PART III. Implementing Inter-Network Relationships with BGP

Network Configuration Example

Service Provider Multihoming

Introduction to IP Routing. Geoff Huston

BGP and the Internet

IPv6 Module 16 An IPv6 Internet Exchange Point

Lecture 07c Routing Border Gateway Protocol

Chapter 5: Maintaining and Troubleshooting Routing Solutions

H3C BGP Configuration Examples

BGP101. Howard C. Berkowitz. (703)

Small additions by Dr. Enis Karaarslan, Purdue - Aaron Jarvis (Network Engineer)

Internet Routing Protocols Lecture 03 Inter-domain Routing

Advanced Multihoming. BGP Traffic Engineering

Border Gateway Protocol

Contents. BGP commands 1

BGP Commands: M through N

BGP Attributes and Policy Control. BGP Attributes. Agenda. What Is an Attribute? AS-Path. AS-Path loop detection. BGP Attributes

Implementing BGP. BGP Functional Overview. Border Gateway Protocol (BGP) is an Exterior Gateway Protocol (EGP) that allows you to create loop-free

Protecting an EBGP peer when memory usage reaches level 2 threshold 66 Configuring a large-scale BGP network 67 Configuring BGP community 67

Internet Routing Basics

Inter-domain Routing. Outline. Border Gateway Protocol

DE-CIX Academy: BGP - Multihoming

BGP Best External. Finding Feature Information

IPv4/IPv6 BGP Routing Workshop. Organized by:

Transcription:

Introduction to BGP ISP Workshops Last updated 30 October 2013 1

Border Gateway Protocol p A Routing Protocol used to exchange routing information between different networks n Exterior gateway protocol p Described in RFC4271 n RFC4276 gives an implementation report on BGP n RFC4277 describes operational experiences using BGP p The Autonomous System is the cornerstone of BGP n It is used to uniquely identify networks with a common routing policy 2

BGP p Path Vector Protocol p Incremental Updates p Many options for policy enforcement p Classless Inter Domain Routing (CIDR) p Widely used for Internet backbone p Autonomous systems 3

Path Vector Protocol p BGP is classified as a path vector routing protocol (see RFC 1322) n A path vector protocol defines a route as a pairing between a destination and the attributes of the path to that destination. 12.6.126.0/24 207.126.96.43 1021 0 6461 7018 6337 11268 i AS Path 4

Path Vector Protocol AS6337 AS11268 AS7018 AS500 AS6461 AS600 5

Definitions p Transit carrying traffic across a network, usually for a fee p Peering exchanging routing information and traffic p Default where to send traffic when there is no explicit match in the routing table 6

Default Free Zone The default free zone is made up of Internet routers which have explicit routing information about the rest of the Internet, and therefore do not need to use a default route NB: is not related to where an ISP is in the hierarchy 7

Peering and Transit example transit provider A Backbone Provider C provider E peering IXP-West peering peering IXP-East provider B transit Backbone Provider D provider F A and B peer for free, but need transit arrangements with C and D to get packets to/from E and F 8

Autonomous System (AS) AS 100 p Collection of networks with same routing policy p Single routing protocol p Usually under single ownership, trust and administrative control p Identified by a unique 32-bit integer (ASN) 9

Autonomous System Number (ASN) p p p Two ranges 0-65535 (original 16-bit range) 65536-4294967295 (32-bit range RFC6793) Usage: 0 and 65535 (reserved) 1-64495 (public Internet) 64496-64511 (documentation RFC5398) 64512-65534 (private use only) 23456 (represent 32-bit range in 16-bit world) 65536-65551 (documentation RFC5398) 65552-4199999999 (public Internet) 4200000000-4294967295 (private use only RFC6996) 32-bit range representation specified in RFC5396 n Defines asplain (traditional format) as standard notation 10

Autonomous System Number (ASN) p ASNs are distributed by the Regional Internet Registries n They are also available from upstream ISPs who are members of one of the RIRs p Current 16-bit ASN assignments up to 63999 have been made to the RIRs n Around 45300 are visible on the Internet n Around 500 left unassigned p Each RIR has also received a block of 32-bit ASNs n Out of 5200 assignments, around 4000 are visible on the Internet p See www.iana.org/assignments/as-numbers 11

Configuring BGP in Cisco IOS p This command enables BGP in Cisco IOS: router bgp 100 p For ASNs > 65535, the AS number can be entered in either plain or dot notation: router bgp 131076 or router bgp 2.4 p IOS will display ASNs in plain notation by default n Dot notation is optional: router bgp 2.4 bgp asnotation dot 12

BGP Basics Peering A AS 100 AS 101 C B D p Runs over TCP port 179 p p p Path vector protocol Incremental updates Internal & External BGP E AS 102 13

Demarcation Zone (DMZ) A DMZ Network AS 100 AS 101 C B D E AS 102 p DMZ is the link or network shared between ASes 14

BGP General Operation p Learns multiple paths via internal and external BGP speakers p Picks the best path and installs it in the routing table (RIB) p Best path is sent to external BGP neighbours p Policies are applied by influencing the best path selection 15

Constructing the Forwarding Table p BGP in process n receives path information from peers n results of BGP path selection placed in the BGP table n best path flagged p BGP out process n announces best path information to peers p Best path stored in Routing Table (RIB) p Best paths in the RIB are installed in forwarding table (FIB) if: n prefix and prefix length are unique n lowest protocol distance 16

Constructing the Forwarding Table in BGP in process discarded accepted everything bgp peer BGP table routing table out best paths BGP out process forwarding table 17

ebgp & ibgp p BGP used internally (ibgp) and externally (ebgp) p ibgp used to carry n Some/all Internet prefixes across ISP backbone n ISP s customer prefixes p ebgp used to n Exchange prefixes with other ASes n Implement routing policy 18

BGP/IGP model used in ISP networks p Model representation ebgp ebgp ebgp ibgp ibgp ibgp ibgp IGP IGP IGP IGP AS1 AS2 AS3 AS4 19

External BGP Peering (ebgp) A AS 100 AS 101 C B p Between BGP speakers in different AS p Should be directly connected p Never run an IGP between ebgp peers 20

Configuring External BGP Router A in AS100 ip address on ethernet interface interface ethernet 5/0 ip address 102.102.10.2 255.255.255.240! Local ASN router bgp 100 network 100.100.8.0 mask 255.255.252.0 neighbor 102.102.10.1 remote-as 101 Remote ASN neighbor 102.102.10.1 prefix-list RouterC in neighbor 102.102.10.1 prefix-list RouterC out! ip address of Router C ethernet interface Inbound and outbound filters 21

Configuring External BGP Router C in AS101 ip address on ethernet interface interface ethernet 1/0/0 ip address 102.102.10.1 255.255.255.240! Local ASN router bgp 101 network 100.100.64.0 mask 255.255.248.0 neighbor 102.102.10.2 remote-as 100 Remote ASN neighbor 102.102.10.2 prefix-list RouterA in neighbor 102.102.10.2 prefix-list RouterA out! ip address of Router A ethernet interface Inbound and outbound filters 22

Internal BGP (ibgp) p BGP peer within the same AS p Not required to be directly connected n IGP takes care of inter-bgp speaker connectivity p ibgp speakers must be fully meshed: n They originate connected networks n They pass on prefixes learned from outside the ASN n They do not pass on prefixes learned from other ibgp speakers 23

Internal BGP Peering (ibgp) AS 100 B A C D p Topology independent p Each ibgp speaker must peer with every other ibgp speaker in the AS 24

Peering between Loopback Interfaces AS 100 A C B p Peer with loop-back interface n Loop-back interface does not go down ever! p Do not want ibgp session to depend on state of a single interface or the physical topology 25

Configuring Internal BGP Router A in AS100 ip address on loopback interface interface loopback 0 ip address 105.3.7.1 255.255.255.255! router bgp 100 network 100.100.1.0 Local ASN neighbor 105.3.7.2 remote-as 100 neighbor 105.3.7.2 update-source loopback0 neighbor 105.3.7.3 remote-as 100 neighbor 105.3.7.3 update-source loopback0! ip address of Router B loopback interface Local ASN 26

Configuring Internal BGP Router B in AS100 ip address on loopback interface interface loopback 0 ip address 105.3.7.2 255.255.255.255! router bgp 100 network 100.100.1.0 Local ASN neighbor 105.3.7.1 remote-as 100 neighbor 105.3.7.1 update-source loopback0 neighbor 105.3.7.3 remote-as 100 neighbor 105.3.7.3 update-source loopback0! ip address of Router A loopback interface Local ASN 27

Inserting prefixes into BGP p Two ways to insert prefixes into BGP n redistribute static n network command 28

Inserting prefixes into BGP redistribute static p Configuration Example: router bgp 100 redistribute static ip route 102.10.32.0 255.255.254.0 serial0 p Static route must exist before redistribute command will work p Forces origin to be incomplete p Care required! 29

Inserting prefixes into BGP redistribute static p Care required with redistribute! n redistribute <routing-protocol> means everything in the <routing-protocol> will be transferred into the current routing protocol n Will not scale if uncontrolled n Best avoided if at all possible n redistribute normally used with route-maps and under tight administrative control 30

Inserting prefixes into BGP network command p Configuration Example router bgp 100 network 102.10.32.0 mask 255.255.254.0 ip route 102.10.32.0 255.255.254.0 serial0 p A matching route must exist in the routing table before the network is announced p Forces origin to be IGP 31

Configuring Aggregation p Three ways to configure route aggregation n redistribute static n aggregate-address n network command 32

Configuring Aggregation p Configuration Example: router bgp 100 redistribute static ip route 102.10.0.0 255.255.0.0 null0 p Static route to null0 is called a pull up route n Packets only sent here if there is no more specific match in the routing table n Care required see previously! 33

Configuring Aggregation Network Command p Configuration Example router bgp 100 network 102.10.0.0 mask 255.255.0.0 ip route 102.10.0.0 255.255.0.0 null0 p A matching route must exist in the routing table before the network is announced p Easiest and best way of generating an aggregate 34

Configuring Aggregation aggregate-address command p Configuration Example: router bgp 100 network 102.10.32.0 mask 255.255.252.0 aggregate-address 102.10.0.0 255.255.0.0 [summary-only] p Requires more specific prefix in BGP table before aggregate is announced p summary-only keyword n Optional keyword which ensures that only the summary is announced (the more specific routes are suppressed)

Summary BGP neighbour status Router6>sh ip bgp sum! BGP router identifier 10.0.15.246, local AS number 10! BGP table version is 16, main routing table version 16! 7 network entries using 819 bytes of memory! 14 path entries using 728 bytes of memory! 2/1 BGP path/bestpath attribute entries using 248 bytes of memory! 0 BGP route-map cache entries using 0 bytes of memory! 0 BGP filter-list cache entries using 0 bytes of memory! BGP using 1795 total bytes of memory! BGP activity 7/0 prefixes, 14/0 paths, scan interval 60 secs!! Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd! 10.0.15.241 4 10 9 8 16 0 0 00:04:47 2! 10.0.15.242 4 10 6 5 16 0 0 00:01:43 2! 10.0.15.243 4 10 9 8 16 0 0 00:04:49 2!...! BGP Version Updates sent and received Updates waiting 36

Summary BGP Table Router6>sh ip bgp! BGP table version is 16, local router ID is 10.0.15.246! Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,! r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,! x best-external, a additional-path, c RIB-compressed,! Origin codes: i - IGP, e - EGP,? - incomplete! RPKI validation codes: V valid, I invalid, N Not found!! Network Next Hop Metric LocPrf Weight Path! *>i 10.0.0.0/26 10.0.15.241 0 100 0 i! *>i 10.0.0.64/26 10.0.15.242 0 100 0 i! *>i 10.0.0.128/26 10.0.15.243 0 100 0 i! *>i 10.0.0.192/26 10.0.15.244 0 100 0 i! *>i 10.0.1.0/26 10.0.15.245 0 100 0 i! *> 10.0.1.64/26 0.0.0.0 0 32768 i! *>i 10.0.1.128/26 10.0.15.247 0 100 0 i! *>i 10.0.1.192/26 10.0.15.248 0 100 0 i! *>i 10.0.2.0/26 10.0.15.249 0 100 0 i! *>i 10.0.2.64/26 10.0.15.250 0 100 0 i!...! 37

Summary p BGP4 path vector protocol p ibgp versus ebgp p stable ibgp peer with loopbacks p announcing prefixes & aggregates 38

Introduction to BGP ISP Workshops 39