Netmiko Device Commands

This section contains details of the commands capable of being executed by the switches and the CLI commands sent to the switch for each command module that is selected.

Switches

AristaEos:

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan {segmentation_id}

      • name {network_name}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • no vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface {port}

      • switchport mode access

      • switchport access vlan {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface {port}

      • no switchport access vlan {segmentation_id}

      • no switchport mode trunk

      • switchport trunk allowed vlan none

  • SET_NATIVE_VLAN: Sets a specified native VLAN
    • CLI commands:
      • interface {port}

      • switchport mode trunk

      • switchport trunk native vlan {segmentation_id}

      • switchport trunk allowed vlan add {segmentation_id}

  • DELETE_NATIVE_VLAN: Removes the native VLAN
    • CLI commands:
      • interface {port}

      • no switchport trunk native vlan {segmentation_id}

      • switchport trunk allowed vlan remove {segmentation_id}

  • ADD_NETWORK_TO_TRUNK: Adds a network to a trunk port.
    • CLI commands:
      • interface {port}

      • switchport trunk allowed vlan add {segmentation_id}

  • REMOVE_NETWORK_FROM_TRUNK: Removes a network from a trunk port.
    • CLI commands:
      • interface {port}

      • switchport trunk allowed vlan remove {segmentation_id}

ArubaOSCX:

Built for ArubaOS-CX

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan {segmentation_id}

      • name {network_name}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • no vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface {port}

      • no routing

      • vlan access {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface {port}

      • no vlan access {segmentation_id}

  • ADD_NETWORK_TO_TRUNK: Adds a network to a trunk port.
    • CLI commands:
      • interface {port}

      • no routing

      • vlan trunk allowed {segmentation_id}

  • REMOVE_NETWORK_FROM_TRUNK: Removes a network from a trunk port.
    • CLI commands:
      • interface {port}

      • no vlan trunk allowed {segmentation_id}

  • ENABLE_PORT: Enables the port
    • CLI commands:
      • interface {port}

      • no shutdown

  • DISABLE_PORT: Shuts down the port
    • CLI commands:
      • interface {port}

      • shutdown

BrocadeFastIron:

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan {segmentation_id} by port

      • name {network_name}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • no vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • vlan {segmentation_id} by port

      • untagged ether {port}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • vlan {segmentation_id} by port

      • no untagged ether {port}

  • QUERY_PORT: Shows details about the switch for that port
    • CLI commands:
      • show interfaces ether {port} | include VLAN

CiscoIos:

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan {segmentation_id}

      • name {network_name}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • no vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface {port}

      • switchport mode access

      • switchport access vlan {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface {port}

      • no switchport access vlan {segmentation_id}

      • no switchport mode trunk

      • switchport trunk allowed vlan none

  • SET_NATIVE_VLAN: Sets a specified native VLAN
    • CLI commands:
      • interface {port}

      • switchport mode trunk

      • switchport trunk native vlan {segmentation_id}

      • switchport trunk allowed vlan add {segmentation_id}

  • DELETE_NATIVE_VLAN: Removes the native VLAN
    • CLI commands:
      • interface {port}

      • no switchport mode trunk

      • no switchport trunk native vlan {segmentation_id}

      • switchport trunk allowed vlan remove {segmentation_id}

  • ADD_NETWORK_TO_TRUNK: Adds a network to a trunk port.
    • CLI commands:
      • interface {port}

      • switchport mode trunk

      • switchport trunk allowed vlan add {segmentation_id}

  • REMOVE_NETWORK_FROM_TRUNK: Removes a network from a trunk port.
    • CLI commands:
      • interface {port}

      • switchport trunk allowed vlan remove {segmentation_id}

CiscoNxOS:

Netmiko device driver for Cisco Nexus switches running NX-OS.

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan {segmentation_id}

      • name {network_name}

      • exit

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • no vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface {port}

      • switchport mode access

      • switchport access vlan {segmentation_id}

      • exit

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface {port}

      • no switchport access vlan

      • exit

  • ADD_NETWORK_TO_TRUNK: Adds a network to a trunk port.
    • CLI commands:
      • interface {port}

      • switchport mode trunk

      • switchport trunk allowed vlan add {segmentation_id}

      • exit

  • REMOVE_NETWORK_FROM_TRUNK: Removes a network from a trunk port.
    • CLI commands:
      • interface {port}

      • switchport trunk allowed vlan remove {segmentation_id}

      • exit

  • ENABLE_PORT: Enables the port
    • CLI commands:
      • interface {port}

      • no shutdown

      • exit

  • DISABLE_PORT: Shuts down the port
    • CLI commands:
      • interface {port}

      • shutdown

      • exit

Cisco300:

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan {segmentation_id}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • no vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface {port}

      • switchport mode access

      • switchport access vlan {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface {port}

      • no switchport access vlan

      • switchport trunk allowed vlan remove all

Cumulus:

Built for Cumulus 4.x

Note for this switch you want config like this, where secret is the password needed for sudo su:

[genericswitch:<hostname>]
device_type = netmiko_cumulus
ip = <ip>
username = <username>
password = <password>
secret = <password for sudo>
ngs_physical_networks = physnet1
ngs_max_connections = 1
ngs_port_default_vlan = 123
ngs_disable_inactive_ports = False
  • NETMIKO_DEVICE_TYPE: Netmiko Supported device type
    • CLI commands:
      • linux

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • net add vlan {segmentation_id}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • net del vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • net add interface {port} bridge access {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • net del interface {port} bridge access {segmentation_id}

  • PLUG_BOND_TO_NETWORK: Adds bond to the bridge as a port for the VLAN
    • CLI commands:
      • net add bond {bond} bridge access {segmentation_id}

  • UNPLUG_BOND_FROM_NETWORK: Removes bond’s access VLAN assignment
    • CLI commands:
      • net del bond {bond} bridge access {segmentation_id}

  • ENABLE_PORT: Enables the port
    • CLI commands:
      • net del interface {port} link down

  • DISABLE_PORT: Shuts down the port
    • CLI commands:
      • net add interface {port} link down

  • ENABLE_BOND: Enables bond interface by removing link down state
    • CLI commands:
      • net del bond {bond} link down

  • DISABLE_BOND: Disables bond interface by setting its link state to down
    • CLI commands:
      • net add bond {bond} link down

  • SAVE_CONFIGURATION: Saves the configuration
    • CLI commands:
      • net commit

  • ERROR_MSG_PATTERNS: A tuple of regular expressions. These patterns are used to match and handle error messages returned by the switch.
    • CLI commands:
      • re.compile(‘ERROR: Command not found.’)

      • re.compile(‘command not found’)

      • re.compile(‘is not a physical interface on this switch’)

CumulusNVUE:

Built for Cumulus 5.x

Note for this switch you want config like this, where secret is the password needed for sudo su:

[genericswitch:<hostname>]
device_type = netmiko_cumulus_nvue
ip = <ip>
username = <username>
password = <password>
secret = <password for sudo>
ngs_physical_networks = physnet1
ngs_max_connections = 1
ngs_port_default_vlan = 123
ngs_disable_inactive_ports = False
  • NETMIKO_DEVICE_TYPE: Netmiko Supported device type
    • CLI commands:
      • linux

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • nv set bridge domain br_default vlan {segmentation_id}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • nv unset bridge domain br_default vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • nv unset interface {port} bridge domain br_default untagged

      • nv set interface {port} bridge domain br_default access {segmentation_id}

  • ADD_NETWORK_TO_TRUNK: Adds a network to a trunk port.
    • CLI commands:
      • nv unset interface {port} bridge domain br_default access

      • nv set interface {port} bridge domain br_default vlan {segmentation_id}

  • ADD_NETWORK_TO_BOND_TRUNK: Adds a VLAN to the bond interface for trunking
    • CLI commands:
      • nv unset interface {bond} bridge domain br_default access

      • nv set interface {bond} bridge domain br_default vlan {segmentation_id}

  • REMOVE_NETWORK_FROM_TRUNK: Removes a network from a trunk port.
    • CLI commands:
      • nv unset interface {port} bridge domain br_default vlan {segmentation_id}

  • DELETE_NETWORK_ON_BOND_TRUNK: Removes a VLAN from the bond interface for trunking
    • CLI commands:
      • nv unset interface {bond} bridge domain br_default vlan {segmentation_id}

  • SET_NATIVE_VLAN: Sets a specified native VLAN
    • CLI commands:
      • nv unset interface {port} bridge domain br_default access

      • nv set interface {port} bridge domain br_default untagged {segmentation_id}

      • nv set interface {port} bridge domain br_default vlan {segmentation_id}

  • SET_NATIVE_VLAN_BOND: Sets the native VLAN for the bond interface
    • CLI commands:
      • nv unset interface {bond} bridge domain br_default access

      • nv set interface {bond} bridge domain br_default untagged {segmentation_id}

      • nv set interface {bond} bridge domain br_default vlan {segmentation_id}

  • DELETE_NATIVE_VLAN: Removes the native VLAN
    • CLI commands:
      • nv unset interface {port} bridge domain br_default untagged {segmentation_id}

      • nv unset interface {port} bridge domain br_default vlan {segmentation_id}

  • DELETE_NATIVE_VLAN_BOND: Unsets the native VLAN for the bond interface
    • CLI commands:
      • nv unset interface {bond} bridge domain br_default untagged {segmentation_id}

      • nv unset interface {bond} bridge domain br_default vlan {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • nv unset interface {port} bridge domain br_default access

      • nv unset interface {port} bridge domain br_default untagged

      • nv unset interface {port} bridge domain br_default vlan

  • ENABLE_PORT: Enables the port
    • CLI commands:
      • nv set interface {port} link state up

  • DISABLE_PORT: Shuts down the port
    • CLI commands:
      • nv set interface {port} link state down

  • SAVE_CONFIGURATION: Saves the configuration
    • CLI commands:
      • nv config save

  • ERROR_MSG_PATTERNS: A tuple of regular expressions. These patterns are used to match and handle error messages returned by the switch.
    • CLI commands:
      • re.compile(‘Invalid config’)

      • re.compile(‘Config invalid at’)

      • re.compile(‘ERROR: Command not found.’)

      • re.compile(‘command not found’)

      • re.compile(‘is not a physical interface on this switch’)

      • re.compile(‘Error: Invalid parameter’)

      • re.compile(‘Unable to restart services’)

      • re.compile(‘Failure during apply’)

DellNos:

Netmiko device driver for Dell Force10 (OS9) switches.

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • interface vlan {segmentation_id}

      • description {network_name}

      • exit

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • no interface vlan {segmentation_id}

      • exit

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface vlan {segmentation_id}

      • untagged {port}

      • exit

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface vlan {segmentation_id}

      • no untagged {port}

      • exit

  • ADD_NETWORK_TO_TRUNK: Adds a network to a trunk port.
    • CLI commands:
      • interface vlan {segmentation_id}

      • tagged {port}

      • exit

  • REMOVE_NETWORK_FROM_TRUNK: Removes a network from a trunk port.
    • CLI commands:
      • interface vlan {segmentation_id}

      • no tagged {port}

      • exit

DellOS10:

Netmiko device driver for Dell PowerSwitch switches.

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • interface vlan {segmentation_id}

      • description {network_name}

      • exit

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • no interface vlan {segmentation_id}

      • exit

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface {port}

      • switchport mode access

      • switchport access vlan {segmentation_id}

      • exit

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface {port}

      • no switchport access vlan

      • exit

  • ADD_NETWORK_TO_TRUNK: Adds a network to a trunk port.
    • CLI commands:
      • interface {port}

      • switchport mode trunk

      • switchport trunk allowed vlan {segmentation_id}

      • exit

  • REMOVE_NETWORK_FROM_TRUNK: Removes a network from a trunk port.
    • CLI commands:
      • interface {port}

      • no switchport trunk allowed vlan {segmentation_id}

      • exit

  • SET_NATIVE_VLAN: Sets a specified native VLAN
    • CLI commands:
      • interface {port}

      • switchport mode trunk

      • switchport access vlan {segmentation_id}

  • DELETE_NATIVE_VLAN: Removes the native VLAN
    • CLI commands:
      • interface {port}

      • no switchport access vlan

  • ENABLE_PORT: Enables the port
    • CLI commands:
      • interface {port}

      • no shutdown

      • exit

  • DISABLE_PORT: Shuts down the port
    • CLI commands:
      • interface {port}

      • shutdown

      • exit

  • ERROR_MSG_PATTERNS: A tuple of regular expressions. These patterns are used to match and handle error messages returned by the switch.
    • CLI commands:
      • No cli commands for this switch command

DellPowerConnect:

Netmiko device driver for Dell PowerConnect switches.

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan database

      • vlan {segmentation_id}

      • exit

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • vlan database

      • no vlan {segmentation_id}

      • exit

  • PLUG_PORT_TO_NETWORK_GENERAL: Allows the VLAN and lets it carry untagged frames
    • CLI commands:
      • interface {port}

      • switchport general allowed vlan add {segmentation_id} untagged

      • switchport general pvid {segmentation_id}

      • exit

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface {port}

      • switchport access vlan {segmentation_id}

      • exit

  • DELETE_PORT_GENERAL: Removes VLAN from allowed list and stops allowing it to carry untagged frames
    • CLI commands:
      • interface {port}

      • switchport general allowed vlan remove {segmentation_id}

      • no switchport general pvid

      • exit

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface {port}

      • switchport access vlan none

      • exit

  • ADD_NETWORK_TO_TRUNK: Adds a network to a trunk port.
    • CLI commands:
      • interface {port}

      • switchport general allowed vlan add {segmentation_id} tagged

      • exit

  • REMOVE_NETWORK_FROM_TRUNK: Removes a network from a trunk port.
    • CLI commands:
      • interface {port}

      • switchport general allowed vlan remove {segmentation_id}

      • exit

  • ERROR_MSG_PATTERNS: A tuple of regular expressions. These patterns are used to match and handle error messages returned by the switch.
    • CLI commands:
      • re.compile(’% Incomplete command’)

      • re.compile(‘VLAN was not created by user’)

      • re.compile(‘Configuration Database locked by another application - try later’)

      • re.compile(‘Port is not in Layer-2 mode’)

Fake:

Netmiko device driver for Fake switches.

  • NETMIKO_DEVICE_TYPE: Netmiko Supported device type
    • CLI commands:
      • linux

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • add network {segmentation_id}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • delete network {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • plug port {port} to network {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • delete port {port}

  • ADD_NETWORK_TO_TRUNK: Adds a network to a trunk port.
    • CLI commands:
      • add network {segmentation_id} to trunk {port}

  • REMOVE_NETWORK_FROM_TRUNK: Removes a network from a trunk port.
    • CLI commands:
      • remove network {segmentation_id} from trunk {port}

  • ENABLE_PORT: Enables the port
    • CLI commands:
      • enable {port}

  • DISABLE_PORT: Shuts down the port
    • CLI commands:
      • disable {port}

  • ERROR_MSG_PATTERNS: A tuple of regular expressions. These patterns are used to match and handle error messages returned by the switch.
    • CLI commands:
      • No cli commands for this switch command

HpeComware:

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan {segmentation_id}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • undo vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface {port}

      • port link-type access

      • port access vlan {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface {port}

      • undo port access vlan

HpeComware:

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan {segmentation_id}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • undo vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface {port}

      • port link-type access

      • port access vlan {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface {port}

      • undo port access vlan

Huawei:

For Huawei Network Operating System VRP V3 and V5.

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan {segmentation_id}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • undo vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface {port}

      • port link-type access

      • port default vlan {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface {port}

      • undo port default vlan {segmentation_id}

Huawei:

For Huawei Next-Generation Network Operating System VRP V8.

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan {segmentation_id}

      • commit

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • undo vlan {segmentation_id}

      • commit

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface {port}

      • port link-type access

      • port default vlan {segmentation_id}

      • commit

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface {port}

      • undo port default vlan {segmentation_id}

      • commit

Juniper:

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • set vlans {network_name} vlan-id {segmentation_id}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • delete vlans {network_name}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • delete interfaces {port} unit 0 family ethernet-switching vlan members

      • set interfaces {port} unit 0 family ethernet-switching vlan members {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • delete interfaces {port} unit 0 family ethernet-switching vlan members

  • ENABLE_PORT: Enables the port
    • CLI commands:
      • delete interfaces {port} disable

  • DISABLE_PORT: Shuts down the port
    • CLI commands:
      • set interfaces {port} disable

  • ADD_NETWORK_TO_TRUNK: Adds a network to a trunk port.
    • CLI commands:
      • set interfaces {port} unit 0 family ethernet-switching vlan members {segmentation_id}

  • REMOVE_NETWORK_FROM_TRUNK: Removes a network from a trunk port.
    • CLI commands:
      • delete interfaces {port} unit 0 family ethernet-switching vlan members {segmentation_id}

MellanoxMlnxOS:

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan {segmentation_id}

      • name {network_id}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • no vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface ethernet {port}

      • switchport mode access

      • switchport access vlan {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface ethernet {port}

      • no switchport access vlan

      • no switchport mode

NokiaSRL:

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • set tunnel-interface vxlan0 vxlan-interface {segmentation_id} type bridged

      • set tunnel-interface vxlan0 vxlan-interface {segmentation_id} ingress vni {segmentation_id}

      • set tunnel-interface vxlan0 vxlan-interface {segmentation_id} egress source-ip use-system-ipv4-address

      • set network-instance mac-vrf-{segmentation_id} type mac-vrf

      • set network-instance mac-vrf-{segmentation_id} description OS-Network-ID-{network_name}

      • set network-instance mac-vrf-{segmentation_id} vxlan-interface vxlan0.{segmentation_id}

      • set network-instance mac-vrf-{segmentation_id} protocols bgp-evpn bgp-instance 1 vxlan-interface vxlan0.{segmentation_id}

      • set network-instance mac-vrf-{segmentation_id} protocols bgp-evpn bgp-instance 1 evi {segmentation_id}

      • set network-instance mac-vrf-{segmentation_id} protocols bgp-evpn bgp-instance 1 ecmp 8

      • set network-instance mac-vrf-{segmentation_id} protocols bgp-vpn bgp-instance 1 route-target export-rt target:1:{segmentation_id}

      • set network-instance mac-vrf-{segmentation_id} protocols bgp-vpn bgp-instance 1 route-target import-rt target:1:{segmentation_id}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • delete network-instance mac-vrf-{segmentation_id}

      • delete tunnel-interface vxlan0 vxlan-interface {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • set interface {port} subinterface {segmentation_id} type bridged

      • set network-instance mac-vrf-{segmentation_id} interface {port}.{segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • delete network-instance mac-vrf-{segmentation_id} interface {port}.{segmentation_id}

      • delete interface {port} subinterface {segmentation_id}

OvsLinux:

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • ovs-vsctl set port {port} vlan_mode=access

      • ovs-vsctl set port {port} tag={segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • ovs-vsctl clear port {port} tag

      • ovs-vsctl clear port {port} trunks

      • ovs-vsctl clear port {port} vlan_mode

  • SET_NATIVE_VLAN: Sets a specified native VLAN
    • CLI commands:
      • ovs-vsctl set port {port} vlan_mode=native-untagged

      • ovs-vsctl set port {port} tag={segmentation_id}

      • ovs-vsctl add port {port} trunks {segmentation_id}

  • DELETE_NATIVE_VLAN: Removes the native VLAN
    • CLI commands:
      • ovs-vsctl clear port {port} vlan_mode

      • ovs-vsctl clear port {port} tag

      • ovs-vsctl remove port {port} trunks {segmentation_id}

  • SET_NATIVE_VLAN_BOND: Sets the native VLAN for the bond interface
    • CLI commands:
      • ovs-vsctl set port {bond} vlan_mode=native-untagged

      • ovs-vsctl set port {bond} tag={segmentation_id}

      • ovs-vsctl add port {bond} trunks {segmentation_id}

  • DELETE_NATIVE_VLAN_BOND: Unsets the native VLAN for the bond interface
    • CLI commands:
      • ovs-vsctl clear port {bond} vlan_mode

      • ovs-vsctl clear port {bond} tag

      • ovs-vsctl remove port {bond} trunks {segmentation_id}

  • ADD_NETWORK_TO_TRUNK: Adds a network to a trunk port.
    • CLI commands:
      • ovs-vsctl add port {port} trunks {segmentation_id}

  • REMOVE_NETWORK_FROM_TRUNK: Removes a network from a trunk port.
    • CLI commands:
      • ovs-vsctl remove port {port} trunks {segmentation_id}

  • ADD_NETWORK_TO_BOND_TRUNK: Adds a VLAN to the bond interface for trunking
    • CLI commands:
      • ovs-vsctl add port {bond} trunks {segmentation_id}

  • DELETE_NETWORK_ON_BOND_TRUNK: Removes a VLAN from the bond interface for trunking
    • CLI commands:
      • ovs-vsctl remove port {bond} trunks {segmentation_id}

Pluribus:

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan-create id {segmentation_id} scope fabric ports none description {network_name} auto-vxlan

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • vlan-delete id {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • vlan-port-remove vlan-range all ports {port}

      • port-vlan-add port {port} untagged-vlan {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • vlan-port-remove vlan-range all ports {port}

Ruijie:

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan {segmentation_id}

      • name {network_name}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • no vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface {port}

      • switchport mode access

      • switchport access vlan {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface {port}

      • no switchport access vlan {segmentation_id}

      • no switchport mode trunk

      • switchport trunk allowed vlan none

Sonic:

Built for SONiC 3.x

Note for this switch you want config like this, where secret is the password needed for sudo su:

[genericswitch:<hostname>]
device_type = netmiko_sonic
ip = <ip>
username = <username>
password = <password>
secret = <password for sudo>
ngs_physical_networks = physnet1
ngs_max_connections = 1
ngs_port_default_vlan = 123
ngs_disable_inactive_ports = False
  • NETMIKO_DEVICE_TYPE: Netmiko Supported device type
    • CLI commands:
      • linux

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • config vlan add {segmentation_id}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • config vlan del {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • config vlan member add -u {segmentation_id} {port}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • config vlan member del {segmentation_id} {port}

  • ADD_NETWORK_TO_TRUNK: Adds a network to a trunk port.
    • CLI commands:
      • config vlan member add {segmentation_id} {port}

  • REMOVE_NETWORK_FROM_TRUNK: Removes a network from a trunk port.
    • CLI commands:
      • config vlan member del {segmentation_id} {port}

  • SAVE_CONFIGURATION: Saves the configuration
    • CLI commands:
      • config save -y

  • ERROR_MSG_PATTERNS: A tuple of regular expressions. These patterns are used to match and handle error messages returned by the switch.
    • CLI commands:
      • re.compile(‘VLAN[0-9]+ doesn't exist’)

      • re.compile(‘Invalid Vlan Id , Valid Range : 1 to 4094’)

      • re.compile(‘Interface name is invalid!!’)

      • re.compile(‘No such command’)

SupermicroSmis:

A class to represent a Supermicro SMIS switch.

  • ADD_NETWORK: A tuple of command strings used to add a VLAN
    • CLI commands:
      • vlan {segmentation_id}

      • name {network_name}

  • DELETE_NETWORK: A tuple of command strings used to delete a VLAN
    • CLI commands:
      • no vlan {segmentation_id}

  • PLUG_PORT_TO_NETWORK: A tuple of command strings used to configure a port to connect to a specific VLAN
    • CLI commands:
      • interface {port}

      • switchport mode access

      • switchport access vlan {segmentation_id}

  • DELETE_PORT: A tuple of command strings used to remove a port from the VLAN
    • CLI commands:
      • interface {port}

      • no switchport access vlan {segmentation_id}

      • no switchport mode trunk

      • switchport trunk allowed vlan none