up | Inhaltsverzeichniss | Kommentar

Manual page for IFCONFIG(8C)

ifconfig - configure network interface parameters

SYNOPSIS

/usr/etc/ifconfig interface [ address_family ] [ address [ dest_address ] ] [ netmask mask ]
          [ broadcast address ] [ up ] [ down ] [ trailers ] [ -trailers ] [ arp ] [ -arp ] [ private ]
          [ -private ] [ metric n ] [ auto-revarp ]

/usr/etc/ifconfig interface [ protocol_family ]

DESCRIPTION

ifconfig is used to assign an address to a network interface and/or to configure network interface parameters. ifconfig must be used at boot time to define the network address of each interface present on a machine; it may also be used at a later time to redefine an interface's address or other operating parameters. Used without options, ifconfig displays the current configuration for a network interface. If a protocol family is specified, ifconfig will report only the details specific to that protocol family. Only the super-user may modify the configuration of a network interface.

The interface parameter is a string of the form nameunit, for example le0 or ie1. Three special interface names, -a, -ad and -au, are reserved and refer to all or a subset of the interfaces in the system. If one of these interface names is given, the commands following it are applied to all of the interfaces that match:

-a
Apply the commands to all interfaces in the system.
-ad
Apply the commands to all ``down'' interfaces in the system.
-au
Apply the commands to all ``up'' interfaces in the system.

Since an interface may receive transmissions in differing protocols, each of which may require separate naming schemes, the parameters and addresses are interpreted according to the rules of some address family, specified by the address_family parameter. The address families currently supported are ether and inet. If no address family is specified, inet is assumed.

For the TCP/IP family (inet), the address is either a host name present in the host name data base (see hosts.5 or in the Network Information Service (NIS) map hosts, or a TCP/IP address expressed in the Internet standard ``dot notation''. Typically, an Internet address specified in dot notation will consist of your system's network number and the machine's unique host number. A typical Internet address is 192.9.200.44, where 192.9.200 is the network number and 44 is the machine's host number.

For the ether address family, the address is an Ethernet address represented as x:x:x:x:x:x where x is a hexadecimal number between 0 and ff. Only the super-user may use the ether address family.

If the dest_address parameter is supplied in addition to the address parameter, it specifies the address of the correspondent on the other end of a point to point link.

OPTIONS

up
Mark an interface ``up''. This happens automatically when setting the first address on an interface. The up option enables an interface after an ifconfig down, reinitializing the hardware.
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
This flag used to cause a non-standard encapsulation of inet packets on certain link levels. Sun drivers no longer use this flag, but it is ignored for compatibility.
-trailers
Disable the use of a ``trailer'' link level encapsulation.
arp
Enable the use of the Address Resolution Protocol in mapping between network level addresses and link level addresses (default). This is currently implemented for mapping between TCP/IP addresses and 10Mb/s Ethernet addresses.
-arp
Disable the use of the Address Resolution Protocol.
private
Tells the in.routed routing daemon (see routed.8c that the interface should not be advertised.
-private
Specify unadvertised interfaces.
auto-revarp
Use the Reverse Address Resolution Protocol (RARP) to automatically acquire an address for this interface. Available beginning with SunOS 4.1.1 Rev B.
metric n
Set the routing metric of the interface to n, default 0. The routing metric is used by the routing protocol (routed(8C)). Higher metrics have the effect of making a route less favorable; metrics are counted as addition hops to the destination network or host.
netmask mask
(inet only) Specify how much of the address to reserve for subdividing networks into sub-networks. The mask includes 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 with a leading 0x, with a dot-notation address, or with a pseudo-network name listed in the network table networks.5 The mask contains 1's for the bit positions in the 32-bit address which are to be used for the network and subnet parts, and 0's for the host part. The mask should contain at least the standard network portion, and the subnet field should be contiguous with the network portion. If a `+' (plus sign) is given for the netmask value, then the network number is looked up in the NIS netmasks.byaddr map (or in the /etc/netmasks) file if not running the NIS service.
broadcast address
(inet only) Specify the address to use to represent broadcasts to the network. The default broadcast address is the address with a host part of all 0's. A + (plus sign) given for the broadcast value causes the broadcast address to be reset to a default appropriate for the (possibly new) address and netmask. Note that the arguments of ifconfig are interpreted left to right, and therefore

ifconfig -a netmask + broadcast +

and

ifconfig -a broadcast + netmask +

may result in different values being assigned for the interfaces' broadcast addresses.

EXAMPLES

If your workstation is not attached to an Ethernet, the ie0 interface should be marked ``down'' as follows:

ifconfig ie0 down

To print out the addressing information for each interface, use

ifconfig -a

To reset each interface's broadcast address after the netmasks have been correctly set, use

ifconfig -a broadcast +

FILES

/dev/nit
/etc/netmasks

SEE ALSO

intro.3 ethers.3n arp.4p hosts.5 netmasks.5 networks.5 netstat.8c rc.8 routed.8c

DIAGNOSTICS

Messages indicating 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.

NOTES

The network information service (NIS) was formerly known as Sun Yellow Pages (YP). The functionality of the two remains the same; only the name has changed.


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97