12-22-2024 05:27 PM - last edited on 12-22-2024 05:56 PM by shaiksh
Hi all,
I'm trying to configure a shared infrastructure with VRF light for two imaginary customers.
* R2 & CRB2 have identical BGP configuration such as same ASN, WAN IP, BGP router id and network advertisement.
* I have created two separate VRFs at R5 and established eBGP neighborship among them (R2 & CRB2 ).
* I have set two separate community values for two customers towards global RT.
Now, R5 (Global RT) is choosing only routes from VRF "B". What should I do if I want to keep both routes from VRF "A" and VRF "B" and separate in global RT?
R5#sh ip bg
BGP table version is 33, local router ID is 198.51.100.5
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,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* 172.16.1.0/24 192.168.1.6 0 0 65200 i
*> 192.168.1.6 0 0 65200 i
R5#sh ip bg 172.16.1.0/24
BGP routing table entry for 172.16.1.0/24, version 32
Paths: (2 available, best #2, table default)
Advertised to update-groups:
3
Refresh Epoch 1
65200, imported path from 474:100:172.16.1.0/24 (A)
192.168.1.6 from 192.168.1.6 (192.168.1.6)
Origin IGP, metric 0, localpref 100, valid, external
Community: 31064164
Extended Community: RT:474:100
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
65200, imported path from 474:200:172.16.1.0/24 (B)
192.168.1.6 from 192.168.1.6 (192.168.1.6)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 31064264
Extended Community: RT:474:200
rx pathid: 0, tx pathid: 0x0
R5#
*********************************************************
R5 running configuration
ip vrf A
rd 474:100
import ipv4 unicast map GLOBAL-VRFA
export ipv4 unicast map VRFA-GLOBAL
route-target export 474:100
route-target import 474:100
!
ip vrf B
rd 474:200
import ipv4 unicast map GLOBAL-VRFB
export ipv4 unicast map VRFB-GLOBAL
route-target export 474:200
route-target import 474:200
interface GigabitEthernet0/1
ip vrf forwarding A
ip address 192.168.1.5 255.255.255.252
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/2
ip vrf forwarding B
ip address 192.168.1.5 255.255.255.252
duplex auto
speed auto
media-type rj45
!
router bgp 474
bgp router-id 198.51.100.5
bgp log-neighbor-changes
neighbor 198.51.100.6 remote-as 474
!
address-family ipv4
neighbor 198.51.100.6 activate
neighbor 198.51.100.6 send-community both
neighbor 198.51.100.6 next-hop-self
exit-address-family
!
address-family ipv4 vrf A
neighbor 192.168.1.6 remote-as 65200
neighbor 192.168.1.6 activate
exit-address-family
!
address-family ipv4 vrf B
neighbor 192.168.1.6 remote-as 65200
neighbor 192.168.1.6 activate
exit-address-family
!
ip forward-protocol nd
!
ip community-list 1 permit 31064164
ip community-list 2 permit 31064264
!
route-map GLOBAL-VRFA permit 10
match community 1
!
route-map VRFA-GLOBAL permit 10
set community 31064164
!
route-map GLOBAL-VRFB permit 10
match community 2
!
route-map VRFB-GLOBAL permit 10
set community 31064264
!
12-22-2024 10:24 PM
I think you need under the address-family IPv4
multi path ibgp or multi path ebgp
MHM
12-22-2024 11:26 PM
Hi MHM,
Thank you so much for your suggestion. So far my understanding, ibgp or eibgp multipath is for load sharing over multiple paths towards outbound traffic. My intention is opposite. I want to receive same prefix from two different ebgp neighbors.
Regards,
Badshah Sekendar
12-22-2024 11:44 PM
both branches have same 172.16.1.0/24 and if it use same RD then both see as same prefix
so if you want to see both prefix in BGP use different RD and if you want to use both prefix (i.e. in RIB) use multi path
MHM
12-23-2024 12:15 AM - edited 12-23-2024 12:19 AM
Hi MHM,
The prefixes are already in different RDs. I have added the multipath as well, nothing got changed unfortunately.
Current BGP config
address-family ipv4
neighbor 198.51.100.6 activate
neighbor 198.51.100.6 send-community both
neighbor 198.51.100.6 next-hop-self
maximum-paths eibgp 2
exit-address-family
BGP table
R5(config-router-af)#do sh ip bg 172.16.1.0/24
BGP routing table entry for 172.16.1.0/24, version 6
Paths: (2 available, best #2, table default)
Advertised to update-groups:
2
Refresh Epoch 1
65200, imported path from 474:100:172.16.1.0/24 (A)
192.168.1.6 from 192.168.1.6 (192.168.1.6)
Origin IGP, metric 0, localpref 100, valid, external
Community: 31064164
Extended Community: RT:474:100
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
65200, imported path from 474:200:172.16.1.0/24 (B)
192.168.1.6 from 192.168.1.6 (192.168.1.6)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 31064264
Extended Community: RT:474:200
rx pathid: 0, tx pathid: 0x0
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide