ifconfig.1m (2012 03)

i
ifconfig(1M) ifconfig(1M)
EXAMPLES
To configure the primary interface lan0 with a subnet mask and set to the default broadcast address
#ifconfig lan0 192.168.1.1 netmask 255.255.255.128 up
To change the default broadcast address
#ifconfig lan0 255.255.255.0 broadcast
To check configuration values for network interface lan0
#ifconfig lan0
To configure secondary interface lan0:1. By default this turns the interface "up"
#ifconfig lan0:1 192.168.1.3 netmask 255.255.255.0 up
or
#ifconfig lan0:1 192.168.1.3 netmask 255.255.255.0
To bring down secondary interface lan0:1
#ifconfig lan0:1 down
or
#ifconfig lan0:1 inet down
To disable and enable the interface
#ifconfig lan0 down
#ifconfig lan0 up
To remove secondary interface lan0:1
#ifconfig lan0:1 0
To remove primary interface lan0. Note: All secondaries should have been brought down first for interface
lan0 to be unplumbed.
#ifconfig lan0 unplumb
To assign another IP address to loopback interface lo0. Note: Primary loopback interface (lo0:0) cannot be
changed.
#ifconfig lo0:1 127.0.0.2
To change the routing metric of interface lan0 to 3. This makes the routing protocol prefer routes with
values of 0, 1 or 2.
#ifconfig lan0 192.168.1.1 netmask 255.255.255.0 metric 3
or
#ifconfig lan0 metric 3
DIAGNOSTICS
Messages indicate if the specified interface does not exist, the requested address is unknown, or the user
is not privileged and tried to alter an interfaces configuration.
WARNINGS
The
lanadmin, lanscan, and linkloop commands are deprecated. These commands will be
removed in a future HP-UX release. HP recommends the use of replacement command nwmgr(1M) to
perform all network interface-related tasks.
AUTHOR
ifconfig was developed by HP and the University of California, Berkeley.
SEE ALSO
netstat(1), lanscan(1M), nwmgr(1M), route(1M), rtradvd(1M), inet(3N), inet6(3N), hosts(4), NDP(7P),
route(7P), routing(7).
IP Version 6 Addressing Architecture, RFC4291, Hinden, Deering.
HP-UX 11i Version 3: March 2012 7 Hewlett-Packard Company 7