Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 © 2000, Cisco Systems, Inc. Session # Presentation_ID Border Gateway Protocol.

Similar presentations


Presentation on theme: "1 © 2000, Cisco Systems, Inc. Session # Presentation_ID Border Gateway Protocol."— Presentation transcript:

1 1 © 2000, Cisco Systems, Inc. Session # Presentation_ID Border Gateway Protocol

2 Agenda BGP Fundamentals BGP Attributes Controlling the flow of BGP updates Practical Design Examples

3 Autonomous System (AS) AS 100 A Collection of networks with same policy Single routing protocol Usually under single administrative control Identified by AS number (1 – 65535) Private ASNs from 64512 – 65535

4 ARIN A unique routing policy (its policy differs from its border gateway peers) A multi-homed site ASN Registration Guidelines http://www.arin.net

5 What is an IGP? Interior Gateway Protocol Within an Autonomous System Carries information about internal prefixes Examples—OSPF, RIP, EIGRP…

6 What is an EGP? Exterior Gateway Protocol Used to convey routing information between Autonomous Systems Decoupled from the IGP Current EGP is BGP

7 Interior vs. Exterior Routing Protocols Interior Automatic discovery Generally trust your IGP routers Routes go to all IGP routers Exterior Specifically configured peers Connecting with outside networks Set administrative boundaries

8 Why do we need an EGP? Scaling to large network Hierarchy Limit scope of failure Fast convergence No manual reconfig (static routes) - high maintenance Complex Routing Policies Control reachability to prefixes by selecting outbound paths and announcing internal routes

9 NJEDge Member Remote Network Alternate ISP NJEDge Intranet NJEDge Internet Verizon ATM

10 What is BGP? Border Gateway Protocol, currently version 4 – defined in RFC 1771 Distance-vector routing protocol running over TCP port 179 Supports classless routing Actually two protocols – iBGP and eBGP

11 Internal BGP AS 3847 When BGP speakers in the same AS form a BGP connection for the purpose of exchanging routing information, they are said to be running IBGP or internal BGP. IBGP speakers are usually fully-meshed. B A c

12 External BGP When BGP speakers in different ASs form a BGP connection for the purpose of exchanging routing information, they are said to be running EBGP or external BGP. EBGP peers are usually directly connected. AS 109 AS 110 131.108.0.0 A B 150.10.0.0 131.108.10.0.1.2

13 Agenda BGP Fundamentals BGP Attributes Controlling the flow of BGP updates Practical Design Examples

14 BGP Attributes AS-path Origin Next-hop Weight Local preference Multi Exit Discriminator (MED) Community

15 BGP Attributes 1880 AS-Path 141.253.10.0/24 A 690 B 200 C 1. Router A sends update for 141.253.10.0/24 with AS_PATH: 1880 2. Router B sends update for 141.253.10.0/24 with AS_PATH: 690 1880 3.Router C sends update for 141.253.10.0/24 with AS_PATH: 200 690 1880 4.Router A will detect its own AS number and will discard the update

16 AS-Path AS3847 207.240.0.0/16 AS1673 140.222.0.0/16 AS701 192.67.95.0/24 AS3561 204.70.0.0/15 192.67.95.0/24 3847 701 i 140.222.0.0 3847 1673 i 204.70.0.0/15 3847 3561 i 207.240.0.0/16 3847 i AS6201 E C F G D B A show ip bgp

17 AS-Path Sequence of ASNs a route has traversed. Provides a mechanism for loop detection Shortest AS path preferred Policies may be applied based on AS path

18 Origin Order of preference: IGP (i) Route is interior to the originating AS Set with the Network statement under router BGP EGP (e) Route learned via EGP Incomplete (?) Route redistributed from IGP

19 RouterB# show ip bgp table version is 24, local router ID is 203.250.15.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 192.208.10.0 192.208.10.5 0 0 300 i Origin AS 300 AS 200 192.208.10.5 A B 192.208.10.6

20 Next Hop 160.10.0.0/16 150.10.0.0/16 150.10.1.1 150.10.1.2 AS 100 AS 300 AS 200 150.10.0.0/16 150.10.1.1 160.10.0.0/16 150.10.1.1 AB Next hop IP address to reach a network For EBGP usually the IP of the neighbor specified by the neighbor remote-as command

21 Next Hop 160.10.0.0/16 150.10.0.0/16 150.10.1.2 AS 100 AS 300 AS 200 A B C 150.10.0.0/16 150.10.1.1 160.10.0.0/16 150.10.1.1 150.10.1.1 With IBGP Next Hop does not change Ensure that router C can reach 150.10.1.1 via an IGP

22 Weight Cisco proprietary Local to router, not propagated in any routing updates Value 0-65535 (default if originated by router - 32768, other - 0) Highest weight preferred Rarely used

23 router bgp 300 neighbor 1.1.1.1 remote-as 100 neighbor 1.1.1.1 weight 2000 neighbor 2.2.2.2 remote-as 200 neighbor 2.2.2.2 weight 1000 Weight

24 Local Preference AS 400 AS 200 160.10.0.0/16 AS 100 AS 300 160.10.0.0/16 150 > 160.10.0.0/16 200 150 200 E B C A D

25 Path with highest local pref is preferred (default = 100) Unlike weight, local pref advertised to routers within the same AS (IBGP) Often used attribute “Powerful” attribute, comes before AS-Path length in the BGP selection algorithm Local Preference

26 router bgp 400 neighbor 3.3.3.4 remote-as 300 neighbor 128.213.11.1 remote-as 400 bgp default local-preference 200 Local Preference

27 Multi-Exit Discriminator (MED) AS 201 AS 200 192.68.1.0/24 C AB 192.68.1.0/24 1000192.68.1.0/24 2000

28 Lowest MED preferred Used to convey the relative preference of entry points into an AS (Local Pref is outbound) Influences best path selection – after AS_PATH evaluation Comparable if paths are from same AS. Use bgp always-compare-med command to compare all MEDs Advertised to external neighbors Usually based on IGP metric Multi-Exit Discriminator (MED)

29 router bgp 300 neighbor 3.3.3.2 remote-as 100 neighbor 3.3.3.2 route map SETMEDOUT out neighbor 1.1.1.1 remote-as 300 route-map SETMEDOUT permit 10 set metric 200 Multi-Exit Discriminator (MED)

30 BGP attribute Used to group destinations Useful in applying routing policies Represented as number(s) that get “stamped” on BGP routes Each destination could be member of multiple communities Community attribute carried across Autonomous Systems Communities

31 router bgp 200 network 160.10.0.0 neighbor 3.3.3.1 remote-as 300 neighbor 3.3.3.1 send-community neighbor 3.3.3.1 route-map SETCOMMUNITY out route-map SETCOMMUNITY permit 10 match ip address 1 set community no-export route-map SETCOMMUNITY permit 20 access list 1 permit 0.0.0.0 255.255.255.255 Communities AS 200 AS 300 3.3.3.2 A B 3.3.3.1 AS 100 160.10.0.0 C

32 Agenda BGP Fundamentals BGP Attributes Controlling the flow of BGP updates Practical Design Examples

33 BGP Path Selection Algorithm 1.Do not consider IBGP path if not synchronized 2.Do not consider path if no route to next hop 3.Highest weight (local to router) 4.Highest local preference (global within AS) 5.Shortest AS path

34 BGP Path Selection Algorithm 6.Lowest origin code IGP < EGP < incomplete 7.Multi-Exit Discriminator Considered only if paths are from the same AS 8.Prefer EBGP path over IBGP path 9.Path with shortest next hop metric wins 10.Lowest router-id

35 router bgp 256 neighbor 3.3.3.4 remote-as 300 route-map SETLOCALIN in neighbor 128.213.11.1 remote-as 256 ip as-path 7 permit ^300$ route-map SETLOCALIN permit 10 match as-path 7 set local-preference 200 route-map SETLOCALIN permit 20 Route Maps

36 Route-maps are Cisco’s mechanism to select and modify routes with if/then style algorithms. For route-maps with the keyword “permit”, if the prefix being examined passes the match statement, the set commands are executed and the route-map is exited. If the match statement is not passed, the next sequence number is executed. If there are no more sequence numbers, the prefix is filtered/dropped. Route Maps route-map SETLOCALIN permit 10 match as-path 7 set local-preference 200 route-map SETLOCALIN permit 20

37 ip as-path 7 permit ^300$.Period matches any single character, including white space. *Asterisk matches 0 or more sequences of the pattern. +Plus sign matches 1 or more sequences of the pattern. ?Question mark matches 0 or 1 occurrences of the pattern ^Caret matches the beginning of the input string. $Dollar sign matches the end of the input string. _Underscore matches a comma (,), left brace ({), right brace (}) left parenthesis, right parenthesis, the beginning or end of the input string, or a space. ][Square brackets designate a range of single character patterns. -Hyphen separates the endpoints of a range. These are much like standard vi regular expressions. Cisco Regular Expressions

38 3847 6201 D A C B E 701 F 6202 G The following configuration could be used on router B to accept routes from AS6201 & 6202 and deny all others. ip as-path access-list 10 permit ^6201$ ip as-path access-list 10 permit ^6201_6202$ ip as-path access-list 10 deny.*

39 Router A router bgp 100 network 170.10.0.0 neighbor 2.2.2.2 remote-as 200 neighbor 2.2.2.2 route-map SETPATH out route-map SETPATH permit 10 set as-path prepend 100 100 AS-Path Padding AS 400 AS 200 AS 100 AS 300 A

40 A way to group in a configuration template a set of neighbors having the same outbound policy. Peer-groups allow: easier configuration (and maintenance) of BGP neighbors better cpu/memory usage when generating updates By grouping neighbors with common policy together, routers can save CPU by creating once a route object and then advertising that object to multiple peers. Also, saves typing :) Peer Groups

41 router bgp 300 neighbor EXTERNALMAP peer-group neighbor EXTERNALMAP route-map SETMED neighbor EXTERNALMAP filter-list 1 out neighbor EXTERNALMAP filter-list 2 in neighbor 2.2.2.2 remote-as 100 neighbor 2.2.2.2 peer-group EXTERNALMAP neighbor 4.4.4.2 remote-as 600 neighbor 4.4.4.2 peer-group EXTERNALMAP neighbor 1.1.1.2 remote-as 200 neighbor 1.1.1.2 peer-group EXTERNALMAP neighbor 1.1.1.2 filter-list 3 in Peer Groups

42 Three ways to configure route aggregation Redistribute static Network mask command Aggregate-address command Aggregation

43 router bgp 200 neighbor 3.3.3.1 remote-as 300 redistribute static ip route 160.0.0.0 255.0.0.0 null 0 Aggregation Redistribute Static

44 router bgp 200 network 160.0.0.0 mask 255.0.0.0 neighbor 3.3.3.1 remote-as 300 ip route 160.0.0.0 255.0.0.0 null 0 Aggregation Network Mask

45 router bgp 200 network 160.0.0.0 neighbor 3.3.3.1 remote-as 300 aggregate-address 160.0.0.0 255.0.0.0 Aggregation Aggregate-address

46 router bgp 300 neighbor 3.3.3.3 remote-as 200 neighbor 2.2.2.2 remote-as 100 network 160.10.0.0 aggregate-address 160.0.0.0 255.0.0.0 suppress-map CHECK route-map CHECK permit 10 match ip address 1 access-list 1 deny 160.20.0.0 0.0.255.255 access-list 1 permit 0.0.0.0 255.255.255.255 Aggregation Suppress-map

47 Agenda BGP Fundamentals BGP Attributes Controlling the flow of BGP updates Practical Design Examples

48 Multi-homing with two ISPs 141.253.10.0/24 A AS 100 ISP A AS 200 C NJEDge Internet B 10.10.10.10 20.20.20.20 AS 300 1.0.0.0 / 8 2.0.0.0 / 8 Risk of your AS becoming a transit AS

49 router bgp 300 network 1.0.0.0 network 2.0.0.0 neighbor 10.10.10.10 remote-as 100 neighbor 10.10.10.10 route-map localonly out neighbor 20.20.20.20 remote-as 200 neighbor 20.20.20.20 route-map localonly out ip as-path access-list 10 permit ^$ route-map localonly permit 10 match as-path 10 Configuration to Receive Full Internet Routing Table

50 router bgp 300 network 1.0.0.0 network 2.0.0.0 neighbor 10.10.10.10 remote-as 100 neighbor 10.10.10.10 route-map localonly out neighbor 10.10.10.10 route-map as100only in neighbor 20.20.20.20 remote-as 200 neighbor 20.20.20.20 route-map localonly out neighbor 20.20.20.20 route-map as200only in ip as-path access-list 10 permit ^$ ip as-path access-list 20 permit ^100$ ip as-path access-list 30 permit ^200$ route-map localonly permit 10 match as-path 10 route-map as100only permit 10 match as-path 20 Route-map as200only permit 10 match as-path 30 ip route 0.0.0.0 0.0.0.0 10.10.10.10 ip route 0.0.0.0 0.0.0.0 20.20.20.20 Configuration to Receive Directly- Connected Routes

51 router bgp 300 network 1.0.0.0 network 2.0.0.0 neighbor 10.10.10.10 remote-as 100 neighbor 10.10.10.10 route-map localonly out neighbor 10.10.10.10 prefix-list ABC in neighbor 20.20.20.20 remote-as 200 neighbor 20.20.20.20 route-map localonly out neighbor 20.20.20.20 prefix-list ABC in ip prefix-list ABC seq 5 permit 0.0.0.0/0 ip as-path access-list 10 permit ^$ route-map localonly permit 10 match as-path 10 Configuration to Receive Default Routes Only

52 Load Sharing when Multi-homed to Two ISPs AS 100 AS 300 ISP A Network Internet AS 400 10.10.10.0/24 10.10.20.0/24 E B C A D IBGP NJEDge Internet Member Network

53 router eigrp 10 network 175.220.0.0 router bgp 200 neighbor 1.1.1.1 remote-as 300 neighbor 2.2.2.2 remote-as 200 neighbor 1.1.1.1 distribute-list 1 out redistribute eigrp 10 access-list 1 permit 175.220.0.0 0.0.255.255 Redistributing IGP into BGP Requires careful use of access lists to prevent routes from being injected back into BGP

54 router bgp 200 network 175.220.0.0 neighbor 1.1.1.1 remote-as 300 neighbor 2.2.2.2 remote-as 200 Redistributing IGP into BGP (Preferred) Works for networks learned through IGP or static routes Use with aggregate-address command if necessary

55 Redistributing BGP into IGP Normally avoided because too many routes would be injected into the IGP Common design is to redistribute one or two routes and make them exterior routes Or, have your BGP router generate default for your autonomous system When redistributing from BGP into IGP, only routes learned using EBGP get redistributed

56 Cisco Routers Can’t run full BGP - 2500 4000/4000M/4500/4500M Can run full BGP (64 MB)- 2600 3620/3640/3660 4700M 7206 7000 7500

57 Best Practices Peer IBGP routers using loopback address neighbor 1.1.1.1 update-source loopback0 BGP soft-reconfig Allows config changes w/o clearing neighbor Inbound: neighbor 1.1.1.1 soft-reconfiguration inbound Outbound: no configuration necessary clear ip bgp 1.1.1.1 soft (in/out) Route Refresh Capability IOS 12.0(1.0.4)S and later bgp dampening command Suppress flapping routes (high CPU utilization) For EBGP only Alternate paths still usable Use judiciously! bgp log-neighbor-changes Used to log neighbor up/down events and resets

58


Download ppt "1 © 2000, Cisco Systems, Inc. Session # Presentation_ID Border Gateway Protocol."

Similar presentations


Ads by Google