Monthly Archive for September, 2006Page 2 of 2

New Things I am Giving a Shot

It’s taken me something like 20 years to figure out that I learn best by experience. Here’s a list of ways I’ve thrown my world into upheaval recently.

Update:
It’s been a few weeks, so a follow up is warranted.

  • I can’t say much about Gnome. I guess it’s OK. I miss the Kclip clipboard utility from KDE.
  • Black-on-white terminals have been fine, except for some apps with bad default color schemes. Yellow-on-white, for example, is terrible.
  • The Opera transition was easy. I miss many Firefox extensions, but there are lots of nice features to ease my pain: a newsreader, bittorrent client, spell checker, mouse gestures, etc. It’s also fast as hell. On the negative side, there were a few crashes, some weirdness in Google Reader, and a flash plug-in problem that broke YouTube.
  • Switching to Xemacs was really hard. I’m going to keep trying, but I don’t have much hope.

DSL Modem Web Interface in Bridged Mode

Since I run my own netfilter-based router, my Zoom ADSL modem operates in bridged mode and I have almost no need for the web-config interface thingy. I say almost because the web interface is apparently the only way to see the actual ADSL sync speed.

Here’s the stanza from my /etc/interfaces which configures the external interface:


auto eth0
iface eth0 inet static
        address 66.114.146.48
        netmask 255.255.255.0
        broadcast 66.114.146.255
        gateway 66.114.146.1

As you can see, I have a static IP of 66.114.146.48. To access the web interface on 10.0.0.2, I’m supposed to configure my PC with a specific IP (10.0.0.4). If I did that, however, it would override my static IP and I’d lose net connectivity.

Last night I discovered a way to have my cake and eat it too:


auto eth0:1
iface eth0:1 inet static
        address 10.0.0.4
        netmask 255.255.255.0
        gateway 10.0.0.2 # Bad idea, see below!

This creates an alias for eth0 with the modem’s preferred IP settings. This virtual interface runs concurrently with the real one, so net connectivity is unaffected. After adding this stanza and performing a quick ifup eth0:1, I could ping 10.0.0.2 from my router.

Browsing to http://10.0.0.2/ from any of the internal machines immediately brought up the modem’s web interface. This surprised me a little at first. I expected to need some extra iptables rules, but it turns out to just work with my existing IP masquerading setup. I think this is because of two facts:

  • eth0:1 automatically becomes the route for pakets targeting the 10.0.0.0/24 network
  • IP masq SNATs the outgoing packets to its interface’s IP (in this case, 10.0.0.4).

Now that I know my actual ADSL speeds, I’m going to give wondershaper a try.

Update:
My original article had a major bug (see the strikethrough text above). If I include that line, I’m essentially telling Linux that I have multiple default routes to the internet, and so my routing tables look like this:


10.0.0.0/24 dev eth0  proto kernel  scope link  src 10.0.0.4
192.168.1.0/24 dev ath1  proto kernel  scope link  src 192.168.1.1
192.168.0.0/24 dev br0  proto kernel  scope link  src 192.168.0.1
66.114.146.0/24 dev eth0  proto kernel  scope link  src 66.114.146.48
default via 10.0.0.2 dev eth0  src 10.0.0.4
default via 66.114.146.1 dev eth0

That penultimate line is the problem. If I omit the gateway declaration, however, I get only one (sensible) default route and everything seems to work.




Creative Commons Attribution-NonCommercial 3.0 United States
Creative Commons Attribution-NonCommercial 3.0 United States