Skip to content

L2VPN PW Class

Configure L2VPN Pseudowire Class templates for MPLS-based Layer 2 VPN services on IOS-XR devices. Pseudowire classes define encapsulation methods, transport modes, and load balancing parameters that can be applied to pseudowire configurations for consistent behavior across multiple pseudowires.

Diagram
NameTypeConstraintMandatoryDefault Value
l2vpn_pw_classList[l2vpn_pw_class]No

l2vpn_pw_class (iosxr.devices.configuration)

Section titled “l2vpn_pw_class (iosxr.devices.configuration)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
encapsulation_mplsBooleantrue, falseNo
encapsulation_mpls_load_balancing_flow_label_bothBooleantrue, falseNo
encapsulation_mpls_load_balancing_flow_label_both_staticBooleantrue, falseNo
encapsulation_mpls_load_balancing_flow_label_code_17Booleantrue, falseNo
encapsulation_mpls_load_balancing_flow_label_code_17_disableBooleantrue, falseNo
encapsulation_mpls_load_balancing_flow_label_receiveBooleantrue, falseNo
encapsulation_mpls_load_balancing_flow_label_receive_staticBooleantrue, falseNo
encapsulation_mpls_load_balancing_flow_label_transmitBooleantrue, falseNo
encapsulation_mpls_load_balancing_flow_label_transmit_staticBooleantrue, falseNo
encapsulation_mpls_load_balancing_pw_labelBooleantrue, falseNo
encapsulation_mpls_transport_mode_ethernetBooleantrue, falseNo
encapsulation_mpls_transport_mode_vlan_passthroughBooleantrue, falseNo
encapsulation_mpls_transport_mode_vlanBooleantrue, falseNo

The following configuration describes how to set up L2VPN pseudowire class parameters on a Cisco IOS-XR device.

l2vpn
pw-class <name>
encapsulation mpls
transport-mode ethernet
transport-mode vlan
transport-mode passthrough
load-balancing
pw-label
flow-label both
static
flow-label code 17
disable

Example-1: Basic pseudowire class with MPLS encapsulation

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
l2vpn_pw_class:
- name: "PWC1"
encapsulation_mpls: true
encapsulation_mpls_transport_mode_ethernet: true

Example-2: Pseudowire class with load balancing enabled

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
l2vpn_pw_class:
- name: "PWC-LB"
encapsulation_mpls: true
encapsulation_mpls_transport_mode_ethernet: true
encapsulation_mpls_load_balancing_pw_label: true

Example-3: Comprehensive pseudowire class with flow label

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
l2vpn_pw_class:
- name: "PWC-FLOW"
encapsulation_mpls: true
encapsulation_mpls_transport_mode_ethernet: true
encapsulation_mpls_load_balancing_pw_label: true
encapsulation_mpls_load_balancing_flow_label_both: true

Example-4: VLAN transport mode pseudowire class

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
l2vpn_pw_class:
- name: "PWC-VLAN"
encapsulation_mpls: true
encapsulation_mpls_transport_mode_vlan: true

Example-5: Multiple pseudowire classes

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
l2vpn_pw_class:
- name: "PWC-ETHERNET"
encapsulation_mpls: true
encapsulation_mpls_transport_mode_ethernet: true
encapsulation_mpls_load_balancing_pw_label: true
- name: "PWC-VLAN"
encapsulation_mpls: true
encapsulation_mpls_transport_mode_vlan: true
encapsulation_mpls_load_balancing_pw_label: false
- name: "PWC-PASSTHROUGH"
encapsulation_mpls: true
encapsulation_mpls_transport_mode_vlan_passthrough: true

Example-6: Pseudowire class with transmit-only flow label

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
l2vpn_pw_class:
- name: "PWC-TX"
encapsulation_mpls: true
encapsulation_mpls_transport_mode_ethernet: true
encapsulation_mpls_load_balancing_flow_label_transmit: true

Example-7: Pseudowire class with receive-only flow label

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
l2vpn_pw_class:
- name: "PWC-RX"
encapsulation_mpls: true
encapsulation_mpls_transport_mode_ethernet: true
encapsulation_mpls_load_balancing_flow_label_receive: true