slxos_netdev_l2_interface

The slxos_netdev_l2_interface type allows you to manage assignment of VLANS to ports on a switch.

Syntax

slxos_netdev_l2_interface { "name":
ensure => [present | absent],
vlan_tagging => [enable | disable],
description =>  "vlan-description"
tagged_vlans => (vlan | [vlan1, vlan2, vlan3, ...]),
untagged_vlan => vlan,
native_vlans => vlan,

target => $target
}

Properties

Table 1. slxos_netdev_l2_interface properties
Property Description
name (required) Specifies the name of the interface.
vlan_tagging Configures the mode for the given port as access or trunk. A value of enable configures the port in trunk mode, in which tagged packets are processed. A value of disable (the default), configures the port in access mode, in which tagged packets are discarded. If you do not specify a value for this attribute, but you do set the tagged_vlans attribute, the port is configured as a trunk port.
description The switch interface description.
tagged_vlans Specifies VLAN IDs for tagged packets. This could be a single value, or an array of values. When this property is set, the vlan_tagging property defaults to enabled.
untagged_vlan (optional) Specifies VLAN IDs for untagged packets. If the port is also processing tagged packets, this VLAN is the native VLAN.
target (optional) Specifies device connection information. For example, http://admin:password@[3001::1]:830 NOTE: The target can also be specified by using a shortcut. An example is: $ip23= "http://admin:password@10.11.12.13:830; you can then use $ip23 subsequently.

Examples

The following Puppet code segment configures several properties for the Ethernet interface.

class node1 {
$ip23= "http://admin:password@10.11.12.13:830"
slxos_netdev_interface { “eth-1/1":
ensure => present,
admin => up,
description => "this is a storage port",
mtu => 2200,
speed => "10000",
target => $ip23
}

Use the show running interface command to verify the results of the code segment on the switch.

device# sh run interface ethenet 1/1
interface ethernet 1/1
speed 10000
mtu 2200
description this is a storage port
no shutdown
!