arista_l2interface - Manage layer 2 interfaces

Author:Peter Sprygada

Synopsis

New in version 1.2.

Manage layer 2 interface resources on Arista EOS network devices

Options

parameter required default choices comments
interface_id yes
    the full name of the interface
    logging no
    • true
    • false
    • yes
    • no
    enables or disables the syslog facility for this module
    state no present
    • present
    • absent
    describe the desired state of the interface related to the config
    tagged_vlans no
      specifies the list of vlans that should be allowed to transit this interface
      untagged_vlan no default
        specifies the vlan that untagged traffic should be placed in for transit across a vlan tagged link
        vlan_tagging no True
        • enable
        • disable
        specifies whether or not vlan tagging should be enabled for this interface

        Note

        Requires Arista EOS 4.10

        Note

        Requires Netdev extension for EOS

        Examples


        Example playbook entries using the arista_l2interface module to manage resource
        state. Note that interface names must be the full interface name not shortcut
        names (ie Ethernet, not Et1)
        
            tasks:
            - name: create switchport ethernet1 access port
              action: arista_l2interface interface_id=Ethernet1 logging=true
        
            - name: create switchport ethernet2 trunk port
              action: arista_l2interface interface_id=Ethernet2 vlan_tagging=enable logging=true
        
            - name: add vlans to red and blue switchport ethernet2
              action: arista_l2interface interface_id=Ethernet2 tagged_vlans=red,blue logging=true
        
            - name: set untagged vlan for Ethernet1
              action: arista_l2interface interface_id=Ethernet1 untagged_vlan=red logging=true
        
            - name: convert access to trunk
              action: arista_l2interface interface_id=Ethernet1 vlan_tagging=enable tagged_vlans=red,blue logging=true
        
            - name: convert trunk to access
              action: arista_l2interface interface_id=Ethernet2 vlan_tagging=disable untagged_vlan=blue logging=true
        
            - name: delete switchport ethernet1
              action: arista_l2interface interface_id=Ethernet1 state=absent logging=true
        

        Note

        Requires EOS 4.10 or later

        Note

        The Netdev extension for EOS must be installed and active in the available extensions (show extensions from the EOS CLI)

        Note

        See http://eos.aristanetworks.com for details

        Table Of Contents

        Previous topic

        arista_interface - Manage physical Ethernet interfaces

        Next topic

        arista_lag - Manage port channel (lag) interfaces