ifconfig(1M)
NAME
ifconfig − configure network interface parameters
SYNOPSIS
ifconfig interface address_family [address [dest_address]] [parameters]
ifconfig interface [address_family]
DESCRIPTION
ifconfig is used to assign an address to a network interface and/or configure network 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.
Command-Line Arguments
interface A string of the form name unit, such as lan0. (See DEPENDENCIES.)
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. Therefore, it is necessary to specify the address_family, which may affect interpretation of the remaining parameters on the command line. The only address family currently supported is inet ( DARPA -Internet family).
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”. The host number can be omitted on 10-Mbyte/second Ethernet interfaces (which use the hardware physical address), and on interfaces other than the first.
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”.
parameters The following operating parameters can be specified:
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”.
down Mark an interface “down”. When an interface is marked “down”, the system will not attempt to transmit messages 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 Request the use of a “trailer” link-level encapsulation when sending. If a network interface supports trailers, the system will, when possible, encapsulate outgoing messages in a manner that minimizes the number of memory-to-memory copy operations performed by the receiver. On networks that support Address Resolution Protocol, this flag indicates that the system should request that other systems use trailers when sending to this host. Similarly, trailer encapsulations will be sent to other hosts that have made such requests. Currently used by Internet protocols only (see NOTES).
-trailers Disable the use of a “trailer” link-level encapsulation (default).
arp Enable the use of Address Resolution Protocol in mapping between network level addresses and link-level addresses (default). This is currently implemented for mapping between DARPA Internet addresses and 10-Mbyte/second Ethernet addresses.
-arp Disable the use of 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 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.
debug Enable driver-dependent debugging code. This usually turns on extra console error logging.
-debug Disable driver-dependent debugging code.
netmask mask (Inet only) Specify how much of the address to reserve for subdividing networks into sub-networks. mask includes the network part of the local address, and the subnet part which is taken from the host field of the address. 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 (see networks(4)). mask contains 1’s for each bit position in the 32-bit address that are to be used for the network and subnet parts, and 0’s for the host part. mask should contain at least the standard network portion, and the subnet field should be contiguous with the network portion.
broadcast (Inet only) Specify the address that represents broadcasts to the network. The default broadcast address is the address with a host part of all 1’s.
ipdst (NS only) This is used to specify an Internet host that is willing to receive IP packets encapsulating NS packets bound for a remote network. In this case, an apparent point-to-point link is constructed, and the address specified is taken as the NS address and network of the destination.
The command:
ifconfig interface
with no optional command arguments supplied displays the current configuration for interface. If address_family is specified, ifconfig reports only the details specific to that address family. Only a user who has appropriate privileges can modify the configuration of a network interface.
DEPENDENCIES
The name of an interface associated with a LAN card is lan, and its unit is determined as follows:
Series 300/400:
The LAN card with the lowest select code is given the interface unit number 0; the LAN card with the next higher select code is given the interface unit number 1; and so on.
Series 700/800:
The LAN card in the lowest hardware module in the backplane is given interface unit number 0; the LAN card in the next higher hardware module is given interface unit number 1; and so on. When there are two or more LAN cards in a module (e.g. CIO), interface unit numbers are assigned to LAN cards in slot order before being assigned to cards in the next higher module. For example, consider a system with two LAN cards in CIO module 4 (slot 3 and slot 7) and one LAN card in CIO module 8 (slot 5). The three cards are assigned interface unit numbers 0, 1, and 2, respectively.
The lanscan command can be used to display the name and unit number of each interface that is associated with a LAN card (see lanscan(1M)).
NOTES
Currently, all HP 9000 systems can receive trailer packets but do not send them. Setting the trailers flag has no effect.
DIAGNOSTICS
Messages indicating that 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.
SEE ALSO
netstat(1), lanconfig(1m), lanscan(1m) hosts(4), routing(7).
Hewlett-Packard Company — HP-UX Release 9.0: August 1992