Brings an interface administratively up or down.
By default, all ports on the SLX device are down.
The configuration you set is persisted.
DRC and idempotency are supported.
In SLX-OS, you can use the show interface ethernet command to see the status of the Ethernet interfaces on your device.
This example changes the Admin Status on one IP address.
efa inventory device interface set-admin-state --ip 10.25.225.167 --if-name 0/20-22 --state down +---------------+----+------+----------------+--------------+---------+--------+ | DeviceIP | ID | Name | Interface Type | Admin Status | Result | Reason | +---------------+----+------+----------------+--------------+---------+--------+ | 10.25.225.167 | 9 | 0/21 | ethernet | down | Success | | + +----+------+----------------+--------------+---------+--------+ | | 89 | 0/20 | ethernet | down | Success | | + +----+------+----------------+--------------+---------+--------+ | | 1 | 0/22 | ethernet | down | Success | | +---------------+----+------+----------------+--------------+---------+--------+ Interface Details --- Time Elapsed: 19.5606145s ---
This example attempts to change the Admin Status on two IP addresses, however one IP address is invalid.
efa inventory device interface set-admin-state --ip 10.25.225.167,10.10.10.10 --if-name 0/20-22 --state down +---------------+----+------+----------------+--------------+---------+----------------+ | DeviceIP | ID | Name | Interface Type | Admin Status | Result | Reason +---------------+----+------+----------------+--------------+---------+----------------- | 10.10.10.10 | | | | | Failed | Device does not | | | | | | | exist with IP: 10.10.10.10 +---------------+----+------+----------------+--------------+---------+----------------+ | 10.25.225.167 | 9 | 0/21 | ethernet | down | Success | | + +----+------+----------------+--------------+---------+----------------+ | | 89 | 0/20 | ethernet | down | Success | | + +----+------+----------------+--------------+---------+----------------+ | | 1 | 0/22 | ethernet | down | Success | | +---------------+----+------+----------------+--------------+---------+----------------+ Interface Details --- Time Elapsed: 20.740265s ---
This example changes the Admin State on multiple valid IP addresses.
efa inventory device interface set-admin-state --ip 10.25.225.167,10.24.48.131,10.24.51.135 --if-name 0/20-22 --state up +---------------+-----+------+----------------+--------------+---------+--------+ | DeviceIP | ID | Name | Interface Type | Admin Status | Result | Reason | +---------------+-----+------+----------------+--------------+---------+--------+ | 10.24.48.131 | 110 | 0/21 | ethernet | up | Success | | + +-----+------+----------------+--------------+---------+--------+ | | 142 | 0/20 | ethernet | up | Success | | + +-----+------+----------------+--------------+---------+--------+ | | 148 | 0/22 | ethernet | up | Success | | +---------------+-----+------+----------------+--------------+---------+--------+ | 10.24.51.135 | 16 | 0/21 | ethernet | up | Success | | + +-----+------+----------------+--------------+---------+--------+ | | 48 | 0/22 | ethernet | up | Success | | + +-----+------+----------------+--------------+---------+--------+ | | 86 | 0/20 | ethernet | up | Success | | +---------------+-----+------+----------------+--------------+---------+--------+ | 10.25.225.167 | 9 | 0/21 | ethernet | up | Success | | + +-----+------+----------------+--------------+---------+--------+ | | 89 | 0/20 | ethernet | up | Success | | + +-----+------+----------------+--------------+---------+--------+ | | 1 | 0/22 | ethernet | up | Success | | +---------------+-----+------+----------------+--------------+---------+--------+ Interface Details --- Time Elapsed: 56.4964544s ---This example changes the Admin Status for the specified fabric name.
efa inventory device interface set-admin-state --fabric nc_no_vni --if-name 0/20-22 --state up +--------------+-----+------+----------------+--------------+---------+--------+ | DeviceIP | ID | Name | Interface Type | Admin Status | Result | Reason | +--------------+-----+------+----------------+--------------+---------+--------+ | 10.24.51.135 | 48 | 0/22 | ethernet | up | Success | | + +-----+------+----------------+--------------+---------+--------+ | | 16 | 0/21 | ethernet | up | Success | | + +-----+------+----------------+--------------+---------+--------+ | | 86 | 0/20 | ethernet | up | Success | | +--------------+-----+------+----------------+--------------+---------+--------+ | 10.24.48.131 | 148 | 0/22 | ethernet | up | Success | | + +-----+------+----------------+--------------+---------+--------+ | | 142 | 0/20 | ethernet | up | Success | | + +-----+------+----------------+--------------+---------+--------+ | | 110 | 0/21 | ethernet | up | Success | | +--------------+-----+------+----------------+--------------+---------+--------+ Interface Details --- Time Elapsed: 37.9236481s ---