Re: Serial SLIP Connection
Hello Dan, ASB> Here is a note I wrote myself some years ago, when I > last tried it. I like slip because it's simple and > does the job. I will try to test it this evening. I can confirm that SLIP still works. Here's an iperf speed test over the serial connection:- Client connecting to 192.168.3.1, TCP port 5001 TCP window size: 32.5 KByte (default) [ 3] local 192.168.3.2 port 65527 connected with 192.168.3.1 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-18.2 sec 256 KBytes 115 Kbits/sec -Andy Ball
Re: Serial SLIP Connection
Hello Dan, Here is a note I wrote myself some years ago, when I last tried it. I like slip because it's simple and does the job. I will try to test it this evening. /etc/ifconfig.sl0 ! /sbin/slattach -h -s 115200 /dev/tty00 inet 192.168.3.129 192.168.3.128 up (IP addresses reversed at one end of the cable). -Andy Ball.
Re: Serial SLIP Connection
Dan Plassche writes: > On 11/1/18, Andy Ruhl wrote: >> On Thu, Nov 1, 2018 at 10:50 AM Dan Plassche wrote: >>> 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 > > Thanks, Andy. The netmask was defaulting to 255.0.0.0 and I now > set it to 255.255.255.252 at each end. I tried again without cu > and setting both ends as 10.0.5.1 and 10.0.5.2, but still had the > same behavior (can ping out, but no packets received or route to > DNS on the cient). The test server's network card is at 10.0.2.15 > with the gateway at 10.0.2.2 and the DNS at 10.0.2.3. Adding > additional static routes to those endpoints through the NetBSD > server did not seem to help. I am not really following your descriptions of what is working and what isn't, in particularly "ping out". On the two machines with slip, you should run tcpdump, and on each, see what happens when you "ping -n 10.0.5.2" from 1, and vice versa. If that works, your slip configuration itself is ok. Then, on the machine that has a regular interface and slip (yes, an old timer is cringing hearing that :-), presumably you can successfully ping machines on the greater internet, telnet to 80/443, etc. Then, the questions are: is IP forwarding enabled on the gateway machine? if you ping 10.0.2.2 from the slip-only machine, and run tcpdump on the gateway machine, first on the slip line, and then on the ethernet, do you see the outgoing ICMP echo request packets? Do you see replies? run netstat -s, then do the above for 10s, then netstat -s again, and diff the results. Explain all changed counters. (Really; this will find things you don't realize you should look for.) on another machine on the lan, ping 10.0.5.2. tcpdump and see what happens. Explain how you have routes set up for normal lan machines to know that 10.0.5.0/30 is reached via the gateway machine.
Re: Serial SLIP Connection
I'm curious - why SLIP and not PPP? Regards, Malcolm -- Malcolm Herbert m...@mjch.net
Re: Serial SLIP Connection
On 11/1/18, Andy Ruhl wrote: > On Thu, Nov 1, 2018 at 10:50 AM Dan Plassche wrote: >> 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 > > I haven't done this in a really long time, but I don't remember > needing cu when using 2 directly attached machines over a null modem. > Just slattach. Maybe that changed. > > I also seem to recall using a /30 and a netmask for both ends. Your > addresses don't belong to the same /30. Try using .1 and .2 or .5 and > .6. > > Just stuff to try. I can't say that this info is useful 20 years later. > > Andy > Thanks, Andy. The netmask was defaulting to 255.0.0.0 and I now set it to 255.255.255.252 at each end. I tried again without cu and setting both ends as 10.0.5.1 and 10.0.5.2, but still had the same behavior (can ping out, but no packets received or route to DNS on the cient). The test server's network card is at 10.0.2.15 with the gateway at 10.0.2.2 and the DNS at 10.0.2.3. Adding additional static routes to those endpoints through the NetBSD server did not seem to help.
Re: Serial SLIP Connection
On Thu, Nov 1, 2018 at 10:50 AM Dan Plassche wrote: > 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 I haven't done this in a really long time, but I don't remember needing cu when using 2 directly attached machines over a null modem. Just slattach. Maybe that changed. I also seem to recall using a /30 and a netmask for both ends. Your addresses don't belong to the same /30. Try using .1 and .2 or .5 and .6. Just stuff to try. I can't say that this info is useful 20 years later. Andy
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