ChorusOS 5.0 System Administrator's Guide

The ChorusOS operating system as an ARP proxy

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:

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.

Figure 12-2 The ChorusOS system as an ARP Proxy

Graphic

Configuring the Gateway as an ARP Proxy

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:

  1. Create the two network interfaces:

    mkdev ifeth 0
    mkdev ifeth 1
  2. Configure interface ifeth0:

    ifconfig ifeth0 129.158.110.111 netmask 0xffffff00 broadcast 129.158.110.255
    ifwait ifeth0
  3. Configure interface ifeth1

    ifconfig ifeth1 129.158.112.222 netmask 0xffffff00 broadcast 129.159.112.255
    ifwait ifeth1
  4. Set up the routes:

    route add -net 129.158.110 -iface ifeth0
    route add -net 129.158.112 -iface ifeth1
  5. Configure the ChorusOS system to forward IP packets:

    sysctl -w net.inet.ip.forwarding=1
  6. Configure the ChorusOS system to forward ARP requests by activating the net.ether.inet.proxyall microkernel state:

    sysctl -w net.ether.inet.proxyall=1
Configuring the Hosts on the Subnetworks

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:

  1. Configure the ifeth0 interface:

    ifconfig ifeth0 129.158.110.333 netmask 0xffff0000 broadcast 129.158.255.255
    ifwait ifeth0
  2. 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.