toogeeky
Console Time Tracker
admin — Sun, 2009-10-25 03:18
I had been needing a time tracker for my new job (haven't told you about that, have I ;-) ), so I wrote one In Bash shell script.
If you understand the phrase "/bin/bash ~/ctimetracker-0.0.1/ctimetracker", then this might be understandable to you, and more than that, it *could* be useful.
So, checkout the public domain code, all on it's very own, special page. It took a whole day to write that (almost) mess :-(. Have fun with it!
One of these days I'll work on the menu and layout so ctimetracker isn't so prominent but is still findable. We'll see though.
Console Time Tracker
Off to bed. Thanks for reading :-).
--Teran (sega01)
IPv6 and Specific, Stateless Route Autoconfiguration on Linux
admin — Thu, 2009-10-22 00:19
/bin/cat > /dev/world << "EoF"
If you didn't understand the above, and you don't know what stateless autoconfiguration in IPv6 is, you probably won't find the post very useful. But feel free to read along and comment, either way :-). I'm pretty sure that this is applicable to at least Linux 2.6.22 and later, but I'm sure it's been around longer than that.
Time to finally get this written out. Ages ago, I noticed radvd's route option and wanted to use it for eleutherNet (which is unused and needs to be updated some year). What the option does, is it sets the router to advertise specific routes for any number of subnets. I was hoping to have eleutherNet in it's on /48 of fd11:2358:1321::/48, but give out /64's to each connecting node. So, you'd connect to aditi (the main server, don't ask) and have a place in fd11:2358:1321::/64, foobar could connect to imaginaryserverA and have its IP in fd11:2358:1321:1337::/64, and boredomdefied could connect to imaginaryserverB, have its own place in fd11:2358:1321:1234::/64, while all of them would route the /48's through their node, if they weren't connected to the others directly. Now, I can `ip ro add fd11:2358:1321::/48 via fd11:2358:1321::1`, but that's just kinda lame. radvd lets us automate that, or it should, if your boxes are configured correctly.
I tested out the route option, and nothing. rdisc6 printed the route, but none of my boxes would pick it up automatically. I ended up spending hours and hours on the problem, googling for "specific routes", and different things. I even emailed kernel developers (which usually isn't a good idea. Don't worry though, I tried mailing lists directly, first), and didn't get very far. Eventually, I found it. After I found the solution I decided that some day I would blog about it, since it's so cryptic to find, even on the mostly omniscient Google (which still isn't as smart as Heather :-) ).
Turns out, the more proper term to google for is "route information option". After finding that out, I stumbled upon this mailing list post, and had my question answered.
So, how do stateless specific routes work in Linux? They don't, by default. The key lies in:
net.ipv6.conf.default.accept_ra_rt_info_max_plen Or, something more receptive to echo's, `mount | grep type\ proc | cut -d \ -f3`/sys/net/ipv6/conf/default/accept_ra_rt_info_max_plen
Or, usually,
/proc/sys/net/ipv6/conf/default/accept_ra_rt_info_max_plen
(I'm not trying to show off. I think I'm just missing Heather. It's nothing, anyways. Newbies beware: you usually look stupid doing that kind of stuff :-).)
Using my decoding skills, I think "accept_ra_rt_info_max_plen" means something like "Accept Router Advertisement Route Inform Maximum Prefix length".
It defaults to 0. So in other words, the maxmimum prefix interfaces accept by default is a length of 0, which either means it accepts routes to ::/0 (default route, so what IPv6 routers usually are, unless they have a lifetime of 0), or nada. You can make your own guess. Anyways, if you want to accept a /64, echo 64 into your procfs, and things will work out. In Icadyptes I have it default to 120, for no particular reason, of course I'll probably change it later.
So, there you have it. Stateless, specific routes, autoconfigured without much more than `ip l s $interface up`. Pretty cool, eh?
If it works, you can get something like this:
[root@blazingcabbage ~]# ip -6 ro 2001:470:8:29::/64 dev eth0 proto kernel metric 256 expires 86383sec mtu 1500 advmss 1440 hoplimit 4294967295 fd11:2358:1321::/48 via fe80::2e0:4cff:fe00:8520 dev eth0 proto kernel metric 1024 expires 1796sec mtu 1500 advmss 1440 hoplimit 4294967295 fe80::/64 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295 default via fe80::2e0:4cff:fe00:8520 dev eth0 proto kernel metric 1024 expires 1796sec mtu 1500 advmss 1440 hoplimit 64
And yes, I love Heather!
Thanks for reading. I hope this helps someone.
--Teran
EoF