01-25-2024 10:52 PM - last edited on 02-12-2024 09:26 PM by Translator
I would like to create routing in bgp as follows. How do I achieve this in IOS-XR.ASR9000. How do I do this?
----
router bgp 65000
vrf test
address-family ipv4 unicast
bgp router-id 1.1.1.1
neighbor 10.10.10.10
remote-as 4
address-family ipv6 unicast
bgp router id 2.2.2.2
neighbor 2001:f:e::1
remote-as 4
vrf test2
address-family ipv4 unicast
bgp router-id 1.1.1.4
address-family ipv6 unicast
bgp router id 2.2.2.4
Solved! Go to Solution.
01-26-2024 09:16 PM - last edited on 02-12-2024 09:32 PM by Translator
Hi @okochat18 ,
I am not sure on what operating system these configurations are from, but in general you can only have one BGP router id per VRF, so one for both IPv4 and IPv6. Under XR it would look something like this:
route policy accept-all
pass
end-policy
router bgp xxx
address-family vpnv4 unicast
address-family vpnv6 unicast
vrf test
rd xxx:yyy
bgp router-id 1.1.1.1
address-family ipv4 unicast
address-family ipv6 unicast
neighbor 10.10.10.10
remote-as 4
address-family ipv4 unicast
route-policy accept-all in
route-policy accept-all out
neighbor 2001:f:e::1
remote-as 4
address-family ipv6 unicast
route-policy accept-all in
route-policy accept-all out
vrf test2
rd xxx:zzz
bgp router-id 1.1.1.4
address-family ipv4 unicast
address-family ipv6 unicast
Note that the route-policy is required in XR, as eBGP does not advertise nor receive any update by default.
Regards,
01-26-2024 09:16 PM - last edited on 02-12-2024 09:32 PM by Translator
Hi @okochat18 ,
I am not sure on what operating system these configurations are from, but in general you can only have one BGP router id per VRF, so one for both IPv4 and IPv6. Under XR it would look something like this:
route policy accept-all
pass
end-policy
router bgp xxx
address-family vpnv4 unicast
address-family vpnv6 unicast
vrf test
rd xxx:yyy
bgp router-id 1.1.1.1
address-family ipv4 unicast
address-family ipv6 unicast
neighbor 10.10.10.10
remote-as 4
address-family ipv4 unicast
route-policy accept-all in
route-policy accept-all out
neighbor 2001:f:e::1
remote-as 4
address-family ipv6 unicast
route-policy accept-all in
route-policy accept-all out
vrf test2
rd xxx:zzz
bgp router-id 1.1.1.4
address-family ipv4 unicast
address-family ipv6 unicast
Note that the route-policy is required in XR, as eBGP does not advertise nor receive any update by default.
Regards,
01-27-2024 05:31 AM
@Harold Ritter is totally correct'
One router-id per vrf not per ip address family.
Maybe you asking about making ipv6 prefix using next-hop ipv4?
MHM
01-28-2024 04:39 PM - last edited on 02-12-2024 09:31 PM by Translator
Thanks Harold Ritter and MHM
I saw this config sample on cisco's example page sometime back
and thought it could be done per vrf per ipv4/Ipv6
====
https://www.cisco.com/c/en/us/td/docs/ios/12_2sr/12_2sra/feature/guide/srbgprid.html
Router(config-router)# address-family ipv4 vrf vrf_trans
Router(config-router-af)# neighbor 192.168.1.1 remote-as 40000
Router(config-router-af)# bgp router-id 10.99.1.1
===
Is it that IOSXR cant do it?
Was it existing and removed?
In terms of routing,
Using one Router-ID for both address-family IPv4 and address-family IPv6
wouldnt the router have problem with forming adjacency during bgp message exchanges if
the bgp router-id is the same?
To Harold: Btw the configs we completely made up to help you understand what I want to implement
01-28-2024 05:56 PM - last edited on 02-12-2024 09:30 PM by Translator
Hi @okochat18 ,
Having a separate bgp router-id for ipv4 and ipv6 within the same VRF is not possible in IOS either.
PE1(config-router)#address-family ipv4 vrf test
PE1(config-router-af)#bgp router-id 1.1.1.1
PE1(config-router-af)#address-family ipv6 vrf test
PE1(config-router-af)#bgp router-id 1.1.1.2
PE1(config-router-af)#do sh runn | s r b
router bgp 109
bgp log-neighbor-changes
!
address-family ipv4 vrf test
bgp router-id 1.1.1.2
exit-address-family
!
address-family ipv6 vrf test
bgp router-id 1.1.1.2
exit-address-family
The bgp router-id will be the same for both, as can be seen above.
> wouldnt the router have problem with forming adjacency during bgp message exchanges if
the bgp router-id is the same?
You can have as many sessions as you want between two routers and all the sessions could have the same bgp router-id. The issue would be if the local bgp router-id was equal to the remote bgp router-id.
Regards,
02-01-2024 09:18 PM
Harold, I appreciate your feedback. So glad
Currently I'm checking on my end. Will respond soon!
02-02-2024 01:49 AM - last edited on 02-12-2024 09:29 PM by Translator
Hi @Harold Ritter , @MHM Cisco World
Thanks guys for your inputs last weekend.
In a scenario as shown below where the bgp router-id is actually placed in the BGP global settings.
Would the vrf pick up the ipv4 id and also the ipv6 id as separate entities?
As per my knownledge couldnt make sense of it
============
route policy accept-all
pass
end-policy
router bgp xxx
address-family ipnv4 unicast
bgp router-id 1.1.1.1
address-family ipnv6 unicast
bgp router-id 1.1.1.2
address-family vpnv4 unicast
address-family vpnv6 unicast
vrf test
rd xxx:yyy
address-family ipv4 unicast
neighbor 10.10.10.10
remote-as 4
address-family ipv4 unicast
route-policy accept-all in
route-policy accept-all out
neighbor 2001:f:e::1
remote-as 4
address-family ipv6 unicast
route-policy accept-all in
route-policy accept-all out
02-02-2024 02:01 AM
let me check again
Thanks
MHM
02-02-2024 04:12 AM
Hi @okochat18 ,
XR will not accept a different BGP router-id for v4 and v6, whether that is in the global or VRF context.
Why would it matter if the IPv4 and IPv6 sessions both used the same BGP router-id? As I mentioned before, if you connect these two sessions to the same peer, that peer would not have any issue accepting both sessions.
So why do you want to force a separate router-id for the v4 and v6 session?
Regards,
02-12-2024 04:53 PM
@Harold Ritter
Thanks for the responses.
I finally came to terms that its not possible.
Cheers
02-12-2024 05:29 PM
You are very welcome @okochat18 . As mentioned before, although you can't configure a separate BGP router-id per address family, you can probably still achieve what you wanted to.
Regards,
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