ifconfig(1Mtcp)


ifconfig -- configure network interface parameters

Synopsis

ifconfig -a

ifconfig interface [ -p ] [ address_family ] [ address [ remote_address ] ] [ command ... ]

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 operational parameters.

The interface argument is a string catenated from the name of the network driver and its unit number (n). These are some examples:


netn
MDI drivers

wdnn
DLPI drivers

TCM5X9_n
ODI drivers

lon
loopback drivers
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 inet for Version 4 of the Internet Protocol family is supported. This is the default value.

For the Internet Protocol family, the address is either a host name present in the hosts(4tcp) database, or an Internet address expressed in ``dot notation''. The remote_address need only be specified to identify the address of the correspondent on the other end of a SLIP or PPP link.

Options


-a
Displays information about all configured interfaces.

-p
Execute slink to link the specified interface into the TCP/IP stack. This will only be done if the interface is not already linked when ifconfig tries to set the interface address.

This option is only used when TCP is started. It is required for a small number of network adapters to which an interface cannot be linked until TCP/IP is running and available to download microcode to the adapter when the driver is opened.

Commands

ifconfig understands the following commands:

alias address
Establish an additional network address for this interface. This is useful when packets need to be received that are addressed to a defunct network address, or for creating virtual domains on a host.

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

-arp
Disable the use of the Address Resolution Protocol.

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

dblevel n
Enable packet logging of IP datagrams on PPP interfaces (ppp0, ppp1, and so on). If n is set to 1, logging is enabled. If set to 0, logging is disabled (the default). When enabled, the IP protocol support module will decode IP datagrams containing UDP datagrams or TCP segments and write this information to the PPP log file (usually /var/adm/log/ppp.log).

debug n
Enable driver dependent debugging code; usually, this turns on extra console error logging. n specifies the debugging level. A level of 0 turns off debugging.

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 and it does not break (hang up) the physical connection for SLIP and PPP links.

link0
Enable the first link-specific parameter.

-link0
Disable the first link-specific parameter.

link1
Enable the second link-specific parameter.

-link1
Disable the second link-specific parameter.

link2
Enable the third link-specific parameter.

-link2
Disable the third link-specific parameter.

metric n
Set the routing metric of the interface to n, default 0. The routing metric is used by the routing daemon routed(1Mtcp). 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.

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(4tcp). 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.

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(7tcp) 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 size in bytes of the TCP receive window.

send_size
Specifies the size in bytes of the TCP send window.

use_fullsize
If set to 0, TCP will truncate the size of each segment to a multiple of 1KB that will fit in a frame. If set to 1, TCP will will use all available space in a frame for each segment.

If TCP large window scaling is enabled (see rfc1323), the maximum possible value of recv_size and send_size is 1073725440 ((2^16-1)*2^14) bytes. If TCP large window scaling is disabled (see -rfc1323), the maximum value is 65535 (2^16-1) bytes.


rfc1323
Turn on TCP large window scaling and timestamps (see RFC 1323) for an interface.

Large window scaling is recommended for long fat networks (LFNs) which have a capacity (defined as the bandwidth of the network in bytes per second times the round-trip delay in seconds) that is greater than 65,535 bytes. The sizes of the TCP receive and send windows (configured using the perf command) should be set equal to the capacity up to a maximum value of 1,073,725,440 ((2^16-1)*2^14) bytes.

Timestamps protect against wrapped sequence numbers when the time taken to transmit 2^32 (4,294,967,296) bytes of data on a network is less than the value of the maximum segment lifetime (MSL). Timestamps should be enabled if the product of the bandwidth of the network in bytes per second multiplied by the MSL in seconds has a value greater than 2^32.) The default MSL value is 120 seconds (defined as half the value of the inconfig(1Mtcp) tcp_2msl parameter).

By default, large window scaling and timestamps are enabled on all interfaces provided that the inconfig tcp_do_rfc1323 parameter is set to 1. This behavior should be turned off using the -rfc1323 command for SLIP and PPP interfaces that use header compression.


-rfc1323
Turn off TCP large window scaling and timestamps (RFC 1323) for an interface. This should be specified for SLIP and PPP interfaces if they use header compression.

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.

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.

References

arp(1Mtcp), arp(7tcp), hosts(4tcp), ip(7tcp), netstat(1Mtcp), networks(4tcp), slink(1Mtcp), strcf(4tcp), tcp(7tcp)

RFC 1323

Notices

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(7tcp) for a discussion of any functionality that a generic kernel may support.

Only root may modify the configuration of a network interface.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004