HP-UX Reference (11i v3 07/02) - 1M System Administration Commands A-M (vol 3)

i
ifconfig(1M) ifconfig(1M)
NAME
ifconfig - configure network interface parameters
SYNOPSIS
ifconfig [-m mod1[,mod2]...] interface [address_family][address[dest_address]] [parameters]
ifconfig interface [address_family]
DESCRIPTION
The first form of the
ifconfig command assigns an address to a network interface and/or configures net-
work interface parameters.
ifconfig must be used at boot time to define the network address of each
interface present on a machine. It can also be used at other times to redefine an interface’s address or
other operating parameters. If the address_family is not specified, the address family defaults to IPv4.
The second form of the command, without address_family, displays the current configuration for interface.
If address_family is not specified,
ifconfig reports the details on all supported address families. An
exception is when the user has not configured any interface with an IPv6 address,
ifconfig does not
display the IPv6 loopback interface.
Only a user with appropriate privileges can modify the configuration of a network interface. All users can
run the second form of the command.
Arguments
ifconfig recognizes the following arguments:
-m mod1[,mod2]...
A list of modules that can be pushed on a stream associated with an interface. The
-m
option can be used to configure an interface manually with the specified module names.
There is no space between the module names and only a comma is used to separate the
module names. If the -m option is specified, ifconfig pushes all modules on the stream
associated with the interface in the specified order. For example, module mod2 is pushed
on top of module mod1. The modules are pushed between IP and network drivers. If the
-m option is not specified, the modules (if any) specified in the
DEFAULT_INTERFACE_MODULES variable are used for configuring the interface (see
netconf and netconf-ipv6 in /etc/rc.config.d/
).
address Either a host name present in the host name database (see hosts(4)), or a DARPA Internet
address expressed in Internet standard dot notation (see inet(3N)) for an IPv4 address and
in colon notation (see inet6(3N)) for an IPv6 address.
address_family
Name of protocol on which naming scheme is based. An interface can receive transmissions
in differing protocols, each of which may require separate naming schemes. The
address_family, affects the interpretation of the remaining parameters on the command
line. The only address families currently supported are
inet (DARPA-Internet family) for
IPv4 addresses, and inet6 for IPv6 addresses.
dest_address Address of destination system. Consists of either a host name present in the host name
database (see hosts(4)), or a DARPA Internet address expressed in Internet standard dot
notation (see inet(3N)) for an IPv4 address, and in colon notation (see inet6(3N)) for an IPv6
address.
interface A string of the form name unit, such as lan0. (See the Interface Naming subsection given
below.)
parameters One or more of the following operating parameters:
up Mark an interface "up". Enables interface after an ifconfig down.
Occurs automatically when setting the address on an interface. Setting
this flag has no effect if the hardware is "down". A secondary interface (see
the Interface Naming subsection given below) can be marked up only if the
primary interface is already up.
down Mark an interface "down". When an interface is marked "down", the system
will not attempt to transmit messages through that interface. A primary
interface (see the Interface Naming subsection given below) can be marked
down only if all the secondary interfaces on the same physical device are
already down.
326 Hewlett-Packard Company 1 HP-UX 11i Version 3: February 2007