ifconfig command

Name

ifconfig — Network device configuration and selection

Synopsis

ifconfig [-a] [-s] [--help] [--version] {interface} [address] [netmask{address}] [gateway{address}] [tftpserver{address} ] [[up] | [down]]

Options

-a

Displays information about all available interfaces

-s

Changes output to short format

--help

Display commands syntax then exits

--version

Displays commands version then exits

address

Address to assign to interface e.g. 192.168.7.101

interface

Name e.g. ne0 or de0 unless -a is used

netmask

Netmask to assign to interface e.g. 255.255.255.0

gateway

Default gateway to assign to interface e.g. 192.168.7.1

tftpserver

TFTP server address to use e.g. 192.168.7.10

up

Selects the interface as operational and the default.

down

Disables the interface.

Description

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 53, “Using the ifconfigcommand 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 53. 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 54. 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 >

bron: http://www.simtec.co.uk/products/SWABLE/files/able-set/command_ifconfig.html