IPv6 over PPP over a null-modem connection

26 June 2009

I just did my first null-modem serial link today. And yes, I did IPv6. On each computer I ran:

# pppd nodetach noauth local /dev/ttyS0 115200 ipv6 ,

Then, each computer came up with a ppp0 interface that was down by default (for some reason, pppd doesn’t like to bring it up if it’s IPv6-only). So I ran this on one machine:

# ifconfig ppp0 up
# ifconfig ppp0 add fc00:23::1
# ip route add fc00:23::2 dev ppp0

And then on the other machine, the reverse:

# ifconfig ppp0 up
# ifconfig ppp0 add fc00:23::2
# ip route add fc00:23::1 dev ppp0

Then the glorious:

$ ping6 fc00:23::2
64 bytes from fc00:23::2: icmp_seq=1 ttl=64 time=12.0 ms
64 bytes from fc00:23::2: icmp_seq=2 ttl=64 time=11.8 ms
64 bytes from fc00:23::2: icmp_seq=3 ttl=64 time=9.87 ms

Serial is cool.

Update: Added the ‘local‘ keyword in case pppd has ‘modem‘ specified by default in /etc/ppp/options

Why dynamic IPv6 subnet allocations for home users are evil

23 June 2009

Currently, a typical home Internet user will be assigned one IP address from their ISP, and then use NAT (Network Address Translation) to share the Internet connection among all their computers. The IP address assigned by your ISP is dynamic, and that is not a problem for the average home user, or even your typical power user.

Setting static IPs on computers is not all that uncommon, even among home users, excluding only the very most technically-illiterate ones. For example, your home router might be 10.0.0.1, and the other desktops in your house might be 10.0.0.10, 10.0.0.11, and so on. Then, if somebody drops by and wants to use your WiFi, they might be assigned an address via DHCP, such as 10.0.0.121.

This won’t work in IPv6 if, and only if, ISPs choose to make your subnet allocation dynamic. I urge ISPs to assign static IPv6 subnets to all their customers.

Why? Well, let me give my reasons. In IPv4, all the home machines in the above example are behind a NAT. This means the private IP address (10.0.0.121) gets dynamically translated to your public IP address (123.12.134.78).

Because of the absence of NAT in IPv6, this can’t happen! Your machine’s IPv6 address is tied to the subnet allocated to you by the ISP. And if your ISP changes your subnet every time you connect to the Internet as they currently do with IPv4, your static IPs will break horrendously.

I am aware of site-local and unique local addresses. These addresses are designed to be used only in a local situation, and not routed to the Internet. In theory, this could solve the problem, by allowing you to have a static local address, and a dynamic global address. In practice, this will not work because:

  • Site-local addresses have been deprecated by RFC 3879.
  • Unique local addresses are considered to be global addresses by current OSes. Wikipedia says that “despite the restricted, local usage of these addresses, they have a global address scope”, which means that your computer will assume either one can get to the Internet.
  • Thus, your source IP may be wrong, and your packet may be filtered and rejected by your ISP, or you may never get a reply, as the message won’t be able to get back to you.
  • Having both unique local and global addresses are confusing to the end-user, unlike link-local addresses, which are clearly marked as such, and are generally non-routable.

Finally, we must look at the reason why dynamic IPv4 addresses are assigned in the first place. I believe the main reason for this is to conserve space. With most of their address space used up, ISPs would have to count on all of their customers not using their Internet connections at the same time. Dynamic IP addresses means they can effectively over-subscribe their puny IP allocations.

In IPv6, this is not necessary. ISPs typically get a /32 allocation, which if you’re not familiar with CIDR notation, is bleeping huge! With a /32 allocation, an ISP could allocate more than 4 billion /64 subnets (which are suitable for a typical household) to each of their customers. I don’t think any ISP in the world has 4 billion customers, and if they did, they could get a /31 allocation, which would give them about 8 billion /64 subnets. Plenty of space for static allocations for everyone!

In conclusion, I’d like to summarise what I’ve been trying to bring out:

  • People that like to set static IPs on their machines will have them break if their subnet changes.
  • Site-local and unique local addresses only add to the problem, not solve it.
  • There is enough IPv6 address space in a /32 for everybody to have a static subnet.
  • There is no business advantage in giving out dynamic subnets. Do the best thing by your customers and go static.

So, dear ISPs of the world, please make static IPv6 subnets a part of your standard offering — not a “paid upgrade” or anything silly like that. It might work in the NAT’ed world of IPv4, but you will do your IPv6 customers a disservice.

Thanks for reading. :)

Dodgy SSD

22 June 2009

This morning, on the train to TAFE, I fired up my Eee 901, resuming from standby. I was greeted by some pretty morbid messages in my tty:

[ 1589.499104] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6
[ 1589.499113] ata2.00: BMDMA stat 0x4
[ 1589.499125] ata2.00: cmd c8/00:20:00:00:00/00:00:00:00:00/e0 tag 0 dma 16384 in
[ 1589.499128]          res 51/84:00:00:00:00/00:00:00:00:00/e0 Emask 0x10 (ATA bus error)
[ 1589.499134] ata2.00: status: { DRDY ERR }
[ 1589.499139] ata2.00: error: { ICRC ABRT }
[ 1589.499180] ata2: soft resetting link
[ 1589.685741] ata2.00: configured for UDMA/66
[ 1589.692501] ata2.01: configured for UDMA/66
[ 1589.692524] ata2: EH complete

And the OS promptly crashed. I rebooted, and GRUB told me that it “Could not load operating system”. Great.

I did an fsck, and I saw the most number of errors I’ve seen in my life, seconded only by the time I mounted my Linux drive in Windows using the Ext2 IFS driver, and Windows crashed.

fsck found lots of orphaned files. My /lost+found directory was 2.5GB in size. /etc was only 8.0K in size. It didn’t boot.

So, I tried to reinstall by using my trusty Ubuntu 9.04 on my USB flash drive. I repartitioned /dev/sda, but the Ubuntu installer subsequently bombed out, complaining it couldn’t mount the drive.

I’m typing this from my live USB. Luckily Ubuntu 9.04 comes with OpenOffice.org 3.0, and I’ve been able to copy my fonts from my second SSD, which was unharmed, so I can work on my assignments.

I fear the SSD is stuffed.

Greener grass

7 June 2009

I’m currently working towards my Diploma, which I will hopefully finish by the end of this month. Until then, I need to get stuck into finishing assignments, including ones on network security, server design, and project management.

Some things I’d like to get around to doing when I’m finished:

  • Update Battle for Wesnoth for OLPC to the latest version of 1.6 (currently stuck at 1.4.5).
  • Get around to redesigning this blog to be a little more presentable, and a little more me.
  • Too much of my life is locked up in Twitter and Delicious. Would be nice to integrate them both into my WordPress theme nicely.
  • Finish off some Python projects, such as an ABC iView browser and my Volcano game.
  • Reading. I got given a truckload of books a couple of weeks ago — mostly Java books, but also one on UML which looks interesting.

And, of course, there’s bassoon. I’m hoping to do my LMusA (Licentiate) exam this year, although it may prove to be too much for this year, in which case I can work on it for next year.

Certificate IV in Information Technology

2 June 2009

On Thursday, I was presented with my Certificate IV in Information Technology (General) from Campbelltown TAFE.

What does this mean? I’ll tell you what it means: fractals. The more you discover about something, the more you find out there is to learn. I’m currently doing the Diploma of Information Technology, due to be finished by the end of this month, which branches out even further into the mystical realms of network security, project management, and other crazy stuff.

Probably the most annoying thing at this point in time is the fact that the certificate is in landscape format, which means it will not look good next to my bassoon certificates, which are printed in a portrait format. I wonder if TAFE offers a certificate in document forgery so I can make a portrait version of the certificate…