Technical data
ifconfig
The
mask
variable includes both 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 beginning with 0x, in the standard
Internet dotted-decimal notation, or beginning with a name.
The mask contains ones (1) for the bit positions in the 32-bit address that are
reserved for the network and subnet parts, and zeros (0) for the bit positions that
specify the host. The mask should contain at least the standard network portion.
The default net mask is based on the address parameter’s network class.
up
Marks an interface as working (up). This parameter is used automatically when
setting the first address for an interface, or it can be used to enable an interface
after an
ifconfig down
command. If the interface was reset when previously
marked with the
down
parameter, the hardware will be reinitialized.
Examples
The following examples show how to use the
ifconfig
command.
1.
TCPIP> ifconfig sl0
sl0: flags=10
This example shows how to query the status of serial line interface sl0.
2.
TCPIP> ifconfig lo0 inet 127.0.0.1 up
This example shows how to configure the local loopback interface. Only a user
with system privileges can modify the configuration of a network interface.
3.
TCPIP> ifconfig ln0 212.232.32.1/22
This example shows how to configure an ln0 interface. The broadcast address
is 212.232.35.255 as the 22-bit mask specifies four Class C networks.
4.
TCPIP> ifconfig tra0 130.180.4.1/24 speed 4
This example shows how to configure the token ring interface for a 4 Mb/s
token ring with a net mask of 255.255.255.0 in CIDR format.
5.
TCPIP> ifconfig tra0 down
TCPIP> ifconfig tra0 speed 16 up
This example shows how to stop the token ring interface and start it for a 16
Mb/s token ring.
6.
TCPIP> ifconfig we0 alias 132.50.40.35/24
This example shows how to add alias 132.50.40.35 with a net mask of
255.255.255.0 in CIDR format to interface we0.
7.
TCPIP> ifconfig we0 aliaslist 132.240.32-36.40-50/24
This example shows how to add network addresses 40 through 50, to subnets
18.240.32, 18.240.33, 18.240.34, 18.240.35, and 18.240.36 with a net mask of
255.255.255.0 in CIDR format to the we0 interface.
A–14 Troubleshooting Utilities Reference