Overview
This article provides information regarding the CLI command interface
which is used to configure the interface address and other IP networking settings.
Information
- {}: Options are enclosed in braces and are separated by '|'
- []: Optional keywords are enclosed in brackets
- <>: User input is required where variables are enclosed in greater-than and less-than symbols
The table below details all the commands which are used for the configuration of an interface. It also details commands which can be used for viewing the interface configuration.
Action Description | Command | Parameter Description |
To add or remove an IPv4 address and netmask for the specified interface | [no] interface <inf> ip address <IPv4 addr> <netmask> |
netmask - Specify the netmask as dotted quad format (e.g., 255.255.255.0) or as a netmask length after a slash (e.g.,/24) |
To enable IPv6 on the specified interface |
[no] interface <inf> ipv6 enable |
Not Applicable |
To add or remove an IPv6 address for the specified interface |
[no] interface <inf> ipv6 address <IPv6 addr>/<len> |
<IPv6 addr>/<len> - e.g. 2001:db8:1234::5678/64 |
To enable IPv6 stateless address autoconfiguration (SLAAC) on the specified interface |
[no] interface <inf> ipv6 address autoconfig [default | privacy] |
|
To enable DHCP on the specified interface |
interface <inf> dhcp |
Not Applicable |
To renew DHCP on the specified interface |
interface <inf> dhcp renew |
Not Applicable |
To configure an IPv4 alias on the specified interface |
interface <inf> alias <alias index> ip <IPv4 addr> |
Not Applicable |
To add a comment to the specified interface |
interface <inf> comment <comment> |
Not Applicable |
To configure the duplex of the specified interface |
interface <inf> duplex {half|full|auto} |
Not Applicable |
To configure the speed of this interface |
interface <inf> speed {10|100|1000|auto} |
Not Applicable |
To configure the MTU of this interface | interface <inf> mtu <mtu> |
Not Applicable |
To disable the specified interface | interface <inf> shutdown |
Not Applicable |
To display information about the running state for the interfaces | show interfaces [<inf>] [brief] |
|
To display the current configuration for all interfaces |
show interfaces configured |
Not Applicable |
To display a summary of the running state for all interfaces, including bridge and role information |
show interfaces summary |
Not Applicable |
Example
Set the speed and duplex interface settings for eth2.
interface eth2 speed 100
interface eth2 duplex full
Notes
- To set global IP network settings (e.g., default gateway) use the IP command.
- To configure a role for an interface (e.g., Cluster, Mirror or WCCP) use associated role command (cluster, mirror or wccp)
- To configure bridge settings, use the bridge command.
Find more CLI commands.
Priyanka Bhotika
Comments