TCP/IP over null-modem
This tiny document describes how I managed to establish a TCP/IP connection between two Debian GNU/Linux boxes using a null-modem cable.
Software
You need the net-tools and ifupdown packages installed (you’ll probably have those installed anyway). On non-debian systems, take care to have /sbin/slattach installed.
Kernel
You need “Network device support -> SLIP (serial line) support” (CONFIG_SLIP) enabled.
/etc/network/interfaces
On machine 1, add the following lines:
iface sl0 inet static
address 192.168.0.1
netmask 255.255.255.255
pointopoint 192.168.0.2
On the other box, the lines look like:
iface sl0 inet static
address 192.168.0.2
netmask 255.255.255.255
pointopoint 192.168.0.1
Notice the absence of a second (third) t in pointopoint!
slattach
Now it’s time to run slattach -s <speed> -p slip <device>, e.g. slattach -s 115200 -p slip /dev/ttyS0 on both machines.
Bring up the interface
You can now ifup sl0 on both machines et voilà – here’s your tcp/ip connection.
Sources
- SLIP on GNU/Linux Debian 2.2 by Per Weijnitz