logo

Manual Pages


Table of Contents

NAME

ifconfig - configure network interface parameters

SYNOPSIS

ifconfig interface [ [ alias | -alias ] address ] [ netmask mask ] [ broadcast address ] [ mediatype type ] [ mtusize size ] [ up | down ] [ trusted | untrusted ] [ wins | -wins ] [ partner | -partner address | interface ]

ifconfig -a

DESCRIPTION

ifconfig assigns an address to a network interface and configures network interface parameters. ifconfig must be used at boot time to define the network address of each network interface present on a machine; it may also be used at a later time to redefine a network interface's address or other operating parameters. When used without optional parameters, ifconfig displays the current configuration for a network interface.

The interface parameter is the name of the network interface. The name is of the form en for Ethernet interfaces, fn for FDDI interfaces, and an for ATM interfaces, possibly followed by a letter, where n is 0 for on-board network interfaces and the expansion slot number for network interfaces plugged into expansion slots. If a card in an expansion slot has more than one network interface, the network interface name will be followed by a letter, indicating which of the network interfaces on that card it is. The network interface name vh is used to specify IP virtual host addresses associated with the filer. Only alias addresses (using the alias option) may be assigned to the vh interface. The network interface name -a is special and it does not take any optional parameters. It displays the current configuration for all the network interfaces present.

The address is either a host name present in the host name data base /etc/hosts or an Internet address expressed in the Internet standard dot notation.

OPTIONS

broadcast address
Specifies 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.

down
Marks a network interface "down". When a network interface is marked "down" the system will not attempt to transmit messages through that network interface. If possible, the network interface will be reset to disable reception as well. This action does not automatically disable routes using the network interface.

mediatype type Specifies the Ethernet media type used. Depending on the physical specifications of the Ethernet card the acceptable types are "thick" (10Base5 AUI), "thin" (10Base2 BNC), "tp" (10Base-T RJ-45 twisted-pair), or "tpfd" (Full duplex 10Base-T RJ-45 twistedpair), or "100tx" (100Base-T RJ-45 twistedpair), or "100tx-fd" (Full duplex 100Base-T RJ-45 twisted-pair), or "auto" (Auto RJ-45 twisted-pair). The default media type is set to "tp" or to "auto" where applicable.

On a 10/100 Mbps auto-negotiable interface, the system will auto-negotiate a 10 Mbps half or full duplex or 100 Mbps half or full duplex link and set the network interface accordingly when it is configured up. If the other end does not support auto-negotiation and full duplex operation is desired, it must be explicitly set using the mediatype command.

On a 10/100 Mbps interface, the system will auto-detect a 10 Mbps or 100 Mbps link and set the link speed accordingly when the network interface is configured up. The hardware is not currently capable of autodetecting full duplex interfaces, so if full duplex operation is desired, it must be explicitly set using the mediatype command. Only the 10/100 Mbps interfaces are capable of full duplex operation.

mtusize size
Specifies the MTU (maximum transmission unit) to use for the network interface. This is normally necessary only for noncompliant FDDI or ATM bridges, routers or switches that don't know how to fragment FDDI or ATM size packets.

netmask mask
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 /etc/networks. The mask contains 1's for the bit positions in the 32-bit address that 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. A default netmask is chosen according to the class of the IP address.

up
Marks a network interface "up". This may be used to enable a network interface after an "ifconfig down." It happens automatically when setting the first address on a network interface. If the network interface was reset when previously marked down, the hardware will be re-initialized.

alias
Establishes an additional network address for this network interface. This is sometimes useful when changing network numbers and one wishes to accept packets addressed to the old network interface. It is required when creating IP virtual host addresses.

-alias
Remove a network address for this network interface.

trusted
Specifies that the network to which the network interface is attached is trusted relative to firewall-style security (default).

untrusted
Specifies that the network to which the network interface is attached is not trusted relative to firewall-style security.

wins
Specifies that the network interface is to be registered with Windows Internet Name Services (default). Such registration is only performed when CIFS is running and at least one WINS server has been configured.

-wins
Specifies that the network interface is not to be registered with Windows Internet Name Services.

partner address Applies only to filers in a cluster. It maps a network interface to address, which is an IP address on the partner and is referred to as the partner IP address. In takeover mode, this network interface assumes the identity of the network interface on the partner, whose IP address is address. For example, toaster1 and toaster2 are filers in a cluster. If the IP address of e8 on toaster2 is 198.9.200.38, use the following command on toaster1 if you want e1 of toaster1 to assume the identity of e8 of toaster2 for the duration of a takeover:

ifconfig e1 partner 198.9.200.38

Be sure that both the local network interface and the partner's network interface are attached to the same network segment or network switch. Otherwise, after takeover, clients of the failed filer might need to wait an indeterminate amount of time for routing tables to flush before being able to access the data on the failed filer.

An ATM ELAN interface cannot assume the identity of a partner interface. Instead, a LANE partner is configured for an ATM adapter using the partner interface option.

partner interface
Applies only to filers in a cluster. It maps a network interface to interface, which is an interface on the partner. This option is used to configure the LANE partner for an ATM adapter as described under CLUSTER CONSIDERATIONS.

-partner address
Applies only to filers in a cluster. It removes the mapping between a network interface and an IP address on the partner.

-partner interface
Applies only to filers in a cluster. It removes the mapping between a network interface and interface on the partner.

CLUSTER CONSIDERATIONS

On a filer in a cluster, a network interface performs one of these roles:

A dedicated network interface for the local filer whether or not the filer is in takeover mode. A network interface performs this role if it has a local IP address but not a partner IP address, which you can assign by the partner option of the ifconfig command. An ATM ELAN interface can only perform the role of a dedicated interface, and an ATM adapter interface configured for LANE can be a dedicated interface if ELANs have been configured on it, but it has no partner ATM adapter.

A shared network interface for both the local filer and the partner. That is, if the partner fails, the network interface assumes the identity of a network interface on the partner but works on behalf of both the live filer and the partner. A network interface performs this role if it has a local IP address and a partner IP address, which you assign by the partner option of the ifconfig command. An exception to this is an ATM adapter interface configured for LANE -- it performs the role of a shared interface if ELANs have been configured on it, and it has a partner ATM adapter.

A standby network interface for the partner. That is, if the partner fails, the network interface works on behalf of the partner. When the filer is not in takeover mode, the network interface is idle. A network interface performs this role if it does not have a local IP address but a partner IP address, which you assign by the partner option of the ifconfig command. An exception to this is an ATM adapter interface configured for LANE -- it performs the role of a standby interface if no ELANs have been configured on it, but it has a partner ATM adapter.

The filer maps a partner IP address to a shared or standby interface when the filer initiates a takeover operation. In takeover mode, all requests destined for the partner IP address are serviced by the shared or standby interface. Also, in partner mode, if a command takes a network interface name as an argument, enter the network interface name of the failed filer. The command is executed on the shared or standby interface on the live filer. Similarly, in partner mode, a command for displaying network interface information displays the network interface name of the failed filer, even though the command is serviced by the shared or standby interface on the live filer.

In addition to assuming the partner IP address in takeover mode, a shared or standby interface assumes the media access control (MAC) address of the partner. This enables the clients of the partner to continue using their address resolution protocol (ARP) tables after the takeover.

On ATM, partner interfaces are configured independently for LANE and for ForeIP/SPANS. A SPANS partner interface is configured through its IP address, as described above, except that a SPANS interface cannot be a shared interface.

An ELAN interface cannot be a shared or standby interface. Instead, for LANE, an ATM adapter can be configured as a dedicated interface, a standby interface, or a shared interface. The LANE partner for an ATM adapter is configured by specifying the partner option followed by the ATM adapter interface on the partner. On takeover, the ELANs on the partner adapter will be configured on the adapter of the takeover host. When an ATM adapter is a shared interface, a given ELAN cannot be configured more than once on the adapter after takeover. This means that if both filers in a cluster pair are on the same ELANs, each filer would need a minimum of two ATM adapters to support full takeover.

ELAN interfaces are only displayed in the context of the owning filer (the takeover host or the partner), and in the partner context both the adapter and ELAN interface names are those of the failed filer.

These ifconfig options are not available in partner mode: partner, -partner, and mtusize.

EXAMPLES

Example 1: A cluster contains two filers, toaster1 and toaster2. toaster1 takes over toaster2 after toaster2 fails.

The /etc/rc file on toaster1 is as follows:

  ifconfig e0 192.9.200.37
  ifconfig e1 192.9.200.38 partner 192.9.200.41
  ifconfig e2 partner 192.9.200.42

The /etc/rc file on toaster2 is as follows:

  ifconfig e7 192.9.200.42
  ifconfig e8 192.9.200.41 partner 192.9.200.38
  ifconfig e9 partner 192.9.200.37

The e0 interface on toaster1 is a dedicated interface. It services requests only for address 192.9.200.37. After toaster1 takes over toaster2, this network interface is not available in partner mode.

The e1 interface on toaster1 is a shared interface. It services requests for address 192.9.200.38 when toaster1 is not in takeover mode. When toaster1 is in takeover mode, the network interface services requests for both addresses 192.9.200.38 and 192.9.200.41. When toaster1 is in partner mode, this network interface shows up as the e8 interface in commands that involve network interface names.

The e2 interface on toaster1 is a standby interface. It does not service any request when toaster1 is not in takeover mode. However, after toaster1 takes over toaster2, this network interface services requests for address 192.9.200.42. When toaster1 is in partner mode, this network interface shows up as the e7 interface in commands that involve network interface names.

Example 2: A cluster contains two filers, maytag1 and maytag2. Both filers are configured identically, with ELANs engr and mktg on ATM interface a4 and ELAN mfg on ATM interface a5.

The following /etc/rc file on maytag1 contains the following commands:

  ifconfig a4 partner a5
  ifconfig a5 partner a4

When maytag1 takes over maytag2, ELAN mfg is added to maytag1-a4 and ELANs engr and mktg are added to maytag1-a5. However, the partner ELAN interfaces are only displayed in partner mode.

FILES

/etc/hosts
host name data base
/etc/networks
network name data base

BUGS

You cannot configure gigabit Ethernet interfaces and ATM ForeIP/SPANS interfaces to be shared interfaces in a cluster. They can be configured as standby interfaces.

SEE ALSO

na_partner(1), na_hosts(5), na_networks(5)


Table of Contents