ifconfig — Network device configuration and selection
ifconfig [-a] [-s] [--help] [--version] {interface} [address] [netmask{address}] [gateway{address}] [tftpserver{address}
] [[up] | [down]]
-aDisplays information about all available interfaces
-sChanges output to short format
--helpDisplay commands syntax then exits
--versionDisplays commands version then exits
addressAddress to assign to interface e.g. 192.168.7.101
interfaceName e.g. ne0 or de0 unless -a is used
netmaskNetmask to assign to interface e.g. 255.255.255.0
gatewayDefault gateway to assign to interface e.g. 192.168.7.1
tftpserverTFTP server address to use e.g. 192.168.7.10
upSelects the interface as operational and the default.
downDisables the interface.
This command allows network interfaces to be manually configured and different interfaces to be selected.
Normally ABLE will use DHCP on the default interface
when retrieving files over tftp, the default interface may be
changed with this command by using just
the up flag (see Example 11.1, “Using the ifconfig
command to select default interface”)
By using the other parameters the interface may be configured with IPv4 addresses. Configuring in this way removes the requirement of using a DHCP server.
Example 11.1. Using the ifconfig command to select default interface
>ifconfig -a dm0 HWaddr 00:01:3d:20:20:20 ne0 HWaddr 00:01:3d:ff:ff:00 >ifconfig dm0 up looking for net.dm0 net.dm0:selected as boot interface >ifconfig ne0 up looking for net.ne0 net.ne0:selected as boot interface >
Example 11.2. Using the ifconfig command to configure a fixed address
This example shows the first davicom interface (dm0) being configured with the IP protocol address 192.168.7.101 with a netmast of 255.255.255.0 and to use the tftpserver 192.168.7.10 no default gateway has been specified.
>ifconfig dm0 192.168.7.101 netmask 255.255.255.0 tftpserver 192.168.7.10 up looking for net.dm0 net.dm0:selected as boot interface >