Linuxdoc Linux Questions
Click here to ask our community of linux experts!
Custom Search
Custom Search
Custom Search

Chapter 29. Using PPP across a null modem (direct serial) connection

This is very simple - there is no modem in the way so things are much simpler.

First of all, choose one of the machines as a 'server', setting up a getty on the serial port so you can test that you do have connectivity using minicom to access the serial port on the 'client'.

Once you have this functioning, you can remove the getty UNLESS you want to make sure that the connection is validated using user name/password pairs as for a dial up connection. As you have 'physical control' of both machines, I will presume that you do NOT want to do this.

Now, on the server, remove the getty and make sure that you have the serial ports on both machines configured correctly using 'setserial'.

All you need to do now is to start pppd on both systems. I will assume that the connection uses /dev/ttyS34 on both machines. So, on both machines execute the command:-

pppd -detach crtscts lock <local IP>:<remote IP> /dev/ttyS3 38400 &

This will bring up the link - but as yet you have no routing specified. You can test the link by pinging to and fro to each machine. If this works, bring down the link by killing one of the pppd processes.

The routing you need will of course depend on exactly what you are trying to do. Generally, one of the machines will be connected to an Ethernet (and beyond) and so the routing required is exactly the same as for a PPP server and client.

So on the Ethernet equipped machine, the pppd command would be...

pppd -detach crtscts lock proxyarp <local IP>:<remote IP> /dev/ttyS3 38400 &

and on the other machine ...

pppd -detach crtscts lock defaultroute <local IP>:<remote IP> /dev/ttyS3 38400 &

If you are linking two networks (using a serial link!) or have more complex routing requirements, you can use /etc/ppp/ip-up in exactly the same way as mentioned earlier in this document.