ifconfig(1M) ifconfig(1M)
NAME
ifconfig - configure network interface parameters
SYNOPSIS
ifconfig interface [addressfamily] [address [destaddress]]
[parameters] [netmask mask] [broadcast address] [metric n]
[mtu n]
ifconfig interface [protocolfamily]
ifconfig virtual-interface [protocolfamily] alias interface address
[parameters]
ifconfig virtual-interface delete
DESCRIPTION
ifconfig is used to assign an address to a network interface and/or to
configure network interface parameters. ifconfig must be used at boot
time to define the network address of each interface present on a
machine; it may also be used at a later time to redefine an inter-
face's address or other operating parameters. Used without options,
ifconfig displays the current configuration for a network interface.
You can, for example, only specify inet as a protocol family. Only the
superuser may modify the configuration of a network interface.
Since an interface may receive packages from differing protocols, each
of which may require separate naming schemes, the parameters and
addresses are interpreted according to the rules of some address fam-
ily, specified by the addressfamily parameter. The address families
currently supported are mac, ether and inet. The address families mac
and ether refer to the same address family. If no address family is
specified, inet is assumed.
For the DARPA Internet family (inet), the address is either a host
name present in the host name database [see hosts(4)], or a DARPA
Internet address expressed in the Internet standard dot notation. Typ-
ically, an Internet address specified in dot notation will consist of
your system's network number and the machine's unique host number. A
typical Internet address is 192.9.200.44, where 192.9.200 is the net-
work number and 44 is the machine's host number.
If the destaddress parameter is supplied in addition to the address
parameter, it specifies the address of the correspondent on the other
end of a point to point link.
OPTIONS
The following options and parameters can be set with ifconfig:
up Mark an interface "up". This can be used to enable an
interface after an "ifconfig down." It happens automati-
cally when setting the first address on an interface.
Page 1 Reliant UNIX 5.44 Printed 11/98
ifconfig(1M) ifconfig(1M)
down Mark an interface "down". When an interface is marked
"down", the system will not attempt to transmit packages
through that interface. If possible, the interface will
be reset to disable reception as well. This action does
not automatically disable routes using the interface.
trailers (inet only) Enable the use of a "trailer" link level
encapsulation when sending. If a network interface sup-
ports trailer encapsulation, the system will, when pos-
sible, encapsulate outgoing messages in a manner which
minimizes the number of memory to memory copy operations
performed by the receiver. This feature is machine-
dependent, and therefore not recommended. On networks
that support the Address Resolution Protocol [see
arp(7)], this flag indicates that the system should
request that other systems use trailer encapsulation
when sending to this host. Similarly, trailer encapsula-
tions will be used when sending to other hosts that have
made such requests. This parameter is not supported by
Reliant UNIX systems.
-trailers Disable the use of a "trailer" link level encapsulation.
arp Enable the use of the Address Resolution Protocol in
mapping between network level addresses and link level
addresses (default).
-arp Disable the use of the Address Resolution Protocol.
metric n Set the routing metric of the interface to n, default 0.
The routing metric is used by the routing protocol [see
routed(1M)]. Higher metrics have the effect of making a
route less favorable; metrics are interpreted as addi-
tion hops to the destination network or system.
mtu n Set the logical maximum transmission unit (MTU) of the
interface to n. The MTU is the largest amount of data
that can be sent in one packet. Generally this won't be
changed because the driver for the interface already
knows the physical MTU. The main purpose of the option
is to artificially lower the MTU for special situations
such as bridges between networks with different physical
MTU values. Setting the value above the physical MTU or
to an unreasonably small value will probably cause the
network software to fail. The physical MTU for Ethernet
interfaces is 1500, for FDDI interfaces it is 4096, and
for the loopback interface it is 2048.
multicast Set the IFFMULTICAST flag for the given interface and
mark the interface as multicast capable.
-multicast Reset the IFFMULTICAST flag for the given interface.
Page 2 Reliant UNIX 5.44 Printed 11/98
ifconfig(1M) ifconfig(1M)
netmask mask (inet only) Specify how much of the address to reserve
for subdividing networks into subnetworks. The mask
includes the network part of the local address and the
subnet part, which is taken from the host field of the
address. The mask can be specified as a single hexade-
cimal number with a leading 0x, with a dot-notation
Internet address, or with a pseudo-network name listed
in the network table networks(4). The mask contains 1's
for the bit positions in the 32-bit address which are to
be used for the network and subnet parts, and 0's for
the host part. The mask should contain at least the
standard network portion, and the subnet field should be
contiguous with the network portion.
broadcast address
(inet only) Specify the address to use to represent
broadcasts to the network. The default broadcast address
is the address with a host part of all 1's.
VIRTUAL INTERFACES
For the inet family it is possible to create virtual interfaces as an
alias for an existing interface. This is done with the command
ifconfig virtual-interface [inet] alias interface address [parameters]
The virtual interface is assigned the name virtual-interface and its
own address. Additional parameters such as netmask and broadcast can
be specified. Once such a virtual interface has been created it is
fully functional and may be reconfigured with ifconfig. The system
will respond to ARP requests for the address of the virtual interface
if it is UP and was not configured with the -arp parameter.
To delete a virtual interface the command
ifconfig virtual-interface delete
may be used.
Restrictions:
The original interface that is aliased must be configured and UP. It
must not be a virtual interface.
Aliased interfaces are not complete IP interfaces. There are no
separate interface statistics available for an aliased interface, the
statistics are recorded in the counters of the original interface.
The netstat -i command displays the alias interfaces under the name of
the original interface as well as their statistics. The "Network" and
"Address" columns show the values used in the configuration of the
alias interfaces.
Page 3 Reliant UNIX 5.44 Printed 11/98
ifconfig(1M) ifconfig(1M)
The netstat -p command lists all alias interfaces under their real
names.
Aliases are recognized by having the ALI flag set.
When a (real) interface is deleted, all interfaces that are an alias
of that real interface are deleted as well.
EXAMPLES
If your computer is not attached to an Ethernet, the lce0 interface
(e.g. on an RM600) should be marked "down" as follows:
ifconfig lce0 down
To print out the addressing information for one interface, use
ifconfig lce0
Output:
lce0: flags=23<UP,BROADCAST,NOTRAILERS>
inet 129.103.171.4 netmask ffffff00 broadcast 129.103.171.255
To create a virtual interface lce0:1 as an alias to interface lce0
with the new IP address 129.104.131.7, use
ifconfig lce0:1 alias lce0 129.104.131.7 netmask 0xffffff00
The parameters of the virtual interface may be viewed with the command
ifconfig lce0:1. The output would be
lce0:1: flags=23<UP,BROADCAST,NOTRAILERS>
inet 129.104.131.7 netmask ffffff00 broadcast 129.104.131.255
To delete the virtual interface, use
ifconfig lce0:1 delete
DIAGNOSTICS
Messages indicating the specified interface does not exist, the
requested address is unknown, or the user is not privileged and tried
to alter an interface's configuration.
FILES
/dev/ip
SEE ALSO
netstat(1M), routed(1M), hosts(4), networks(4), arp(7).
Page 4 Reliant UNIX 5.44 Printed 11/98