ifconfig
Use the "ifconfig" command to display and configure IP addresses, subnet masks, or broadcast addresses using TCP/IP. Also use this command to display default gateway addresses using TCP/IP.
To get the above addresses, contact your network administrator. Use the default configuration if you cannot obtain setting addresses.
View settings
msh> ifconfig
IPv4 configuration
msh> ifconfig "interface_name" "address"
If you did not enter an interface name, it is automatically set to the Ethernet interface.
wlan can be specified only when the optional wireless LAN board is installed.
Interface name | Interface configured |
---|---|
ether | Ethernet Interface |
wlan | Wireless LAN interface |
The following explains how to configure an IPv4 address 192.168.15.16 on the Ethernet interface.
msh> ifconfig ether 192.168.15.16
IPv6 configuration
msh> ifconfig "interface_name" inet6 "address" "prefixlen[1–128]"
The following explains how to configure an IPv6 address to 2001:DB8::100 with a prefix length of 64 on the Ethernet interface.
msh> ifconfig ether inet6 2001:DB8::100 64
Netmask configuration
msh> ifconfig "interface_name" netmask "address"
The following explains how to configure a subnet mask 255.255.255.0 on the Ethernet interface.
msh> ifconfig ether netmask 255.255.255.0
Broadcast address configuration
msh> ifconfig "interface_name" broadcast "address"
Changing the interface
msh> ifconfig "interface" up
When using the optional wireless LAN board, you can specify either an Ethernet or wireless LAN interface.
The IP address, subnet mask and broadcast address are the same as those for the Ethernet interface and wireless LAN interface.
TCP/IP configuration is the same for both the Ethernet and wireless LAN interface. If interfaces are changed, the new interface inherits the configuration.
Use "0x" as the initial two letters of a hexadecimal address.