Problem: VisiBroker localaddr file FAQ Resolution: Information in this Brief applies to: Visibroker (versions 3 to 8.5) All Supported Platforms Overview This article contains frequently asked questions regarding the purpose and use of the optional VisiBroker localaddr file. Details What is the localaddr file? The localaddr file an optional VisiBroker configuration file used to define network interface information for multihomed hosts. What is the localaddr file used for? The localaddr file can be used to define which interfaces are used for UDP broadcast by the osagent when an osagent starts up and announces it's existence. Additionally, the osagent uses this information to match client handler requests to the best available sub network for the client. The localaddr file will also be used to define which interfaces are used for UDP broadcast by VisiBroker applications when the application must resort to broadcasting in order to locate an osagent. Where is the localaddr file located? If a localaddr file is used, it can be placed in the adm directory of the VisiBroker installation ($VBROKER_ADM/localaddr). Or it can be placed in an arbitrary location and referenced by the OSAGENT_LOCAL_FILE environment variable. (Note that some examples in the documentation show how to use the OSAGENT_LOCAL_FILE environment variable with a file named "agntaddr.txt" or "agentaddr". The examples are correct but use of these particular file names has caused some confusion with customers between the use of the OSAGENT_LOCAL_FILE and OSAGENT_ADDR_FILE environment variables. The OSAGENT_LOCAL_FILE can be set to a file that follows the localaddr format and will override the default location. The use of the OSAGENT_ADDR_FILE environment variable is not related to the localaddr file in any way). What is the format of the localaddr file? The localaddr file has the following format: #IP subnet_mask broadcast_address For example: #IP subnet_mask broadcast_address 172.20.80.16 255.255.0.0 172.20.255.255 172.30.80.16 255.255.0.0 172.30.255.255 Each field should be separated by a space. In some older versions of VisiBroker an extra newline or carriage return is necessary to ensure that the last line of the file is read correctly. When do I need to use the localaddr file? The localaddr file is often recommended Windows and AIX hosts with multiple network interfaces in order to specify the correct subnet masks and broadcast addresses. For other Unix platforms it is only necessary if itis desirable to limit the interfaces used by VisiBroker for UDPbroadcasts. The localaddr file is usually provided to control osagent behavior. How is the field used by VisiBroker? The osagent uses the IP address to establish client handlers. If more then one line with the same IP address are encountered in the localaddr file only the first will be used. Subsequent entries with the same IP address will be ignored. What is used for the if no localaddr is provided? The behavior varies depending on the platform. For Windows NT and AIX the default will be a list of addresses returned by gethostbyname. All other platforms use ioctl functions to determine the correct information for all interfaces dynamically. How is the field used by VisiBroker? All applications which use the osagent are considered clients to the osagent. Clients may be configured to use a specific osagent address, or may broadcast to locate an osagent. The osagent responds to the initial client request by replying with a handler address and port that will be used for all subsequent communication with that client. The osfind tool and the location service use a combination of UDP and TCP to communicate with the osagent. All other VisiBroker applications are UDP clients to the osagent. The osagent will use the subnet mask to try to find a best match for an incoming handler request. If a match is found, then the associated IP is passed back to the client for subsequent communications. If no match is found then the address passed back to the client depends on whether the client has requested a UDP handler or a TCP handler. If no match is found for a UDP handler request, the default IP of the host will be provided to the client for subsequent communications. If no match is found for a TCP handler request, the first IP in the localaddr file will be provided to the client for subsequent communications. What is used for the if no localaddr is provided? The behavior varies depending on the platform. For Windows NT and AIX the default will be as if there is a localaddr file with the subnet mask is hard coded to 255.255.255.0. In many cases this value will not be correct and the use of a localaddr file may be necessary. All other platforms use ioctl functions to determine the correct information for all interfaces dynamically. How can I determine the correct subnet mask for Windows NT or AIX? The "ipconfig /all" command can be used to determine the correct subnetmask values for Windows NT. The ifconfig and smit utilities can be used to determine the correct subnet mask values for AIX. Please see the AIX system documentation for instructions on using these utilities. Note that the subnet mask is used by the osagent to match client handler requests, so it is not always necessary to change the default values if the default values will also result in the correct match. How is the field used by VisiBroker? The osagent and VisiBroker applications use this field to define what is meant by broadcast. Whenever the osagent broadcasts it"s existence, or an application attempts to locate an osagent using broadcast, the set of broadcast addresses defined in localaddr will beused. What is used for the if no localaddr is provided? The behavior varies depending on the platform. For Windows NT and AIX the default will be as if there is a localaddr file with the IP address set to a system dependent definition (INADDR_BROADCAST). All other platforms use ioctl functions to determine the correct information for all interfaces dynamically. What are the acceptable values for the ? Normally the broadcast address is set to restrict broadcast to the samesubnet as the host (first example below). This can be widened or narrowed arbitrarily. For example, given the following IP address and subnet mask, several possible strategies are shown. # broadcast to the entire 172.20 subnet. 172.20.80.16 255.255.0.0 172.20.255.255 # broadcast to a limited portion (172.20.80) of the 172.20 subnet. 172.20.80.16 255.255.0.0 172.20.80.255 # broadcast to all addresses. 172.20.80.16 255.255.0.0 255.255.255.255
↧