vif destroy vif_name
vif add vif_name interface_list
vif { favor | nofavor } interface
vif status [ vif_name ]
vif stat vif_name [ interval ]
In the vif commands, vif_name stands for the name of a virtual interface. The name must be a string that is no longer than 15 characters and meets the following criteria:
- It must begin with a letter.
- It must not contain a space.
- It must not already be in use for a virtual interface.
Virtual interface names are case-sensitive.
Once created, a virtual interface is indistinguishable from a physical network interface. You can inspect and modify statistical and configuration information using the ifconfig and netstat commands, among others.
You can create a virtual interface in one of two modes: single or multi.
In single mode, only one of the links is active at a time. If Data ONTAP detects a fault in the active link, an inactive link in the trunk, if available, is activated.
In multi mode, all links are simultaneously active. This mode is only useful if all the links are connected to a switch that supports trunking over multiple port connections. The switch must be configured to understand that all the port connections share a common media access control (MAC) address and are part of a single logical interface. The switch is responsible for determining how to forward incoming packets to the filer.
Network interfaces belonging to a trunk do not have to be on the same network card. However, some Ethernet switches or routers require that all Ethernet interfaces forming a virtual interface be either half-duplex or full-duplex. Check the documentation that comes with your Ethernet switch or router to see whether you need to configure the filer Ethernet interfaces to be half-duplex or full-duplex.
With the vif command, you can also create a trunk of trunks. For example, a subnetwork has two switches that are capable of trunking over multiple port connections. The filer has a two-link multi trunk to one switch and a two-link multi trunk to the second switch. You can create a second-level trunk in single mode that contains both of the multi trunks. When you configure the second-level trunk using the ifconfig command, only one of the two multi trunks is brought up as the active link. If all the underlying interfaces in the active trunk fail, the second-level trunk activates the link corresponding to the other trunk.
You can destroy a virtual interface only if you have configured it down using the ifconfig command.
The virtual interface driver constantly checks each virtual interface and each link for status. Links issue two types of indications:
If all the links for a virtual interface are broken, the virtual interface issues a system log message similar to this:
Fri Oct 16 15:09:29 PDT [toaster: pvif_monitor]: vif0: all links are down
If all links on a virtual interface are broken and a link subsequently comes back up, the virtual interface issues a system log message similar to this:
Fri Oct 16 15:09:42 PDT [toaster: pvif_monitor]: vif0: switching to e3a
The following command creates a multi virtual interface vif0 with two links, e3a and e3b:
vif create vif0 e3a e3b
The status option prints out results in the following form. Here is an example of the output for vif0:
vif status
default: transmit 'multi', fail 'log'
vif0: 2 links, transmit 'multi', fail 'default'
up:
e3a: state up, since 15Oct1998 14:58:13 (05:23:09)
mediatype: auto-tp-up
flags: enabled
input packets 2386, input bytes 234962
output packets 0, output bytes 0
up indications 19392, broken indications 0
indication: up at 15Oct1998 20:21:22
consecutive 19392, transitions 0
e3b: state up, since 15Oct1998 14:58:13 (05:23:09)
mediatype: auto-tp-up
flags: enabled address-set-1
input packets 267, input bytes 25530
output packets 930, output bytes 196196
up indications 19389, broken indications 0
indication: up at 15Oct1998 20:21:22
consecutive 19389, transitions 0
down:
broken:
In this example, both of the vif0 links are in the active (up) state. vif0 is configured to transmit over multiple links and its failure behavior is the default (send errors to the system log). Links are in one of three states:
Links constantly issue either up or broken indications based on their interaction with the switch. The consecutive count indicates the number of consecutively received indications with the same value (in this example, up). The transitions count indicates how many times the indication has gone from up to down or from down to up.
If vif0 is a link in a second-layer trunk (for example, vif create vif2 vif0), an additional line is added to its status information:
trunked: vif2
The following example displays statistics about multi virtual interface vif0:
vif stat vif0
Virtual interface (trunk) vif0
e3a e3b
In Out In Out
8637076 47801540 158 159
1617 9588 0 0
1009 5928 0 0
1269 7506 0 0
1293 7632 0 0
920 5388 0 0
1098 6462 0 0
2212 13176 0 0
1315 7776 0 0
1. The local node must specify, using the partner option of the ifconfig command, the mapping of the partner's virtual interface. For example, to map the partner's vif2 interface to the local vif1 interface, the following command is required:
ifconfig vif1 partner vif2
Note that the interface must be named, not the address. The mapping must be at the top-level trunk, if trunks are nested. You do not map link-by-link.
2. After takeover, the partner must "create" its virtual interface. Typically, this takes place in the /etc/rc file. For example:
vif create vif2 e3a e3b
When executed in takeover mode, the local node does not actually create a vif2 virtual interface. Instead, it looks up the mapping (in this example partner vif2 to local vif1) and initializes its internal data structures. The interface list (in this example, e3a and e3b) is ignored because the local node can have different mappings of devices for its vif1 trunk.
3. After the partner virtual interface has been initialized, it must be configured. For example:
ifconfig vif2 `hostname`-vif2
Only the create, stat, and status options are enabled in partner mode. The create option does not create new virtual interfaces in partner mode. Instead, it initializes internal data structures to point at the mapped local virtual interface. The status and stat options reference the mapped virtual interface. However, all links are printed using the local device names.
When using multi vifs with clusters, connecting the vifs into a single switch constitutes a single point of failure. By adding a second switch and setting up two multi vifs on each node in the cluster so that the multi vifs on each node are connected to separate switches the trunks will continue to operate in the face of single switch failure. The following /etc/rc file sequence illustrates this approach:
# configuration for node 1 # first level multi vif: # attach e4a and e4b to Switch 1 vif create multi vif0 e4a e4b # first level multi vif: # attach e4c and e4d to Switch 2 vif create multi vif1 e4c e4d # second level single vif consisting of both # first level vifs; only one active at a time vif create single vif10 vif0 vif1 # use vif0 unless it is unavailable vif favor vif0 # configure the vif with an interface and partner ifconfig vif10 `hostname-vif10` partner vif10
The partner node is configured similarly; the favored first level interface in this case is the trunk connected to "Switch 2".
Virtual interfaces can have no more than four links.
The fault detection mechanism does not detect whether the switch is connected to the network. Link status is the only mechanism used to determine whether a link is up or broken.
The older Gigabit Ethernet interface, the Gigabit Ethernet Controller, cannot be configured in a trunk. The newer Gigabit Ethernet interface, identified as Gigabit Ethernet Controller II by the sysconfig command, can be configured in a trunk, and a trunk can include both GbE-II interfaces and 10/100 interfaces. However, most switches do not support mixing 10/100 and Gigabit Ethernet interfaces in a multi-mode trunk.