ifconfig(1M) ifconfig(1M)
ifconfig - configure network interface parameters
/usr/etc/ifconfig [ -v ] interface address_family [ address [ dest_address ] ]
[ parameters ]
/usr/etc/ifconfig interface [ protocol_family ]
/usr/etc/ifconfig [ -v ] -a
ifconfig is used to assign an address to a network interface and/or
configure network interface parameters. ifconfig is invoked at boot time
from /etc/init.d/network to define the network address of each interface
present on a machine; you can also use it once the system is up to
redefine an interface's address or other operating parameters. The
interface parameter is a string of the form ``name unit'', for example,
enp0. Using the -a option shows status for all interfaces on the
machine.
If specified, the -v option causes additional information about specified
interfaces to be displayed, including speed.
Since an interface can receive transmissions in differing protocols, each
of which may require separate naming schemes, it is necessary to specify
the address_family, which can change the interpretation of the remaining
parameters. Currently, just the ``inet'' address family is supported.
For the Internet family, the address is either an Internet address
expressed in the Internet standard ``dot notation'' (see inet(3N)), or a
hostname present in the hosts(4) file, /etc/hosts. (Other hosts
databases, such as named and NIS, are ignored.)
Only the superuser can modify the configuration of a network interface.
The following 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
automatically when setting the first address on an
interface. If the interface was reset when previously
marked down, the hardware is reinitialized.
down Mark an interface down. When an interface is marked down,
the system does not attempt to transmit messages through
that interface. If possible, the interface is reset to
disable reception as well. This action does not
automatically disable routes using the interface.
arp Enable the use of the Address Resolution Protocol in
mapping between network level addresses and link level
addresses (default). It is used by a variety of data link
network interfaces such as Ethernet.
Page 1
ifconfig(1M) ifconfig(1M)
-arp Disable the use of the Address Resolution Protocol.
alias addr Establish an additional network address for this
interface. This can be useful in permitting a single
physical interface to accept packets addressed to several
different addresses such as when you are changing network
numbers and you wish to accept packets addressed to the
old interface. Another case is when you'd like to have
multiple addresses assigned to a single network interface.
The broadcast and netmask options can also be used in
conjunction with the alias option. When using aliases you
may have to change the configuration of routed, especially
if aliases are on different networks than the primary
address. Aliases are added as host entries in the routing
tables for routed. See routed(1M) for more information on
this.
-alias|delete addr
Deletes a previously added alias.
metric n Set the routing metric of the interface to n, default 0.
The routing metric is used by the routing protocol
(routed). Higher metrics have the effect of making a
route less favorable; metrics are counted as addition hops
to the destination network or host.
netmask mask 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 hexadecimal 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 that 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.
mtu n Specify device maximum transmission unit value. This may
not be supported on all devices. Currently, this may be
used to lower ethernet MTU's below 1500 bytes to
interoperate with buggy adapters and network hardware.
broadcast addr 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.
dest_addr Specify the address of the correspondent on the other end
of a point-to-point link.
Page 2
ifconfig(1M) ifconfig(1M)
debug Enable driver-dependent debugging code; usually, this
turns on extra console error logging.
-debug Disable driver-dependent debugging code.
highbw Flag an interface as being a high-bandwidth interface.
This acts as a hint which allows upper layer protocols to
adjust their behaviour to optimise performance (e.g. TCP
will be less aggressive with ACKing).
-highbw Remove the high-bandwidth flag from an interface.
link{0,1,2} Enable driver-specific feature 0-2.
-link{0,1,2} Disable driver-specific feature 0-2.
primary This parameter makes the specified interface the primary
interface for networking. In cases where no interface or
interface address is specified by an application, the
'primary' interface will be preferred.
rspace value Specifies the default receive space used by TCP when
communicating over the interface. Use a value of 0 to
clear this parameter and use the system-wide default.
sspace value Specifies the default send space used by TCP when
communicating over the interface. Use a value of 0 to
clear this parameter and use the system-wide default.
ifconfig displays the current configuration for a network interface when
no optional parameters are supplied. If a protocol family is specified,
ifconfig reports only the details specific to that protocol family.
Network interfaces on Silicon Graphics systems can only receive and not
send packets that use ``trailer'' link-level encapsulation. Therefore,
ifconfig does not accept the trailers parameter.
For 100baseTX interfaces, such as 'ef', LINK0 being set indicates that
the device is operating at full-duplex. It is not currently possible to
force full- or half-duplex by setting or clearing this flag.
Currently options such as 'metric' are not handled for IP aliases;
adjusting the metric will affect only the primary address. 'broadcast'
and 'netmask' are the only options currently known to work properly with
IP aliases.
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.
Page 3
ifconfig(1M) ifconfig(1M)
/etc/hosts host-address database
/etc/config/ifconfig-?.options site-specific options (1 file per
interface)
/etc/config/ipaliases.options interface-specific ip alias addresses
netstat(1), network(1M).
PPPPaaaaggggeeee 4444 [ Back ]
|