The Address Resolution Protocol (ARP -- see ARP(7P)) maps IP addresses to specific machine addresses in a network. Where a ChorusOS system is acting as a gateway between two or more subnetworks, configuring it as an ARP proxy allows you to handle all the different physical subnetworks as if they are the same network. In other words, creating an ARP proxy makes a single virtual network composed of several physical subnetworks. Consequently, the different hosts located on these networks can communicate without being aware of the presence of the gateway.
This type of configuration is desirable in the following circumstances:
To extend an ethernet segment beyond the physical limit of the ethernet transport used. The ARP proxy gateway can be used to join two or more subnetworks together to form a single ethernet segment with a single network configuration.
To boot a diskless machine via the network if the server providing the system image is located on the other side of a gateway. This situation requires the gateway to be transparent since the firmware code used to load the system image through the network is unaware of the gateway's existence.
A ChorusOS host with two or more ethernet adapters can be configured as an ARP proxy linking different network interfaces to create a single, virtual network, as shown in Figure 12-2.
To configure the ChorusOS gateway to act as an ARP proxy, create the two network interfaces, set them up and create the routing table. To create the example shown in Figure 12-2, you add the following to the sysadm.ini file of the ChorusOS gateway:
Create the two network interfaces:
mkdev ifeth 0 mkdev ifeth 1
Configure interface ifeth0:
ifconfig ifeth0 129.158.110.111 netmask 0xffffff00 broadcast 129.158.110.255 ifwait ifeth0
Configure interface ifeth1
ifconfig ifeth1 129.158.112.222 netmask 0xffffff00 broadcast 129.159.112.255 ifwait ifeth1
Set up the routes:
route add -net 129.158.110 -iface ifeth0 route add -net 129.158.112 -iface ifeth1
Configure the ChorusOS system to forward IP packets:
sysctl -w net.inet.ip.forwarding=1
Configure the ChorusOS system to forward ARP requests by activating the net.ether.inet.proxyall microkernel state:
sysctl -w net.ether.inet.proxyall=1
You must now configure the individual hosts on the virtual network so that they use the ARP proxy gateway. To configure Host A in Figure 12-2 you add the following lines to its sysadm.ini file:
Configure the ifeth0 interface:
ifconfig ifeth0 129.158.110.333 netmask 0xffff0000 broadcast 129.158.255.255 ifwait ifeth0
Set a default route, since the router simulates a single network:
route add default -iface ifeth0
As you can see, when configuring the hosts on the network you are required only to specify the IP address of that particular host and the IP address of the virtual network. There is no requirement to specify the exact IP address of the gateway, thus rendering the gateway transparent to all the individual hosts on the network.