cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
773
Views
3
Helpful
10
Replies

Creating bgp router-ids for IPv4 and IPv6 instances under VRF(IOS-XR)

okochat18
Level 1
Level 1

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
1 Accepted Solution

Accepted Solutions

Harold Ritter
Cisco Employee
Cisco Employee

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

10 Replies 10

Harold Ritter
Cisco Employee
Cisco Employee

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

@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

okochat18
Level 1
Level 1

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

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

okochat18
Level 1
Level 1

Harold, I appreciate your feedback. So glad

Currently I'm checking on my end. Will respond soon!

okochat18
Level 1
Level 1

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

let me check again 
Thanks 
MHM

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

okochat18
Level 1
Level 1

@Harold Ritter 
Thanks for the responses.
I finally came to terms that its not possible.

Cheers

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Review Cisco Networking for a $25 gift card