Download presentation
Presentation is loading. Please wait.
Published byRonald Barker Modified over 9 years ago
1
Release 5.1, Revision 0 Copyright © 2001, Juniper Networks, Inc. Advanced Juniper Networks Routing Module 6: Border Gateway Protocol
2
Copyright © 2001, Juniper Networks, Inc. Objectives Describe the configuration options for BGP peers Explain the default “movement” of BGP routes through a router Describe the role of BGP attributes in the process of choosing routes to use and advertise Describe how BGP next hop reachability is achieved
3
Copyright © 2001, Juniper Networks, Inc. BGP Operation BGP stores routes in three main Routing Information Base (RIB) memory tables – RIB-IN: All received routes get placed here – RIB-LOCAL: Routes the local router is using to forward traffic – RIB-OUT: All advertised routes get placed here Only active BGP routes in the local routing table may be advertised to peers – Single best BGP path is advertised – advertise-inactive can be used when BGP route is not active, but only the single best inactive BGP path is advertised
4
Copyright © 2001, Juniper Networks, Inc. Local Preference Exchanged by IBGP peers only Usually used to set the exit point from an AS IBGP propagates information throughout the AS Which router to reach 172.17.2.0? It makes sense to use Router B IBGP 172.17.2.0/24 EBGP IBGP makes sure each each peer knows to use Router B through Local_Pref B This AS neither knows nor cares about the other AS’ Local_Pref A
5
Copyright © 2001, Juniper Networks, Inc. AS Paths BGP AS Path is the route to a given destination Consists of a list of the AS numbers of all routers (path) a packet must go through The path can be parsed by regular expressions 192.168.27.0/24 AS 20222 AS 21777 AS 23001 AS 25678 192.168.27.0/24: 21777 20222 I 192.168.27.0/24: 23001 20222 I
6
Copyright © 2001, Juniper Networks, Inc. The Origin Code Installed by the originating router for the prefix (route) A tag of “believability” as to the origin of the route information (Where did you get it from?) Origin can be internal, external, or unknown – I: Internal (0) – Learned from an IGP – E: External (1) – Learned from EGP – ?: Incomplete (2) – NLRI found by some other means “I” (0) is better than “E” (1) which is better than “?” (2) All JUNOS software BGP routes have origin IGP by default
7
Copyright © 2001, Juniper Networks, Inc. Multiexit Discriminator (MED) An optional, non-transitive attribute (Code Type 4), it is never passed through one AS to another AS MED can be used by a neighboring AS to prefer one of several paths to the local AS Informs neighboring AS which of the ingress paths should be used to reach the local AS in an attempt to influence inbound traffic Can perform some primitive load balancing MED values are often translated from IGP metric Other AS networks can always preempt MED via other BGP attributes
8
Copyright © 2001, Juniper Networks, Inc. BGP Path Selection (1 of 2) 1. Can the BGP next hop (BNH) be reached? If yes, proceed. If no, stop processing. 2. Prefer the highest LOCAL-PREF value. 3. Prefer the shortest AS-PATH length. 4. Prefer the lowest ORIGIN value. 5. Prefer the lowest MED value. 6. Prefer paths learned via EBGP over routes via IBGP.
9
Copyright © 2001, Juniper Networks, Inc. BGP Path Selection (2 of 2) 7. Prefer paths with the lowest IGP metric 8. Prefer paths where BNH has a better route preference when examining both routing tables inet.0 and inet.3 9. Prefer paths where BNH has greater number of equal- cost paths 10. Prefer paths with the shortest Cluster-List length 11. Prefer paths from the peer with the lowest RID 12. Prefer paths from the peer with the lowest peer ID
10
Copyright © 2001, Juniper Networks, Inc. Path Selection: Peer-ID Used when there are multiple BGP peering sessions between two routers Only one BGP session will be used to forward traffic ID is the physical IP address on the neighboring router’s interface LasVegas(AS2) LosAngeles(AS1) 10.10.1.1/24 10.10.1.2/24 [edit protocols bgp group ext-peers] type external; peer-as 2; neighbor 10.10.1.1; neighbor 10.10.2.1; } 10.10.2.1/24 10.10.2.2/24
11
Copyright © 2001, Juniper Networks, Inc. Path Selection: Multipath Router-ID and Peer-ID comparisons can both be ignored when multipath is configured within BGP – Two peering sessions to the same router can be used – Two peering sessions to different routers can be used – Two peering sessions to different AS networks can be used Multipath cannot be used with multihop LasVegas(AS2) LosAngeles(AS1) 10.10.1.1/24 10.10.1.2/24 [edit protocols bgp group ext-peers] type external; peer-as 2; multipath; neighbor 10.10.1.1; neighbor 10.10.2.1; } user@host> show bgp summary Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Rec 10.10.1.1 2 7 7 0 0 00:00:02 19/19/0 10.10.2.1 2 8 10 0 0 00:00:06 19/19/0 10.10.2.1/24 10.10.2.2/24
12
Copyright © 2001, Juniper Networks, Inc. Multihop Peering lo0: 192.168.3.4 EBGP sessions may peer with non-physical addresses LasVegas(AS2) LosAngeles(AS1) 10.10.1.1/24 10.10.1.2/24 lo0: 172.16.128.1 [edit protocols bgp group ext-peers] type external; local-address 192.168.3.4; neighbor 172.16.128.1 { multihop ttl 2; } [edit routing-options] static { route 172.16.128.1 next-hop [ 10.10.1.1 10.10.2.1 ]; } 10.10.2.1/24 10.10.2.2/24 Step 1 Step 2 Step 3
13
Copyright © 2001, Juniper Networks, Inc. Multihop no-nexthop-change EBGP peers alter the BGP next hop across AS boundaries – A next-hop value of self is seen in the show route advertising-protocol bgp command Can be changed if multihop and the keyword of no- nexthop-change is used – The next-hop value is the address of the IBGP who advertised the route user@host> show route advertising-protocol bgp 192.168.1.2 inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 1 hidden) Prefix Nexthop MED Lclpref AS path 100.100.100.0/24 Self I [edit protocols bgp group ext-peers] user@host# set neighbor 192.168.1.2 multihop no-nexthop-change user@host> show route advertising-protocol bgp 192.168.1.2 inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 1 hidden) Prefix Nexthop MED Lclpref AS path 100.100.100.0/24 10.10.10.1 I
14
Copyright © 2001, Juniper Networks, Inc. Peer Configuration Options (1 of 2) passive keeps BGP from sending OPEN message [edit protocols bgp] group ext-peers { type external; peer-as 2; neighbor 10.10.10.1 { passive; } MD5 authentication can be enabled allow accepts OPEN messages from any peer within the configured IP address range [edit protocols bgp] group ext-peers { type external; allow 10.10/16; } [edit protocols bgp] group ext-peers { type external; peer-as 2; neighbor 10.10.10.1 { authentication-key “$9$.mQn/9pBRSAp7VYojiAp0O1h”; }
15
Copyright © 2001, Juniper Networks, Inc. Peer Configuration Options (2 of 2) prefix-limit allows a specified amount of prefixes to be received [edit protocols bgp] group ext-peers { type external; peer-as 2; family inet { unicast { prefix-limit { maximum 25000; teardown 80 idle-timeout 10; } neighbor 10.10.10.1; } family inet enables multi-protocol BGP extensions [edit protocols bgp] group ext-peers { type external; peer-as 2; neighbor 10.10.10.1 { family inet { unicast; multicast; }
16
Copyright © 2001, Juniper Networks, Inc. Modifying AS Path: Remove-Private AS 65003 192.168.19.0/24 AS 1000 192.168.17.0/24: 1000 I 192.168.18.0/24: 1000 I 192.168.19.0/24: 1000 I remove-private AS 65001 192.168.17.0/24 192.168.18.0/24 AS 65002 192.168.17.0/24: 65001 I 192.168.19.0/24: 65003 I 192.168.18.0/24: 65002 I
17
Copyright © 2001, Juniper Networks, Inc. Modifying AS Path: Local-AS (I) AS 1 172.16.10.0/24: 1 222 I 172.16.12.0/24: 1 333 I AS 222 172.16.10.0/24 172.16.12.0/24 AS 333 172.16.10.0/24: 222 I 172.16.12.0/24: 333 I Internet
18
Copyright © 2001, Juniper Networks, Inc. Modifying AS Path: Local-AS (II) 172.16.10.0/24: 1 222 I 172.16.12.0/24: 1 333 I AS 222 172.16.10.0/24 172.16.12.0/24 AS 333 172.16.10.0/24: 222 I 172.16.12.0/24: 333 I Internet AS 777 local-as 1 172.16.10.0/24: 777 1 222 I 172.16.12.0/24: 777 1 333 I
19
Copyright © 2001, Juniper Networks, Inc. Modifying AS Path: Local-AS (III) 172.16.10.0/24: 222 I 172.16.12.0/24: 333 I AS 222 172.16.10.0/24 172.16.12.0/24 AS 333 172.16.10.0/24: 222 I 172.16.12.0/24: 333 I Internet AS 777 local-as 1 private 172.16.10.0/24: 777 222 I 172.16.12.0/24: 777 333 I
20
Copyright © 2001, Juniper Networks, Inc. Path Selection and MEDs By default, only MEDs from the same neighboring AS are compared BGP can be configured to change this behavior always-compare-med compares MED values regardless of whether the neighboring AS is the same Caution is needed when comparing MEDs from more than one AS since every network has a different interpretation of a “good” MED [edit protocols] bgp { path-selection always-compare-med; }
21
Copyright © 2001, Juniper Networks, Inc. Coordinating MED and IGP Metrics BGP can set the MED value on route announcements based on the IGP metric to the peer the route was received from Use the metric-out command with a group or neighbor – Can be set to a specific value – Can be set to the current IGP metric – Can be set to the minimum IGP metric ever learned – Can add to or subtract from the IGP metric [edit protocols bgp] group as-100-peers { type external; peer-as 100; neighbor 192.168.2.2 metric-out 10; neighbor 192.168.3.3 metric-out igp; neighbor 192.168.4.4 metric-out minimum-igp; neighbor 192.168.5.5 metric-out igp 5; }
22
Copyright © 2001, Juniper Networks, Inc. Review Questions To what IP addresses to EBGP sessions usually peer? Why? To what IP addresses to IBGP sessions usually peer? Why? Why does BGP rely on an IGP for next hop resolution? What is “next hop self” and when is it used in BGP?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.