next up previous contents index
Next: The PLIP Interface Up: Interface Configuration for IP Previous: Routing through a Gateway

Configuring a Gateway

Configuring a machine to switch packets between two Ethernets is pretty straightforward. Assume we're back at vlager, which is equipped with two Ethernet boards, each being connected to one of the two networks. All you have to do is configure both interfaces separately, giving them their respective IP address, and that's it.

It is quite useful to add information on the two interfaces to the hosts file in the way shown below, so we have handy names for them, too:

    191.72.1.1      vlager      vlager.vbrew.com
    191.72.1.1      vlager-if1
    191.72.2.1      vlager-if2

The sequence of commands to set up the two interfaces is then:

    # ifconfig eth0 vlager-if1
    # ifconfig eth1 vlager-if2
    # route add brew-net
    # route add wine-net



Mon Aug 5 17:45:08 MET DST 1996