Using a NetWinder with MediaOne Express

The NetWinder makes a great Internet access terminal as well as an IP masquerading gateway for other computers.

I have mine set up with MediaOne Express (New England), an Internet cable-modem service of my cable TV provider. I get roughly 1.5Mb/sec downstream and 300Kb/sec upstream for $39.95(US)/month including the cable-modem lease. I highly recommend it if it is available in your area. (This must be a painful read for those folks in Europe who pay by-the-minute for crappy bandwidth. :P )

The wire coming into my house is a standard coax cable, but separate from the cable-TV cable ("allow myself to introduce... um.. myself"). From the wall, it goes to a LANcity cable modem, which has a 10baseT ethernet port on the back, which I plug directly into the 10/100 (Tulip) ethernet port on the NetWinder:

 Wall  |   coax    ----------		      |     O\
 Plate ]==========+  Cable   |           eth1 | Net   |
       |          |  Modem   +----------------+ Winder|
                  |__________|	      --------+       |
                                     |   eth0 |______/
                     PC ---------    |          /___\
                     PC -------- |   | 
                     ...       -+++++++-
                              | 10BaseT |
                              |   Hub   |

Eth0 goes into a separate LinkSys 10BaseT hub, and the NetWinder does IP masquerading to provide Internet access for all of the computers involved. For the other computers, its as simple as doing "route add -net default gw netwinder", updating /etc/resolv.conf, and you're off and running.

How To Set It Up

Before you do anything, make a note of your ethernet hardware (MAC) addresses. Run "/sbin ifconfig eth0" and "/sbin ifconfig eth1" and save the output somewhere (write it down or print it out) since as Ralph Siemsen pointed out,
> I was just looking over your page on using the MediaOne Express 
> and thought I should mention that as of the 2.0.35 kernel, the MAC 
> address _is_ stored  [ when one does ifconfig with the "hw" 
> parameter].

I have found that the ethernet address does reset itself between boots, so I'm not sure about Ralphs assertion, but write the number down anyway just to be safe...

Ok, the first problem is that MediaOne will only install on Windows 95, NT Workstation, or Macintosh, because (1) that's the most cost-effective selection of OS's to trains their techs on and (2) NT Server and Linux have certain services enabled by default which lend themselves to cracker vulnerabilities (they seem to be worried most about spammers getting ahold of your system and using it as a mail relay for a few million messages; also, running a DHCP server on your public network interface will get your service disconnected). Once installed though, you're free to do whatever you want. They don't prohibit NT Server or Linux, they just don't support it.

MediaOne uses DHCP to supply your IP address, name server(s), and routing information. Thus, they need the MAC address (ethernet hardware address) of the Ethernet card in your PC to set up the DHCP server end. Once you switch over to the NetWinder, you can either call tech support and tell them "I have a new Ethernet card in my PC" (lie) and use the NetWinder MAC address, or (as I do) use "ifconfig" to tell the NetWinder to use the PC's MAC address. The second approach has the added benefit that if you decide to use your PC as a DHCP client later on, you don't have to keep bugging MediaOne's tech support.

Running an earlier disk image with a 2.0.x kernel, the stock DHCP client daemon "dhcpcd" worked well for me. Once dhcpcd gets a DHCP response from the server, it creates two files, "/etc/dhcpc/hostinfo-{interface}" and "/etc/dhcpc/resolv.conf". My /etc/resolv.conf is just a symlink to the latter file. The first file contains IP address, netmask, router, etc. in a format suitable for sourcing as Bourne Shell commands. I delete it, start dhcpcd, then wait for it to be created before continuing my system boot.

With newer disk images and 2.2.x kernels, dhcpcd did not work properly, so I am currently experimenting with "dhclient" instead. It has some "issues" that I don't fully understand, so I'm not going to document its use further here...

Here is the script that I call from /etc/rc.d/rc.local to set up my MediaOne connection:


# Set up MediaOne connection.


echo "Setting up MediaOne connection..."
# If you don't want to bother telling MediaOne about your NetWinder's
# ethernet address, keep the line below and replace 00:11:22:33:44:55 
# with the ethernet address from your PC.
# On kernel's 2.0.35 and later this IS stored in non-volatile ram,
# so make sure you write down the previous hw address in case
# you should need to put the NetWinder back on the same segment
# as the PC (thanks Ralph).
/sbin/ifconfig eth1 hw ether 00:11:22:33:44:55
/sbin/ifconfig eth1 up
/sbin/dhcpcd eth1
echo "Waiting for DHCP response from MediaOne..."
while [ ! -f $HOSTINFO ]
  sleep 2
echo "Got it."
echo "Setting up firewalling..."
sh /etc/firewall/firewall.on

Note that my script depends on dhcpcd creating /etc/dhcpc/hostinfo-eth1. If you use a different version of dhcpcd, or that one called pump (or is it suck? I forget), there may be a different way to detect when the DHCP connect is established.

The firewall.on script sets up my IP masquerade and firewall rules. Since I might have left some stupid holes in it, I'm not posting it here. But I used Robert Ziegler's excellent documentation as a reference while setting things up. I'll defer all further tips to his Linux LAN & Internet Fireware Security FAQ, as this applies equally well for Linux on the PC or the NetWinder.

Oh, and yes, I could have used eth0 for the cable modem connection and saved the faster eth1 for my LAN, but I only have a 10baseT hub and I already had eth0 configured for the LAN side, so it made no difference to me. eth0 would certainly work just as well.