HP-UX Reference (11i v1 05/09) - 1M System Administration Commands A-M (vol 3)

i
ifconfig(1M) ifconfig(1M)
NAME
ifconfig - configure network interface parameters
SYNOPSIS
ifconfig 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.
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:
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 parame-
ters 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 inter-
face. 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.
broadcast (inet only) Specify the address that represents broadcasts to the net-
work. The default broadcast address is the address with a host part
of all 1’s.
metric n Set the routing metric of the interface to n. The default is 0. The
routing metric is used by the routing protocol (see gated(1M)).
Higher metrics have the effect of making a route less favorable;
metrics are counted as additional hops to the destination network or
host.
netmask mask
(inet only) Specify how much of the address to reserve for subdivid-
ing networks into sub-networks or aggregating networks into super-
nets. mask can be specified as a single hexadecimal number with a
HP-UX 11i Version 1: September 2005 1 Hewlett-Packard Company Section 1M347