Managing Multihomed Client Machines

The File Server can choose the interface to which to send a message when it initiates communication with the Cache Manager on a multihomed client machine (one with more than one network interface and IP address). If that interface is inaccessible, it automatically switches to an alternate. This improves AFS performance, because it means that the outage of an interface does not interrupt communication between File Server and Cache Manager.

The File Server can choose the client interface when it sends two types of messages:

(The File Server does not choose which client interface to respond to when filling a Cache Manager's request for AFS data. In that case, it always responds to the client interface via which the Cache Manager sent the request.)

The Cache Manager compiles the list of eligible interfaces on its client machine automatically as it initializes, and records them in kernel memory. When the Cache Manager first establishes a connection with the File Server, it sends along the list of interface addresses. The File Server records the addresses, and uses the one at the top of the list when it needs to break a callback or send a ping to the Cache Manager. If that interface is inaccessible, the File Server simultaneously sends a message to all of the other interfaces in the list. Whichever interface replies first is the one to which the File Server sends future messages.

You can control which addresses the Cache Manager registers with File Servers by listing them in two files in the /usr/vice/etc directory on the client machine's local disk: NetInfo and NetRestrict. If the NetInfo file exists when the Cache Manager initializes, the Cache Manager uses its contents as the basis for the list of interfaces. Otherwise, the Cache Manager uses the list of interfaces configured with the operating system. It then removes from the list any addresses that appear in the /usr/vice/etc/NetRestrict file, if it exists. The Cache Manager records the resulting list in kernel memory.

You can also use the fs setclientaddrs command to change the list of addresses stored in the Cache Manager's kernel memory, without rebooting the client machine. The list of addresses you provide on the command line completely replaces the current list in kernel memory. The changes you make persist only until the client machine reboots, however. To preserve the revised list across reboots, list the interfaces in the NetInfo file (and if appropriate, the NetRestrict file) in the local /usr/vice/etc directory. (You can also place the appropriate fs setclientaddrs command in the machine's AFS initialization script, but that is less efficient: by the time the Cache Manager reads the command in the script, it has already compiled a list of interfaces.)

To display the list of addresses that the Cache Manager is currently registering with File Servers, use the fs getclientaddrs command.

Keep the following in mind when you change the NetInfo or NetRestrict file, or issue the fs getclientaddrs or fs setclientaddrs commands:

To create or edit the client NetInfo file

  1. Become the local superuser root on the machine, if you are not already, by issuing the su command.

       % su root
       Password: <root_password>
    
  2. Using a text editor, open the /usr/vice/etc/NetInfo file. Place one IP address in dotted decimal format (for example, 192.12.107.33) on each line. On the first line, put the address that you want each File Server to use initially. The order of the remaining machines does not matter, because if an RPC to the first interface fails, the File Server simultaneously sends RPCs to all of the other interfaces in the list. Whichever interface replies first is the one to which the File Server then sends pings and RPCs to break callbacks.

  3. If you want the Cache Manager to start using the revised list immediately, either reboot the machine, or use the fs setclientaddrs command to create the same list of addresses in kernel memory directly.

To create or edit the client NetRestrict file

  1. Become the local superuser root on the machine, if you are not already, by issuing the su command.

       % su root
       Password: <root_password>
    
  2. Using a text editor, open the /usr/vice/etc/NetRestrict file. Place one IP address in dotted decimal format on each line. The order of the addresses is not significant. Use the value 255 as a wildcard that represents all possible addresses in that field. For example, the entry 192.12.105.255 indicates that the Cache Manager does not register any of the addresses in the 192.12.105 subnet.

  3. If you want the Cache Manager to start using the revised list immediately, either reboot the machine, or use the fs setclientaddrs command to set a list of addresses that does not included the prohibited ones.

To display the list of addresses from kernel memory

  1. Issue the fs getclientaddrs command.

       % fs getclientaddrs 
    

    where gc is an acceptable alias for getclientaddrs (getcl is the shortest acceptable abbreviation).

The output lists each IP address on its own line, in dotted decimal format.

To set the list of addresses in kernel memory

  1. Become the local superuser root on the machine, if you are not already, by issuing the su command.

       % su root
       Password: <root_password>
    
  2. Issue the fs setclientaddrs command to replace the list of addresses currently in kernel memory with a new list.

       # fs setclientaddrs [-address <client network interfaces>+]
    

    where

    sc

    Is an acceptable alias for setclientaddrs (setcl is the shortest acceptable abbreviation).

    -address

    Specifies one or more IP addresses in dotted decimal format (hostnames are not acceptable). Separate each address with one or more spaces.