Tuesday, March 12, 2013

The really awkward Mir/Wayland drama.

I’ve been reading the drama going on between Canonical and the Wayland developers.

For those who don’t know: Wayland is a protocol designed to replace X11.

The two major desktop environment providers KDE, GNOME seem to be onboard with a move towards Wayland.

Canonical is the powerhouse behind the hugely popular Ubuntu linux distribution. Ubuntu used to use GNOME with Metacity (a window manager) as it’s default. They then built Unity on top of GNOME. You’d think they’d be all about Wayland? WRONG.

Out of nowhere Canonical announces Mir, a display server for Ubuntu. Why? “Because X11 input is insecure and because Wayland” This is crazy and just wrong.

I have read no compelling arguments as to why Mir exists at all. Including the announcements the Spec around. I read Mark Shuttleworth’s blog about it. I even read Christopher Halse Rogers G+ post about it. And I still cannot see a reason for Mir’s existence at all, in any capacity.

Why doesn’t the Mir team just contribute to Wayland? Their answer is that Wayland is too complex, not testable, and not developed as open as Mir is/will be. The Wayland people were blinded sided by the announcement. They were never approached by the Mir team about Wayland. And the complexity concerns seem to be nothing but conjecture from people not familiar the project. To put this in perspective, they’ve removed their complaints about Wayland from their Spec. And have been walking about statements about Wayland. This is ridiculous, why not just own up to the fact that the Mir team did not do their homework? Instead of doing just that, they’re trying to justify Not Invented Here syndrome by appealing to aesthetics?

Seriously, the Mir argument is now: Why contribute to Wayland when we can do only what we want? Canonical seems to be a on a bit of a power grab and their response to criticism is not encouraging.

Sunday, October 7, 2012

IPv6

I don’t often get to say this, mostly because this centers around Comcast, but Comcast really got their IPv6 rollout just right. Seriously. It’s native, no 6to4 tunnel required, and uses stateless address auto-configuration (SLAAC) in order to assign devices addresses. Seriously, color me impressed.

Not only this, they give you an entire /64 prefix length block play with. If you don’t know what that means, read on. If you do happen to know, what follows is an overview of IP addresses and some differences between IPv4 and IPv6.

Before I go any further it’s probably time to look at an IPv6 address:

IP addresses

2001:2:2f4e:9:1234:5678:90AB:CDEF

This looks a lot different than IPv4 addresses which look like this:

192.168.1.1

But they’re actually pretty similar.

IPv4 are 32bit numbers. These numbers are divided into 4 8bit segments. 4 * 8 = 32

IPv6 are 128bit numbers. These are divided into 8 16bit segments. 8 * 16 = 128

Since IPv4 uses 8bit segments, that means each segment is bounded to 0x0 - 0xFF (or 0-255)

IPv6 on the other hand uses 16bit segments. IPv6 segment bounds are 0x0 - 0xFFFF (or 0-65535).

That’s quite the jump. The more segments, the more possibilities. In fact, just two segments can encapsulate all of the IPv4 addresses.

You might be thinking:

     "What's with these colons? Where did all the numbers go?"

How to write and read IPv6 addresses

Because IPv6 address can be long and people tend to be lazy there are ways of shortening these addresses.

Consider this IPv6 address: 2001:0db8:0000:0000:0000:0000:0000:00001.

That’s a lot of zeros. Let’s shorten each segments to the smallest representation, that means just dropped leading zeros. You’ll end up with this: 2001:db8:0:0:0:0:0:1.

That’s actually a bit better, but there are still quite a few repeating zeros. What if we just drop the lonely zeros? Then that address would look like this: 2000:db8:::::1

Which is a bit better, but still a lot of colons. Can we do anything else?

Well, we know the total length of an IPv6 address and if all the leading digits are zeros we can still fill in the missing segments. So what if we just said :: is the largest number of segments instead of just one! Then we get something like this: 2001:db8:1::1

That is a lot easier and actually preferred way of representing addresses. The only other consideration is to use lowercase letters. Here are another example: ::1 which expands to: 0000:0000:0000:0000:0000:0000:0000:0001 This is actually the local-link IPv6 address. This is similar to 127.0.0.1: the IPv4 local-link address. I’m sure you get the picture by now.

IPv6 subnets

Earlier I mentioned that Comcast customers are getting a /64 block. What does this mean?

/64 is a network prefix. That probably doesn’t help unless you already understand subnetworks.
What if we wanted multiple networks instead of one large one? Subnets help us accomplish this by logically dividing up the addresses in to networks parts and hosts parts. In order to do this, a network will reserve a portion of the address, called a prefix. The rest is left available to the hosts.

IPv4 and IPv6 both use CIDR format to denote subnet prefix. Let’s take a look at IPv4 first and then IPv6.

/24 specifies that the network prefix is 24 bits long. Looking at our old address 192.168.1.1 we can see that the network prefix is 192.168.1 and .1 host portion. Together they reppresent the address. So 192.168.1.1/24 lets us know what network we’re on and what addresses are available to the hosts. Another way this can be written is subnet mask using decimal octets. /24 is the same as the netmask of 255.255.255.0. If you see the older netmask notation, it’s just saying the same thing. If you took the netmask and bitwise AND the ip address, you’d get a network prefix.

Real quick: 0xC0A80101 & 0xFFFFFF00 = C0A80100 = in dotted decimal: 192.168.1.0 (C0.A8.01.00)

IPv6 is largely the same with a few distinctions. IPv6 complaint addresses always have 64bits for the host portion. IPv6 addresses on the Internet by default will split their network prefixes into a 48bit provider prefix and a 16bit site prefixes.

There are so many IPv6 addresses that only certain segment are allowed on the global Internet (for now). For reference that number is 2000::/3.

2000::/3 means addresses from 2000:: -> 3FFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF are valid IPv6 address ranges for use on the Internet.

There are other special reservations and you can look them up.

How do we get our IPv6 addresses?

If you’re a Comcast customer chances are you’re going to have to buy your own modem. Most ISPs will be giving a /64 because stateless addresses auto-configuration (SLAAC) requires /64. This means when you’re connected to an IPv6 you will automatically get an IP address. Like magic. This is not DHCP, which is “stateful”. There exists DHCPv6 for when SLAAC can’t be used and I haven’t used it.

To put it another way each Comcast customer is allocated: 18,446,744,073,709,551,616 addresses!

But what about static IP addresses?

If ISPs are giving away blocks of addresses and your addresses are automatically configured, how can get a static IP address?

If you’re using SLAAC this is most likely taken care of. Those last 64bits are actually going to be generated taking your EUI-48 MAC address and turning into a Modified EUI-64 address. This is actually easy!

The MAC address 00:1D:BA:06:37:64 (taken from the Wikipedia example) will be used for this example:

We’ve got 48bits, from a MAC address we need 64bits. To do this FF:FE is inserted into the middle.

  • 00:1D:BA:FF:FE:06:37:64

Now we have our EUI-64 address. Though IPv6 modifies this value. The 7th most significant bit is inverted starting from 1.

1d:baff:fd06:3764 is what the unmodified would look like but IPv6 is modified 3d:baff:fd06:3764 is the modified version.

Looking directly at the operation can shed some light into why:

00 1d converts to the following binary: 
0000 0000 0001 1101 and we can forget about the leading zeros.
0001 1101  is what we're going to manipulate

1d ==  0001 and 1101  == 1 and 13 == 0x1 and 0xd
3d ==  0011 and 1101  == 3 and 13 == 0x3 and 0xd 

000111001 => 00111101  == 61 (or 0x3d)

Notice how the 0001 became 0011. That’s the modification!

So your if your network prefix is 2001:db8:: your IP would be: 2001:db8::3d:baff:fd06:3764

Privacy concerns

Now that I have this IP address that always identifies me on the web, does this mean people can track me on the web? The answer is yes and no.

The good news is that most likely this won’t happen. Most Operation Systems when configuring IPv6 with SLAAC will then lease a temporary address. This is the address that the Internet will see. Not the Modified EUI-64 address. The temporary address will also expire and change automatically while you’re using the internet.

The modified EUI-64 bit IPv6 address is still valid and will work.

If you want a different static ip, just configure one in your prefix and it’ll just work. Your computer will announce it’s intention to the network and then you’ll have an address.

Tuesday, June 5, 2012 Thursday, May 31, 2012

I am going to destroy chef.

Monday, May 21, 2012

Stuff I did today, beat Diablo 3. Put my bed together.

Wednesday, May 9, 2012 Sunday, April 29, 2012

Prometheus

Dear Lords of Time and Space,

It needs to be time to watch Prometheus. Like, right fucking now.

<3 Sean

P.S. I mean it. RIGHT. FUCKING. NOW.

Thursday, April 26, 2012

What’s new?

Fuckin’ GitHub, that’s new. I’m now working at GitHub.

What’s next? Moving to SF. Yeah, that’s what. Atlanta has been an experience but it’s been long enough.

I spent the past couple of weeks out in San Francisco getting used to GitHub and making new friends. It’s been amazing, everyone at GH has been great. I’m not sure it could have gone any better.

Here’s an Octocat

Bear Calvary!

Friday, April 6, 2012

Out with the old, in with the new.

I had my last day at Vitrue on Friday (March 30th). After work there was a nice get together and it was great. I enjoyed seeing everyone one last time before I head to a new city, a new job.

I’m going to GitHub! Mother fuckin’ GitHub! This is an incredible opportunity and I’m excited. GitHub has a great group of people and I can’t wait to be apart of a product I love to use.

I’ve been sitting on this post for a couple of days trying to figure out what to say but coming up short. So, I’m just going to cut this short. Going to GitHub and that’s awesome.