icx_vlan – Manage VLANs on Ruckus ICX 7000 series switches

New in version 2.9.

Synopsis

  • This module provides declarative management of VLANs on ICX network devices.

Parameters

Parameter Choices/Defaults Comments
aggregate
list
List of VLANs definitions.
associated_interfaces
list
This is a intent option and checks the operational state of the for given vlan name for associated interfaces. If the value in the associated_interfaces does not match with the operational state of vlan interfaces on device it will result in failure.
associated_tagged
list
This is a intent option and checks the operational state of given vlan name for associated tagged ports and lags. If the value in the associated_tagged does not match with the operational state of vlan interfaces on device it will result in failure.
check_running_config
boolean
    Choices:
  • no
  • yes
Check running configuration. This can be set as environment variable. Module will use environment variable value(default:True), unless it is overridden, by specifying it as module parameter.
delay
integer
Delay the play should wait to check for declarative intent params values.
interfaces
dictionary
List of ethernet ports or LAGS to be added as access(untagged) ports to the vlan. To add a range of ports use 'to' keyword. See the example.
name
list
Name of the interface or lag
purge
boolean
    Choices:
  • no
  • yes
Purge interfaces not defined in the name
ip_arp_inspection
boolean
    Choices:
  • no
  • yes
Enables dynamic ARP inspection on a VLAN.
ip_dhcp_snooping
boolean
    Choices:
  • no
  • yes
Enables DHCP snooping on a VLAN.
name
string
Name of the VLAN.
state
string
    Choices:
  • present
  • absent
State of the VLAN configuration.
stp
dictionary
Enable spanning-tree 802-1w/rstp for this vlan.
enabled
boolean
    Choices:
  • no
  • yes
Manage the state(Enable/Disable) of the spanning_tree_802_1w in the current vlan
priority
string
Configures the priority of the bridge. The value ranges from 0 through 65535. A lower numerical value means the bridge has a higher priority. Thus, the highest priority is 0. The default is 32768.
type
string
    Choices:
  • 802-1w ←
  • rstp
Specify the type of spanning-tree
tagged
dictionary
List of ethernet ports or LAGS to be added as trunk(tagged) ports to the vlan. To add a range of ports use 'to' keyword. See the example.
name
list
Name of the interface or lag
purge
boolean
    Choices:
  • no
  • yes
Purge interfaces not defined in the name
vlan_id
string / required
ID of the VLAN. Range 1-4094.
associated_interfaces
list
This is a intent option and checks the operational state of the for given vlan name for associated interfaces. If the value in the associated_interfaces does not match with the operational state of vlan interfaces on device it will result in failure.
associated_tagged
list
This is a intent option and checks the operational state of given vlan name for associated tagged ports and lags. If the value in the associated_tagged does not match with the operational state of vlan interfaces on device it will result in failure.
check_running_config
boolean
    Choices:
  • no
  • yes ←
Check running configuration. This can be set as environment variable. Module will use environment variable value(default:True), unless it is overridden, by specifying it as module parameter.
delay
integer
Default:
10
Delay the play should wait to check for declarative intent params values.
interfaces
dictionary
List of ethernet ports or LAGS to be added as access(untagged) ports to the vlan. To add a range of ports use 'to' keyword. See the example.
name
list
Name of the interface or lag
purge
boolean
    Choices:
  • no
  • yes
Purge interfaces not defined in the name
ip_arp_inspection
boolean
    Choices:
  • no
  • yes
Enables dynamic ARP inspection on a VLAN.
ip_dhcp_snooping
boolean
    Choices:
  • no
  • yes
Enables DHCP snooping on a VLAN.
name
string
Name of the VLAN.
purge
boolean
    Choices:
  • no ←
  • yes
Purge VLANs not defined in the aggregate parameter.
state
string
    Choices:
  • present ←
  • absent
State of the VLAN configuration.
stp
dictionary
Enable spanning-tree 802-1w/rstp for this vlan.
enabled
boolean
    Choices:
  • no
  • yes
Manage the state(Enable/Disable) of the spanning_tree_802_1w in the current vlan
priority
string
Configures the priority of the bridge. The value ranges from 0 through 65535. A lower numerical value means the bridge has a higher priority. Thus, the highest priority is 0. The default is 32768.
type
string
    Choices:
  • 802-1w ←
  • rstp
Specify the type of spanning-tree
tagged
dictionary
List of ethernet ports or LAGS to be added as trunk(tagged) ports to the vlan. To add a range of ports use 'to' keyword. See the example.
name
list
Name of the interface or lag
purge
boolean
    Choices:
  • no
  • yes
Purge interfaces not defined in the name
vlan_id
integer / required
ID of the VLAN. Range 1-4094.

Notes

Note

Examples

- name: Add a single ethernet 1/1/48 as access(untagged) port to vlan 20
  icx_vlan:
    name: test-vlan
    vlan_id: 20
    interfaces:
      name:
        - ethernet 1/1/48

- name: Add a single LAG 10 as access(untagged) port to vlan 20
  icx_vlan:
    vlan_id: 20
    interfaces:
      name:
        - lag 10

- name: Add a range of ethernet ports as trunk(tagged) ports to vlan 20 by port
  icx_vlan:
    vlan_id: 20
    tagged:
      name:
        - ethernet 1/1/40 to 1/1/48

- name: Add discontinuous lags, ethernet ports as access(untagged) and trunk(tagged) port to vlan 20.
  icx_vlan:
    vlan_id: 20
    interfaces:
      name:
        - ethernet 1/1/40 to 1/1/48
        - ethernet 2/1/1
        - lag 1
        - lag 3 to 5
    tagged:
      name:
        - ethernet 1/1/20 to 1/1/25
        - lag 1 to 3

- name: Remove an access and range of trunk ports from vlan
  icx_vlan:
    vlan_id: 20
    interfaces:
      name:
        - ethernet 1/1/40
    tagged:
      name:
        - ethernet 1/1/39 to 1/1/70

- name: Enable dhcp snooping, disable arp inspection in vlan
  icx_vlan:
    vlan_id: 20
    ip_dhcp_snooping: present
    ip_arp_inspection: absent

- name: Create vlan 20.  Enable  arp inspection in vlan. Purge all other vlans.
  icx_vlan:
    vlan_id: 20
    ip_arp_inspection: present
    purge: present

- name: Remove vlan 20.
  icx_vlan:
    vlan_id: 20
    state: absent

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
commands
list
always
The list of configuration mode commands to send to the device

Sample:
['vlan 100', 'name test-vlan']


Status

Authors

  • Ruckus Wireless (@Commscope)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.