Runtime Arguments

11: IPv6 - Size really does matter

Jim McQuillan & Wolf Episode 11

Jim demonstrates more of his networking knowledge, though this episode still required a lot research. Wolf, of course, has questions.

The internet has been around for more than 40 years in some form. It's outgrown its ability to handle all of the hosts but fortunately, there's a solution. IPv6 is mature and wide-spread and not only does it increase the address space to 128-bits (up from 32-bits) it is also more efficient for routing and transferring data across the net and it's better for VOIP and Gaming. In the US, 55% of all internet traffic is over IPv6 and in some other countries it's much higher. You almost certainly are using it in your home network and your cell phone is likely using it as well. In this episode we get into the history of the internet. We'll talk about IPv4 shortcomings and how IPv6 deals with those issues. Hopefully by listening to this episode, you'll come away ready to embrace this technology.


Takeaways

  • IPv6 is more prevalent than you might have thought
  • IPv6 shouldn't be feared and it doesn't have to be annoying and really isn't terribly complex
  • Make sure you have a firewall enabled on your router
  • Even if your ISP doesn't provide IPv6 support you can still use it locally


In Episode 3, we talked about Web Assembly. Here's a link to the announcement about WASM-3.0 which was released this week

https://webassembly.org/news/2025-09-17-wasm-3.0/

Hosts:
Jim McQuillan can be reached at jam@RuntimeArguments.fm
Wolf can be reached at wolf@RuntimeArguments.fm

Follow us on Mastodon: @RuntimeArguments@hachyderm.io

If you have feedback for us, please send it to feedback@RuntimeArguments.fm

Checkout our webpage at http://RuntimeArguments.fm

Theme music:
Dawn by nuer self, from the album Digital Sky

Wolf:

Howdy everybody, it is another episode of Runtime Arguments. Um I'm so happy you're listening. I'm Wolf, and uh here's my partner, Jim. Hey Jim. Hey Wolf, good to be here. Yeah, uh today I just want to tell you right up front, uh, we're gonna be talking about uh networking and specifically IPv6 and what that means and how it compares to IPv4, which is good because I don't know a whole lot about that. Uh but let's start off with uh what'd you do this week, Jim?

Jim:

You know, this was a really good week. I got some uh some nice big projects from one of my customers, so that's gonna keep us busy for quite a while. So that's always fun. But I know you uh you had a whole different kind of thing going on today. You had an issue with one of your dogs.

Wolf:

I am a dog person, as you well know, Jim. And so am I. I guess everybody everybody else should know too. I love my dogs, and for the past, well, I think one of the greatest things uh about marrying the woman to whom I'm married now is that she brought dogs into my life. Other animals are great. Anything that gives you love, I don't even care if it's a parrot. If it gives you love, I think that's the right thing. For me, that's dogs. I love my dogs. I have pictures, I talk about them all the time, and I usually have about three at a time. Uh so we have a pair of three-year-old girls and a one-year-old boy. They're all small because I'm older now. We used to have big Rhodes and Ridgebacks, but now we have little dogs. And my boy, my one-year-old, Oscar, he's a cavapoo, he weighs about 14 pounds. He stopped eating and drinking. Um he started uh not even throwing up, just sort of regurgitating his food, he just sort of fell out of him. So we decided he needed to go to the vet. And a regular vet uh didn't even have any open. This was Saturday morning. Uh they didn't even have any openings till Monday. And we thought, oh no, he can't wait that long. So we went to a sp a special nearby emergency veterinary hospital, and they looked at him and did x-rays, and then they said, His belly is completely full, and we don't know what it is, but whatever it is, it's got to come out. I mean, they gave me some cheaper options, like we can give him laxatives and just wait and watch. Um but the surgeon said, and maybe this is just what surgeons do, they sell the thing they do. She said, um whatever it is in there, it's gotta come out. He needs surgery. Uh and she's the expert. When people ask me for help and I'm the expert, I expect them to do what I say. Because I already know I know what's right for them. Uh, and I know they don't. So when she said he needs surgery, my answer was I don't know how I'm gonna pay for it, but that doesn't matter compared to uh Oscar being, okay, let's figure out how to get him the surgery. So Saturday he had surgery. Turned out that what was completely filling his belly was a gigantic wad of string that he uh had somehow extracted from a toy and some tiny piece of metal, probably also from that toy, that was so small it was unidentifiable. Uh so he spent, I think, two nights at the veterinary hospital, and uh he's been home for a couple of days now. He's still recovering, but he's doing way better uh than I expected him to be doing, and um that makes me so happy because I know I'm not supposed to have favorites, but he's kind of my favorite. Of course he is. Of course he is. Um this dog gives me so much Yeah, I think so happy he's uh doing better.

Jim:

I know that was a big thing for you.

Wolf:

And it really was. Yeah, um and uh the fact that we figured out how to pay for it and that he got the surgery and that the surgeon was good and that this was the right thing and that it all came together, and that now he's home and that he's doing okay, um, that really was about the biggest, most important thing that happened to me during the week. Um So that's how my week went. I started scary, ended um about as about as happy as I could reasonably be. Um so let's move from how our weeks were uh into uh feedback. Uh we love feedback, as I say, every single time. We do get some. Uh if you want to send us feedback, you can email it to us, feedback at runtimearguments.fm. At the end of the show, um, I'm gonna repeat that, and I'm also gonna tell you how to reach uh both me and Jim directly uh if you're on Mastodon, which which if you're a tech person and you probably are listening to this podcast, you you should probably be on Mastodon. Uh we got some feedback about uh the latest release of WASM. Uh Jim, what what did we hear?

Jim:

Yeah, uh uh WASM, WASM. We did an episode on it. Uh our third episode was on its WebAssembly. Um a new version of it came out, uh 3.0. It was released a couple of days ago. Uh one of the big things is it handles 64-bit address space now. So that's huge. A lot more memory is available to uh programs running in that. Uh they added exception handling, so that's pretty cool. Um, a few little things that it can directly modify JSON. Um, it already works in most browsers. That surprised me. Um, it's already out there in the browsers. Um so yeah, I I've got a link to the announcement down in the show notes. Um, so check that out if you're interested.

Wolf:

Which you and the show notes you will see in your podcast player. That's the text that shows up with the podcast.

Jim:

That's right.

Wolf:

Okay. Um, I think we're just gonna get right into it. Um, Jim, you're the one who did the research this time. Uh, tell me about IPv6.

Jim:

All right. Uh several months ago, I needed a new router in my house. And uh uh anytime I have network questions, uh ask my buddy Marlon. Uh Marlon's in uh he's a brilliant network engineer at Meta. Um, so when I have questions, he's the guy. So he recommended I get a NetGate router. I got the Model 1100. It's a little tiny thing, not terribly expensive. It runs PF Sense, uh, which is based on FreeBSD, and it's it's been just a fantastic router. I I can't recommend it enough uh for people. Uh but as I was setting it up, Marlon was coaching me along, and he said, uh, neat thing about this router, that the firewall is enabled by default, which is important because I've got IPv6 in my network. And I thought, okay, well, I I would normally enable it anyway, but he made a point to tell me it is enabled. And why does it matter? Because IPv6 is there. Um well, it turns out that IPv6 uh gives you an public it gives every host on the network a public IP address. And if you don't have a firewall, uh people can communicate with that machine. So if you've got machines inside your house and you don't have a firewall, people are gonna be hitting that machine um because the the address is is is routable to the internet, uh, if you have IPv6 uh from your internet service provider. Um the reason is it's that way. Yeah, yeah, right. Wolf doesn't have it. Um but back in the days of IPv4, uh in order to connect to the internet, uh you had to use NAT or uh uh network address translation. I'll talk about more about that in a minute. But IPv6 doesn't need that, doesn't use that at all. So everything end to end, the computers can talk to each other. So yeah, a firewall is really important. So, like anybody, uh when you learn something important like this, what do you do? You you tell all your friends about it. So I was telling my friend Ron, uh, we've mentioned him a few times on various episodes. Uh I told Ron about this, and he thought, wow, that that sounds important, and maybe we should do an episode on IPv6. So here we are. I did a bunch of research and it was really kind of fun. Um, so anyway, here we are talking about IPv6. Um what is it and why do I need it? Uh let's get into it. Uh, it's the sixth generation or the sixth version of the internet protocol. We've been using the fourth version, IPv4, for more than 40 years. Uh, I I know some of you aren't 40 years old yet, but uh believe me, Wolf and I, we are. And uh and we've been using the internet pretty much since the beginning. Uh IPv4 only supports 32-bit addresses. And what that means is you can only have up to about 4.3 billion IP addresses. And every machine on the network has to have an IP address. 4.3 billion sounds like a lot, but yeah, it it turns out it's it's not that much. Uh, neat thing about IPv6 is they upped it to 128 bits. That's a huge increase in the address space. Where uh uh IPv4 had uh 4.3 billion addresses. IPv6 has 340 undecilian addresses. Uh I've never even heard that term before. It's undecilium.

Wolf:

I I hate it when we do the big numbers.

Jim:

Oh, this is the same thing. I mean, I'm supposed to be a number guy and it's I'll break it down for you, okay? 300 and that that number is 340 followed by 36 zeros. That's 30 that's 340 trillion, trillion, trillion unique IP addresses. So what you're saying is that's enough. That's well, it's enough for our lifetime. Um it's probably enough until the sun burns out. Um that's enough IP addresses for every grain of sand on Earth to have its own unique IP address and still have plenty left over. Uh, another way of saying that is uh you could assign a unique address to every atom in the human body and every star in the observable universe and still have enough addresses left over to create new galaxies. So, yeah, we we're not gonna run out anytime soon. That's that's that's the big thing that IPv6 gives gives us, but we're gonna talk a little bit more about it. First, I want to get into a little bit of history about networking. Back in the olden days, uh there was something called circuit-switched networking. That was basically the phone system. You remember you you you've probably seen pictures of the switchboard operators, uh all the women sitting in in chairs at the at these boards with these patch cables, and they you you make a phone call and and somebody is uh uh in fact, you didn't even dial the phone, right? You you you you picked up the receiver, you're talked into it, and you know said, give me Quincy 901.

Wolf:

And and uh let me ask you a question. Yeah does that mean Quincy 901 has a hole on that board?

Jim:

And if you want to talk to them, I thought it would plug into that hole. It you know what it might be like a a queue that she would plug into, and then somebody further on up the line would plug their cord into the nine, and eventually it would get to the destination uh it and it would uh make the connection. Anyway, that's a circuit switch network. Once a connection was made, that connection stayed up for the entire duration of the call. Whether it was 30 seconds or two hours, that connection stayed connected. Um in the 60s, in the 1960s, uh the defense department of defense, uh DARPA, uh they started working on something called packet switched networking. Uh in this way, voice and data and uh uh would be broken up into small chunks called packets, and those would be sent out on a network uh on on the line, and and each packet uh would have a source address and a destination address, and they would go through this series of of I guess there were routers, and they would get to the other end. And and each packet might even take a different path to get there. But the idea was if uh if there were something like catastrophic, like a nuclear explosion that wiped out part of the grid, uh those packets would find a new way. They would just get rerouted, and in some cases though that that rerouting could happen in milliseconds. So that was much better than the circuit switch networking. Um the uh in 1983, this this project to do this was called ARPANET. And in 1983, they switched to TCP IP. Uh and it was version four. It was the first public use of IPv4. Uh for nodes on the network to talk to each other, each one would get a unique address. Um remember 32-bit addresses, 4.3 billion unique addresses. Um in those days there were only a few hundred nodes on the network. Um, so it was no big deal.

Wolf:

So this is a perfect demonstration of my ignorance. Yes. Um right up until this minute, yeah. I thought it was called IPv4 because it had four numbers. And I thought IPv6, well, I don't know what I thought about IPv6.

Jim:

Because four bytes?

Wolf:

I know right. That's what I thought. I really I see now that I am I'm not just wrong, I'm horribly embarrassingly wrong.

Jim:

In fact, every every IP packet has a header in the beginning. IPv4 is a 20 uh uh 20-byte header that included the source address and the destination address and a bunch of flags and stuff. But the first four bits of that packet header uh is the version. And uh version four is uh what's that in binary 0100? So that's that's what it was. Um uh so yeah, IPv4 uh was in use for a long time. Uh in the late 80s, uh ARPANET uh gave way to the internet, what we call the internet now. It it got its roots in in uh in the ARPANET. Uh as it grew, millions of nodes came online. Universities, corporations, uh they were all connected full times. We we would dial up. You remember the having to use a modem? Uh what fun that was. You'd you'd dial up, you'd get an IP address, and you'd you'd do your communicating, and when you disconnect, you'd lose that IP address, somebody else would get it. So there's still there was still plenty of addresses. No big deal. We weren't gonna run it anytime soon, but people could start to see the light that 4.3 billion in the long run wasn't gonna cut it. So work began on a new version. Um lots of companies got involved, IBM, digital equipment, uh the phone companies, everybody got involved in this thing, and they started working on what became IPv6. And the big thing was let's increase the address size from 32 bits to 128 bits, like I talked about before.

Wolf:

Uh I guess that's good because I used to hear all the time, like the thing people always said is, Yep, we're gonna run out. There, we're not gonna have enough addresses.

Jim:

Um yeah, that's and that's what they were saying. There was there was real fear we were gonna run out and and everything would come crashing down. Um I remember hearing in the late 90s we were gonna run out, uh, you know, and then in the 2000s we were gonna run out. And and you know, it it wasn't until January of 2011 uh when they finally ran out of uh class uh uh of uh IPv4 32-bit addresses that they could allocate. Uh there's all kinds of tricks to uh that kept us working. Um initially, uh the 32-bit addresses they were uh handed out in what they called classes. Uh there was a class A, and and they would take that 32-bit address, and the first eight bits of it would identify um uh the the network. So really, really large companies, maybe the military, would get a class A. Uh within that class A, uh the whoever got that, um, they could assign 16 million hosts in that network. Nobody's got 16 million hosts, right? And there was only 128 of those. Uh and and I'm kind of using round numbers here. I'm not taking into consideration the fact that you lose the first and the last. So it wasn't 128, it was 126. Uh that's that's that's not that important for what we're talking about. Uh so that was class A's. Uh then there was class B, and that was the uh the first 16 bits was the network, and the last 16 bits was the host on that network. Now there was um 16.

Wolf:

When you said lose the first and the last, yeah. That's because you need those to say whether it's a class A or a class B or whatever other class.

Jim:

Certainly the the I think the first two bits or first three bits would say whether it was a class A or class B. Um uh part of that. But uh like if you look at the first eight bits, uh you've really got a number from zero to two fifty-five. Well, zero, uh you couldn't assign an address of zero. And two fifty-five, um, yeah, you couldn't do that because that's that's used for that's reserved for something else. So uh you really had 126 addresses. In fact, the way they laid it out, uh only half of the half the address space was reserved for class A. So it's really 0 to 127. 0 is reserved. Uh 127 is reserved because that's your local host address, your loopback address, 127.0.0.1. So that couldn't be used. But everything in between that was usable. So anyway, 126 of those. Class B was 16 bits. There's 16,384 of those. Uh, and you could have 65,536 machines on each of those networks. Still a very large company, right? Uh class C that was much more common. That was the first 24 bits identified the network, and the last eight bits identified the machine. Um there was also class D, which is uh multicast, that was reserved for multicast, and class E Uh which was used for other uses.

Wolf:

Um Okay. This gives me kind of a weird question. Yeah. I don't know if the thing I'm about to say is related to classes, uh, or even if you want to say anything about it. But a lot of times when I see someone specify a range of IP addresses, yeah. And where I mean IPv4, um, they will say blah blah blah slash 16.

Jim:

What does that mean? Yeah, that was one of the tricks they used to uh extend the use here. The the problem with you doing these classful network addresses is they're incredibly wasteful, right? You assign a class A to somebody, nobody's gonna use 16 have 16 million hosts on that network. So it's an awful lot of addresses that went to waste. A class B, how many companies do you know that have 65,000 hosts? Uh I mean, now certainly, you know, uh Facebook, they have that, right? Google, they have that. But uh, you know, those aren't publicly accessible machines anyway. They're behind a load balancer and they have a private network address and all that kind of stuff. But um, it was incredibly wasteful. Even a class C. Uh, you know, I uh back in the 90s I worked for a very small company. We got assigned a class C uh address, and uh we only had five machines, five or six machines on the network. So we had 256 addresses we could use, but we only used six of them. It was kind of silly, still a lot of waste. That's what was happening. So they came up with a neat trick uh to get us past that. They they switched to something called um classless uh networks. Uh it was uh have you heard of CIDR C-I-D-R. That's um classless interdomain routing. And what they would do instead of breaking it up in eight, 16, 24-bit networks, they could break it at any boundary they wanted. So, like you said, a slash 16. Well, a slash 16 is roughly equivalent to a class B. Um, but uh, you know, I had a I had a network, uh I had a bunch of machines in a data center. In fact, if you look back, I think episode one or two, we talked about uh moving out of the data center. But back when I had that data center, I had a rack of machines in it, and the ISP assigned us a class 28. Or I'm sorry, not a class, a slash 28. So what that meant was the first 28 bits recognized the the network, us, and the last four bits we could use for uh to assign addresses to our machines in that network. Uh so slash 28 gave us four bits. We couldn't use the first one, we couldn't use the last one, so that gave us 14 uh addresses. Uh so there's your classless interdomain routing. Uh routing got much simpler because now you could uh the the big routers out on the network, they would just look at the you know the first uh the first eight bits or sixteen bits or eleven bits or whatever, and they would know that yeah, all of those machines are sitting there at um uh uh MCI at the time, right? Or or Xfinity or whoever. Uh so routing got much simpler. The the big routers just had to point to the the big ISPs, and then the ISPs would figure the routing out from there. So that that got a lot easier. Um it it extended uh the the length uh of those IP address uh uh the allocations. It it allowed us to allocate a lot more IP addresses. So it got us through it. But like I said, the uh IANA Internet Assigned Name Authority, they ran out of class C's that they could assign, or really addresses that they could assign. Uh, you know, all the companies have the big block that they're still using, but there's no more to assign. So if you wanted to become an ISP, you'd have a hard time getting an IP address block to give to your customers. You'd have to buy it from uh from one of the big guys. Um, it wasn't perfect, but it sure helped a lot. Now, all the machines in our networks, like right now, if if if you're at home, you most certainly have an IPv4 address assigned to you. Uh like me, I'm I'm using Xfinity, and they give me an IP address. Uh internally, I'm using private IP addresses, like the range of 182.168.something something. Uh, I'm using that. And then to get to the outside world, we use NAT, network address translation. And that helps a lot, but it's it's a it's an ugly hack, really. What NAT does, if you're not familiar with it, is uh you the packet starts on your desktop machine. Uh you let's say you want to get to Facebook, uh, you're using your your private IP address, it hits your router. Your router translates that address into its public address, and then it goes out to the network, it's Facebook, and then the return packets come back the same way. They will hit your router, and then your router will translate that back to your private address, and then it'll hit your desktop machine. It requires uh tables to keep track of all that, and it's slow, and it's it's you know, it's got some problems, especially when you want to get into like doing firewalls or VoIP or gaming. It it can get kind of ugly. But it it got us through uh not running out, right?

Wolf:

So Okay, so yeah, uh so now we know uh a lot about IPv4, which we have tons of experience with. Um tell me what exactly does an IPv6 address look like?

Jim:

All right, so it's 128 bits long. Uh only you don't, you know, that's binary. You don't read it, you know, it's not presented to humans that way. Just like IPv4 addresses were octets, you had uh like you thought four octets. 192.168.0.1 is an IPv4 address. IPv6 is uh eight hex tets. That's eight groups of four characters, uh hex characters, zero through F, uh separated by colons. So uh I you can imagine what that looks like. Uh I I've got an address on my machine, it's like 2601 040E colon and a whole bunch of other digits. I'm not gonna read those all out to you. It doesn't really matter. But it's a it's a long string of digits, four digits at a time, separated by colons.

Wolf:

Okay, so the thing I I just have to say about this is when you tell me an IPv4 address, I can remember it and I can use it in some text field somewhere, and I can write it down. And if you tell me one of these huge long strings of tuples of hex digits separated by colons, uh by the time you get to the fourth set of hex digits, I've already forgotten the first ones.

Jim:

Oh yeah. So yeah. I well, I think the goal is humans shouldn't even need to worry about these, right? That's what you have DNS for. Um and I'll talk in a little bit about another way to uh have names assigned to these IP addresses to make it easier. Uh nobody's typing in these kinds of addresses. If anything, if you if you do need to deal with that, you're cutting and pasting, you know, uh on your screen. Um, but yeah, those numbers are are kind of crazy. There is a shorthand for them, though. Um uh if within the middle of the address uh you got a long series of zeros, all those zeros can be squishing.

Wolf:

My driver's license.

Jim:

Yeah. All those zeros can be squished out and replaced with a double colon. Um so the address can can be shortened to look better. Also, leading zeros in each of those hextets can be uh uh removed. So that helps a little bit. It's still a long, ugly address, right?

Wolf:

So how do I know what my IPv6 address is?

Jim:

Great question. Um there's a couple of ways to do it, uh, and it depends on what machine you're on. If you're on a Linux machine, uh the best way to do it is the IP command with the ADDR argument. So it's IP space adr. That'll list out all of your interfaces and all of your addresses. Um Mac OS, it's IFconfig. That'll list all your interfaces with all of your addresses. And in Windows, it's IPconfig slash all. I'm sorry, for Mac OS, did I say IF config or IP? It's IFconfig.

Wolf:

You did the right thing.

Jim:

And IP config for Windows. Uh IPconfig slash all will spit out all of your interfaces. I mean, you you might only have a couple uh uh interfaces, right? You're gonna have a loopback interface, uh, and you're gonna have either an ethernet interface or a Wi-Fi interface uh interface or both. So it'll it'll list all of those.

Wolf:

Okay, so um this reminds me a lot of MAC addresses. Um on my machine I know uh that I have a MAC address for each network interface. So I I've got one for my Ethernet, I've got one for my Wi-Fi, I've got one for my if I have a firewall or something, I think I have a MAC address for that. Um and and I think I usually have that many IPv4 addresses. Um how many IPv6 addresses do I have?

Jim:

Yeah, well i in IPv4, oh i i in a computer you have as many MAC addresses as you have interfaces, right? And you'll have one IP address assigned to each, but IPv6, you might have a lot more. Um uh you'll see those when you run the the IF config or the IP config command. Uh on my machine right now, it's a Mac, my uh Ethernet interface, I have 11 addresses on it. Uh and you might wonder why you have so many, and I'll talk about that in just a second. I am wondering why. Yeah. So uh if if you're at your if you're at your desk right now, listener, uh go ahead and run one of those commands, IP adder, uh, ifconfig, or ipconfig, just to see what you've got. And you're gonna see lots of different addresses, and each one of them has a special meaning. Uh and if you're if you're uh if you want to see what address you're talking to the world on, uh try this this this website called test-ipv6.com. It'll give you a bunch of cool information, including the address that you hit it with. Uh go to that website and and it'll tell you. It'll also tell you what your IPv4 address is. And the neat thing that you learn.

Wolf:

I have been using whatismyp.com.

Jim:

Uh you can do that too. I do that all the time because I can always remember that one, right? And that'll tell you what your IP address is. The problem with that is it's just full of pop-up ads. They're really trying to sell you something. Test IPv6 is not doing that. They're just telling you about your addresses. And they give you some useful information about uh uh if everything looks okay and if you can reach uh sites on the internet, and that's pretty cool. So um give that a try. And what you'll find is your your IPv6 address is actually the address on your local machine, on your desktop, your laptop, whatever. Your IPv4 address is gonna be the address of your router, the external address of your router. So if you sit down at another comp if you sit at another computer in your network, that computer's gonna get a different IPv6 address, but it's gonna get the same IPv4. That's because of NAT, right? Network address translation.

Wolf:

The thing that you were saying before about network address translation.

Jim:

Yeah. So uh that's kind of neat. It sort of really points out the fact that you have a unique address, a unique, unique global address for each machine that's on your network.

Wolf:

Um okay, well, let me stop you there because um this is sort of reminding me of MAC addresses. Yes. Um and uh I have a feeling the thing I'm about to say can't possibly be true because it would be a gigantic privacy violation. But um you are born with a specific MAC address because for a specific network network interface, and you know, the start of that is the company that made that piece of network hardware or whatever, and the end of it is tells you it's three comma or real time or whatever. And there's so many available IPv6 addresses, um, it was just my assumption that just like a MAC address, a network interface is born with uh a specific IPv6 address. But you said two things that make me feel like that can't be true. One of them is that you have more IPv6 addresses than you do network interfaces. And the second one um is that they're all public. And if they were all public, then being born with one sounds bad.

Jim:

Okay, first off, they're not all public. I have 11 addresses on my network interface. Uh I've got some private addresses. Uh I'm going to talk about that right now. And I'll get into your question about how the MAC address relates to the IP address in just a minute. Uh if you list your IP addresses using uh the IF config command or whatever, uh, you'll see a bunch of addresses. You'll see at least one that starts with FE80. That's a link local address. That address uh is private to your network. Uh you can use that address to talk to other machines on your same network, the same physical network. Okay. Uh you can't use that address to talk to anybody outside of your network, whether it's out on the internet or another network someplace else. You can't do it because it's it won't get routed. There's other addresses you might see one that starts with FD, uh, like uh Frank David. Uh if it starts with that, uh that's a unique local address, and that's kind of like a link local address, only that can be routed. It's not going to get routed out to the internet, but you can have multiple networks in your home or your business or whatever, and you can have that kind of address, and it'll get routed across those those routers, and you can talk from one machine to another as a private IP address. Okay. Um if your ISP supports IPv6, uh, I I feel I'm lucky. I've got Xfinity and and they're they support IPv6 really, really well. Um, if you have that support, then you're gonna see some addresses that start with something else. In my case, my addresses start with uh 2601, 2601, something, something, something. Right? That's that tells me that I have a uh Xfinity address. Uh uh all it is is the first 64 bits that that Xfinity has given me. The remaining 64 bits, my machines generate on their own. So any any packet out on the network that wants to get to me, or any anybody that wants to connect to me, uh, they're gonna have to hit uh Xfinity with that first 64 bits, and then once it gets to my router, it's gonna route to the to my machine. Um Verizon, on the other hand, you know, I I might start with 2601. If you've got Verizon, it's gonna be 2600. Uh if you have ATT, it's something else. Uh Starlink, they support IPv6, it's gonna be something else. Uh, but anyway, uh uh you're gonna get that prefix from your internet service provider, the first 64 bits. And that whole 64 bits is gonna be unique for me, for my network. Uh, my next door neighbor might also have Xfinity, and they're gonna get a unique 64-bit prefix. It's gonna start off with the same 2601, but the rest of the the other uh what's left, 48 bits, um they're going to uh be something unique for them, right? So everybody on Xfinity is gonna start with 2601, but they're gonna have something after that. In fact, it's a few more digits. It's it's uh 20 bits, so it's uh 26014 something for uh Xfinity. But all the rest of the digits are are gonna be uh unique for your network. Um so you get to assign the last 64 bits for each of your machines. Uh what happens is you don't really assign it, your machines generate their own address. And early on, they use the MAC address to to figure out what those 64 bits were gonna be.

Wolf:

That doesn't sound like that.

Jim:

Well, it turned out it's a privacy issue, right? Because now they can identify you. If you move that machine, let's let's say you you you're using a laptop and you're moving around, you're going to a coffee shop, you're going anywhere and you're talking, or your cell phone. Uh if it's the MAC address, you could be tracked, right? Even though the first 64 bits might change, the last 64 bits, if they're always the same, and if they're based on your MAC address, they can they can track you. And that's not good. So there's these privacy extensions that pretty much everybody uses now. All the all the vendors are are doing this, and they will generate a unique random address for that machine. Um now I said I have 11 IP addresses. The reason I have 11 is I've got my FE80 address, my link local address. I've got an FD something address, my uh unique local address, and then I've got a whole bunch of 2601 addresses. And the reason is, remember we said uh they can track you with with your IP address. Well, every day you get a new IPv6 address. Every day your machine generates a new address, um, and it's a unique random address, and whatever address you had, that gets marked deprecated, and those stick around for up to seven days. So at any given time, you might have seven addresses, your one current address and your six deprecated addresses. These are all temporary, they all go away eventually, but those extra ones stick around because you might be in the middle of a communication or a connection with somebody out on the net, and you're talking using that address. So the address still works, but after seven days, it's gonna go away.

Wolf:

So it's a ring buffer or something like that.

Jim:

Well, I mean, they fall off the end. It's not like they keep circling. Uh you just keep getting a new one every time. And remember, with 340 undecilian addresses, we can afford to throw some of this away. And it's, you know, who knows? Another machine on your network might randomly pick that address next year, and it's really not going to cause any problem. Although, with 64 bits of address space, you're you another machine's not going to pick that address, right? What are the chances? So you've got all these temporary addresses, they're all uh marked. Deprecated, they're gonna go away. Um, but all of this happens magically, it just happens for you. Um interesting thing though, it's consumer devices. Uh just hold hold your question for just a second. Consumer devices are gonna do this, they're gonna do this uh temporary address allocation. If you set up a server on your on your network, servers usually don't do that because servers need a static IP address. So they're gonna assign themselves an address and they're gonna stick with it forever. Um I noticed that when I set up an Ubuntu server and a Debian server, they both just got themselves one IPv6 address and they stuck with it. But when I set up desktop versions of those two, uh, they got uh the temporary addresses. Uh so you had a question?

Wolf:

Um Actually, I I think you just answered that. You think I you think I covered it? All right. Well, I mean I have more questions. Oh, sure. So do I. Uh my next question is what we're throwing these things around. How do you actually uh do what tools do we have to deal with these things?

Jim:

I I'll get to the tools in just a second. I just want to spend just a minute on uh on uh how these addresses get assigned. There's this thing called Slack, S-L-A-A-C, stateless address auto configuration. Uh for your link local address, it just takes the FE80 and it generates a uh a unique set of digits that comes after that. Um you might have a DHCP server on your network, a DHCP V6. Uh if that's the case, it'll it'll get the prefix from your ISP and it'll assign you an address in a range. You can go into your router and configure your DHCP server to give you a range of addresses. Like mine is from 1000 to colon 2000. It's zeros. It's like the 64-bit prefix, a whole bunch of zeros, and then some something between 1000 and 2000 hex. Um so yeah, you want to talk about tools, right? What tools do we have to look at these things? Well, I already talked about the IF config and IP config commands. Um, but other tools, you know, if if you've been playing with networks at all, you you always use ping, uh, traceroute, netstat, all those tools. Um, well, ping, uh just ping will do IPv4. Ping six will do Ipv6. That's the name of the command. Now in Linux, you can just do ping-six, and and that the ping and ping six are really the same binary. Uh there's a sim link from one to the other. But anyway, if you want to ping somebody with an IPv6 address, you use ping six and you can ping. And it's, you know, it works just the same way. Same thing with traceroute. There's a tracerou six. Um uh address lookups. If you want to look up an address of a machine, like let's say you want to look up uh CNN's IPv6 address, you can use dig. You just type dig space aAA spacecn.com. It'll give you better.

Wolf:

So AAA is the type of the DNS record?

Jim:

It's the type of the record in the DNS server.

Wolf:

So I've used A addresses. I know about those.

Jim:

Normally, yeah, IPv4, it was just an A record. These are quad A records. Uh so dig. If you're old school, you might use NS Lookup. That'll still work. For that, though, you've got to specify the type. You say NS lookup space dash type equals A A. Then follow it with the name of the host you're looking for. Uh if you get a chance, though, try uh try to do a dig on uh Facebook. It's neat because their public IP address comes back and it's a whole series of digits, but then embedded within it is F-A-C-E colon B O O C. I mean they don't K isn't a valid uh uh character in in hex, but so they use C, but it basically spells out Facebook in their IP address. I I I think that's kind of clever, and it sort of shows me they they do have a sense of humor. Um so yeah. That's that's kind of how that works.

Wolf:

Um what if I only have an IPv4 address, but the server I want to access only has IPv6? Um can I get to it? Uh or or maybe turn that around. What if I have an IPv6, uh, but the server I want to talk to only has IPv4? What do I do?

Jim:

Well, there are ways. It's it's kind of clumsy. Uh there was this thing called 624. That's the digit 6, the letters TO, the digit 4. And that allows tunneling of IPv6 packets across an IPv4 network. That doesn't really help you here. It is still out there, but it doesn't really help you here. There's this other thing called NAT64. Uh, what that'll let you do is if you have an IPv6 address, you can talk to an IPv4 server by going through a NAT64 uh relay, and it will it'll translate the address for you. It's really kind of like a proxy. You hit that relay, it forwards the request on using IPv4, the answer comes back to that relay and it gets bounced back to you over IPv6. That's out there, it works. Uh there's something else called uh, I think it's pronounced Teredo, T-E-R-E-D-O tunneling. It's kind of the same thing. It's a technology from Microsoft. Uh, it can work. There's an open source package if you want to try it on Linux called Mirato M-I-R-E-D-O. Uh that's for Linux and Mac OS, if you want to give that a try. So there is some hope if you need to talk to a machine uh and you don't have the right IP stack. Um that that's kind of the problem here is compatibility between IPv4 and IPv6. Now, the real answer to that is dual stack. Have both IPv4 and IPv6, both on your device and the servers you're trying to communicate with. So you can use whatever protocol you need to use to talk to that. Uh the thing about IPv6 is every step along the way has to handle IPv6.

Wolf:

Right? Okay. So um as I think everybody knows by now, you and I are both developers. Yeah. We write code, I write tons of code. Some of that code is network code. Yep. Um I don't usually in my network code go so low as to actually think about uh IP addresses. But uh let's pretend that I did. It as a uh developer doing network code, do I have to make changes? What I mean, obviously IPv6 is a thing, and I need to think about it. What do I need to do now in network code?

Jim:

Well, if you're if you're just trying to hit a website, you know, you write a a Python script to go out and scrape data out of a website. If you're dealing with host names, the tran the the the whole uh transition from uh whatever from IPv4, IPv6, that all happens for you. You don't have to worry about it. You're hitting a uh a host name underneath the the stack will take care of uh doing the right thing. But if you're writing low-level network code where you're dealing with IP addresses and stuff, um, as long as you use the the the methods that you're supposed to use, even for IPv4, um uh things like um uh what is there, uh N2P and P2N, and there's some various functions that you're supposed to call to uh do the translation between a text version of the address and the internal binary version of the address. Uh just make sure you're using the right methods to do that. And please don't store IP addresses as strings. Uh uh my buddy Marlon tried to make sure that was really clear to me. If you're doing anything where you're storing IP addresses, uh store them in the appropriate format. Uh, I know, like if you're trying to store addresses in post uh Postgres, uh, there is a data type called INET. Uh and that'll handle IPv4 and IPv6. So use the appropriate thing. He he sort of compared it to storing dates. You never want to store dates as uh as as a string. You want to store it internally as a date type if you can. If you have a language or database that lets you do that, do the use the right type for that, and you'll be okay. I think the type of networking stuff you and I write, there's really no issue. Uh, you know, the programs that we wrote a long time ago continue to function uh if you're using IPv6.

Wolf:

So the thing you just said, um, I'm gonna go off topic for one sentence. Yeah. Uh, but I have said this before, and I'm gonna say it again. Um absolutely, as a programmer, your job is to say what you mean. And uh using using a date type or an uh IP address type, that is saying what you mean.

Jim:

So you're signaling to the computer what you're trying to do, and you're signaling to other programmers and even yourself what you're trying to do. Use the right type. That's a great point to make. Um so yeah. So uh you might be wondering now uh just how widespread is IPv6? Um wondering that. Yeah, I'm sure you are. Well, it turns out Google has reported they've got a really nice status page, and and they're saying right about now, 48% of the network traffic they get is over over IPv6. Now, internally they're using IPv6 all the time. Uh, but 48% of the traffic that hits their servers uh from outside is is IPv6. I think that's pretty good. In um in 2020, five years ago, it was only 30%. Uh and when they started tracking it in 2008, it was 0.05%. So they've seen quite a growth in in the amount of uh IPv6 traffic they're seeing. Facebook uh is over 60% now, so they're seeing an awful lot of IPv6. And my buddy Marlon told me internally, Facebook, that's all they use. All their machines internally is all IPv6. They don't even do IPv4. Um worldwide, uh uh basically US internet traffic, about 55% of that is IPv6, Canada, 42.5%, France 85%, or over 85% Russia. 16%. That's a lot of IPv6, right? Um so yeah, it's it's out there, it's being used, um, but there are still some large ISPs that don't use it. As you found out, you switch to a fiber carrier, and they don't give you IPv6.

Wolf:

And I have to say, um I I guess I just don't know what I'm missing, um, which makes me want to ask, okay, IPv6 has this way, way bigger address space. Um but what am I missing? Why else is IPv6 better?

Jim:

Well, there's there's a lot of features to it that are that are pretty nice. Um the whole auto configuration thing is is really cool. Uh you can do some of that with IPv4, but it's uh it really uh works well with IPv6. It's much more efficient routing, the routing tables uh got simpler. Um there's no broadcast uh address in IPv6, which kind of threw me off because, like, how do you find a DHCP server? You know, I'm I'm used to the days where you send out a broadcast to look for an IP, look for a DHCP server. Um, you know, how does that all work? Well, it turns out it uses something else, it uses multicast. And then I thought, well, what's the difference between multicast and broadcast? You still got to send out a multicast packet looking for your server. Well, as Marlon explained to me, multicast is much more efficient. Um, it gets handled in the kernel. Many times it gets handled directly on the network card. If your machine isn't interested in those multicast requests, your machine completely ignores them. It just gets to the card and that's it. Or it gets to the kernel and that's it. Where broadcasts broadcasts, they go all the way up into the kernel and into then there's a context switch, and now they're in user space. And so it it puts quite a burden on each machine on the network. They all have to at least look at that broadcast request. Whereas they don't have to look at the multicast request. So it cuts down quite a bit of traffic that your machine sees when it's trying to do other things, right? Um, there's no network uh uh fragmentation with uh IPv4. You might send out really big packets, and if somewhere along the line there's a router that can't handle large packets, that router will break it down into smaller packets and then send those small packets. Um with IPv6, uh there's this uh uh MTU discovery thing that happens where it'll it'll send out a query all the way end to end and figure out what's the smallest MTU that can be used from here to there, and then that's the packets it sends out. There's none of this uh fragmenting in the middle. So that's kind of neat. Uh IPv6, there's no need for NAT. That's a huge thing, especially if you're a gamer or if you're into VPNs and VoIP and that kind of thing. You don't have to worry about NAT. Uh it's just direct end-to-end uh configurations, end-to-end connections, and it works. So there's a lot of features that are really nice, right?

Wolf:

Um I don't know. So this this kind of leaves me with a question. Yeah. Uh now that I know it's not IPv4 because there's four digits. Yeah. Nah. That makes and because they're versions, we got IPv4 and we got IPv6, uh, but I I actually have seen the number line, and and there is a spot in between four and six. They sometimes call that spot five. Um what exactly happened to five?

Jim:

Well, I I I I mentioned way early on in this episode that uh the first four bits of the IP header dis determines the version. Well, version five was used for something called internet stream protocol. It was kind of an experiment trying to figure out how to do streaming across the network, like for voice and stuff. This is years and years ago. Uh so that used up uh version five. They never called it IPv5, it was just version five in the protocol header. So that that that used up that version. So the next logical step was IPv6. So that's what we get.

Wolf:

I agree with that because um the stream provider um acronym would be terrible to have right now because we already have something for ISP. I don't think we need another thing. Right. Right, right.

Jim:

Anyway, so so yeah, so that's you know, I I learned a ton about IPv6 uh doing this. One of the really neat things I learned about that really isn't directly related to IPv6, but that was uh Avahi and Banjour. Uh it's it's like the same thing, right? I think uh uh Avahi is the open source thing that does it. But there's this protocol for like self-discovery and discovery of your neighbors and putting names on IP addresses and stuff, and it's really cool. Um, I I didn't know anything about it before, I just always knew it was there, and it's it's one of those things I I was annoyed by. Um, but it turns out it's quite useful. So like I set up a test machine, uh test virtual machine called test dash net, and I it's a Ubuntu machine. I booted it up, and uh then I found I could reach it from other machines. I didn't have to type in that big long IP address, I could uh ping it or SSH to it by by using uh test-net dot local. It was there automatically. I didn't have to put it in DNS or anything, it was just there. Uh uh, local.

Wolf:

Yeah, the dot local.local before. And I thought dot local uh was just a nice thing that the Mac added. I didn't realize Ubuntu did it. I didn't realize everybody didn't.

Jim:

All the devices on the network have have that, their host name followed by dot local. That's the the top level domain that they're in. It's really quite handy. Uh so I didn't have to go put that in my hosts table. I didn't have to put it in my DNS anywhere. Uh, you know, sometimes when I set up a new machine, I'll just go into my SSH config and I'll create a host entry in there and put that there. I didn't need to do any of that. I could just SSH space test dash net dot local and it works. And it turns out that works through uh something called mDNS, uh multicast DNS. Uh so there's these announcements that go out through multicast uh announcements um to say, here's my name, here's my IP address, put it in your neighbor table. And that's what happens. So all these machines on my network are uh uh able to able to talk to all the other machines by name. Now, you know, I say machines on my network. It turns out I have 69 devices on my network. Um a lot of those devices are not machines, like I've got cameras and and my doorbell and my garage door. Um uh they've all got IP addresses, but they all have IBs.

Wolf:

My doorbell has a pair of wires coming out of it. That's what I have.

Jim:

Yours is uh it's it's a it's two-bit, right? Or my lights it up. Yeah. Uh so anyway, uh all the machines on my network seem to have an IPv uh 6 address and a name to go with it. I I I thought that was pretty cool. So I I I use that a lot uh now.

Wolf:

This actually gives me a question. Yeah, because you said SSH. And I use SSH all the time. Yeah. And I have a.ssh slash config file. Yep. And one of the things uh, you know, for each machine you care to connect to, you have an entry in your uh config file, and uh often there's a host, and then inside that host entry there's a host name, and you can put an IP address there. You can put an IP address there. Can I put an IPv6 address there?

Jim:

Absolutely. It doesn't care. It's an IP address. So just put that there.

Wolf:

Except that IP addresses that would have to be one of those kind of more static y server type addresses. Oh shit.

Jim:

I wouldn't just put one for a uh uh for a for another desktop machine, another consumer device. You wouldn't want to do that because that that address is only good for a day. And uh then a new one gets assigned. Uh what you could instead do instead of putting an address there, you could put the name like me. I could put test dash net dot local. When when that IP address changes, uh my machine knows it because the the the that machine sends out a a uh uh an announcement to say, here's my address now that goes with this. Name. So you can just put a name in there if you want. Something with dot local on it.

Wolf:

So this actually makes me want to reference back to uh one of the previous topics that you covered, uh, where you introduced me to Tail Scale. Yeah. And uh that may Tail Scale is another but different answer to this same problem, always having a good name for some other machine that you want to connect to that's one of yours. Yeah. So that's for this particular problem that I'm describing to you. Um it's this isn't an answer for everything, but Tailscale happens to be another answer besides.ssh slash config for this particular problem for me.

Jim:

Sure, because the way that Tailscale does it, they've got this thing called a tailnet, and they give you a name and an IP address, and you can refer to that machine by that name, and it goes through the VPN, and it's really, really pretty slick. They they do a really nice job with it. And they use IPv6. Uh I think they support IPv4 and IPv6, but it's there. If you want to use IPv6 through Tailnet, Tail Scale, you can do it. So that's pretty neat.

Wolf:

So um, so this leads me to this. Yes. And that is um, it sounds like we're kind of at the end. Are we at the end?

Jim:

Do you think we're covered a lot? There's a lot for people to think about. Uh they can go home and uh, you know, they got some homework to do, they can go home and try this. So yeah.

Wolf:

Uh I was gonna ask you, how do I know if I have IPv6? But you said two things. Um one is you gave actual commands to list the IPv6 addresses you have. So obviously, if I run those commands and I see addresses, well, I've got it. And second, you described how widespread it is, um, which makes me feel like on any desktop you almost certainly have it, at least for that desktop, even if your network provider doesn't let it come out.

Jim:

Right. So internally you'll you'll almost certainly have it. Now I um uh I I used to just get annoyed by IPv6, right? I'd I'd list my network interfaces and I'd see all these really long addresses that didn't mean anything to me. So on my servers, I would disable it because I was annoyed by it. I didn't understand it. Um looking back, that was kind of silly, right?

Wolf:

Sounds like me and Unicode and ASCII. Um just ignore it. Unicode's okay.

Jim:

Yeah, right, right. Ignore it, right? Not yeah, try not to think about it, and it turns out it's great. Well, that's like IPv6, it's great. Um, I I I got a few takeaways for you. Uh the thing is IPv6 is much more prevalent than you might have thought. It's out there everywhere. Um, it shouldn't be feared, it doesn't have to be annoying, and and it isn't terribly complex. Uh, it's pretty neat. Uh, probably the most important thing I gotta tell you if you have IPv6 in your network with a public IPv6 address, make sure you have a firewall, please. Um, because the connections can get right through to you if you don't. Now, maybe you have a firewall on your device, on your desktop machine, and that's great. Um, but please have a firewall uh at your router because you might have a lot of devices in your network that can't have a firewall, right? My my camera, is that gonna have a firewall? No, right? It's there. In fact, those things are notoriously uh vulnerable. So, first line of defense should be a firewall at your at your gateway uh into your house. Um beyond that, uh if you want a firewall on your individual machine, it's probably a good idea too. Um let's see, uh last point I wanted to make. Even if your ISP doesn't provide you with IPv6, at least you can use it internally. Wolf, you can use it. I saw your list of IP addresses. You can talk to all your machines over IPv6. Right? So that's and I think I might be. Yeah, yeah, right. So that's pretty much it.

Wolf:

Well, let me let me say this. Um I learned I know you learned a ton doing this, but you describing it, I learned a ton. I had a lot of misconceptions. Um and I I feel smarter now, and that I like to feel smarter, so that's that's good.

Jim:

That's you know, if I make you feel smarter, I must be doing something right, because that's a I'm usually I'm usually the one leaching leaching knowledge from you.

Wolf:

Uh yeah, so I I want to thank everybody for listening because it's that's what makes us go. That's what gives us the energy, and it's your feedback that uh tells us how we're doing, where to go, what we got right, what we got wrong. Please uh continue to send us feedback, which you can do with email uh by sending to feedback at runtimearguments.fm, and you can contact us. I am oh crap, now I have to look. I think I'm yesjustwolf at hackyderm.io and Jim, you are Jam MCQ? Yes, is that right?

Jim:

MmcQ.

Wolf:

At Hackyderm.io. Right. So if you're on Mastodon, uh you can write to us. And if you're not on Mastodon, why aren't you on Mastodon? That's my next question. Yeah, right. Um uh I think uh you have some specific people to thank.

Jim:

Yeah, yeah. You know, I I I I gotta give a special shout out to Marlon. I mentioned his name several times. Uh he uh he taught me so much. He's my go-to guy. Every time I needed to learn something about IBv6, I'd I'd knock on his door. If I said anything correct in this episode, it's because of Marlon. If I said anything wrong, that's totally on me. And I'm sure I didn't get everything right. That's totally on me. But super thanks to Marlon. Uh, I really appreciate his help here. And also a shout out to Ron. Ron, it was Ron's idea to do this episode to begin with. And you know, I've had more fun and I've learned more by researching the information for this episode than any episode I've done so far. So it it it it was truly a blast doing this, and I hope you all learned something about it. And really, you have Marlon and Ron to thank for that. So, yeah, thank you.

Wolf:

And I can say, uh, because we run in the same circles, and I know both Marlon and Ron, uh, both of those are sterling people. They're both smart, they're both kind, they're both helpful. Um yeah, you definitely went to the right place to get help. I I feel like that. Anyway, um, I think we've run out of time, we've run out of knowledge. Uh, it's time to say goodbye. So thanks for listening, everybody. Send us some feedback and uh goodbye. Thank you, everybody. Goodbye.

Podcasts we love

Check out these other fine podcasts recommended by us, not an algorithm.

CoRecursive: Coding Stories Artwork

CoRecursive: Coding Stories

Adam Gordon Bell - Software Developer
Two's Complement Artwork

Two's Complement

Ben Rady and Matt Godbolt
Accidental Tech Podcast Artwork

Accidental Tech Podcast

Marco Arment, Casey Liss, John Siracusa
Python Bytes Artwork

Python Bytes

Michael Kennedy and Brian Okken
Talk Python To Me Artwork

Talk Python To Me

Michael Kennedy