Наши партнеры

Книги по Linux (с отзывами читателей)

Библиотека сайта rus-linux.net

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:

       vlager      vlager.vbrew.com

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
Andrew Anderson
Thu Mar 7 23:22:06 EST 1996