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

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

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

Introduction to BGP ISP/IXP Workshops

BGP Attributes and Policy Control

BGP Attributes and Policy Control

BGP Attributes and Policy Control

Introduction to BGP. ISP/IXP Workshops

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

BGP Policy Control. ISP Workshops. Last updated 17 May 2014

BGP Attributes and Path Selection

BGP Policy Control. ISP Workshops

BGP Protocol & Configuration. Scalable Infrastructure Workshop AfNOG2008

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

Ravi Chandra cisco Systems Cisco Systems Confidential

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

Connecting to a Service Provider Using External BGP

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

BGP for Internet Service Providers

internet technologies and standards

LACNIC XIII. Using BGP for Traffic Engineering in an ISP

Routing Basics ISP/IXP Workshops

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

Connecting to a Service Provider Using External BGP

Module 6 Implementing BGP

BGP in the Internet Best Current Practices

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

BGP Configuration for a Transit ISP

Advanced Multihoming. BGP Traffic Engineering

Configuring BGP. Cisco s BGP Implementation

Service Provider Multihoming

BGP Commands. Network Protocols Command Reference, Part 1 P1R-355

EE 122: Inter-domain routing Border Gateway Protocol (BGP)

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

PART III. Implementing Inter-Network Relationships with BGP

Routing Basics ISP/IXP Workshops

BGP and the Internet

TELE 301 Network Management

Border Gateway Protocol - BGP

BGP route filtering and advanced features

Module 3 BGP route filtering and advanced features

Service Provider Multihoming

BGP and the Internet. Why Multihome? Why Multihome? Why Multihome? Why Multihome? Why Multihome? Redundancy. Reliability

Routing Basics. ISP Workshops

Copyright 1998, Cisco Systems, Inc. All rights reserved. Printed in USA. 0945_05F9_c1.scr 1. RST _05_2001_c1

CertifyMe. CertifyMe

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

Lab 2 BGP route filtering and advanced features

Multihoming Complex Cases & Caveats

Multiprotocol BGP (MBGP)

BGP Commands. Network Protocols Command Reference, Part 1 P1R-355

BGP. Autonomous system (AS) BGP version 4

IPv4/IPv6 BGP Routing Workshop. Organized by:

BGP Attributes (C) Herbert Haas 2005/03/11 1

BGP and the Internet

CS BGP v4. Fall 2014

Multihoming Techniques. bdnog8 May 4 8, 2018 Jashore, Bangladesh.

IPv6 Module 7 BGP Route Filtering and Advanced Features

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

BGP. Autonomous system (AS) BGP version 4

BGP. Autonomous system (AS) BGP version 4. Definition (AS Autonomous System)

BGP. Attributes 2005/03/11. (C) Herbert Haas

Distance Vector: Link Cost Changes. Interdomain Routing. Distance Vector: Count to Infinity Problem. Distance Vector: Poisoned Reverse

Configuring BGP community 43 Configuring a BGP route reflector 44 Configuring a BGP confederation 44 Configuring BGP GR 45 Enabling Guard route

How BGP Routers Use the Multi Exit Discriminator for Best Path Selection

BGP. Autonomous system (AS) BGP version 4. Definition (AS Autonomous System)

BGP Scaling Techniques

BGP. Autonomous system (AS) BGP version 4

BGP. BGP Overview. BGP Operation. BGP Neighbors

BGP Scaling Techniques

Module 16 An Internet Exchange Point

Border Gateway Protocol

Border Gateway Protocol (an introduction) Karst Koymans. Tuesday, March 8, 2016

DE-CIX Academy: BGP - Multihoming

BGP for Internet Service Providers

Border Gateway Protocol (an introduction) Karst Koymans. Monday, March 10, 2014

BGP-v4 Theory and Practice

BGP. Autonomous system (AS) BGP version 4. Definition (AS Autonomous System)

Lecture 16: Border Gateway Protocol

CS 640: Introduction to Computer Networks. Intra-domain routing. Inter-domain Routing: Hierarchy. Aditya Akella

Internet inter-as routing: BGP

Inter-domain Routing. Outline. Border Gateway Protocol

Module 13 Multihoming to Different ISPs

Module 18 Transit. Objective: To investigate methods for providing transit services. Prerequisites: Modules 12 and 13, and the Transit Presentation

I Commands. Send comments to

IPv6 Module 16 An IPv6 Internet Exchange Point

Introduction to IP Routing. Geoff Huston

Routing Basics. Campus Network Design & Operations Workshop

Lecture 16: Interdomain Routing. CSE 123: Computer Networks Stefan Savage

ISP Border Definition. Alexander Azimov

Service Provider Multihoming

Lecture 18: Border Gateway Protocol

Lecture 17: Border Gateway Protocol

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

Service Provider Multihoming

Table of Contents. BGP Configuration 1

BGP Multihoming ISP/IXP Workshops

BGP Configuration. BGP Overview. Introduction to BGP. Formats of BGP Messages. Header

prefix filtering netkit-lab-bgp-1

Configuration prerequisites 45 Configuring BGP community 45 Configuring a BGP route reflector 46 Configuring a BGP confederation 46 Configuring BGP

Module 8 Multihoming Strategies Lab

Transcription:

Introduction to GP GP asics INET 2000 NTW quick reminder ISP/IXP Workshops 2000, isco Systems, Inc. 1 ISP/IXP Presentation_I Workshops 2000, 1999, isco Systems, Inc. www.cisco.com 2 order Gateway Protocol GP Routing Protocol used to exchange routing information between networks exterior gateway protocol RF1771 work in progress to update draft-ietf-idr-bgp4-10.txt urrently Version 4 Runs over TP 3 Path Vector Protocol Incremental Updates Many options for policy enforcement lassless Inter omain Routing (IR) Widely used for Internet backbone utonomous systems 4 Path Vector Protocol Path Vector Protocol GP is classified as a path vector routing protocol (see RF 1322) S6337 S11268 path vector protocol defines a route as a pairing between a destination and the attributes of the path to that destination. S7018 S500 12.6.126.0/24 207.126.96.43 1021 0 6461 7018 6337 11268 i S6461 S Path S600 5 6 1

efinitions Peering and Transit example Transit - carrying traffic across a network, usually for a fee Peering - exchanging routing information and traffic efault - where to send traffic when there is no explicit match is in the routing table provider provider IXP- West ackbone Provider and can peer, but need transit arrangements with to get packets to/from IXP-East provider 7 8 utonomous System (S) emarcation Zone (MZ) S 100 MZ S 100 Network S 101 ollection of networks with same routing policy Single routing protocol E S 102 Usually under single ownership, trust and administrative control Shared network between Ses 9 10 GP asics GP General Operation Peering S 100 S 101 GP speakers are called peers E S 102 Learns multiple paths via internal and external GP speakers Picks the best path and installs in the forwarding table Policies applied by influencing the best path selection 11 12 2

onstructing the Forwarding Table GP in process receives path information from peers results of GP path selection placed in the GP table best path flagged GP out process announces best path information to peers est paths installed in forwarding table if: prefix and prefix length are unique lowest protocol distance in bgp peer out onstructing the Forwarding Table everything best paths GP in process GP out process GP table discarded accepted forwarding table 13 14 External GP Peering (egp) onfiguring External GP (isco IOS) S 100 S 101 Router in S100 interface ethernet 5/0 ip address 222.222.10.2 255.255.255.240 network 220.220.8.0 mask 255.255.252.0 neighbor 222.222.10.1 remote-as 101 neighbor 222.222.10.1 prefix-list Router in neighbor 222.222.10.1 prefix-list Router out etween GP speakers in different S Should be directly connected o not run an IGP between egp peers 15 Router in S101 interface ethernet 1/0/0 ip address 222.222.10.1 255.255.255.240 router bgp 101 network 220.220.16.0 mask 255.255.240.0 neighbor 222.222.10.2 remote-as 100 neighbor 222.222.10.2 prefix-list Router in neighbor 222.222.10.2 prefix-list Router out 16 Internal GP (igp) Internal GP Peering (igp) GP peer within the same S Not required to be directly connected S 100 igp speakers need to be fully meshed they originate connected networks they do not pass on prefixes learned from other igp speakers 17 Topology independent Each igp speaker must peer with every other igp speaker in the S E 18 3

Stable igp Peering Peering to Loop-ack ddress Peer with loop-back address igp session is not dependent on state of a single interface igp session is not dependent on physical topology Loop-back interface does not go down - ever S 100 19 20 onfiguring Internal GP (isco IOS) Router interface loopback 0 ip address 215.10.7.1 255.255.255.255 network 220.220.1.0 neighbor 215.10.7.2 remote-as 100 neighbor 215.10.7.2 update-source loopback0 neighbor 215.10.7.3 remote-as 100 neighbor 215.10.7.3 update-source loopback0 Router interface loopback 0 ip address 215.10.7.2 255.255.255.255 network 220.220.5.0 neighbor 215.10.7.1 remote-as 100 neighbor 215.10.7.1 update-source loopback0 neighbor 215.10.7.3 remote-as 100 neighbor 215.10.7.3 update-source loopback0 21 Inserting prefixes into GP - network command onfiguration Example router bgp 109 network 198.10.4.0 mask 255.255.254.0 ip route 198.10.0.0 255.255.254.0 serial0 matching route must exist in the routing table before the network is announced Forces origin to be IGP 22 onfiguration ggregation - Network ommand onfiguring ggregation - aggregate-address command onfiguration Example router bgp 109 network 198.10.0.0 mask 255.255.0.0 ip route 198.10.0.0 255.255.0.0 null0 250 matching route must exist in the routing table before the network is announced Easiest and best way of generating an aggregate onfiguration Example router bgp 109 network 198.10.4.0 mask 255.255.252.0 aggregate-address 198.10.0.0 255.255.0.0 [ summary-only ] Requires more specific prefix in routing table before aggregate is announced {summary-only} keyword optional keyword which ensures that only the summary is announced if a more specific prefix exists in the routing table 23 24 4

uto Summarisation Synchronisation isc IOS automatically summarises subprefixes to the classful network. Example: 61.10.8.0/22 --> 61.0.0.0/8 In isco IOS, GP does not advertise a route before all routers in the S have learned it via an IGP isable synchronisation if: Must be turned off for any Internet connected site using GP. S doesn t pass traffic from one S to another, or ll transit routers in S run GP, or router bgp 109 no auto-summary 25 igp is used across backbone router bgp 109 no synchronization 26 Summary GP4 - distance vector protocol igp versus egp GP ttributes stable igp - peer with loopbacks announcing prefixes & aggregates no synchronization & no auto-summary 27 ISP/IXP Presentation_I Workshops 1999, 2000, isco Systems, Inc. www.cisco.com 28 What Is an ttribute? S-Path... Next Hop S Path ME escribes the characteristics of prefix Transitive or non-transitive Some are mandatory...... Sequence of Ses a route has traversed Loop detection pply policy S 500 S 300 S 200 S 100 170.10.0.0/16 180.10.0.0/16 180.10.0.0/16 300 200 100 170.10.0.0/16 300 200 S 400 150.10.0.0/16 180.10.0.0/16 300 200 100 170.10.0.0/16 300 200 150.10.0.0/16 300 400 29 30 5

Next Hop Next Hop 150.10.1.1 150.10.1.2 150.10.1.1 150.10.1.2 S 200 150.10.0.0/16 S 300 S 200 150.10.0.0/16 egp igp S 300 150.10.0.0/16 150.10.1.1 160.10.0.0/16 150.10.1.1 S 100 160.10.0.0/16 Next hop to reach a network Usually a local network is the next hop in egp session S 100 160.10.0.0/16 150.10.0.0/16 150.10.1.1 160.10.0.0/16 150.10.1.1 Next hop not changed 20 31 32 igp Next Hop Next Hop (summary) Loopback 220.1.254.2/32 220.1.1.0/24 S 300 igp 220.1.2.0/23 Loopback 220.1.254.3/32 IGP should carry route to next hops Recursive route look-up Unlinks GP from actual physical topology Next hop is ibgp router loopback address 220.1.1.0/24 220.1.254.2 220.1.2.0/23 220.1.254.3 llows IGP to make intelligent forwarding decision Recursive route look-up 33 34 Origin ggregator onveys the origin of the prefix Influence best path selection Three values - IGP, EGP, incomplete IGP - generated from GP network statement EGP - generated from EGP incomplete - generated by redistribute action 35 Useful for debugging purposes onveys the IP address of the router/gp speaker generating the aggregate route oesn t influence path selection 36 6

Local Preference Local Preference Local to an S - non-transitive local preference set to 100 when heard from neighbouring S Used to influence GP path selection determines best path for outbound traffic Path with highest local preference wins 37 S 200 160.10.0.0/16 500 > 160.10.0.0/16 800 S 100 160.10.0.0/16 S 400 500 800 E S 300 38 Local Preference Multi-Exit iscriminator onfiguration of Router : router bgp 400 neighbor 220.5.1.1 remote-as 300 neighbor 220.5.1.1 route-map local-pref in route-map local-pref permit 10 match ip address prefix-list MTH set local-preference 800 ip prefix-list MTH permit 160.10.0.0/16 ip prefix-list MTH deny 0.0.0.0/0 le 32 Inter-S - non-transitive metric reset to 0 on announcement to next S Used to convey the relative preference of entry points determines best path for inbound traffic omparable if paths are from same S IGP metric can be conveyed as ME 39 40 Multi-Exit iscriminator (ME) 192.68.1.0/24 2000 S 200 192.68.1.0/24 S 201 192.68.1.0/24 1000 Multi-Exit iscriminator onfiguration of Router : router bgp 400 neighbor 220.5.1.1 remote-as 200 neighbor 220.5.1.1 route-map set-med out route-map set-med permit 10 match ip address prefix-list MTH set metric 1000 ip prefix-list MTH permit 192.68.1.0/24 ip prefix-list MTH deny 0.0.0.0/0 le 32 41 42 7

GP attribute ommunity Used to group destinations Represented as two 16bit integers Each destination could be member of multiple communities ommunity attribute carried across S s Useful in applying policies ISP 2 X 200.10.0.0/16 200.10.0.0/16 300:9 160.10.0.0/16 300:1 ommunity S 300 S 100 160.10.0.0/16 160.10.0.0/16 300:1 170.10.0.0/16 300:1 ISP 1 E 170.10.0.0/16 300:1 S 200 S 400 170.10.0.0/16 43 44 Well-Known ommunities No-Export ommunity internet = all routes are members of this community no-export = do not advertise to egp peers no-advertise = do not advertise to any peer 170.10.X.X 170.10.0.0/16 170.10.X.X No-Export S 100 S 200 E G 170.10.0.0/16 local-s = do not advertise outside local S (used with confederations) F 45 46 GP Path Selection lgorithm Why is this the best path? GP Path Selection lgorithm o not consider igp path if not synchronised o not consider path if no route to next hop Highest weight (local to router) Highest local preference (global within S) Shortest S path ISP/IXP Presentation_I Workshops 1999, 2000, isco Systems, Inc. www.cisco.com 47 48 8

GP Path Selection lgorithm (continued) Lowest origin code IGP < EGP < incomplete Multi-Exit iscriminator onsidered only if paths are from same S Prefer egp path over igp path Path with shortest next-hop metric wins Lowest router-id pplying Policy with GP The GP Toolkit 49 ISP/IXP Presentation_I Workshops 1999, 2000, isco Systems, Inc. www.cisco.com 50 pplying Policy with GP Policy ontrol - Prefix List Policy-based on S path, community or the prefix Rejecting/accepting selected routes Set attributes to influence path selection Tools: Prefix-list (filters prefixes) Filter-list (filters S paths) Route-maps and communities 51 Per neighbour prefix filter incremental configuration High performance access-list Inbound or Outbound ased upon network numbers (using familiar IPv4 address/mask format) 52 Prefix Lists - Examples Prefix Lists - Examples eny default route ip prefix-list EG deny 0.0.0.0/0 Permit the prefix 35.0.0.0/8 ip prefix-list EG permit 35.0.0.0/8 eny the prefix 172.16.0.0/12 ip prefix-list EG deny 172.16.0.0/12 In 192/8 allow up to /24 ip prefix-list EG permit 192.0.0.0/8 le 24 This allows all prefix sizes in the 192.0.0.0/8 address block, apart from /25, /26, /27, /28, /29, /30, In 192/8 deny /25 and above ip prefix-list EG deny 192.0.0.0/8 ge 25 This denies all prefix sizes /25, /26, /27, /28, /29, /30, /31 and /32 in the address block 192.0.0.0/8. It has the same effect as the previous example In 192/8 permit prefixes between /12 and /20 ip prefix-list EG permit 193.0.0.0/8 ge 12 le 20 This denies all prefix sizes /8, /9, /10, /11, /21, /22, and higher in the address block 193.0.0.0/8. Permit all prefixes ip prefix-list EG permit 0.0.0.0/0 le 32 ISP/IXP Workshops /31 and /32. 2000, isco Systems, Inc. www.cisco.com 53 54 0.0.0.0 matches all possible addresses, 0 le 32 9

Policy ontrol - Prefix List Example onfiguration router bgp 200 network 215.7.0.0 neighbor 220.200.1.1 remote-as 210 neighbor 220.200.1.1 prefix-list PEER-IN in neighbor 220.200.1.1 prefix-list PEER-OUT out ip prefix-list PEER-IN deny 218.10.0.0/16 ip prefix-list PEER-IN permit 0.0.0.0/0 le 32 ip prefix-list PEER-OUT permit 215.7.0.0/16 ip prefix-list PEER-OUT deny 0.0.0.0/0 le 32 55 Policy ontrol - Filter List Filter routes based on S path Inbound or Outbound Example onfiguration: network 215.7.0.0 neighbor 220.200.1.1 filter-list 5 out neighbor 220.200.1.1 filter-list 6 in ip as-path access-list 5 permit ^200$ ip as-path access-list 6 permit ^150$ 56 Policy ontrol - Regular Expressions Like Unix regular expressions. Match one character * Match any number of preceding expression + Match at least one of preceding expression ^ eginning of line $ End of line _ eginning, end, white-space, brace Or () brackets to contain expression 57 Policy ontrol - Regular Expressions Simple Examples.* Match anything.+ Match at least one character ^$ Match routes local to this S _1800$ Originated by 1800 ^1800_ Received from 1800 _1800_ Via 1800 _790_1800_ Passing through 1800 then 790 _(1800_)+ Match at least one of 1800 in sequence _\(65350\)_ Via 65350 (confederation S) 58 Policy ontrol - Regular Expressions Not so simple Examples ^[0-9]+$ ^[0-9]+_[0-9]+$ ^[0-9]*_[0-9]+$ ^[0-9]*_[0-9]*$ ^[0-9]+_[0-9]+_[0-9]+$ _(701 1800) 1849(_.+_)12163$ Match S_PTH length of one Match S_PTH length of two Match S_PTH length of one or two Match S_PTH length of one or two Match S_PTH length of three Match anything which has gone through S701 or S1800 Match anything of origin S12163 and passed through S1849 59 Policy ontrol - Route Maps Example onfiguration - route map and prefix-lists ip prefix-list HIGH-PREF permit 10.0.0.0/8 ip prefix-list HIGH-PREF deny 0.0.0.0/0 le 32 ip prefix-list LOW-PREF permit 20.0.0.0/8 ip prefix-list LOW-PREF deny 0.0.0.0/0 le 32 route-map infilter permit 10 match ip address prefix-list HIGH-PREF set local-preference 120 route-map infilter permit 20 match ip address prefix-list LOW-PREF set local-preference 80 neighbor 1.1.1.1 route-map infilter in 60 10

Policy ontrol - Route Maps Policy ontrol - Route Maps Example onfiguration - route map and filter lists neighbor 220.200.1.2 remote-as 200 neighbor 220.200.1.2 route-map filter-on-as-path in route-map filter-on-as-path permit 10 match as-path 1 set local-preference 80 route-map filter-on-as-path permit 20 match as-path 2 set local-preference 200 ip as-path access-list 1 permit _150$ ip as-path access-list 2 permit _210_ 61 Example configuration of S-PTH prepend router bgp 300 network 215.7.0.0 neighbor 2.2.2.2 remote-as 100 neighbor 2.2.2.2 route-map SETPTH out route-map SETPTH permit 10 set as-path prepend 300 300 Standard practice implements two occurrences of the SN when prepending 62 Policy ontrol - Matching ommunities Policy ontrol - Setting ommunities Example onfiguration neighbor 220.200.1.2 remote-as 200 neighbor 220.200.1.2 route-map filter-on-community in route-map filter-on-community permit 10 match community 1 set local-preference 50 route-map filter-on-community permit 20 match community 2 exact-match set local-preference 200 ip community-list 1 permit 150:3 200:5 ip community-list 2 permit 88:6 63 Example onfiguration network 215.7.0.0 neighbor 220.200.1.1 remote-as 200 neighbor 220.200.1.1 send-community neighbor 220.200.1.1 route-map set-community out route-map set-community permit 10 match ip address prefix-list NO-NNOUNE set community no-export route-map set-community permit 20 match ip address prefix-list EVERYTHING ip prefix-list NO-NNOUNE permit 172.168.0.0/16 ge 17 ip prefix-list EVERYTHING permit 0.0.0.0/0 le 32 64 GP Summary ttributes Path Selection Process Policy ontrol Tools ny questions? 65 11