1 ifconfig SYNOPSIS ifconfig interface_id [address_family] [address[/bitmask] [dest_address]] [parameters] The ifconfig command assigns and displays an address to a network interface, and configures network interface parameters. 2 FLAGS -a Displays information about all interfaces that are configured on a system. 2 DESCRIPTION You use the ifconfig command at boot time to define the network address of each interface. You can also use the ifconfig command at other times to display all interfaces that are configured on a system, to redefine the address of an interface, or to set other operating parameters. NOTE If you want to redefine the interface address or the netmask, you should stop TCP/IP Services. Otherwise, any TCP/IP processes currently running will continue to use the old adddress and netmask and fail. Any user can query the status of a network interface; only a privileged user can modify the configuration network interfaces. You specify an interface with the ifconfig interface_id syntax. (See your hardware documentation for information on obtaining an interface ID.) If you specify only an interface_id, the ifconfig program displays the current configuration for the specified network interface only. If a protocol family is specified by the address_family parameter, ifconfig reports only the configuration details specific to that protocol family. When changing an interface configuration, if the address family cannot be inferred from the address parameter, an address family, which may alter the interpretation of succeeding parameters, must be specified. This family is required because an interface can receive transmissions in different protocols, each of which may require a separate naming scheme. The address argument is the network address of the interface being configured. For the inet address family, the address argument is either a hostname or an Internet address in the standard dotted-decimal notation with or without the optional Classless Inter-Domain Routing (CIDR) bitmask (/bitmask). If using the bitmask argument, do not use the netmask parameter. The destination address (dest_address) argument specifies the address of the correspondent on the remote end of a point-to- point link. 2 PARAMETERS alias alias_address[/bitmask] Establishes an additional network address for this interface. This can be useful when changing network numbers and you want to continue to accept packets addressed to the old interface. If you do not specify a bitmask or netmask with the alias address, the default netmask is based on the alias address's network class. If you are using the optional bitmask argument, do not use the netmask argument. -alias alias_address Removes the network address specified. This can be used either if you incorrectly specified an alias or if an alias is no longer needed. The -alias parameter functions in the same manner as the delete parameter. aliaslist address_list[/bitmask]Establishes a range of additional network addresses for this interface. The range can be a comma-separated list or a hyphenated list, and is inclusive. You can also specify the optional CIDR bitmask (/bitmask) argument at the end of the list. Do not use a comma- separated list and a hyphenated list for a range. -aliaslist Removes a range of network addresses for this interface. This can be useful when deleting network numbers and you want to keep the primary interface address. The alias list rules are the same as for the aliaslist parameter. allmulti Enables the reception of all multicast packets. -allmulti Disables the reception of all multicast packets. arp Enables the use of the Address Resolution Protocol (ARP) in mapping between network- level addresses and link-level addresses. This parameter is on by default. -arp Disables the use of the ARP. Use of this parameter is not recommended. See arp(8) for more information. broadcast broad_address Specifies the address to use to represent broadcasts to the network. The default broadcast address is the address with a host part consisting of all 1s (ones). Note that the computation of the host part is dependent on netmask (see the description of the netmask parameter). delete [net_address] Removes the network address specified. This would be used if you incorrectly specified an alias, or if it was no longer needed. If you have incorrectly set an NS address having the side effect of specifying the host portion, removing all NS addresses will allow you to respecify the host portion. If no address is specified, all network addresses for the interface are deleted. down Marks an interface as not working (down), which keeps the system from trying to transmit messages through that interface. If possible, the ifconfig command also resets the interface to disable reception of messages. Routes that use the interface, however, are not automatically disabled. ipmtu mtu_value Alters the size of the maximum transfer unit (MTU) for messages that your system transmits. It might be necessary to reduce the MTU size so that bridges connecting token rings can transfer frames without error. metric number Sets the routing metric, or number of hops, for the interface to the value of number. The default value is 0 (zero) if number is not specified, indicating that both hosts are on the same network. The routing metric is used by the routed and gated daemons, with higher metrics indicating that the route is less favorable. netmask mask Specifies how much of the address to reserve for subdividing networks into sub-networks. This parameter can only be used with an address family of inet. Do not use this parameter if you are specifying the CIDR mask (/bitmask) with the address argument, alias parameter, or aliaslist parameter. The mask variable includes both 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 beginning with 0x, in the standard Internet dotted-decimal notation, or beginning with a name. The mask contains 1s (ones) for the bit positions in the 32-bit address that are reserved for the network and subnet parts, and 0s (zeros) for the bit positions that specify the host. The mask should contain at least the standard network portion. The default netmask is based on the address parameter's network class. up Marks an interface as working (up). This parameter is used automatically when setting the first address for an interface, or can be used to enable an interface after an ifconfig down command. If the interface was reset when previously marked with the parameter down (see the following section for a description of this parameter), the hardware will be reinitialized.