Managing Multihomed Client Machines
| Chapter 10. Administering Client Machines and the Cache Manager |

## 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:

- A message to break the callback that the Cache Manager holds on a cached file

- A ping message to check that the Cache Manager is still accessible and responding; the File Server sends such a message every few minutes

(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:

- When you issue the fs setclientaddrs command, the revised list of addresses does not propagate automatically to File Servers with which the Cache Manager has already established a connection. They continue to use the list that the Cache Manager registered with them when it first established a connection. To force previously contacted File Servers to use the revised list, you must either reboot each file server machine, or reboot the client machine after changing its NetInfo file, NetRestrict file, or both.

- The fs command interpreter verifies that each of the addresses you specify on the fs setclientaddrs command line is actually configured with the client machine's operating system. If it is not, the command fails with an error message that marks the address as a `Nonexistent interface`.

- As previously noted, the File Server does not use the registered list of addresses when it responds to the Cache Manager's request for data (as opposed to initiating communication itself). It always attempts to send its reply to the interface from which the Cache Manager sent the request. If the reply attempt fails, the File Server selects an alternate route for resending the reply according to its server machine's network routing configuration, not the list of addresses registered by the Cache Manager.

- The Cache Manager does not use the list of interfaces when choosing the interface via which to establish a connection to a File Server.

- The list of addresses that the fs getclientaddrs command displays is not necessarily the one that a specific File Server is using, if an administrator has issued the fs setclientaddrs command since the Cache Manager first contacted that File Server. It determines only which addresses the Cache Manager registers when connecting to File Servers in future.

### 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 a slash (/) followed by a subnet length to represent all possible addresses in a range. For example, the entry `192.12.105.0/24` 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.

Maintaining Server Preference Ranks |  | Controlling the Display of Warning and Informational Messages