.. _dellemc.enterprise_sonic.sonic_interfaces_module: ***************************************** dellemc.enterprise_sonic.sonic_interfaces ***************************************** **Configure Interface attributes on interfaces such as, Eth, LAG, VLAN, and loopback. (create a loopback interface if it does not exist.)** Version added: 1.0.0 .. contents:: :local: :depth: 1 Synopsis -------- - Configure Interface attributes such as, MTU, admin statu, and so on, on interfaces such as, Eth, LAG, VLAN, and loopback. (create a loopback interface if it does not exist.) Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
config
list / elements=dictionary
A list of interface configurations.
advertised_speed
list / elements=string
Advertised speeds of the interface.
Applicable only for Ethernet interfaces.
Supported speeds are dependent on the type of switch.
Speeds may be 10, 100, 1000, 2500, 5000, 10000, 20000, 25000, 40000, 50000, 100000, 400000 or 800000.
auto_negotiate
boolean
    Choices:
  • no
  • yes
auto-negotiate transmission parameters with peer interface.
Applicable only for Ethernet interfaces.
autoneg_mode
string
added in 4.0.0
    Choices:
  • AUTONEG_MODE_BAM
  • AUTONEG_MODE_MSA
BAM/MSA configuration for autonegotiation
Applicable only for Ethernet interfaces.
auto_negotiate should be set to true to configure autoneg_mode
with auto_negotiate set to true , autoneg_mode defaults to BAM
description
string
Description about the interface.
enabled
boolean
    Choices:
  • no
  • yes
Administrative state of the interface.
fec
string
    Choices:
  • FEC_RS
  • FEC_FC
  • FEC_DISABLED
  • FEC_DEFAULT
  • FEC_AUTO
Interface FEC (Forward Error Correction).
Applicable only for Ethernet interfaces.
mtu
integer
MTU of the interface.
Not applicable for Loopback interfaces.
name
string / required
The name of the interface, for example, 'Eth1/15'.
speed
string
    Choices:
  • SPEED_10MB
  • SPEED_100MB
  • SPEED_1GB
  • SPEED_2500MB
  • SPEED_5GB
  • SPEED_10GB
  • SPEED_20GB
  • SPEED_25GB
  • SPEED_40GB
  • SPEED_50GB
  • SPEED_100GB
  • SPEED_200GB
  • SPEED_400GB
  • SPEED_800GB
Interface speed.
Applicable only for Ethernet interfaces.
Supported speeds are dependent on the type of switch.
unreliable_los
string
    Choices:
  • UNRELIABLE_LOS_MODE_ON
  • UNRELIABLE_LOS_MODE_OFF
  • UNRELIABLE_LOS_MODE_AUTO
Monitoring type to be used for generating a loss of service alarm.
state
string
    Choices:
  • merged ←
  • replaced
  • overridden
  • deleted
The state the configuration should be left in.

Notes ----- .. note:: - Tested against Enterprise SONiC Distribution by Dell Technologies. - Supports ``check_mode``. Examples -------- .. code-block:: yaml # Using "deleted" state # # Before state: # ------------- # # show interface status | no-more # ------------------------------------------------------------------------------------------ # Name Description Admin Oper AutoNeg Speed MTU # ------------------------------------------------------------------------------------------ # Ethernet0 - up 100000 9100 # Ethernet4 - up 100000 9100 # Ethernet8 Ethernet-8 down 100000 9100 # Ethernet12 Ethernet-12 down on - 5000 # Ethernet16 - down 40000 9100 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # mtu 9100 # speed 100000 # fec AUTO # shutdown # - name: Configure interfaces sonic_interfaces: config: - name: Ethernet8 - name: Ethernet12 - name: Ethernet16 state: deleted # # After state: # ------------- # # show interface status | no-more # ------------------------------------------------------------------------------------------ # Name Description Admin Oper AutoNeg Speed MTU # ------------------------------------------------------------------------------------------ # Ethernet0 - up 100000 9100 # Ethernet4 - up 100000 9100 # Ethernet8 - up 100000 9100 # Ethernet12 - up 100000 9100 # Ethernet16 - up 100000 9100 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # mtu 9100 # speed 100000 # shutdown # # Using "deleted" state # # Before state: # ------------- # # show interface status | no-more # ------------------------------------------------------------------------------------------ # Name Description Admin Oper AutoNeg Speed MTU # ------------------------------------------------------------------------------------------ # Ethernet0 - up 100000 9100 # Ethernet4 - up 100000 9100 # Ethernet8 - down 100000 9100 # Ethernet12 - down 1000 9100 # Ethernet16 - down 100000 9100 # - name: Configure interfaces sonic_interfaces: config: state: deleted # # After state: # ------------- # # show interface status | no-more # ------------------------------------------------------------------------------------------ # Name Description Admin Oper AutoNeg Speed MTU # ------------------------------------------------------------------------------------------ # Ethernet0 - up 100000 9100 # Ethernet4 - up 100000 9100 # Ethernet8 - up 100000 9100 # Ethernet12 - up 100000 9100 # Ethernet16 - up 100000 9100 # # # # Using "merged" state # # Before state: # ------------- # # show interface status | no-more # ------------------------------------------------------------------------------------------ # Name Description Admin Oper AutoNeg Speed MTU # ------------------------------------------------------------------------------------------ # Ethernet0 - up 100000 9100 # Ethernet4 - up 100000 9100 # Ethernet8 - down 100000 9100 # Ethernet12 - down 100000 9100 # Ethernet16 - down 100000 9100 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # mtu 9100 # speed 100000 # shutdown # - name: Configure interfaces sonic_interfaces: config: - name: Ethernet8 fec: FEC_AUTO - name: Ethernet12 description: 'Ethernet Twelve' auto_negotiate: true - name: Ethernet16 description: 'Ethernet Sixteen' enabled: true mtu: 3500 speed: SPEED_40GB state: merged # # After state: # ------------ # # show interface status | no-more # ------------------------------------------------------------------------------------------ # Name Description Admin Oper AutoNeg Speed MTU # ------------------------------------------------------------------------------------------ # Ethernet0 - up 100000 9100 # Ethernet4 - up 100000 9100 # Ethernet8 - down 100000 9100 # Ethernet12 Ethernet Twelve down on 100000 9100 # Ethernet16 Ethernet Sixteen up 40000 3500 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # mtu 9100 # speed 100000 # fec AUTO # shutdown # # Using "overridden" state # # Before state: # ------------- # # show interface status | no-more # ------------------------------------------------------------------------------------------ # Name Description Admin Oper AutoNeg Speed MTU # ------------------------------------------------------------------------------------------ # Ethernet0 E0 up 100000 9100 # Ethernet4 E4 up 100000 9100 # Ethernet8 E8 down 100000 9100 # Ethernet12 - down 1000 9100 # Ethernet16 - down 100000 9100 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # mtu 9100 # speed 100000 # shutdown # - name: Configure interfaces sonic_interfaces: config: - name: Ethernet8 fec: FEC_AUTO - name: Ethernet12 description: 'Ethernet Twelve' mtu: 3500 enabled: true auto_negotiate: true - name: Ethernet16 description: 'Ethernet Sixteen' mtu: 3000 enabled: false speed: SPEED_40GB state: overridden # # After state: # ------------ # # show interface status | no-more # ------------------------------------------------------------------------------------------ # Name Description Admin Oper AutoNeg Speed MTU # ------------------------------------------------------------------------------------------ # Ethernet0 - down 100000 9100 # Ethernet4 - down 100000 9100 # Ethernet8 - down 100000 9100 # Ethernet12 Ethernet Twelve up on 100000 3500 # Ethernet16 Ethernet Sixteen down 40000 3000 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # mtu 9100 # speed 100000 # fec AUTO # no shutdown # # Using "replaced" state # # Before state: # ------------- # # show interface status | no-more # ------------------------------------------------------------------------------------------ # Name Description Admin Oper AutoNeg Speed MTU # ------------------------------------------------------------------------------------------ # Ethernet0 - up 100000 9100 # Ethernet4 - up 100000 9100 # Ethernet8 - down on 100000 9100 # Ethernet12 - down 1000 9100 # Ethernet16 - down 100000 9100 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # mtu 9100 # speed auto 40000 # shutdown # - name: Configure interfaces sonic_interfaces: config: - name: Ethernet8 auto_negotiate: true advertised_speed: - "100000" - name: Ethernet12 description: 'Ethernet Twelve' mtu: 3500 enabled: true auto_negotiate: true - name: Ethernet16 description: 'Ethernet Sixteen' mtu: 3000 enabled: false speed: SPEED_40GB state: replaced # # After state: # ------------ # # show interface status | no-more # ------------------------------------------------------------------------------------------ # Name Description Admin Oper AutoNeg Speed MTU # ------------------------------------------------------------------------------------------ # Ethernet0 - up 100000 9100 # Ethernet4 - up 100000 9100 # Ethernet8 - down on 100000 9100 # Ethernet12 Ethernet Twelve up on 100000 3500 # Ethernet16 Ethernet Sixteen down 40000 3000 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # mtu 9100 # speed auto 100000 # fec AUTO # shutdown # # Using "deleted" state for MSA/BAM config # # Before state: # ------------- # show interface status # -------------------------------------------------------------------------------------------------------------------------------------- # Name Description Oper Reason AutoNeg Speed MTU Alternate Name # -------------------------------------------------------------------------------------------------------------------------------------- # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1 # Ethernet8 Ethernet8 down no-transceiver on - 9100 Eth1/2 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # description Ethernet8 # mtu 9100 # speed auto MSA # fec RS # unreliable-los auto # no shutdown # - name: Configure interfaces sonic_interfaces: config: - name: Ethernet32 autoneg_mode: AUTONEG_MODE_MSA state: deleted # # After State : # ------------- # show interface status # -------------------------------------------------------------------------------------------------------------------------------------- # Name Description Oper Reason AutoNeg Speed MTU Alternate Name # -------------------------------------------------------------------------------------------------------------------------------------- # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1 # Ethernet8 Ethernet8 down no-transceiver on - 9100 Eth1/2 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # description Ethernet8 # mtu 9100 # speed auto # fec RS # unreliable-los auto # no shutdown # # Using "merged" state for MSA/BAM config # # Before state: # ------------- # show interface status # -------------------------------------------------------------------------------------------------------------------------------------- # Name Description Oper Reason AutoNeg Speed MTU Alternate Name # -------------------------------------------------------------------------------------------------------------------------------------- # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1 # Ethernet8 Ethernet8 down no-transceiver on - 9100 Eth1/2 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # description Ethernet8 # mtu 9100 # speed auto # fec RS # unreliable-los auto # no shutdown # - name: Configure interfaces sonic_interfaces: config: - name: Ethernet32 autoneg_mode: AUTONEG_MODE_MSA state: merged # # After state: # ------------- # # show interface status # -------------------------------------------------------------------------------------------------------------------------------------- # Name Description Oper Reason AutoNeg Speed MTU Alternate Name # -------------------------------------------------------------------------------------------------------------------------------------- # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1 # Ethernet8 Ethernet8 down no-transceiver on - 9100 Eth1/2 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # description Ethernet8 # mtu 9100 # speed auto MSA # fec RS # unreliable-los auto # no shutdown # # Using "replaced" state for MSA/BAM config # # Before state: # ------------- # # show interface status # -------------------------------------------------------------------------------------------------------------------------------------- # Name Description Oper Reason AutoNeg Speed MTU Alternate Name # -------------------------------------------------------------------------------------------------------------------------------------- # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1 # Ethernet8 Ethernet8 down admin-down on - 9100 Eth1/2 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # description Ethernet8 # mtu 9100 # speed auto MSA # fec RS # unreliable-los auto # shutdown # - name: configure interface sonic_interfaces: config: - name: Ethernet8 description: 'Ethernet eight' state: replaced # # After state: # ------------- # # show interface status # -------------------------------------------------------------------------------------------------------------------------------------- # Name Description Oper Reason AutoNeg Speed MTU Alternate Name # -------------------------------------------------------------------------------------------------------------------------------------- # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1 # Ethernet8 Ethernet eight down admin-down off 800000 9100 Eth1/2 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # description "Ethernet eight" # mtu 9100 # speed 800000 # fec RS # unreliable-los auto # shutdown # # Using "replaced" state for MSA/BAM config # # Before state: # ------------- # # show interface status # -------------------------------------------------------------------------------------------------------------------------------------- # Name Description Oper Reason AutoNeg Speed MTU Alternate Name # -------------------------------------------------------------------------------------------------------------------------------------- # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1 # Ethernet8 Ethernet8 down admin-down off 800000 9100 Eth1/2 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # description Ethernet8 # mtu 9100 # speed 800000 # fec AUTO # unreliable-los auto # shutdown # - name: configure interface sonic_interfaces: config: - name: Ethernet8 auto_negotiate: true autoneg_mode: AUTONEG_MODE_MSA state: replaced # # After state: # ------------- # show interface status # -------------------------------------------------------------------------------------------------------------------------------------- # Name Description Oper Reason AutoNeg Speed MTU Alternate Name # -------------------------------------------------------------------------------------------------------------------------------------- # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1 # Ethernet8 - down admin-down on - 9100 Eth1/2 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3 # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # mtu 9100 # speed auto MSA # fec RS # unreliable-los auto # shutdown # # Using "overridden" state for MSA/BAM config # # Before state: # ------------- # show interface status # -------------------------------------------------------------------------------------------------------------------------------------- # Name Description Oper Reason AutoNeg Speed MTU Alternate Name # -------------------------------------------------------------------------------------------------------------------------------------- # Ethernet0 Ethernet0 down admin-down on - 5432 Eth1/1 # Ethernet8 Ethernet8 down no-transceiver on - 4532 Eth1/2 # Ethernet16 - down admin-down off 800000 9100 Eth1/3 # # show running-configuration interface Ethernet 0 # ! # interface Ethernet0 # description Ethernet0 # mtu 5432 # speed auto MSA # fec RS # unreliable-los auto # shutdown # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # description Ethernet8 # mtu 4532 # speed auto MSA # fec RS # unreliable-los auto # no shutdown # - name: configure interface dellemc.enterprise_sonic.sonic_interfaces: config: - name: Ethernet8 description: 'Ethernet eight' state: overridden # # After state: # ------------- # show interface status # -------------------------------------------------------------------------------------------------------------------------------------- # Name Description Oper Reason AutoNeg Speed MTU Alternate Name # -------------------------------------------------------------------------------------------------------------------------------------- # Ethernet0 - down admin-down off 800000 9100 Eth1/1 # Ethernet8 Ethernet eight down admin-down off 800000 9100 Eth1/2 # Ethernet16 - down admin-down off 800000 9100 Eth1/3 # # show running-configuration interface Ethernet 0 # ! # interface Ethernet0 # mtu 9100 # speed 800000 # fec RS # unreliable-los auto # shutdown # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # description "Ethernet eight" # mtu 9100 # speed 800000 # fec RS # unreliable-los auto # shutdown # sonic# # # Using "overridden" state for MSA/BAM config # # Before state: # ------------- # show interface status # -------------------------------------------------------------------------------------------------------------------------------------- # Name Description Oper Reason AutoNeg Speed MTU Alternate Name # -------------------------------------------------------------------------------------------------------------------------------------- # Ethernet0 Ethernet0 down admin-down off 400000 5432 Eth1/1 # Ethernet8 Ethernet eight down no-transceiver off 800000 4352 Eth1/2 # Ethernet16 - down admin-down off 800000 9100 Eth1/3 # # show running-configuration interface Ethernet 0 # ! # interface Ethernet0 # description Ethernet0 # mtu 5432 # speed 400000 # fec RS # unreliable-los auto # shutdown # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # description "Ethernet eight" # mtu 4352 # speed 800000 # fec RS # unreliable-los auto # no shutdown - name: configure interface sonic_interfaces: config: - name: Ethernet8 auto_negotiate: true autoneg_mode: AUTONEG_MODE_MSA state: overridden # # After state: # ------------- # show interface status # -------------------------------------------------------------------------------------------------------------------------------------- # Name Description Oper Reason AutoNeg Speed MTU Alternate Name # -------------------------------------------------------------------------------------------------------------------------------------- # Ethernet0 - down admin-down off 800000 9100 Eth1/1 # Ethernet8 - down admin-down on - 9100 Eth1/2 # Ethernet16 - down admin-down off 800000 9100 Eth1/3 # # show running-configuration interface Ethernet 0 # ! # interface Ethernet0 # mtu 9100 # speed 800000 # fec RS # unreliable-los auto # shutdown # # show running-configuration interface Ethernet 8 # ! # interface Ethernet8 # mtu 9100 # speed auto MSA # fec RS # unreliable-los auto # shutdown Return Values ------------- Common return values are documented `here `_, the following are the fields unique to this module: .. raw:: html
Key Returned Description
after
list
when changed
The resulting configuration module invocation.

Sample:
The configuration returned is always in the same format as the parameters above.
before
list
always
The configuration prior to the module invocation.

Sample:
The configuration returned is always in the same format as the parameters above.
commands
list
always
The set of commands pushed to the remote device.

Sample:
['command 1', 'command 2', 'command 3']


Status ------ Authors ~~~~~~~ - Niraimadaiselvam M(@niraimadaiselvamm)