Archive

Posts Tagged ‘ifconfig’

ifconfig

July 7th, 2009

Table of Contents

NAME

ifconfig – configure network interface parameters

SYNOPSIS

ifconfig interface [ address_family ]
[ [ alias | -alias ] address ]
[ { netmask mask } | { prefixlen len } ] [ broadcast address ] [ anycast ] [ mediatype type ]
[ flowcontrol { none | receive | send | full } ] [ mtusize size ] [ up | down ] [ trusted | untrusted ] [ wins | -wins ] [ nfo | -nfo ]
[ [ partner { address | interface } ] [ -partner ] ]

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, 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

address_family Specifies the address family which affects interpretation of the remaining parameters. Since an interface can receive transmissions in differing protocols with different naming schemes, specifying the address family is recommended. The address or protocol families currently supported are "inet" and "inet6″. The default value is "inet”.

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.

May not be applied to a network interface which is part of a vif.

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. See the discussion under CLUSTER CONSIDERATIONS below for the semantics of this action in a cluster.

May not be applied to a network interface which is part of a vif.

mediatype type Specifies the Ethernet media type used.

10/100, 100/1000, and 10/100/1000 Mbps Copper Interfaces: Depending on the physical specifications of the Ethernet card the acceptable types are "tp" (Half-duplex 10BaseT RJ-45 twisted-pair), "tp-fd” (Full duplex 10Base-T RJ-45 twisted-pair), "100tx" (Half-duplex 100Base-T RJ-45 twisted-pair), "100tx-fd" (Full duplex 100Base-T RJ-45 twisted-pair), and "auto” (Auto RJ-45 twisted-pair).

The default media type is set to "tp" or to "auto" where applicable.

On an auto-negotiable interface, the system will auto-negotiate the speed and duplex of the 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.

All 1000Base-T devices support autonegotiation and the speed cannot be explicitly set to 1000 Mbps. At 1000 Mbps, the interface only operates in full-duplex mode.

1000 Mbps Fiber Interfaces: The Gigabit Ethernet Controllers only support the mediatype "auto”. If the interface detects that the link partner auto-negotiates, then the operational flow control setting is negotiated. If the interface detects that the link partner does not auto-negotiate, then it uses the flow control setting configured through the flowcontrol option or the default value for the interface. The Gigabit Ethernet Controllers only support full-duplex.

10G bps Fiber Interfaces: The 10G TOE/Ethernet Controllers support the mediatype "10g-sr" and "auto”. The interface does not do autonegotiatition, it has fixed and
only support 10Gb speed, fullduplex. flowcontrol by default is set to full, but it can be set to none or send or receive.

flowcontrol
Specifies the flow control type. The acceptable types are "none" (no flow control), "receive" (only receive flow control frames), "send" (only send flow control frames), and "full" (send and receive flow control frames). If the flowcontrol option is not specified, the default value is interface-dependent. If the link partner is configured for auto-negotiation, the interface negotiates flow control by advertising its flow control setting. The actual operational value may be different, depending on the capabilities that each partner advertises. If the link partner is not configured for auto-negotiation, then the interface sends or accepts flow control frames as dictated by the flowcontrol option or the default value.

Gigabit Ethernet interfaces support flow control as described above, and their default flowcontrol setting is "full”.

On 100/1000 and 10/100/1000 Mbps interfaces operating at 10 or 100 Mbps, the system may override the configured setting with "receive” or "none" because most 10 and 100 Mbps devices don’t support flow control. In half-duplex mode, the system always disables flow control. Use the ifstat command to see the operational setting.

Not supported on Virtual interfaces (vif) interfaces.However the underlying interfaces can be modified with this option.

mtusize size Specifies the MTU (maximum transmission unit) to use for the network interface. It is used to specify the jumbo frame size on Gigabit Ethernet interfaces. Jumbo frames are packets larger than the standard Ethernet packet size and must also be supported by the environment’s networking equipment and
clients. The default MTU for jumbo frames is 9000 and the maximum is 9192.

The MTU size does not include the media header or FCS (checksum). However, other vendors may include the 14-byte Ethernet media header, the 4-byte FCS, or a 4-byte VLAN tag when specifying their jumbo frame size.

May not be applied to a network interface which is part of a vif.

netmask mask
(Inet only) 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.

May not be applied to a network interface which is part of a vif. Option is only allowed on interfaces with assigned internet address or if the internet address is provied along with the netmask option.

prefixlen len (Inet6 only) Specify that len bits are reserved for subdividing networks into sub-networks. The len must be integer, and for syntactical reason it must be between 0 to 128. It is almost always 64 under the current IPv6 assignment rule. If the parameter is ommitted, 64 is used.

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.

May not be applied to a network interface which is part of a vif.

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.

May not be applied to a network interface which is part of a vif.

-alias
Remove a network address for this network interface.

May not be applied to a network interface which is part of a vif.

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

May not be applied to a network interface which is part of a vif.

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

May not be applied to a network interface which is part of a vif.

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.

May not be applied to a network interface which is part of a vif.

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

May not be applied to a network interface which is part of a vif.

nfo
Specifies that negotiated failover is to be enabled for the network interface. This option applies only to filers in a cluster. See the description of options Bcf.takeover.on.network_interface_failureR and Bcf.takeover.on_network_interface_failure.policyR in options for more information.

May not be applied to a network interface which is part of a vif.

-nfo
Specifies that negotiated failover is to be disabled for the network interface. This option applies only to filers in a cluster.

May not be applied to a network interface which is part of a vif.

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. If the network interface being configured is a virtual interface then the partner interface must be denoted by an interface name and not an 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.

May not be applied to a network interface which is part of a vif.

partner interface
Applies only to filers in a cluster. It maps a network interface to interface, which is an interface on the partner. If the network interface being configured is a virtual interface then interface must refer to a virtual interface on the partner filer.

May not be applied to a network interface which is part of a vif.

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

May not be applied to a network interface which is part of a vif.

anycast
(Inet6 only) Specify that the address configured is an anycast address. Based on the current specification, only routers may configure anycast addresses. Anycast address will not be used as source address of any of outgoing IPv6 packets.

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.

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.

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.

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.

To facilitate seamless transition, the partner interfaces broadcast gratuitous ARPS so that all clients may update their arp caches.

In takeover mode, attempting to "ifconfig down" an interface that has taken over an interface of the failed filer only marks the interface down for the live filer. To take the interface down completely, the "ifconfig down" command must also be executed in partner mode. These state distinctions are indicated by the UP and PARTNER_UP flags (shown by ifconfig) associated with each interface.

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

The autoconf keyword indicates that an IPv6 address is obtained via stateless autoconfiguration.

EXAMPLE

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.

FILES

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

SEE ALSO

ifstat , partner , sysconfig , vif , hosts , networks , options


Table of Contents









7-mode Manual Pages , , , ,

ifconfig

March 3rd, 2009

If you have a completely dead system and need to re-install ONTAP onto the flash card as well as the disks, then you’ll need to netboot the system (or other reasons you need to setup the networking!). The first step is to setup the networking for this.

CFE> help ifconfig

  SUMMARY

     Configure the Ethernet interface

  USAGE

     ifconfig device [options..]

     Activates and configures the specified Ethernet interface and sets its
     IP address, netmask, and other parameters.  The -auto switch can be used
     to set this information via DHCP.

  OPTIONS

     -auto        Configure interface automatically via DHCP
     -off         Deactivate the specified interface
     -addr=*      Specifies the IP address of the interface
     -mask=*      Specifies the subnet mask for the interface
     -gw=*        Specifies the gateway address for the interface
     -dns=*       Specifies the name server address for the interface
     -domain=*    Specifies the default domain for name service queries
     -speed=*     Sets the interface speed (auto, 10fdx, 10hdx, 100fdx, 100hdx, 1000fdx, 1000hdx)
     -loopback=*  Sets the loopback mode (off,internal,external)  External loopback causes the phy to be placed in loopback mode
     -hwaddr=*    Sets the hardware address (overrides environment)

CFE / Loader Commands , , ,



This site is not affiliated or sponsored in anyway by NetApp or any other company mentioned within.