to be handed to
#
route add default gw vlager
The network name
If you see high packet loss rates when pinging a host behind one or more gateways, this may hint at a very congested network. Packet loss is not so much due to technical deficiencies as to temporary excess loads on forwarding hosts, which makes them delay or even drop incoming datagrams.
Configuring a Gateway
Configuring a machine to switch packets between two Ethernets is pretty straightforward. Assume we're back at
It is quite useful to add information on the two interfaces to the
172.16.1.1 vlager.vbrew.com vlager vlager-if1
172.16.2.1 vlager-if2
The sequence of commands to set up the two interfaces is then:
# ifconfig eth0 vlager-if1
# route add brew-net
# ifconfig eth1 vlager-if2
# route add wine-net
If this sequence doesn't work, make sure your kernel has been compiled with support for IP forwarding enabled. One good way to do this is to ensure that the first number on the second line of
The PLIP Interface
A PLIP link used to connect two machines is a little different from an Ethernet. PLIP links are an example of what are called
PLIP provides very cheap and portable links between computers. As an example, we'll consider the laptop computer of an employee at the Virtual Brewery that is connected to
# ifconfig plip1 vlite pointopoint vlager
# route add default gw vlager
The first command configures the interface, telling the kernel that this is a point-to-point link, with the remote side having the address of
# ifconfig plip1 vlager pointopoint vlite
Note that the
Now we have configured routing from the laptop to the Brewery's network; what's still missing is a way to route from any of the Brewery's hosts to
#
route add vlite gw vlager
Dynamic routing offers a much better option for temporary routes. You could use gated, a routing daemon, which you would have to install on each host in the network in order to distribute routing information dynamically. The easiest option, however, is to use
Current
The SLIP and PPP Interfaces
Although SLIP and PPP links are only simple point-to-point links like PLIP connections, there is much more to be said about them. Usually, establishing a SLIP connection involves dialing up a remote site through your modem and setting the serial line to SLIP mode. PPP is used in a similar fashion. We discuss SLIP and PPP in detail in Chapter 7 and Chapter 8, The Point-to-Point Protocol.
The Dummy Interface
The dummy interface is a little exotic, but rather useful nevertheless. Its main benefit is with standalone hosts and machines whose only IP network connection is a dialup link. In fact, the latter are standalone hosts most of the time, too.
The dilemma with standalone hosts is that they only have a single network device active, the loopback device, which is usually assigned the address