DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

ifconfig(ADMN)


ifconfig -- configure network interface parameters

Syntax

/etc/ifconfig interface [ -p ] [ address_family ] [ address [ dest_address ] ]
[ parameters ]

/etc/ifconfig -a

Description

ifconfig assigns an address to a network interface and/or configures 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.

The interface argument is a string of the form name unit, for example, ``en0'' or ``lo0''.

An interface may receive transmissions in differing protocols, each of which may require separate naming schemes. The address_family provides for specifying a family of protocols, and this specification may change the interpretation of the remaining arguments. Currently only the Internet address family is supported: thus, the only valid value for address_family is ``inet.''

For the Internet family, the address is either a host name present in the host name data base, hosts(SFF), or an Internet address expressed in the Internet standard ``dot notation''. The dest_address is the address of the correspondent on the other end of a point-to-point link.

ifconfig displays the current configuration for a network interface when no optional parameters are supplied.

Options


-a
causes information about all configured interfaces to be displayed

-p
executes slink to link this interface into the TCP/IP stack if the interface is not already linked when ifconfig tries to set the interface address. This option should be used only in TCP startup scripts. It is required for a small number of network cards to which an interface cannot be linked until TCP/IP is running and available to download microcode to the card when the driver is opened.

Parameters


up
Mark an interface ``up''. This may be used to enable an interface after an ifconfig down. It happens automatically when setting the first address on an interface. If the interface was reset when previously marked down, the hardware will be reinitialized.

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.

alias addr
Establish an additional network address for this interface. This is sometimes useful when changing network numbers, and one wishes to accept packets addressed to the old interface.

-alias addr
Remove the specified alias.

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 Internet addresses and 10Mb/s Ethernet addresses. This option is not applicable in the STREAMS environment. Use of arp for an interface is specified in /etc/strcf. The arp driver will be opened when the STREAMS stack is built.

-arp
Disable the use of the Address Resolution Protocol.

metric n
Set the routing metric of the interface to n, default 0. The routing metric is used by the routing daemon routed(ADMN). Higher metrics have the effect of making a route less favorable; metrics are counted as additional hops to the destination network or host.

mtu n
Set the Maximum Transfer Unit (MTU) size of the interface to n. This should not normally be done except for debugging purposes. Note that no validity checking is performed on the specified MTU value; this means that the unwary administrator can raise the MTU of an interface to a value larger than allowed by the hardware.

debug n
Enable driver dependent debugging code; usually, this turns on extra console error logging. ``n'' is used to specify a debugging level. Specifying level 0 turns off debugging.

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 Internet address, or with a pseudo-network name listed in the network table networks(SFF). 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.

broadcast addr
(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 1's.

onepacket size count
Enable the one-packet mode of operation (used for interfaces that cannot handle back-to-back packets). The keyword onepacket must be followed by two numeric parameters: size specifies the small packet size in bytes and count specifies the small packet threshold. If small packet detection is not desired, these values should be zero. See tcp(ADMP) for an explanation of one-packet mode.

-onepacket
Disable one-packet mode.

perf recv_size send_size use_fullsize
Tune interface-specific performance parameters. The keyword perf must be followed by three numeric parameters: recv_size specifies the receive window that TCP will use when using this interface; send_size specifies the send window that TCP will use when using this interface; if use_fullsize has a value of 0, then TCP will truncate the segment size to a multiple of 1K when using this interface; with fast Ethernet hardware, for example, this will cause 1460 byte segments to be used if possible. Specifying use_fullsize with a value of 1 does not truncate the segment size.

link0
Enables the first link-specific parameter.

link1
Enables the second link-specific parameter.

link2
Enables the third link-specific parameter.

-link0
Disables the first link-specific parameter.

-link1
Disables the second link-specific parameter.

-link2
Disables the third link-specific parameter.

The debug and link-specific parameters are driver dependent and may or may not produce any useful results when used on a given interface. See ip(ADMP) for a discussion of any functionality that a generic kernel may support.

Only the root may modify the configuration of a network interface.

Diagnostics

Messages indicating the specified interface does not exist, or the requested address is unknown, or the user is not privileged and tried to alter an interface's configuration.

See also

Intro(ADMP), arp(ADMN), arp(ADMP), hosts(SFF), ip(ADMP), netstat(TC), networks(SFF), strcf(SFF), tcp(ADMN), tcp(ADMP)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003