Interface
This chapter describes the commands that configure and monitor the network interface.
interface {eth0 | eth1 | eth2 | eth3 | ib0 | ib1 | bond0} Enters a network interface context. |
||
Syntax Description |
eth0 |
Management port 0 (out of band) |
eth1 |
Management port 1 (out of band) |
|
eth2 |
Management port 2 (out of band) |
|
eth3 |
Management port 3 (out of band) |
|
ib0 |
InfiniBand interface 0 (part of bond0) |
|
ib1 |
InfiniBand interface 1 (part of bond0) |
|
bond0 |
IP-over-IB bonded interface which consist of ib0 and ib1 |
|
Default |
N/A |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show interfaces |
|
Notes |
ip address <IP address> <netmask> no ip address Sets the IP address and netmask of this interface. The no form of the command clears the IP address and netmask of this interface. |
||
Syntax Description |
IP address |
IPv4 address |
netmask |
Subnet mask of IP address |
|
Default |
0.0.0.0/0 |
|
Configuration Mode |
config interface |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
interface show interfaces |
|
Notes |
If DHCP is enabled on the specified interface, then the DHCP IP assignment will hold until DHCP is disabled |
alias <index> ip address < IP address> <netmask> no alias <index> Adds an additional IP address to the specified interface. The secondary address will appear in the output of “show interface” under the data of the primary interface along with the alias. The no form of the command removes the secondary address to the specified interface. |
||
Syntax Description |
alias |
A number to be associated with the secondary IP |
IP address |
IPv4 address |
|
netmask |
Subnet mask of IP address |
|
Default |
N/A |
|
Configuration Mode |
config interface |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
interface show interfaces |
|
Notes |
|
mtu <size> no mtu Sets the maximum transmission unit (MTU) size for this interface in bytes. The no form of the command resets the MTU to its default. |
||
Syntax Description |
bytes |
Range: 65-1500 [bytes] |
Default |
N/A |
|
Configuration Mode |
config interface |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
interface show interfaces <if-name> |
|
Notes |
duplex <duplex> no duplex Sets the duplex mode of the interface. The no form of the command resets the duplex setting to its default value. |
||
Syntax Description |
duplex |
|
Default |
auto |
|
Configuration Mode |
config interface |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
interface show interfaces <if-name> |
|
Notes |
|
speed <speed> no speed Sets interface speed in Mbps. The no form of the command resets the speed setting to its default value. |
||
Syntax Description |
speed |
|
Default |
auto |
|
Configuration Mode |
config interface |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
interface show interfaces <if-name> |
|
Notes |
|
dhcp [renew] no dhcp Enables DHCP on the specified interface. The no form of the command disables DHCP on the specified interface. |
||
Syntax Description |
renew |
Forces a renewal of the IP address. A restart on the DHCP client for the specified interface will be issued. |
Default |
Enabled |
|
Configuration Mode |
config interface |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
interface show interfaces <if-name> configured |
|
Notes |
|
zeroconf no zeroconf Enables zeroconf on the specified interface. The no form of the command disables the use of zeroconf on the specified interface. |
||
Syntax Description |
N/A |
|
Default |
Disabled |
|
Configuration Mode |
config interface |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
interface show interfaces <if-name> configured |
|
Notes |
|
shutdown no shutdown Disables the specified interface. The no form of the command enables the specified interface. |
||
Syntax Description |
N/A |
|
Default |
Enabled |
|
Configuration Mode |
config interface |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
interface show interfaces <if-name> configured |
|
Notes |
comment <string> no comment Adds a comment for an interface. The no form of the command removes a comment for an interface. |
||
Syntax Description |
string |
A free-form string that has no semantics other than being displayed when interface records are listed |
Default |
"" |
|
Configuration Mode |
config interface |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
interface show interfaces <if-name> |
|
Notes |
show interfaces <ifname> [configured | brief] Displays information about the specified interface, configuration status, and counters. |
||
Syntax Description |
ifname |
The interface whose data to display (e.g., “eth0”, “eth1”, etc.) |
configured |
Displays interface configuration |
|
brief |
Displays interface configuration and status in brief format |
|
Default |
N/A |
|
Configuration Mode |
Any configuration mode |
|
History |
1.5 |
|
4.1.0 |
Updated output |
|
Example |
|
|
Related Commands |
interface <ifname> ip address <IP address> <netmask> |
|
Notes |
ipv6 enable no ipv6 enable Enables all IPv6 addressing for this interface. The no form of the command disables all IPv6 addressing for this interface. |
||
Syntax Description |
N/A |
|
Default |
Disabled |
|
Configuration Mode |
config interface management |
|
History |
4.1.0 |
|
Example |
|
|
Related Commands |
ipv6 address show interface |
|
Notes |
|
ipv6 address {<IPv6 address>/<netmask> | autoconfig [default | privacy]} no ipv6 {<IPv6 address/netmask> | autoconfig [default | privacy]} Configures IPv6 address and netmask to this interface, static or autoconfig options are possible. The no form of the command removes the given IPv6 address and netmask or disables the autoconfig options. |
||
Syntax Description |
IPv6 address/netmask |
Configures a static IPv6 address and netmask. Format example: 2001:db8:1234::5678/64. |
autoconfig |
Enables IPv6 stateless address auto configuration (SLAAC) for this interface. An address will be automatically added to the interface based on an IPv6 prefix learned from router advertisements, combined with an interface identifier. |
|
autoconfig default |
Enables default learning routes. The default route will be discovered automatically, if the autoconfig is enabled. |
|
autoconfig privacy |
Uses privacy extensions for SLAAC to construct the autoconfig address, if the autoconfig is enabled |
|
Default |
No IP address available, auto config is enabled |
|
Configuration Mode |
config interface management |
|
History |
4.1.0 |
|
Example |
|
|
Related Commands |
ipv6 address show interface |
|
Notes |
|
ipv6 dhcp client enable no ipv6 dhcp client enable Enables DHCPv6 on this interface. The no form of the command disables DHCPv6 on this interface. |
||
Syntax Description |
N/A |
|
Default |
Enabled |
|
Configuration Mode |
config interface management |
|
History |
4.1.0 |
|
Example |
|
|
Related Commands |
ipv6 dhcp client renew show ipv6 dhcp |
|
Notes |
ipv6 dhcp client renew Renews DHCPv6 lease for this interface. |
||
Syntax Description |
N/A |
|
Default |
N/A |
|
Configuration Mode |
config interface management |
|
History |
4.1.0 |
|
Example |
|
|
Related Commands |
ipv6 dhcp client enable show ipv6 dhcp |
|
Notes |