.. _cisco.iosxr.iosxr_l2_interfaces_module:
*******************************
cisco.iosxr.iosxr_l2_interfaces
*******************************
**Resource Module to configure L2 interfaces.**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module manages the Layer-2 interface attributes on Cisco IOS-XR devices.
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
config
list
/ elements=dictionary
|
|
A dictionary of Layer-2 interface options
|
|
encapsulation
dictionary
|
|
Specify which packets will be matched by this sub-interface.
|
|
|
dot1q
integer
|
|
IEEE 802.1Q VLAN-tagged packets.
|
|
|
second_dot1q
integer
|
|
IEEE 802.1Q VLAN-tagged packets.
|
|
l2protocol
list
/ elements=dictionary
|
|
Configures Layer 2 protocol tunneling and protocol data unit (PDU) filtering on an interface.
|
|
|
cdp
string
|
Choices:
- drop
- forward
- tunnel
|
Cisco Discovery Protocol (CDP) tunneling and data unit parameters.
|
|
|
cpsv
string
|
Choices:
- drop
- reverse-tunnel
- tunnel
|
CDP, PVST+, STP, and VTP protocols.
|
|
|
pvst
string
|
Choices:
- drop
- forward
- tunnel
|
Configures the per-VLAN Spanning Tree Protocol (PVST) tunneling and data unit parameters.
|
|
|
stp
string
|
Choices:
- drop
- forward
- tunnel
|
Spanning Tree Protocol (STP) tunneling and data unit parameters.
|
|
|
vtp
string
|
Choices:
- drop
- forward
- tunnel
|
VLAN Trunk Protocol (VTP) tunneling and data unit parameters.
|
|
l2transport
boolean
|
|
Switchport mode access command to configure the interface as a layer 2 access
|
|
name
string
/ required
|
|
Full name of the interface/sub-interface excluding any logical unit number, e.g. GigabitEthernet0/0/0/1 or GigabitEthernet0/0/0/1.100.
|
|
native_vlan
integer
|
|
Configure a native VLAN ID for the trunk
|
|
propagate
boolean
|
|
Propagate Layer 2 transport events. Note that it will work only when the l2tranport option is set to TRUE
|
|
q_vlan
list
/ elements=integer
|
|
802.1Q VLAN configuration. Note that it can accept either 2 VLAN IDs when configuring Q-in-Q VLAN, or it will accept 1 VLAN ID and 'any' as input list when configuring Q-in-any vlan as input. Note, that this option is valid only with respect to Sub-Interface and is not valid when configuring for Interface.
This option is DEPRECATED and replaced with qvlan, this attribute will be removed after 2026-06-01.
|
|
qvlan
list
/ elements=string
|
|
802.1Q VLAN configuration. Note that it can accept either 2 VLAN IDs when configuring Q-in-Q VLAN, or it will accept 1 VLAN ID and 'any' as input list when configuring Q-in-any vlan as input. Note, that this option is valid only with respect to Sub-Interface and is not valid when configuring for Interface.
|
|
running_config
string
|
|
This option is used only with state parsed.
The value of this option should be the output received from the IOS-XR device by executing the command show running-config interface.
The state parsed reads the configuration from running_config option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the parsed key within the result.
|
|
state
string
|
Choices:
merged ←
- replaced
- overridden
- deleted
- rendered
- gathered
- parsed
|
The state of the configuration after module completion
|