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
Section titled “Diagram”Classes
Section titled “Classes”configuration (iosxr.devices)
Section titled “configuration (iosxr.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| l2vpn_pw_class | List | [l2vpn_pw_class] | No |
l2vpn_pw_class (iosxr.devices.configuration)
Section titled “l2vpn_pw_class (iosxr.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| encapsulation_mpls | Boolean | true, false | No | |
| encapsulation_mpls_load_balancing_flow_label_both | Boolean | true, false | No | |
| encapsulation_mpls_load_balancing_flow_label_both_static | Boolean | true, false | No | |
| encapsulation_mpls_load_balancing_flow_label_code_17 | Boolean | true, false | No | |
| encapsulation_mpls_load_balancing_flow_label_code_17_disable | Boolean | true, false | No | |
| encapsulation_mpls_load_balancing_flow_label_receive | Boolean | true, false | No | |
| encapsulation_mpls_load_balancing_flow_label_receive_static | Boolean | true, false | No | |
| encapsulation_mpls_load_balancing_flow_label_transmit | Boolean | true, false | No | |
| encapsulation_mpls_load_balancing_flow_label_transmit_static | Boolean | true, false | No | |
| encapsulation_mpls_load_balancing_pw_label | Boolean | true, false | No | |
| encapsulation_mpls_transport_mode_ethernet | Boolean | true, false | No | |
| encapsulation_mpls_transport_mode_vlan_passthrough | Boolean | true, false | No | |
| encapsulation_mpls_transport_mode_vlan | Boolean | true, false | No |
Sample Configuration:
Section titled “Sample Configuration:”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 disableExample YAML Code:
Section titled “Example YAML Code:”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: trueExample-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: trueExample-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: trueExample-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: trueExample-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: trueExample-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: trueExample-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