19.4 Network Programs
ifconfig [interface] [address] [options]
-a apply the action to all interfaces (SunOS 4.X and 5.X only)
-au apply the action to all "up" interfaces (SunOS 4.X and 5.X only)
-ad apply the action to all "down" interfaces (SunOS 4.X and 5.X only)
up bring the interface up. This happens automatically when you set the first address on the interface.
down bring the interface down. The system will no longer send messages through this interface.
trailers|-trailers set the flag to use, or disable, "trailer" link level encapsulation. "trailers" is no longer used, and it set, is ignored.
arp|-arp enable, or disable, the use of Address Resolution Protocol (arp) to map between network level and link level address (defaults to arp)
plumb|unplumb setup and open, or destroy and close, the streams necessary to for TCP/IP to use the interface. After using unplumb the device will not be reported by "ifconfig -a". (SunOS 5.X only).
broadcast address set the address for broadcasting to the local subnet. The default broadcast address is the machine address with the host part of the address set to all 1's, except for SunOS 4.X which defaults to all 0's in the host part of the address.
netmask mask set the mask for how much of the address to use for the network part of the address and how much to use for the subnet (host part) of the address.
ether address set the ethernet address
ifconfig is usually executed at several points in RC scripts, first to bring up each interface, and then again later to reset the netmask and broadcast for each. To report on the network interface do the following, where le0 is the primary interface name on most Sun workstations:
# ifconfig le0
inet 184.108.40.206 netmask ffffff00 broadcast 220.127.116.11
where the netmask value of ffffff00 is equivalent to 255.255.255.0 and the ethernet address is reported only if you are the superuser.
The file /etc/netmasks contains information for non-default netmasks. For SunOS 5.X entries should have the network address use zeroes to fill out the octets, while in SunOS 4.1.X it should not, e.g:
# Network netmask
18.104.22.168 255.255.255.0 <-- used by SunOS 5.X
128.146 255.255.255.0 <-- used by SunOS 4.1.X
ifconfig uses this file for its default settings, i.e. when doing the following:
# ifconfig le0 netmask +