NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Serial SLIP Connection
I'm having trouble setting up a direct serial connection on
NetBSD 7.0.2 to share a server's internet access with a client
over SLIP. The server has internet access over a wired ethernet
card (wm0) and connects to the client over a serial line (null
modem cable).
I started by testing this in virtual machines and I would like to
get it working before deploying to real hardware. I've been
manually setting up the interfaces, but creating a sliplogin
account with the same settings shown below after running getty on
the server's tty00 did not seem to help as alternatives.
Here's what I've tried so far:
1. Created 2 connected PTY devices to attach one to the serial
port on each QEMU machine:
socat -d -d -4 \
pty,raw,user=dp,group=staff,crnl,echo=0,mode=777,\
link=/usr/home/dp/serial-host \
pty,raw,user=dp,group=staff,crnl,echo=0,mode=777,\
link=/usr/home/dp/serial-client
2. Started QEMU x86 NetBSD server and client attached to each
respective PTY:
qemu-system-i386 -nodefaults -hda nbsd72-server.img \
-chardev tty,path=/usr/home/dp/serial-host,id=ser-tty \
-device isa=serial,chardev=ser-tty -net nic -net user \
-vga std &
qemu-system-i386 -nodefaults -hda nbsd72-client.img \
-chardev tty,path=/usr/home/dp/serial-host,id=ser-tty \
-device isa=serial,chardev=ser-tty -net nic -net user \
-vga std &
3. Dial-out to connect to server from client using -t flag
for local line without modem:
cu -t -s 9600 -l /dev/dty00
4. Escape back to shell (~!) on client and setup sl0 interface:
ifconfig sl0 create
slattach -l -s 9600 -t slip /dev/dty00
ifconfig sl0 inet 10.0.2.7 10.0.2.6 arp up
route add default 10.0.2.6
5. Setup interface on server
ifconfig sl0 create
slattach -l -s 9600 -t slip /dev/tty00
ifconfig sl0 inet 10.0.2.6 10.0.2.7 arp up
Any suggestions would be appreciated!
Thanks,
Dan Plassche
Home |
Main Index |
Thread Index |
Old Index