12-07-2021 05:24 PM
Hello
R1(1.1.1.1) R2(2.2.2.2)
\(vrf1) /(vrf1)
PE1--------P------PE2
/(vrf2) \(vrf2)
R3 (3.3.3.3) R4(4.4.4.4)
There is BGP vpnv4 running between PE1 and PE2.
6.6.6.6(loopback1), 61.61.61.61(loopback2) and 62.62.62.62(loopback3) are the loopbacks on PE2. All 3 loopbacks are advertised in igp. As a result, PE1 has a reachability to all 3 loopbacks.
On PE1, 6.6.6.6 is the next hop for 2.2.2.2 and 4.4.4.4.
I want to configure 61.61.61.61 as the next hop for 2.2.2.2 and 62.62.62.62 as the next hop for 4.4.4.4 on PE1.
So I configured 'bgp next-hop' under vrf1 and vrf2. And restarted the BGP process.
vrf definition vrf1
rd 12:12
!
address-family ipv4
route-target export 12:12
route-target import 11:11
bgp next-hop Loopback1
exit-address-family
vrf definition vrf2
rd 22:22
!
address-family ipv4
route-target export 22:22
route-target import 21:21
bgp next-hop Loopback2
exit-address-family
But still, I see 6.6.6.6 as the next hop for 2.2.2.2 and 4.4.4.4.
Am I missing anything?
Thanks,
Sachin
Solved! Go to Solution.
12-08-2021 08:28 PM
Hi @sachin30720041 ,
This feature is not supported for interAS vpnv4. You need to include R4 in AS3 for it to work.
Regards,
12-07-2021 07:16 PM
Hi @sachin30720041 ,
Is this a typo?
vrf definition vrf1
rd 12:12
!
address-family ipv4
route-target export 12:12
route-target import 11:11
bgp next-hop Loopback1 <++++++++ according to what you mentioned, this is 6.6.6.6, right?
exit-address-family
Regards,
12-08-2021 12:10 AM
Hi Harold,
Yes, That is a typo.
Correct config is.
vrf definition vrf1
rd 12:12
!
address-family ipv4
route-target export 12:12
route-target import 11:11
bgp next-hop Loopback2
exit-address-family
vrf definition vrf2
rd 22:22
!
address-family ipv4
route-target export 22:22
route-target import 21:21
bgp next-hop Loopback3
exit-address-family
lo2 and lo3 are in the global table.
Thanks,
Sachin
12-08-2021 04:31 AM
Hi @sachin30720041 ,
And just to make sure, the config with the "bgp next-hop" is applied on PE2, right? If so, it should just work. Did you try a "clear bgp vpnv4 uni * soft out" from PE2 to see if it solves the issue.
Regards,
12-08-2021 02:38 PM
Below is the complete configuration.
R1
\
R3-----R4
/
R2
R3 and R4 are PE routers. BGP vpnv4 session is up between R3 and R4.
R1 and R2 are CE routers.
R3
---------------------------------------
Router#show bgp vpnv4 unicast all
Route Distinguisher: 4:4 (default for vrf vrf1)
*> 1.1.1.1/32 3.3.3.3 0 3 1 i
*> 2.2.2.2/32 3.3.3.3 0 3 2 i
Route Distinguisher: 31:31
*> 1.1.1.1/32 3.3.3.3 0 3 1 i
Route Distinguisher: 32:32
*> 2.2.2.2/32 3.3.3.3 0 3 2 i
12-08-2021 03:15 PM
config the Lo with vrf forwarding.
12-08-2021 08:28 PM
Hi @sachin30720041 ,
This feature is not supported for interAS vpnv4. You need to include R4 in AS3 for it to work.
Regards,
12-08-2021 05:11 AM
addition to Mr.Harold suggest, do you config each loopback with it VRF i think it not use loopback as loopback in different vrf or in global.
12-11-2021 07:52 PM - edited 12-11-2021 07:54 PM
Hi Sachin ,
The VRF address-family BGP next hop is made to works for Intra AS network .
------------------
As with inter AS in your setup due to BGP Next Hop attribute for E-BGP , the next hop will be the E-BGP configured neighbor (here it is 3.3.3.3).
--------------------------------------------------------------
BGP Nexthop Attribute. The BGP nexthop attribute is the next hop IP address that is going to be used to reach a certain destination.
For EBGP, the next hop is always the IP address of the neighbor specified in the neighbor command.
PE3(config)#vrf definition 2
PE3(config-vrf)#address-family ipv4 unicast
PE3(config-vrf-af)#bgp ?
next-hop Next-hop for the routes of a VRF in the backbone(in backbone we should normally have intra AS )
-------------------------------------------------------------------------------------
PE 3 will send next hop as it's loopback
*Dec 12 03:31:01.100: %BGP_SESSION-5-ADJCHANGE: neighbor 4.4.4.4 VPNv4 Unicast topology base removed from session BGP Notification received
*Dec 12 03:31:01.100: %BGP_SESSION-5-ADJCHANGE: neighbor 4.4.4.4 IPv4 Unicast topology base removed from session BGP Notification received
*Dec 12 03:31:01.922: %BGP-5-ADJCHANGE: neighbor 4.4.4.4 Up
*Dec 12 03:31:01.923: BGP(4): (base) 4.4.4.4 send UPDATE (format) 31:31:1.1.1.1/32, next 3.3.3.3, label 17, metric 0, path 1, extended community RT:31:31
*Dec 12 03:31:01.924: BGP(4): (base) 4.4.4.4 send UPDATE (format) 32:32:2.2.2.2/32, next 3.3.3.3, label 18, metric 0, path 1, extended community RT:32:32
PE4#sh bgp vpnv4 unicast all
BGP table version is 159, local router ID is 4.4.4.4
Route Distinguisher: 4:4 (default for vrf vrf1)
*> 1.1.1.1/32 3.3.3.3 0 3 1 i
*> 2.2.2.2/32 3.3.3.3 0 3 1 i
*> 72.72.72.72/32 3.3.3.3 0 0 3 i
Route Distinguisher: 31:31
*> 1.1.1.1/32 3.3.3.3 0 3 1 i
*> 72.72.72.72/32 3.3.3.3 0 0 3 i
Route Distinguisher: 32:32
*> 2.2.2.2/32 3.3.3.3 0 3 1 i
P
PE4#sh bgp vpnv4 unicast all nexthops ---------- as said next hop will be EBGP neighbor
# Paths Nexthop Address
Route Distinguisher: 4:4 (default for vrf vrf1)
6 3.3.3.3
Route Distinguisher: 31:31
6 3.3.3.3
Route Distinguisher: 32:32
6 3.3.3.3
solution---------------------
when i changed PE 4 to AS 3 as simillar to PE 3 you can see the change you need .( Harold has already sugegsted this earlier )
Dec 12 03:39:37.298: %BGP-5-ADJCHANGE: neighbor 4.4.4.4 Up
*Dec 12 03:39:37.300: BGP(4): (base) 4.4.4.4 send UPDATE (format) 31:31:1.1.1.1/32, next 31.31.31.31, label 17, metric 0, path 1, extended community RT:31:31
*Dec 12 03:39:37.300: BGP(4): (base) 4.4.4.4 send UPDATE (format) 32:32:2.2.2.2/32, next 32.32.32.32, label 18, metric 0, path 1, extended community RT:32:32
PE3
router bgp 3
bgp router-id 3.3.3.3
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 3
neighbor 4.4.4.4 update-source Loopback0
PE4#sh bgp vpnv4 unicast all nexthops
# Paths Nexthop Address
Route Distinguisher: 4:4 (default for vrf vrf1)
4 31.31.31.31 ----------- changed
2 32.32.32.32
Route Distinguisher: 31:31
4 31.31.31.31 ---------- changed
Route Distinguisher: 32:32
2 32.32.32.32
PE4#sh bgp vpnv4 unicast all 1.1.1.1
BGP routing table entry for 4:4:1.1.1.1/32, version 17
Paths: (1 available, best #1, table vrf1)
Not advertised to any peer
Refresh Epoch 1
1, imported path from 31:31:1.1.1.1/32 (global)
31.31.31.31 (metric 2) (via default) from 3.3.3.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, internal, best
Extended Community: RT:31:31
mpls labels in/out nolabel/17
rx pathid: 0, tx pathid: 0x0
Updated on Dec 12 2021 03:39:37 UTC
BGP routing table entry for 31:31:1.1.1.1/32, version 14
Paths: (1 available, best #1, no table)
Not advertised to any peer
Refresh Epoch 1
1
31.31.31.31 (metric 2) (via default) from 3.3.3.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, internal, best
Extended Community: RT:31:31
mpls labels in/out nolabel/17
rx pathid: 0, tx pathid: 0x0
Updated on Dec 12 2021 03:39:37 UTC
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