4

I have an old Toshiba Satellite 4015CDT, with Pentium II MMX, 32MB RAM, 4GB HDD. It also has one USB 1.0 port, parallel and serial ports, a 3.5" floppy drive and a CD-ROM drive (almost dead). Also, NetBSD 5.1 is installed on the machine.*

Is it possible to connect the NetBSD machine to a Windows machine (Windows XP) through a serial port, so that the Windows machine will serve as a gateway to the Internet for the NetBSD machine? If so, how?

If it is of any help, here is the page from the NetBSD documentation on serial connections.

I would very much appreciate any help on this matter. Thanks in advance.

**This is the same computer as in here.*

3
  • 1
    If your Windows machine has a parallel port, you can get a faster connection, but the software and the right cable might be harder to get. Commented Mar 23, 2011 at 20:06
  • @Gilles, I have a father-father LPT cable. Is it possible to use it? Commented Mar 25, 2011 at 11:07
  • You need a null-printer cable, I don't know if all male-male parallel cables are suitable. Then you need to investigate PLIP support. It looks like NetBSD requires a patch. Of course, if you have a PCMICA slot, a PCMCIA Ethernet card would be faster. Even Ethernet over USB 1.0 (another possibility with your hardware) would be faster than parallel, I think. Commented Mar 25, 2011 at 19:28

1 Answer 1

2

I've done this on Linux. I had an old laptop that had no ethernet port, and I had no USB-ethernet port or PCMCIA ethernet adapters, but it did have a serial port. You need a null modem cable, and your NetBSD needs to be running a PPP daemon (it's called pppd on Linux).

You then set up serial port in Windows XP as a modem. You need to go to the "Phone and Modem Options" in the Control Panel and create a new modem based on the COM port you want to use and set the baud rate, etc. options accordingly. This then lets you use the "modem" as an Internet interface and you can enable Internet Connection sharing and all that good stuff.

Only caveat is that Windows thinks it's dialing a modem, so it will send modem commands to the serial port that pppd normally wouldn't expect. But you can use a chat script with pppd to basically tell pppd to pretend to be a modem to Windows.

After all this, you'll have an interface ppp0 or whatever NetBSD calls it forwarded through Windows Internet Connection Sharing running at the astonishing speed of 115Kbps.

Basically, this script fragment is the essence of what I'm running on the Linux box. $LOCAL_IP is the IP address of my router/DNS server, which is 10.0.0.1/24, and $LOCAL_NET_MASK is it's netmask which is 255.255.255.0 in this situation.

You need two consecutive IP addresses on the same subnet to form the "tunnel" that PPP depends on. That is then your IP address on the NetBSD box.

PPP_IFACE_ADDRESS="10.0.0.40:10.0.0.41"
echo "link: $TTY, IP interface: $PPP_IFACE_ADDRESS"
pppd 115200 netmask $LOCAL_NET_MASK crtscts connect 'chat -v -f /etc/admin/network/winclient.chat' lock local ms-dns $LOCAL_IP ms-wins $LOCAL_IP persist proxyarp silent $PPP_IFACE_ADDRESS $TTY noauth

and winclient.chat contains this text:

TIMEOUT 3600
CLIENT CLIENTSERVER\c

with an extra newline at the end of it.

But that's Linux. Don't know if pppd works on NetBSD the same way.

4
  • Should I run this script as root? Commented Mar 24, 2011 at 4:10
  • Yep, because the noauth option is a PPP "privileged" option, and I think pppd needs superuser privileges to create a network interface.
    – LawrenceC
    Commented Mar 24, 2011 at 10:33
  • it looks like your solution is for connecting a Windows machine to the Internet. I need it the other way around. Commented Mar 24, 2011 at 16:01
  • 115200 baud is plenty
    – user2497
    Commented Oct 10, 2017 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .