Basic VPWS

Load basic.vpws.init.cfg

#IOS-XE (R1-R6, CE1,5-6,8-12)
config replace flash:basic.vpws.init.cfg

#IOS-XR (XR1, XR2)
configure
load basic.vpws.init.cfg
commit replace
y

Configure the following tLDP VPWS services. Each IOSv CE router should see the other via CDP neighbors and ping the other CE at IP 10.X.Y.X/24.

  • CE1 & CE12

  • CE11 & CE5

    • Use the control word

    • Use the old style configuration (under the interface) on R2

  • CE10 & CE6

    • Do not use the control word

    • Use the new style configuration on R2

  • CE8 & CE9

    • Do not use the direct link between R4-R6

    • Ensure only this one VPWS uses the path that avoids this link

Answer

#R1
int Gi4
 no ip address
int Gi5
 no ip address
!
connect CE1_CE12 gi4 gi5

#XR1
l2vpn pw-class MPLS_CW
 encapsulation mpls control-word
!
l2vpn xconnect group VPWS
 p2p CE5_CE11
  int gi0/0/0/3
  neighbor 2.2.2.2 pw-id 511 pw-class MPLS_CW

#R2
pseudowire-class MPLS_CW
 encapsulation mpls
 control-word
!
int gi5
 no ip address
 xconnect 11.11.11.11 511 pw-class MPLS_CW
!
int gi4
 no ip address
!
l2vpn xconnect context CE6_CE10
 member gi4
 member 12.12.12.12 610 encapsulation mpls

#XR12
l2vpn xconnect group VPWS
 p2p CE6_CE10
  int gi0/0/0/3
  neighbor 2.2.2.2 pw-id 610

#R4
ip explicit-path name AVOID_R4_R6
 index 1 exclude-address 10.4.6.6
!
int tun46
 ip unn lo0
 tunnel mode mpls traffic-eng
 tunnel dest 6.6.6.6
 tunnel mpls traffic-eng path-option 1 explicit name AVOID_R4_R6
!
template type pseudowire CE8_CE9
 encapsulation mpls
 preferred-path interface Tunnel46
!
int Gi6
 no ip address
!
l2vpn xconnect context CE8_CE9
 member GigabitEthernet6
 member 6.6.6.6 89 template CE8_CE9

#R6
ip explicit-path name AVOID_R4_R6
 index 1 exclude-address 10.4.6.4
!
int tun46
 ip unn lo0
 tunnel mode mpls traffic-eng
 tunnel dest 4.4.4.4
 tunnel mpls traffic-eng path-option 1 explicit name AVOID_R4_R6
!
template type pseudowire CE8_CE9
 encapsulation mpls
 preferred-path interface Tunnel46
!
int Gi6
 no ip address
!
l2vpn xconnect context CE8_CE9
 member GigabitEthernet6
 member 4.4.4.4 89 template CE8_CE9

Explanation

Local xconnect on CSR1000v

To implement a local xconnect on IOS-XE, you simply use the connect global command. This enables a cross connect between CE1 and CE12 on R1. You could also place these interfaces in the same BD as an alternative. We can verify that the routers see each other as CDP neighbors and that they can ping each other.

Note that this does not appear to work if you use service instances. You must use the physical interface only.

Update 4/4/24: Another option that seems to be more intuitive is:

#R1
l2vpn xconnect context R1_R12
 member GigabitEthernet4
 member GigabitEthernet5

VPWS between CE5 and CE11 with the CW

IOS-XR defaults to having the CW off. IOS-XE defaults to having the CW on but with autosense (it will adjust to the partner’s CW setting).

Before setting up the VPWS, notice the setting on IOS-XE when configuring a basic xconnect statement:

Even though it is the default, we can configure IOS-XE to use the CW by setting the control-word under a template or under a pseudowire-class.

pseudowire-class MPLS_CW
 encapsulation mpls
 control-word
!
int gi4
 xconnect 11.11.11.11 511 pw-class MPLS_CW

# or

template type pseudowire CE5_CE11
 encapsulation mpls
 control-word include
!
l2vpn xconnect context CE5_CE11
 member GigabitEthernet4
 member 11.11.11.11 511 template CE5_CE11

Notice that the CW is now set to on only (not autosense). However, autosense is still actually working.

IOS-XR will by default leave the CW off. This will make the VPWS inoperable, and IOS-XE will revert to autosense and turn the CW off, which automatically brings the VPWS up. We must set IOS-XR to have the CW on by using a pw-class.

l2vpn pw-class MPLS_CW
 encapsulation mpls control-word
!
l2vpn xconnect group VPWS
 p2p CE5_CE11
  int gi0/0/0/3
  neighbor 2.2.2.2 pw-id 511 pw-class MPLS_CW

We can now see that both sides have the CW on:

We can also verify that the VPWS is up:

Use the detail keyword on both IOS-XE and IOS-XR to get more info, such as MTU values, etc.

Ping between CE5 and CE11 to verify connectivity. Note that on XRd, this is not working. It seems to be some issue with using the CW on this platform. However on XRv9K pings do work.

VPWS between CE6 and CE10 with the CW off

Because IOS-XR has the CW off by default, we can leave the default settings. IOS-XE will autosense and turn the CW off as well.

The instructions ask to use the newer style configuration on IOS-XE. This uses the l2vpn xconnect context mode. Otherwise, configuration is similar to the VPWS configured previously, just without using a pw-class or template.

#R2
l2vpn xconnect context CE6_CE10
 member gi4
 member 12.12.12.12 610 encapsulation mpls

#XR12
l2vpn xconnect group VPWS
 p2p CE6_CE10
  int gi0/0/0/3
  neighbor 2.2.2.2 pw-id 610

Verification is the same as above as well.

VPWS between CE8 and CE9 with MPLS-TE steering

This is a normal VPWS, except we must steer the L2VPN into a TE tunnel, not the default LDP path. To do this, we setup a TE tunnel and do not use autoroute announce. (We only want this L2VPN to use the path, and nothing else). Note that MPLS-TE is already configured in the core. We then set the tunnel as the preferred path for the xconnect via a template that is applied to the l2vpn xconnect context. You can also use a pseudowire-class that is applied to an xconnect statement under an interface.

template type pseudowire CE8_CE9
 encapsulation mpls
 preferred-path interface Tunnel46
!
l2vpn xconnect context CE8_CE9
 member GigabitEthernet5
 member 4.4.4.4 78 template CE8_CE9

To verify that the TE tunnel is up we can use show mpls traffic-eng tunnels

We can verify that the VPWS uses the TE tunnel as the preferred path:

Notice that the default path is “ready.” If the tunnel goes down, the VPWS will default back to the regular LDP path. We can test this by shutting down the tunnel.

If we want to disable this behavior we can use preferred-path int tun46 disable-fallback.

We can verify that the traffic is taking the correct path by using MPLS OAM:

Above we see that the packet arrives via the R5-R6 interface. We can compare this to a regular OAM trace to R6’s loopback, which arrives via the direct R4-R6 interface.

Last updated