cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2471
Views
16
Helpful
9
Replies

How to config 4PE with SRv6 in IOS-XR

Kagamigawa
Spotlight
Spotlight

https://www.ietf.org/id/draft-ietf-bess-ipv6-only-pe-design-00.html#name-test-3-e2e-ipv6-only-pe-ce-

                               ________
     IPv6-Only       _____    /        \                 IPv6-Only
      PE / CE       /     \__/          \___              PE / CE
  +----+  +----+   /                        \        +------+   +-----+
  |    |  |    |  |                          |_      |      |   |     |
  |    |  |    |  |                             \    |      |   |     |
  | CE |--| PE |--\         IPv6-Only Core      |----|  PE  |---|  CE |
  |    |  |    |    \0=========Underlay =======0|    |      |   |     |
  +----+  +----+     \                        __/    +------+   +-----+
  IPv6 BGP peer       \     MPLS / SR domain /         IPv6 BGP peer
  IPv4 forwarding      \__         __       /          IPv4 forwarding
  IPv6 forwarding         \_______/  \_____/           IPv6 forwarding



Figure 9: Test-3 E2E IPv6-Only PE-CE, Global Table over IPv6-Only Core (4PE)

Cisco, Juniper, Arista, Nokia, Huawei code and platform and test results.

Cisco: Edge Router- XR ASR 9910 IOS XR 7.4.1, Core Router- NCS 6000 7.2.2, CRS-X 6.7.4

Juniper: Edge Router- MX platform MX480, MX960, Core Router- PTX Platform PTX5000, PTC10K8 (JUNOS and EVO) Release 20.4R2

Tested v4 edge over v6 core in a virtual setup using vMX platforrm and 20.4R2 and LDPv6 as underlay, but there were some data plane forwarding issues. Tested same setup on latest release 21.4 and it worked. Investigating what the minimum version is for this setup to work.

Arista:

Nokia: Edge and Core-7750 Service Router, Release R21

Huawei: Edge and Core-VRPv8, Release VRP-V800R020C10

 

According to the description in this article, the current ios-xr system can achieve 4PE

I used the following platforms for testing:

topology diagram:

topo.png

platform information:

 

Cisco IOS XR Software, Version 7.4.1
Copyright (c) 2013-2021 by Cisco Systems, Inc.

Build Information:
Built By : ingunawa
Built On : Wed Aug 4 04:18:28 PDT 2021
Built Host : iox-ucs-012
Workspace : /auto/srcarchive17/prod/7.4.1/xrv9k/ws
Version : 7.4.1
Location : /opt/cisco/XR/packages/
Label : 7.4.1-0

PE1's configuration:

 

 

hostname PE1
logging console informational
!
interface Loopback0
 ipv6 address 2001:db8:cafe:aaaa::1/128
!
interface GigabitEthernet0/0/0/1
 ipv6 enable
!
interface GigabitEthernet0/0/0/2
 ipv4 address 10.224.72.1 255.255.255.0
!
router isis underlay
 is-type level-2-only
 net 49.0192.0168.0255.0001.00
 log adjacency changes
 address-family ipv6 unicast
  metric-style wide
  segment-routing mpls
 !
 interface Loopback0
  address-family ipv6 unicast
   prefix-sid index 1
  !
 !
 interface GigabitEthernet0/0/0/1
  address-family ipv6 unicast
  !
 !
!
end

P's configuration:

 

 

hostname P
!
interface Loopback0
 ipv6 address 2001:db8:cafe:bbbb::1/128
!
interface GigabitEthernet0/0/0/1
 ipv6 enable
!
interface GigabitEthernet0/0/0/2
 ipv6 enable
!
router isis underlay
 is-type level-2-only
 net 49.0192.0168.0255.0002.00
 log adjacency changes
 address-family ipv6 unicast
  metric-style wide
  segment-routing mpls
 !
 interface Loopback0
  address-family ipv6 unicast
   prefix-sid index 2
  !       
 !
 interface GigabitEthernet0/0/0/1
  address-family ipv6 unicast
  !
 !
 interface GigabitEthernet0/0/0/2
  address-family ipv6 unicast
  !
 !
!
end

PE2's configuration:

 

 

hostname PE2
logging console informational
!
interface Loopback0
 ipv6 address 2001:db8:cafe:cccc::1/128
!
interface GigabitEthernet0/0/0/1
 ipv6 enable
!
interface GigabitEthernet0/0/0/2
 ipv4 address 10.224.4.1 255.255.255.0
!
router isis underlay
 is-type level-2-only
 net 49.0192.0168.0255.0003.00
 log adjacency changes
 address-family ipv6 unicast
  metric-style wide
  segment-routing mpls
 !
 interface Loopback0
  address-family ipv6 unicast
   prefix-sid index 3
  !
 !
 interface GigabitEthernet0/0/0/1
  address-family ipv6 unicast
  !
 !
!
end

 

 

MPLS forwarding table on PE1:

 

RP/0/RP0/CPU0:PE1#sh mpls forwarding 
Wed Dec  1 07:35:27.096 UTC
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes       
Label  Label       or ID              Interface                    Switched    
------ ----------- ------------------ ------------ --------------- ------------
16002  Pop         SR Pfx (idx 2)     Gi0/0/0/1    fe80::5209:abff:fe00:704   \
                                                                   10282       
16003  16003       SR Pfx (idx 3)     Gi0/0/0/1    fe80::5209:abff:fe00:704   \
                                                                   3970        
24000  Pop         SR Adj (idx 1)     Gi0/0/0/1    fe80::5209:abff:fe00:704   \
                                                                   0           
24001  Pop         SR Adj (idx 3)     Gi0/0/0/1    fe80::5209:abff:fe00:704   \
                                                                   0           

When I try to configure BGP on PE1, I get an error:

 

 

 

router bgp 64512
 bgp router-id 192.168.255.1
 bgp log neighbor changes detail
 address-family ipv4 unicast
  redistribute connected
  allocate-label all
 !
 address-family ipv6 unicast
 !
 neighbor-group 4PE
  remote-as 64512
  update-source Loopback0
  address-family ipv4 labeled-unicast
  !
 !        
 neighbor 2001:db8:cafe:cccc::1
  use neighbor-group 4PE
 !
% Failed to commit one or more configuration items during a pseudo-atomic operation. Al
l changes made have been reverted. Please issue 'show configuration failed [inheritance
]' from this session to view the errors
RP/0/RP0/CPU0:PE1(config)#RP/0/RP0/CPU0:Dec  1 07:37:41.513 UTC: bgp[1078]: %ROUTING-BG
P-3-INIT_GET_VALUE : Failed to obtain Instance ID: bpm/info/default/inst-id during init
ialization: 'sysdb' detected the 'warning' condition 'A SysDB client tried to access a 
nonexistent item or list an empty directory'
Wed Dec  1 07:40:17.521 UTC
!! SEMANTIC ERRORS: This configuration was rejected by 
!! the system due to semantic errors. The individual 
!! errors with each failed configuration command can be 
!! found below.


router bgp 64512
 neighbor-group 4PE
  address-family ipv4 labeled-unicast
!!% Change would result in neighbor (2001:db8:cafe:cccc::1) being activated with an invalid address family
  !
 !
!
end

 

What caused this?

3 Accepted Solutions

Accepted Solutions

Harold Ritter
Cisco Employee
Cisco Employee

Hi @Kagamigawa ,

 

What is reported in this document is SRv6. This is different from the configuration you posted, which is SR MPLS. Here's a sample configuration to implement 4PE (ipv4 over SRv6).

 

hostname PE1
!
vrf test
address-family ipv4 unicast
import route-target
109:1
!
export route-target
109:1
!
interface Loopback0
ipv6 address 2001:db8:12ff::2/128
!
interface GigabitEthernet0/0/0/0
vrf test
ipv4 address 192.168.12.2 255.255.255.0
!
interface GigabitEthernet0/0/0/1
ipv6 enable
!
router isis SRv6
is-type level-2-only
net 49.0001.1921.6810.0002.00
address-family ipv6 unicast
segment-routing srv6
locator LOC0
!
interface Loopback0
passive
address-family ipv6 unicast
!
interface GigabitEthernet0/0/0/1
point-to-point
address-family ipv6 unicast
!
router bgp 109
bgp router-id 192.168.100.2
address-family vpnv4 unicast
vrf all
segment-routing srv6
locator LOC0
!
neighbor 2001:db8:12ff::4
remote-as 109
update-source Loopback0
address-family vpnv4 unicast
!
!
vrf test
rd 109:1
address-family ipv4 unicast
segment-routing srv6
!
redistribute connected
!
segment-routing
srv6
locators
locator LOC0
prefix 2001:db8:12ff:2::/64
!
end

 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

hostname P1
!

interface Loopback0
ipv6 address 2001:db8:12ff::3/128
!
interface GigabitEthernet0/0/0/0
ipv6 enable
!
interface GigabitEthernet0/0/0/1
ipv6 enable
!
router isis SRv6
is-type level-2-only
net 49.0001.1921.6810.0003.00
address-family ipv6 unicast
metric-style wide
!
interface Loopback0
passive
address-family ipv6 unicast
!
!
interface GigabitEthernet0/0/0/0
point-to-point
address-family ipv6 unicast
!
!
interface GigabitEthernet0/0/0/1
point-to-point
address-family ipv6 unicast
!
end


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

hostname PE2
!
vrf test
address-family ipv4 unicast
import route-target
109:1
!
export route-target
109:1
!
interface Loopback0
ipv6 address 2001:db8:12ff::4/128
!
interface GigabitEthernet0/0/0/0
ipv6 enable
!
interface GigabitEthernet0/0/0/1
vrf test
ipv4 address 192.168.45.4 255.255.255.0
!
router isis SRv6
is-type level-2-only
net 49.0001.1921.6810.0004.00
address-family ipv6 unicast
segment-routing srv6
locator LOC0
!
interface Loopback0
passive
address-family ipv6 unicast
!
interface GigabitEthernet0/0/0/0
point-to-point
address-family ipv6 unicast
!
router bgp 109
bgp router-id 192.168.100.4
address-family vpnv4 unicast
vrf all
segment-routing srv6
locator LOC0
!
!
!
address-family vpnv6 unicast
vrf all
segment-routing srv6
locator LOC0
!
neighbor 2001:db8:12ff::2
remote-as 109
update-source Loopback0
address-family vpnv4 unicast
!
vrf test
rd 109:2
address-family ipv4 unicast
segment-routing srv6
!
redistribute connected
!
segment-routing
srv6
locators
locator LOC0
prefix 2001:db8:12ff:4::/64
!
end

 

 

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

Hi,

 

unfortunately, this config above is not correct for 4PE,

4PE means global routing table, not vrf.

 

BGP should look like this(also adding a piece with global IPv4)

router bgp 109
bgp router-id 192.168.100.4
address-family ipv4 unicast
segment-routing srv6
locator LOC0
!
!
!
address-family ipv6 unicast
segment-routing srv6
locator LOC0
!
neighbor 2001:db8:12ff::2
remote-as 109
update-source Loopback0
address-family ipv4 unicast
encapsulation-type srv6
address-family ipv6 unicast
encapsulation-type srv6

 

View solution in original post

Hi @Kagamigawa ,

Here are the configurations for PE1, P1 and PE2 for 4PE.

hostname PE1

!

interface Loopback0

 ipv6 address 2001:db8:12ff::2/128

!

interface GigabitEthernet0/0/0/0

 ipv4 address 192.168.12.2 255.255.255.0

!

interface GigabitEthernet0/0/0/1

 ipv6 enable

!

router isis SRv6

 is-type level-2-only

 net 49.0001.1921.6810.0002.00

 address-family ipv6 unicast

  segment-routing srv6

   locator LOC0

   !

  !      

 !

 interface Loopback0

  passive

  address-family ipv6 unicast

  !

 !

 interface GigabitEthernet0/0/0/1

  point-to-point

  address-family ipv6 unicast

  !

 !

!

router bgp 109

 bgp router-id 192.168.100.2

 address-family ipv4 unicast

  segment-routing srv6

   locator LOC0

  !

  network 192.168.12.0/24

 !

 neighbor 2001:db8:12ff::4

  remote-as 109

  update-source Loopback0

  address-family ipv4 unicast

   encapsulation-type srv6

  !

 !

!

segment-routing

 srv6

  locators

   locator LOC0

    micro-segment behavior unode psp-usd

    prefix fc00:0:1::/48

   !

  !

 !

!

hostname P1

!

interface Loopback0

 ipv6 address 2001:db8:12ff::3/128

!

interface GigabitEthernet0/0/0/0

 ipv6 enable

!

interface GigabitEthernet0/0/0/1

 ipv6 enable

!

router isis SRv6

 is-type level-2-only

 net 49.0001.1921.6810.0003.00

 address-family ipv6 unicast

  segment-routing srv6

   locator LOC0

   !

  !

 !

 interface Loopback0

  passive

  address-family ipv6 unicast

  !

 !

 interface GigabitEthernet0/0/0/0

  point-to-point

  address-family ipv6 unicast

  !

 !

 interface GigabitEthernet0/0/0/1

  point-to-point

  address-family ipv6 unicast

  !

 !

!

segment-routing

 srv6

  locators

   locator LOC0

    micro-segment behavior unode psp-usd

    prefix fc00:0:3::/48

   !

  !

 !

!

hostname PE2

!

interface Loopback0

 ipv6 address 2001:db8:12ff::4/128

!

interface GigabitEthernet0/0/0/0

 ipv6 enable

!

interface GigabitEthernet0/0/0/1

 ipv4 address 192.168.45.4 255.255.255.0

!

router isis SRv6

 is-type level-2-only

 net 49.0001.1921.6810.0004.00

 address-family ipv6 unicast

  segment-routing srv6

   locator LOC0

   !

  !      

 !

 interface Loopback0

  passive

  address-family ipv6 unicast

  !

 !

 interface GigabitEthernet0/0/0/0

  point-to-point

  address-family ipv6 unicast

  !

 !

!

router bgp 109

 bgp router-id 192.168.100.4

 address-family ipv4 unicast

  segment-routing srv6

   locator LOC0

  !

  network 192.168.45.0/24

 !

 neighbor 2001:db8:12ff::2

  remote-as 109

  update-source Loopback0

  address-family ipv4 unicast

   encapsulation-type srv6

  !

 !

!

segment-routing

 srv6

  locators

   locator LOC0

    micro-segment behavior unode psp-usd

    prefix fc00:0:2::/48

   !

  !

 !

!

 

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

9 Replies 9

Hello,

 

it looks like it is complaining about the ipv4 labeled-unicast being configured under the ipv6 address family.

 

address-family ipv6 unicast
!
neighbor-group 4PE
remote-as 64512
update-source Loopback0
address-family ipv4 labeled-unicast

 

Too bad the document you are referring to does not have the actual, vendor-specific configs. What if you change 'address-family ipv4 labeled-unicast' to 'address-family ipv6 labeled-unicast' ?

I think this location cannot be changed. SRv6 provides only the top label of the stack when encapsulating data. Now it needs the 'address-family ipv4 labeled-unicast' of MP-BGP to provide a label to update the bottom of the stack.

Harold Ritter
Cisco Employee
Cisco Employee

Hi @Kagamigawa ,

 

What is reported in this document is SRv6. This is different from the configuration you posted, which is SR MPLS. Here's a sample configuration to implement 4PE (ipv4 over SRv6).

 

hostname PE1
!
vrf test
address-family ipv4 unicast
import route-target
109:1
!
export route-target
109:1
!
interface Loopback0
ipv6 address 2001:db8:12ff::2/128
!
interface GigabitEthernet0/0/0/0
vrf test
ipv4 address 192.168.12.2 255.255.255.0
!
interface GigabitEthernet0/0/0/1
ipv6 enable
!
router isis SRv6
is-type level-2-only
net 49.0001.1921.6810.0002.00
address-family ipv6 unicast
segment-routing srv6
locator LOC0
!
interface Loopback0
passive
address-family ipv6 unicast
!
interface GigabitEthernet0/0/0/1
point-to-point
address-family ipv6 unicast
!
router bgp 109
bgp router-id 192.168.100.2
address-family vpnv4 unicast
vrf all
segment-routing srv6
locator LOC0
!
neighbor 2001:db8:12ff::4
remote-as 109
update-source Loopback0
address-family vpnv4 unicast
!
!
vrf test
rd 109:1
address-family ipv4 unicast
segment-routing srv6
!
redistribute connected
!
segment-routing
srv6
locators
locator LOC0
prefix 2001:db8:12ff:2::/64
!
end

 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

hostname P1
!

interface Loopback0
ipv6 address 2001:db8:12ff::3/128
!
interface GigabitEthernet0/0/0/0
ipv6 enable
!
interface GigabitEthernet0/0/0/1
ipv6 enable
!
router isis SRv6
is-type level-2-only
net 49.0001.1921.6810.0003.00
address-family ipv6 unicast
metric-style wide
!
interface Loopback0
passive
address-family ipv6 unicast
!
!
interface GigabitEthernet0/0/0/0
point-to-point
address-family ipv6 unicast
!
!
interface GigabitEthernet0/0/0/1
point-to-point
address-family ipv6 unicast
!
end


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

hostname PE2
!
vrf test
address-family ipv4 unicast
import route-target
109:1
!
export route-target
109:1
!
interface Loopback0
ipv6 address 2001:db8:12ff::4/128
!
interface GigabitEthernet0/0/0/0
ipv6 enable
!
interface GigabitEthernet0/0/0/1
vrf test
ipv4 address 192.168.45.4 255.255.255.0
!
router isis SRv6
is-type level-2-only
net 49.0001.1921.6810.0004.00
address-family ipv6 unicast
segment-routing srv6
locator LOC0
!
interface Loopback0
passive
address-family ipv6 unicast
!
interface GigabitEthernet0/0/0/0
point-to-point
address-family ipv6 unicast
!
router bgp 109
bgp router-id 192.168.100.4
address-family vpnv4 unicast
vrf all
segment-routing srv6
locator LOC0
!
!
!
address-family vpnv6 unicast
vrf all
segment-routing srv6
locator LOC0
!
neighbor 2001:db8:12ff::2
remote-as 109
update-source Loopback0
address-family vpnv4 unicast
!
vrf test
rd 109:2
address-family ipv4 unicast
segment-routing srv6
!
redistribute connected
!
segment-routing
srv6
locators
locator LOC0
prefix 2001:db8:12ff:4::/64
!
end

 

 

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

Hi,

 

unfortunately, this config above is not correct for 4PE,

4PE means global routing table, not vrf.

 

BGP should look like this(also adding a piece with global IPv4)

router bgp 109
bgp router-id 192.168.100.4
address-family ipv4 unicast
segment-routing srv6
locator LOC0
!
!
!
address-family ipv6 unicast
segment-routing srv6
locator LOC0
!
neighbor 2001:db8:12ff::2
remote-as 109
update-source Loopback0
address-family ipv4 unicast
encapsulation-type srv6
address-family ipv6 unicast
encapsulation-type srv6

 

Thanks this is what I need

hello could you post the whole configurations PE1 PE2 and P device 

Hi @Kagamigawa ,

Here are the configurations for PE1, P1 and PE2 for 4PE.

hostname PE1

!

interface Loopback0

 ipv6 address 2001:db8:12ff::2/128

!

interface GigabitEthernet0/0/0/0

 ipv4 address 192.168.12.2 255.255.255.0

!

interface GigabitEthernet0/0/0/1

 ipv6 enable

!

router isis SRv6

 is-type level-2-only

 net 49.0001.1921.6810.0002.00

 address-family ipv6 unicast

  segment-routing srv6

   locator LOC0

   !

  !      

 !

 interface Loopback0

  passive

  address-family ipv6 unicast

  !

 !

 interface GigabitEthernet0/0/0/1

  point-to-point

  address-family ipv6 unicast

  !

 !

!

router bgp 109

 bgp router-id 192.168.100.2

 address-family ipv4 unicast

  segment-routing srv6

   locator LOC0

  !

  network 192.168.12.0/24

 !

 neighbor 2001:db8:12ff::4

  remote-as 109

  update-source Loopback0

  address-family ipv4 unicast

   encapsulation-type srv6

  !

 !

!

segment-routing

 srv6

  locators

   locator LOC0

    micro-segment behavior unode psp-usd

    prefix fc00:0:1::/48

   !

  !

 !

!

hostname P1

!

interface Loopback0

 ipv6 address 2001:db8:12ff::3/128

!

interface GigabitEthernet0/0/0/0

 ipv6 enable

!

interface GigabitEthernet0/0/0/1

 ipv6 enable

!

router isis SRv6

 is-type level-2-only

 net 49.0001.1921.6810.0003.00

 address-family ipv6 unicast

  segment-routing srv6

   locator LOC0

   !

  !

 !

 interface Loopback0

  passive

  address-family ipv6 unicast

  !

 !

 interface GigabitEthernet0/0/0/0

  point-to-point

  address-family ipv6 unicast

  !

 !

 interface GigabitEthernet0/0/0/1

  point-to-point

  address-family ipv6 unicast

  !

 !

!

segment-routing

 srv6

  locators

   locator LOC0

    micro-segment behavior unode psp-usd

    prefix fc00:0:3::/48

   !

  !

 !

!

hostname PE2

!

interface Loopback0

 ipv6 address 2001:db8:12ff::4/128

!

interface GigabitEthernet0/0/0/0

 ipv6 enable

!

interface GigabitEthernet0/0/0/1

 ipv4 address 192.168.45.4 255.255.255.0

!

router isis SRv6

 is-type level-2-only

 net 49.0001.1921.6810.0004.00

 address-family ipv6 unicast

  segment-routing srv6

   locator LOC0

   !

  !      

 !

 interface Loopback0

  passive

  address-family ipv6 unicast

  !

 !

 interface GigabitEthernet0/0/0/0

  point-to-point

  address-family ipv6 unicast

  !

 !

!

router bgp 109

 bgp router-id 192.168.100.4

 address-family ipv4 unicast

  segment-routing srv6

   locator LOC0

  !

  network 192.168.45.0/24

 !

 neighbor 2001:db8:12ff::2

  remote-as 109

  update-source Loopback0

  address-family ipv4 unicast

   encapsulation-type srv6

  !

 !

!

segment-routing

 srv6

  locators

   locator LOC0

    micro-segment behavior unode psp-usd

    prefix fc00:0:2::/48

   !

  !

 !

!

 

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

Thank you for your team's response

You are very welcome @Kagamigawa and thanks for the feedback

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 products for a $25 gift card