There is basically no difference between linking a single Linux PC to a
PPP server and linking two LANs using PPP on a machine on each LAN.
Remember, PPP is a peer to peer protocol.
However, you DEFINITELY need to understand about how routing is
established. Read the NET-2 howto and the Linux Network Administrator
Guide (NAG). You will also find " TCP/IP Network
Administration" (published by O'Reilly and Assoc - ISBN
0-937175-82-X) to be of invaluable assistance.
If you are going to be sub networking an IP network number on either side
of the link, you will also find the Linux (draft) sub networking
mini-howto) to be of use. This is available at
Linux Sub networking mini-HOWTO.
In order to link two LANs, you must be using different IP network
numbers (or subnets of the same network number) and you will need to use
static IP numbers - or use IP masquerade. If you want to use IP
masquerade, see the IP masquerade mini-howto for instructions on setting
that up.
Arrange with the network administrator of the other LAN the IP numbers
that will be used for each end of the PPP interface. If you are using
static IP numbers, this will also probably require you to dial into a
specific telephone number.
Now edit the appropriate /etc/ppp/options[.ttyXX] file - it's a
good idea to have a specific modem and port at your end for this
connection. This may well require you to change your
/etc/ppp/options file - and create appropriate
options.ttyXX files for any other connections!
Specify the IP numbers for your end of the PPP link in
the appropriate options file exactly as shown above for static IP
numbers.
You must arrange that packets on your local LAN are routed across the
interface that the PPP link establishes. This is a two stage process.
First of all, you need to establish a route from the machine running the
PPP link to the network(s) at the far end of the link. If the link is to
the Internet, this can be handled by a default route established by pppd
itself at your end of the connection using the 'defaultroute' option to pppd.
If however, the link is only linking two LANs, then a specific network
route must be added for each network that is accessible across the link.
This is done using a 'route' command for each network in the
/etc/ppp/ip-up script (see After the link comes up...) for instructions
on doing this.
The second thing you need to do is to tell the other computers on your
LAN that your Linux computer is actually the 'gateway' for the network(s)
at the far end of the ppp link.
Of course, the network administrator at the other end of the link has to
do all this too! However, as s/he will be routing packets to your specific
networks, a specific network route will be required, not a default
route (unless the LANs at the far and of the link are linking into you
to access the Internet across your connection).
If you are linking you LAN to the Internet using PPP - or even just to a
"foreign" LAN, you need to think about security issues. I
strongly urge you to think about setting up a firewall!
You should also speak to the LAN administrator at your site BEFORE
you start linking to foreign LANs or the Internet this way. Failure to
do so could earn you anything from no reaction to really serious trouble!
Copyright ゥ 2000 TUCOWS.COM Inc.
TUCOWS.COM Inc. has no liability for any content or goods on the TUCOWS site or the
Internet, except as set forth in the terms
and conditions and privacy
statement.