SLIP and slattach

After some experimenting I've managed to get a semi-permanent 115kb/s SLIP connection between my main Debian server and a 486 running BSD. By semi-permanent, I mean as soon as there's a power cycle I'm going to have to run out with a laptop with DHCP server, a crossover cable and some patience to make it work again.

Here's a bit of odd behaviour from the BSD machine shown from /var/log/messages:

Nov 20 03:08:33 cogline slattach[644]: SIGHUP on /dev/ttyd0 (sl-1); exiting

This occurs when I run slattach -s 115200 /dev/ttyd0 with nothing attached to the port, or when the other computer is connected and has been running slattach for "a while" (a minute or two?). Debian slattach has no difficulty running with the serial port in any condition, and if it's started reasonably soon before the BSD slattach, everything is fine.

Unfortunately this kind of problem makes it difficult to set up computers that will automatically negotiate a SLIP connection when they first turn on. I configured the BSD system to run slattach and the required ifconfig command on boot and it never works.

Normally SIGHUP is used to indicate that the carrier has dropped and a redial is necessary. The BSD slattach code reveals that the above message is simply what the SIGHUP handler does when no redial command is set, presumably before the interface has finished initialising because the "unit" is still "sl-1" instead of "sl0". I'm using a null modem cable so it makes sense that the carrier will go down when nothing is attached, but that doesn't explain the failure when both are running for a while.

Curious. Stay tuned, I might learn something.

Post a Comment

Your email is never shared.