ifconfig - Display or configure network interface parameters. ifconfig(1M) ifconfig(1M) NAME ifconfig - configure network interface parameters SYNOPSIS ifconfig interface address_family [address [dest_address]] [parameters] ifconfig interface [address_family] DESCRIPTION The first form of the ifconfig command 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 can also be used at other times to redefine an interface's address or other operating parameters. The second form of the command, without address_family, displays the current configuration for interface. If address_family is also specified, ifconfig reports only the details specific to that address family. Only a user with appropriate privileges can modify the configuration of a network interface. All users can run the second form of the command. Arguments ifconfig recognizes the following arguments: address Either a host name present in the host name database (see hosts(4)), or a DARPA Internet address expressed in Internet standard dot notation (see inet(3N)). The host number can be omitted on 10MB/second Ethernet interfaces (which use the hardware physical address), and on interfaces other than the first. address_family Name of protocol on which naming scheme is based. An interface can receive transmissions in differing protocols, each of which may require separate naming schemes. Therefore, it is necessary to specify the address_family, which may affect interpretation of the remaining parameters on the command line. The only address family currently supported is inet (DARPA- Internet family). dest_address Address of destination system. Consists of either a host name present in the host name database (see hosts(4)), or a DARPA Internet address expressed in Internet standard dot notation (see inet(3N)). interface A string of the form nameunit, such as lan0. (See the LAN Card Numbering subsection.) parameters One or more of the following operating parameters: up Mark an interface "up". Enables interface after an ifconfig down. Occurs automatically when setting the address on an interface. Setting this flag has no effect if the hardware is "down". 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. broadcast (Inet only) Specify the address that represents broadcasts to the network. The default broadcast address is the address with a host part of all 1's. debug Enable driver-dependent debugging code. This usually turns on extra console error logging. -debug Disable driver-dependent debugging code. ipdst (NS only) This is used to specify an Internet host that is willing to receive IP packets encapsulating NS packets bound for a remote network. In this case, an apparent point-to-point link is constructed, and the address specified is taken as the NS address and network of the destination. metric n Set the routing metric of the interface to n. The default is 0. The routing metric is used by the routing protocol (see gated(1m)). Higher metrics have the effect of making a route less favorable; metrics are counted as additional 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 or aggregating networks into supernets. 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 (see networks(4)). For subdividing networks into sub-networks, mask must include the network part of the local address, and the subnet part which is taken from the host field of the address. mask must contain 1's in the bit positions in the 32-bit address that are to be used for the network and subnet parts, and 0's in the host part. The 1's in the mask must be contiguous starting from the leftmost bit position in the 32- bit field. mask must contain at least the standard network portion, and the subnet field must be contiguous with the network portion. The subnet field must contain at least 2 bits. The subnet part after performing a bit-wise AND operation between the address and the mask must not contain all 0's or all 1's. For aggregating networks into supernets, mask must only include a portion of the network part. mask must contain contiguous 1's in the bit positions starting from the leftmost bit of the 32-bit field. trailers Request the use of a "trailer" link-level encapsulation when sending. If a network interface supports trailers, the system will, when possible, encapsulate outgoing messages in a manner that minimizes the number of memory- to-memory copy operations performed by the receiver. On networks that support the Address Resolution Protocol, this flag indicates that the system should request that other systems use trailers when sending to this host. Similarly, trailer encapsulations will be sent to other hosts that have made such requests. Currently used by Internet protocols only. See WARNINGS section. -trailers Disable the use of a "trailer" link-level encapsulation (default). LAN Card Numbering The name of an interface associated with a LAN card is lan, and its unitnumber is determined as follows. The LAN card installed first in the system is given interface unit number 0; the next LAN card installed is given interface unit number 1; and so on. When there are two or more LAN cards installed at the same time, interface unit numbers are assigned according to card positions in the backplane: the LAN card that appears "first" in the backplane is given the interface unit number N; the next LAN card in the backplane is given the number N+1. The lanscan command can be used to display the name and unit number of each interface that is associated with a LAN card (see lanscan(1M)). Supernets A supernet is a collection of smaller networks. Supernetting is a technique of using the netmask to aggregate a collection of smaller networks into a supernet. This technique is particularly useful for class C networks. A Class C network can only have 254 hosts. This can be too restrictive for some companies. For these companies, a netmask that only contains a portion of the network part can be applied to the hosts in these class C networks to form a supernet. This supernet netmask should be applied to those interfaces that connect to the supernet using the ifconfig command. For example, a host can configure its interface to connect to a class C supernet, 192.6, by configuring an IP address of 192.6.1.1 and a netmask of 255.255.0.0 to its interface. DIAGNOSTICS Messages indicate if 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. WARNINGS Currently, all HP 9000 systems can receive trailer packets but do not send them. Setting the trailers flag has no effect. SEE ALSO netstat(1), lanconfig(1m), lanscan(1m) hosts(4), routing(7). |