Docsity

resumen del protocolo BGP, Resúmenes de Tecnologías de la Información y la Comunicación

Toggle sidebar
bg1
BGP ROUTING PROTOCOL PRACTICE LABS
REDOUANE MEDDANE
1
BGP Routing Protocol
Practice Labs
Redouane MEDDANE
Table of Contents
Lab 1: MED and AS-Path Prepend ........................................................................................................... 2
Lab 2: BGP Local Preference ................................................................................................................... 9
Lab 3: BGP path control ........................................................................................................................ 17
Lab 4: BGP Confederations ................................................................................................................... 23
Lab 5: Bestpath as-path ignore and aggregate-address ....................................................................... 28
Lab 6: Community Attribute AS-Path Prepend and Default route ....................................................... 40
Lab 7: BGP Backdoor and AS-Path Prepend .......................................................................................... 53
Lab 8: AS-Path Prepend Weight and Default route .............................................................................. 62
Lab 9: Community Attribute and Route Reflector ................................................................................ 72
Lab 10: BGP Peer Group Community Attribute and Local Preference ................................................. 84
Lab 11: MP-BGP Local Preference Weight and Community Attribute.................................................. 95
Lab 12: MP-BGP OSPFv3 and Attributes Manipulation ...................................................................... 106
Lab 13: BGP Confederation weight and Unsuppress-map .................................................................. 119
Lab 14: BGP Conditional advertisement ............................................................................................. 133
Lab 15: Route Aggregation Attribute-map and Advertise-map .......................................................... 140
Lab 16: BGP ORF (Outbound Route Filtering) capability..................................................................... 149
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Vista previa parcial del texto

¡Descarga resumen del protocolo BGP y más Resúmenes en PDF de Tecnologías de la Información y la Comunicación solo en Docsity!

BGP ROUTING PROTOCOL PRACTICE LABS

REDOUANE MEDDANE

BGP Routing Protocol

Practice Labs

Redouane MEDDANE Table of Contents

Lab 1: MED and AS-Path Prepend ........................................................................................................... 2

Lab 2: BGP Local Preference ................................................................................................................... 9

Lab 3: BGP path control ........................................................................................................................ 17

Lab 4: BGP Confederations ................................................................................................................... 23

Lab 5: Bestpath as-path ignore and aggregate-address ....................................................................... 28

Lab 6: Community Attribute AS-Path Prepend and Default route ....................................................... 40

Lab 7: BGP Backdoor and AS-Path Prepend .......................................................................................... 53

Lab 8: AS-Path Prepend Weight and Default route .............................................................................. 62

Lab 9: Community Attribute and Route Reflector ................................................................................ 72

Lab 10: BGP Peer Group Community Attribute and Local Preference ................................................. 84

Lab 11: MP-BGP Local Preference Weight and Community Attribute.................................................. 95

Lab 12: MP-BGP OSPFv3 and Attributes Manipulation ...................................................................... 106

Lab 13: BGP Confederation weight and Unsuppress-map.................................................................. 119

Lab 14: BGP Conditional advertisement ............................................................................................. 133

Lab 15: Route Aggregation Attribute-map and Advertise-map .......................................................... 140

Lab 16: BGP ORF (Outbound Route Filtering) capability..................................................................... 149

BGP ROUTING PROTOCOL PRACTICE LABS

REDOUANE MEDDANE

Lab 1: MED and AS-Path Prepend Basic configuration R1: interface Loopback ip address 1.1.1.1 255.255.255. ! interface FastEthernet0/ ip address 150.1.1.1 255.255.255. no shut ! interface Serial0/ ip address 10.0.0.1 255.255.255. no shut R2: interface Loopback ip address 2.2.2.2 255.255.255. ! interface Loopback ip address 192.1.1.1 255.255.255. ! interface Loopback ip address 193.1.1.1 255.255.255. !

BGP ROUTING PROTOCOL PRACTICE LABS

In order to ensure that the ORIGIN code is INCOMPLETE, you need to redistribute the LAN subnets into BGP. However, you can also use the network statement in conjunction with a R1(config-router)#redistribute connected route-map CONNECTED R1(config-router)#exit You can verify the ORIGIN code by looking at the prefix entry in the BGP Tables. The ORIGIN code of INCOMPLETE is denoted by a question mark (?) in the output of the show ip bgp

  • R1(config-router)#neighbor 2.2.2.2 remote-as REDOUANE MEDDANE
  • R1(config-router)#neighbor 2.2.2.2 update-source loopback
  • R1(config-router)#neighbor 2.2.2.2 ebgp-multihop
  • R1(config-router)#neighbor 4.4.4.4 remote-as
  • R1(config-router)#neighbor 4.4.4.4 update-source loopback
  • R1(config-router)#neighbor 4.4.4.4 ebgp-multihop
  • R2(config)#ip route 1.1.1.1 255.255.255.255 serial 0/
  • R2(config)#ip route 3.3.3.3 255.255.255.255 serial 0/
  • R2(config)#router bgp
  • R2(config-router)#neighbor 1.1.1.1 remote-as
  • R2(config-router)#neighbor 1.1.1.1 update-source loopback
  • R2(config-router)#neighbor 1.1.1.1 ebgp-multihop
  • R2(config-router)#neighbor 3.3.3.3 remote-as
  • R2(config-router)#neighbor 3.3.3.3 update-source loopback
  • R2(config-router)#neighbor 3.3.3.3 ebgp-multihop
  • R3(config)#ip route 2.2.2.2 255.255.255.255 serial 1/
  • R3(config)#ip route 4.4.4.4 255.255.255.255 serial 1/
  • R3(config)#ip route 4.4.4.4 255.255.255.255 serial 1/
  • R3(config)#router bgp
  • R3(config-router)#neighbor 2.2.2.2 remote-as
  • R3(config-router)#neighbor 2.2.2.2 update-source loopback
  • R3(config-router)#neighbor 2.2.2.2 ebgp-multihop
  • R3(config-router)#neighbor 4.4.4.4 remote-as
  • R3(config-router)#neighbor 4.4.4.4 update-source loopback
  • R3(config-router)#neighbor 4.4.4.4 ebgp-multihop
  • R4(config)#ip route 1.1.1.1 255.255.255.255 fastethernet 0/0 150.1.1.
  • R4(config)#ip route 3.3.3.3 255.255.255.255 serial 0/
  • R4(config)#ip route 3.3.3.3 255.255.255.255 serial 0/
  • R4(config)#router bgp
  • R4(config-router)#neighbor 1.1.1.1 remote-as
  • R4(config-router)#neighbor 1.1.1.1 update-source loopback
  • R4(config-router)#neighbor 1.1.1.1 ebgp-multihop
  • R4(config-router)#neighbor 3.3.3.3 remote-as
  • R4(config-router)#neighbor 3.3.3.3 update-source loopback
  • R4(config-router)#neighbor 3.3.3.3 ebgp-multihop
  • R1(config)#route-map CONNECTED permit route map and set the ORIGIN code within the route map.
  • R1(config-route-map)#match interface fastethernet 0/
  • R1(config)#route-map CONNECTED deny R1(config-route-map)#exit
  • R1(config)#router bgp R1(config-route-map)#exit

BGP ROUTING PROTOCOL PRACTICE LABS

REDOUANE MEDDANE

R1(config-router)#do show ip bgp BGP table version is 4, local router ID is 1.1.1. Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path

  • 150.1.1.0/24 4.4.4.4 0 0 4? *> 0.0.0.0 0 32768? *> 150.2.2.0/24 2.2.2.2 0 0 2?
  • 150.3.3.0/24 4.4.4.4 0 4 3? *> 2.2.2.2 0 2 3? R2(config-if)#do show ip bgp BGP table version is 4, local router ID is 195.1.1. Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path
  • 150.1.1.0/24 3.3.3.3 0 3 4? *> 1.1.1.1 0 0 1? *> 150.2.2.0/24 0.0.0.0 0 32768? *> 150.3.3.0/24 3.3.3.3 0 0 3? R3(config-router)#do show ip bgp BGP table version is 5, local router ID is 3.3.3. Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path *> 150.1.1.0/24 4.4.4.4 0 0 4?
  • 2.2.2.2 0 2 1?
  • 150.2.2.0/24 4.4.4.4 0 4 1 2? *> 2.2.2.2 0 0 2? *> 150.3.3.0/24 0.0.0.0 0 32768? R4(config-router)#do show ip bgp BGP table version is 6, local router ID is 4.4.4. Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path *> 150.1.1.0/24 0.0.0.0 0 32768?
  • 1.1.1.1 0 0 1?
  • 150.2.2.0/24 3.3.3.3 0 3 2? *> 1.1.1.1 0 1 2?
  • 150.3.3.0/24 1.1.1.1 0 1 2 3? *> 3.3.3.3 0 0 3? Configure BGP, so that R4 prefers the path via R3 to reach any subnet In the output of the show ip bgp command on R4 we can see that the preferred route to reach 150.3.3.0 is via R3, however the preferred route to reach 150.2.2.0 is via R1 (the lowest router- id), also, to ensure that the subnet 150.1.1.0 will be reached via R3, configure BGP on R1 to advertise all prefixes with a longer AS-PATH to influence the path selection as follow:

BGP ROUTING PROTOCOL PRACTICE LABS

REDOUANE MEDDANE

R2(config-router)#neighbor 3.3.3.3 route-map MED out R2(config-router)#exit Let's verify the BGP RIBs of R3: We have still the best path to reach 150.1.1.0 via R4 as shown by the show ip bgp command on R3 below, so the problem is not resolved even if R2 advertises the lowest MED comparing with R4. The reason is: we met two issues in this case:

**- the first issue is: by default, the MED is only compared for path received from the same AS ,in this case R3 receives two values of MED from two routers (R2 and R4) configured in different AS.

  • The second issue: the MED is compared after the AS-PATH in the BGP decision process. In this case R3 will select the path via R4 as the best path to the 150.1.1.0/24 prefix because of the shorter AS-PATH length.** R3(config)#do show ip bgp BGP table version is 10, local router ID is 3.3.3. Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path *> 150.1.1.0/24 4.4.4.4 4 0 4?
  • 2.2.2.2 2 0 2 1? *> 150.2.2.0/24 2.2.2.2 2 0 2? *> 150.3.3.0/24 0.0.0.0 0 32768? R3(config)# To override the two issues, configure the bgp always-compare-med command to avoid the first issue so always compare the MED even if MED is received from Different AS. And bgp bestpath as-path ignore command to avoid the second issue so that R3 override the BGP decision process by ignoring the step of the AS-PATH in the BGP Decision Process: Let's configure these two commands: R3(config)#router bgp 3 R3(config-router)#bgp bestpath as-path ignore R3(config-router)#bgp always-compare-med We can see for the prefix 150.1.1.0 that the path with the longer AS-PATH length is preferred because the lowest MED even if the AS-PATH takes precedence over the MED in the order of the path selection in BGP: R3(config)#do show ip bgp 150.1.1.0 255.255.255. BGP routing table entry for 150.1.1.0/24, version 2 Paths: (2 available, best #2, table Default-IP-Routing-Table) Flag: 0x Advertised to update-groups: 1 4 4.4.4.4 from 4.4.4.4 (4.4.4.4) Origin incomplete, metric 4, localpref 100, valid, external 2 1 2.2.2.2 from 2.2.2.2 (195.1.1.1) Origin incomplete, metric 2, localpref 100, valid, external, best Another way to verify all BGP RIBs with do show ip bgp, R3 prefers all routes from R2 because the lowest MED:

BGP ROUTING PROTOCOL PRACTICE LABS

REDOUANE MEDDANE

R3(config-router)#do show ip bgp BGP table version is 4, local router ID is 3.3.3. Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path

  • 150.1.1.0/24 4.4.4.4 4 0 4? *> 2.2.2.2 2 0 2 1?
  • 150.2.2.0/24 4.4.4.4 4 0 4 1 1 1 1 1 2? *> 2.2.2.2 2 0 2? *> 150.3.3.0/24 0.0.0.0 0 32768? R3(config-router)#

BGP ROUTING PROTOCOL PRACTICE LABS

REDOUANE MEDDANE

R4:

interface Loopback ip address 4.4.4.4 255.255.255. ! interface FastEthernet0/ ip address 24.0.0.4 255.255.255. no shutdown ! interface FastEthernet0/ ip address 10.100.1.4 255.255.255. no shutdown R5: interface Loopback ip address 5.5.5.5 255.255.255. ! interface FastEthernet0/ ip address 35.0.0.5 255.255.255. no shutdown ! interface FastEthernet0/ ip address 10.100.1.5 255.255.255. no shutdown R6: interface Loopback ip address 6.6.6.6 255.255.255. ! interface FastEthernet0/ ip address 10.100.1.6 255.255.255. no shutdown R7: interface Loopback ip address 7.7.7.7 255.255.255. ! interface FastEthernet0/ ip address 10.100.1.3 255.255.255. no shutdown Configure EIGRP AS 4567 on R4, R5, R6 and R7 and advertise the subnet 10.100.1.0/29 and the loopback 0 subnets: R4: router eigrp 4567 network 4.4.4.4 0.0.0. network 10.100.1.0 0.0.0. R5: router eigrp 4567 network 5.5.5.5 0.0.0. network 10.100.1.0 0.0.0. R6: router eigrp 4567 network 6.6.6.6 0.0.0.

BGP ROUTING PROTOCOL PRACTICE LABS

REDOUANE MEDDANE

network 10.100.1.0 0.0.0. R7: router eigrp 4567 network 7.7.7.7 0.0.0. network 10.100.1.0 0.0.0. Configure iBGP in AS 4567, use loopback 0 interface for peering and use peer group configuration. Configure eBGP between AS 4567 and AS 2 and AS 3. Configure eBGP between AS 2 and AS 1. Configure eBGP between AS 3 and AS 1, advertise 1.0.0.0/8 and 2.0.0.0/8 subnets in BGP: R4: router bgp 4567 network 10.100.1.0 mask 255.255.255. neighbor INTERNAL peer-group neighbor INTERNAL remote-as 4567 neighbor INTERNAL update-source Loopback neighbor INTERNAL next-hop-self neighbor 5.5.5.5 peer-group INTERNAL neighbor 6.6.6.6 peer-group INTERNAL neighbor 7.7.7.7 peer-group INTERNAL neighbor 24.0.0.2 remote-as 2 R5: router bgp 4567 network 10.100.1.0 mask 255.255.255. neighbor INTERNAL peer-group neighbor INTERNAL remote-as 4567 neighbor INTERNAL update-source Loopback neighbor INTERNAL next-hop-self neighbor 4.4.4.4 peer-group INTERNAL neighbor 6.6.6.6 peer-group INTERNAL neighbor 7.7.7.7 peer-group INTERNAL neighbor 35.0.0.3 remote-as 3 R6: router bgp 4567 neighbor INTERNAL peer-group neighbor INTERNAL remote-as 4567 neighbor INTERNAL update-source Loopback neighbor 4.4.4.4 peer-group INTERNAL neighbor 5.5.5.5 peer-group INTERNAL neighbor 7.7.7.7 peer-group INTERNAL R7: router bgp 4567 neighbor INTERNAL peer-group neighbor INTERNAL remote-as 4567 neighbor INTERNAL update-source Loopback neighbor 4.4.4.4 peer-group INTERNAL neighbor 5.5.5.5 peer-group INTERNAL neighbor 6.6.6.6 peer-group INTERNAL

BGP ROUTING PROTOCOL PRACTICE LABS

REDOUANE MEDDANE

6 path entries using 312 bytes of memory 5/2 BGP path/bestpath attribute entries using 620 bytes of memory 2 BGP AS-PATH entries using 48 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 1331 total bytes of memory BGP activity 3/0 prefixes, 6/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 5.5.5.5 4 4567 11 11 5 0 0 00:06:58 3 6.6.6.6 4 4567 10 12 5 0 0 00:07:05 0 7.7.7.7 4 4567 10 12 5 0 0 00:06:27 0 24.0.0.2 4 2 7 6 5 0 0 00:01:55 2 R7(config-router)#do show ip bgp sum BGP router identifier 7.7.7.7, local AS number 4567 BGP table version is 5, main routing table version 5 3 network entries using 351 bytes of memory 6 path entries using 312 bytes of memory 4/2 BGP path/bestpath attribute entries using 496 bytes of memory 2 BGP AS-PATH entries using 48 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 1207 total bytes of memory BGP activity 3/0 prefixes, 6/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 4.4.4.4 4 4567 12 10 5 0 0 00:06:47 3 5.5.5.5 4 4567 12 10 5 0 0 00:07:08 3 6.6.6.6 4 4567 9 9 5 0 0 00:06:56 0 Ensure AS 4567 will use the link between R3-R5 towards network 2.0.0.0/8. Use LOCAL_PREF only. Before configuring the Local-Pref, let’s use a traceroute on R6 and R7 toward 2.0.0.1. We can see that the packet goes through R4--R2: R6#traceroute 2.0.0. Type escape sequence to abort. Tracing the route to 2.0.0. 1 10.100.1.4 72 msec 24 msec 24 msec 2 24.0.0.2 60 msec 28 msec 80 msec 3 12.0.0.1 96 msec * 96 msec R6# R7(config-router)#do traceroute 2.0.0. Type escape sequence to abort. Tracing the route to 2.0.0. 1 10.100.1.4 56 msec 56 msec 12 msec 2 24.0.0.2 52 msec 48 msec 32 msec 3 12.0.0.1 84 msec * 108 msec R7(config-router) *Verify the RIB of R6 and R7: Notice that the best route to reach 2.0.0.0/24 is via R4 (4.4.4.4) denoted by " >i " on both R and R7: R6#show ip bgp

BGP ROUTING PROTOCOL PRACTICE LABS

REDOUANE MEDDANE

BGP table version is 5, local router ID is 6.6.6. Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path

  • i1.0.0.0 5.5.5.5 0 100 0 3 1 i *>i 4.4.4.4 0 100 0 2 1 i
  • i2.0.0.0 5.5.5.5 0 100 0 3 1 i *>i 4.4.4.4 0 100 0 2 1 i r i10.100.1.0/29 5.5.5.5 0 100 0 i r>i 4.4.4.4 0 100 0 i R7(config-router)#do show ip bgp BGP table version is 5, local router ID is 7.7.7. Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path
  • i1.0.0.0 5.5.5.5 0 100 0 3 1 i *>i 4.4.4.4 0 100 0 2 1 i
  • i2.0.0.0 5.5.5.5 0 100 0 3 1 i *>i 4.4.4.4 0 100 0 2 1 i r i10.100.1.0/29 5.5.5.5 0 100 0 i r>i 4.4.4.4 0 100 0 i To ensure that the traffic goes through R5--R3 you will tell to R5 to advertise into BGP AS 4567 the prefix 2.0.0.0/24 with a better (higher) local-preference than R4 as follow, by default the Local-Pref is equal to 100: router bgp 4567 neighbor 35.0.0.3 route-map RM_LOC_PREF in ! ip prefix-list NET-2 seq 5 permit 2.0.0.0/ ! route-map RM_LOC_PREF permit 10 match ip address prefix-list NET- 2 set local-preference 200 ! route-map RM_LOC_PREF permit 20 Verify the RIB of R6 and R7. The best route now toward 2.0.0.0/24 on both R6 and R7 is via R5 (5.5.5.5) because the better (higher) Local-Preference 200: R6#show ip bgp BGP table version is 6, local router ID is 6.6.6. Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path
  • i1.0.0.0 5.5.5.5 0 100 0 3 1 i *>i 4.4.4.4 0 100 0 2 1 i *>i2.0.0.0 5.5.5.5 0 200 0 3 1 i r i10.100.1.0/29 5.5.5.5 0 100 0 i

BGP ROUTING PROTOCOL PRACTICE LABS

REDOUANE MEDDANE

Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path *>i1.0.0.0 4.4.4.4 0 200 0 2 1 i *>i2.0.0.0 5.5.5.5 0 200 0 3 1 i r>i10.100.1.0/29 4.4.4.4 0 100 0 i r i 5.5.5.5 0 100 0 i R7(config)#do show ip bgp BGP table version is 10, local router ID is 7.7.7. Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path *>i1.0.0.0 4.4.4.4 0 200 0 2 1 i *>i2.0.0.0 5.5.5.5 0 200 0 3 1 i r>i10.100.1.0/29 4.4.4.4 0 100 0 i r i 5.5.5.5 0 100 0 i Note: you must enter the clear ip bgp * command to reset the bgp neighbors relationship when configuring the Local-Preference to take effect.

BGP ROUTING PROTOCOL PRACTICE LABS

REDOUANE MEDDANE

Lab 3 : BGP path control Basic Configuration R1: interface FastEthernet0/ ip address 150.1.1.1 255.255.255. no shutd ! interface Serial0/ ip address 10.0.0.1 255.255.255. no shutd ! interface Serial0/ ip address 10.0.0.5 255.255.255. no shutd R2: interface FastEthernet0/ ip address 150.2.2.2 255.255.255. no shutd ! interface Serial0/ ip address 10.0.0.2 255.255.255. no shutd !

BGP ROUTING PROTOCOL PRACTICE LABS

REDOUANE MEDDANE

R3:

router bgp 65503 bgp router-id 3.3.3. bgp confederation identifier 5 bgp confederation peers 65502 65504 network 150.3.3.0 mask 255.255.255. neighbor 10.0.0.5 remote-as 254 neighbor 10.0.0.9 remote-as 65502 neighbor 10.0.0.9 next-hop-self neighbor 10.0.0.14 remote-as 65504 neighbor 10.0.0.14 next-hop-self R4: router bgp 65504 bgp router-id 4.4.4. bgp confederation identifier 5 bgp confederation peers 65503 network 150.1.1.0 mask 255.255.255. neighbor 10.0.0.13 remote-as 65503 neighbor 10.0.0.13 next-hop-self neighbor 150.1.1.1 remote-as 254 Configure AS 5 so that R2 and R3 prefer the path via R1 to reach the 150.1.1.0/24 prefix. Ensure that this is ONLY applicable to this single prefix. The best path to reach 150.1.1.0 from R2 is via R3 through the AS 5 confederation as shown by the following output in the section confed-external, best: R2#show ip bgp 150.1.1.0 255.255.255. BGP routing table entry for 150.1.1.0/24, version 10 Paths: (2 available, best #1, table Default-IP-Routing-Table) Advertised to update-groups: 2 (65503 65504) 10.0.0.10 from 10.0.0.10 (3.3.3.3) Origin IGP, metric 0, localpref 100, valid, confed-external, best 254 10.0.0.1 from 10.0.0.1 (1.1.1.1) Origin IGP, metric 0, localpref 100, valid, external The best path to reach 150.1.1.0 from R3 is via R4 as shown by the following output in the section confed-external, best: R3#show ip bgp 150.1.1.0 255.255.255. BGP routing table entry for 150.1.1.0/24, version 6 Paths: (2 available, best #1, table Default-IP-Routing-Table) Advertised to update-groups: 1 2 (65504) 10.0.0.14 from 10.0.0.14 (4.4.4.4) Origin IGP, metric 0, localpref 100, valid, confed-external, best 254 10.0.0.5 from 10.0.0.5 (1.1.1.1) Origin IGP, metric 0, localpref 100, valid, external

BGP ROUTING PROTOCOL PRACTICE LABS

REDOUANE MEDDANE

To complete this task, you need to modify either the WEIGHT or the LOCAL_PREF attributes for the 150.1.1.0/24 prefix received from R1 on routers R2 and R3. R2(config) # routerbgp 65502 R2(config-router) #neighbor 10.0.0.1 route-map weight-R1 in R2(config-router) #ip prefix-list NET-R1 seq 5 permit 150.1.1.0/ R2(config) # route-map weight-R1 permit 10 R2(config-route-map)# match ip address prefix-list NET-R R2(config-route-map)# set weight 1000 R2(config-route-map)#route-map weight-R1 permit 20 R3(config)#router bgp 65503 R3(config-router)#neighbor 10.0.0.5 route-map weight-R1 in R3(config-router)#ip prefix-list NET-R1 seq 5 permit 150.1.1.0/ R3(config)#route-map weight-R1 permit 10 R3(config-route-map)# match ip address prefix-list NET-R R3(config-route-map)# set weight 1000 R3(config-route-map)# R3(config-route-map)#route-map weight-R1 permit 20 let's verify the result after clearing the bgp neighbors: R2(config-route-map) #do clear ip bgp * R3(config-route-map)#do clear ip bgp * Both R2 and R3 prefer the path through R1 (10.0.0.1): R2(config-route-map)#do show ip bgp 150.1.1.0 255.255.255. BGP routing table entry for 150.1.1.0/24, version 2 Paths: (2 available, best #2, table Default-IP-Routing-Table) Flag: 0x Advertised to update-groups: 1 (65503) 254 10.0.0.10 from 10.0.0.10 (3.3.3.3) Origin IGP, metric 0, localpref 100, valid, confed-external 254 10.0.0.1 from 10.0.0.1 (1.1.1.1) Origin IGP, metric 0, localpref 100, weight 1000, valid, external, best R3(config-route-map)#do show ip bgp 150.1.1.0 255.255.255. BGP routing table entry for 150.1.1.0/24, version 2 Paths: (3 available, best #3, table Default-IP-Routing-Table) Flag: 0x Advertised to update-groups: 1 (65502) 254 10.0.0.9 from 10.0.0.9 (2.2.2.2) Origin IGP, metric 0, localpref 100, valid, confed-external (65504) 10.0.0.14 from 10.0.0.14 (4.4.4.4) Origin IGP, metric 0, localpref 100, valid, confed-external 254 10.0.0.5 from 10.0.0.5 (1.1.1.1) Origin IGP, metric 0, localpref 100, weight 1000, valid, external, best