Skip to main content

ifconfig command

Use this command to configure the Ethernet interface.

Use the ifconfig eth0 command to configure the Ethernet port1 interface and ifconfig eth1 command to configure the Ethernet port2 interface. Type ifconfig eth0 to display the current Ethernet port1 interface configuration and ifconfig eth1 to display the current Ethernet port2 interface configuration. To change the Ethernet interface configuration, type the options, followed by the values.

If Auto Negotiate mode is true (recommended), the data rate and duplex mode will be displayed as auto. The data rate and duplex mode are only used when Auto Negotiate is false.

If IPv6 is enabled, the link-local address link_local_address (-lla) is also displayed. If IPv6 and stateless auto-configuration (-sa6) are both enabled, the Stateless auto-config IP Addresses / Prefix Length address_table (table listing auto-generated IPv6 addresses and their prefix lengths) is also displayed.

If ghn is enabled and the configuration method is dhcp or dthens, the hostname will get from DHCP.

Syntax:
ifconfig [ethernet_number] [-options]
Example:
dhcpinfo eth1 -b
Table 1. ifconfig options
OptionDescriptionValues
-stateInterface statedisabled, enabled
-cConfiguration methoddhcp, static, dthens (dthens corresponds to the try dhcp server, if it fails use static config option on the web interface)
-ghnObtain hostname from DHCPdisabled, enabled
-iStatic IP addressAddress in valid format. Must be associated with subnet mas.
-gGateway addressAddress in valid format.
-sSubnet maskAddress in valid format. Must associated with P address.
-nHost nameString of up to 63 characters. The string can include letters, digits, periods, underscores, and hyphens.
-autoAutonegotiation setting, which determines whether the Data rate and Duplex network settings are configurabletrue, false
-vlanEnable or disable the VLAN taggingenabled, disabled
-vlanidVLAN IDNumeric value between 1 and 4094.
-rData rate10, 100
-dDuplex modefull, half
-mMTUNumeric between 60 and 1500.
-lLAAMAC address format. Multicast addresses are not allowed (the first byte must be even).
-bBurned-in MAC Address (read only) 
-dnDomain name (read only) 
-ipv6IPv6 statedisabled, enabled
-ipv6staticStatic IPv6 statedisabled, enabled
-i6Static IP addressStatic IP address for Ethernet channel 0 in IPv6 format.
-p6Address prefix lengthNumeric value between 1 and 128.
-g6IPv6 static default gatewayIP address for the gateway or default route for Ethernet channel 0 in IPv6.
-dhcp6IPv6 DHCP modeenabled, disabled
-sa6IPv6 Stateless modeenabled, disabled
-llaLink-local address (read only) 
-ncsiNCSI NIC port selectionnic[x]:port[y]
Note
Use comma as the delimiter if there are two or more settings.
-nicSwitch NIC modeshared, dedicated, shared:nic[x]
-failoverFailover modenone, shared, shared:nic[X]:port[Y]
-nssyncNetwork setting synchronizationenabled, disabled
-address_tableTable of automatically-generated IPv6 addresses and their prefix lengths (read only)
Note
The option is visible only if IPv6 and stateless auto-configuration are enabled.
 
-uplinkUplink MACenabled, disabled
Note
  • This option is only available when daisy switch is present.

  • XCC will reboot momentarily when uplink MAC is enabled or disabled.

If the daisy switch is not present.

Example:
system> ifconfig eth0
-state : enabled
-c : dthens
-ghn : disabled
-i : 192.168.70.130
-g : 1.1.1.1
-s : 255.255.255.0
-n : XCC-7DDJ-1234567890
-auto : false
-vlan : disabled
-vlanid : 1
-r : 1000
-d : full
-m : 1488
-l : 38:a7:46:26:37:09
-b : 38:A7:46:26:37:09
-dn :
-ipv6 : enabled
-ipv6static : disabled
-i6 : ::
-p6 : 64
-g6 : ::
-dhcp6 : enabled
-sa6 : enabled
-lla : fe80::3aa7:46ff:fe26:3709
-ncsi :
nic2 : port 0
-nic : dedicated
nic1 : dedicated [active]
nic2 : slot#1, packagID#7:Intel I210 PCIe 1Gb 1-Port RJ45 LOM:port [0-0]
-failover : none
-nssync : disabled
-address_table :

If the daisy switch is present and disabled.

Example:
system> ifconfig eth0
-state : enabled
-c : dthens
-ghn : disabled
-i : 192.168.70.125
-g : 0.0.0.0
-s : 255.255.255.0
-n : XCC-7D72-SH2311M5
-auto : true
-r : auto
-d : auto
-vlan : disabled
-vlanid : 1
-m : 1500
-b : 90:2e:16:0a:17:bd
-l : 90:2e:16:0a:17:bd
-dn : lan
-ipv6 : enabled
-ipv6static : disabled
-i6 : ::
-p6 : 64
-g6 : ::
-dhcp6 : enabled
-sa6 : enabled
-lla : fe80::922e:16ff:fe0a:17bd
-address_table :
-ip01 : fd45:29e9:1f0:70:922e:16ff:fe0a:17bd/64
-ip02 : 2340::922e:16ff:fe0a:17bd/64
-uplink : disabled

If the daisy switch is present and enabled.

Example:
system> ifconfig eth0
-state : enabled
-c : dthens
-ghn : disabled
-i : 192.168.70.125
-g : 0.0.0.0
-s : 255.255.255.0
-n : XCC-7D72-SH2311M5
-auto : false
-r : 100
-d : full
-vlan : disabled
-vlanid : 1
-m : 1500
-b : 90:2e:16:0a:17:bd
-l : 90:2e:16:0a:17:bd
-dn : lan
-ipv6 : enabled
-ipv6static : disabled
-i6 : ::
-p6 : 64
-g6 : ::
-dhcp6 : enabled
-sa6 : enabled
-lla : fe80::922e:16ff:fe0a:17bd
-address_table :
-ip01 : fd45:29e9:1f0:70:922e:16ff:fe0a:17bd/64
-ip02 : 2340::922e:16ff:fe0a:17bd/64
-uplink : enabled