20 Aug 2004 14:42

eth0:1 with iproute2

Here's how to create eth0:1 with iproute2 (and you really should be using iproute2):

ip addr add 192.168.1.1 dev eth0 brd + label eth0:1

13 Aug 2004 11:27

xmltv for the Olympics

xmltv is cool. Slow, but cool. Here's how I got the complete olympic lineup so I don't have to deal with the shoddy nbcolympics.com site:

# sign up for zap2it's data direct service, per the instructions in the
# tv_grab_na_dd man page. Then configure tv_grab_na_dd
tv_grab_na_dd --configure

# grab through the 30th
tv_grab_na_dd --days 17  > dd.xml

# do the magic incantation to get the guide
cat dd.xml | tv_sort | tv_extractinfo_en | tv_sort | tv_grep --on-after now > guide.xml

# now grep out the olympics
tv_grep -i 'olympic' guide.xml | tv_to_latex > oly.tex

# produce the pdf
latex oly.tex
dvipdf oly.dvi

Do it while you're eating breakfast or reading slashdot or something, it takes a lot of CPU and RAM, but it is something you can do in the morning before work, for example.

I made 1-up, 2-up, and 4-up versions. They are 12, 6, and 3 pages, respectively. Choose per your ocular prescription and paper conservation preference.

Ok, I guess I shouldn't say "complete", since apparently the listings are only through the 25th at this stage. I'll blog the last few days in plenty of time to plan your VCR/TiVo/attendance.

05 Aug 2004 16:08

Routing Racoon

I had the hardest time convincing things to route properly from my home network to my work network, over the VPN (racoon<->netscreen25).

Here's what my routing table used to look like:

166.70.37.148/30 dev eth1  proto kernel  scope link  src 166.70.37.150 
172.17.0.0/24 dev eth0  proto kernel  scope link  src 172.17.0.3 
default via 166.70.37.149 dev eth1 
default via 172.17.0.3 dev eth0  scope link

So even though ping 172.16.59.143 would go over the VPN, it would have a source of 166.70.37.150. This was unacceptable, and was messing things up although it kind of half-worked. The following fixed it:

# ip route add 172.16.0.0/12 via 166.70.37.149 dev eth1 src 172.17.0.3
# ip route get 172.16.59.143
172.16.59.143 via 166.70.37.149 dev eth1  src 172.17.0.3 
    cache  mtu 1500 advmss 1460 metric10 64