SLIP stands for "serial line ip" and is a simple way of encapsulating ip packets on a serial line. The serial connection has to be 8 Bit clean.
Unlike the more advanced PPP, SLIP does nothing more than providing an IP link. Everything else in the lifecycle of an IP connection - serial communications setup, routing, DNS setup, authentication, bringing up and pulling down the link - is out of the scope of SLIP, and has to be done manually.
While PPP has replaced SLIP in dynamic, dial-up scenarios, SLIP remains a simple and lean alternative in memory-constrained setups where you control both ends of the link, like NetBSD install kernels, or embedded systems.
The SLIP server needs to provide a serial interface, (optional) authentication, and routing for the ip link.
Probably the easiest way of setting up a serial link is to run getty(8) on the port, and have it hand over the authenticated session to sliplogin:
# /etc/ttys [...] # 38k4 slip access, "server" side tty01 "/usr/libexec/getty std.38400" unknown on local dtrcts
Here, local disables modem control on the line, and dtrcts is a mac68k peculiarity: So-called "hardware handshake" serial cables connect the DTR and HsKo pins, which gives you either modem control (DTR), or flow control (RTS) in hardware.
slip login account member of group "dialer"; no need for an entry in /etc/shells
slip getty setup no modem control, hardware handshake
sliplogin(8) looks at /etc/sliphome/slip.hosts to identify the remote system.
# loginname local-address remote-address netmask opt-args Sslip01 `hostname` slip01 255.255.255.255 link0 link2
Here, the opt-args are link[0-2]. These are switches which change link-level interface behaviour, and should be documented in the sl(4) manpage but are not yet. OpenBSD has just updated their sl(4) manpage (thanks to Marc for the pointer :).
The content of /etc/sliphome
Unless you want to set up a routing daemon for the slip connection the easiest possibility is proxy arp. This means that you have the slip server advertise the ip address on the slip interface under the MAC address of its ethernet LAN interface by having the /etc/sliphome.slip.login script create a manual arp(1) entry.
Make sure that the arp entry gets removed properly after terminating the connection (see /etc/sliphome/slip.logout).
Discuss slipconnect.sh content.
| RFC 1055 - SLIP | A nonstandard for transmission of ip datagrams over serial lines. |
| RFC 1144 - CSLIP | Compressing TCP/IP headers for low-speed serial links |
| sl(4) | Serial Line IP (SLIP) network interface |
| NetBSD PR 33672 | link[0-2] documentation missing from NetBSD sl(4) manpage |
| slattach(8) | Attach serial lines as network interfaces |
| sliplogin(8) | Attach a serial line network interface |
| slstats(8) | Report slip statistics |
| arp(4) | Address Resolution Protocol |
| NetBSD PR 33923 | slattach(8) can't attach sl(4) interface |
| W. Richard Stevens: "TCP/IP Illustrated, Volume 1 - The Protocols", ch. 2.4 |