1 00:00:00,000 --> 00:00:02,120 And it is now the top of the hour. 2 00:00:02,120 --> 00:00:03,480 Good morning. 3 00:00:03,600 --> 00:00:17,000 And now we have our second talk of the day, our second of four, sponsored by the Packet Hacking Village. 4 00:00:17,000 --> 00:00:24,240 And we are honored to have Dennis Smilovic on IPv6. 5 00:00:24,240 --> 00:00:25,780 Dennis, take it away. 6 00:00:28,480 --> 00:00:29,340 Hi. 7 00:00:30,000 --> 00:00:32,640 Yeah, as Ming said, my name is Dennis Smilovic. 8 00:00:32,640 --> 00:00:36,960 I'm a principal security consultant at Nova Information Security based in San Francisco, California. 9 00:00:36,960 --> 00:00:40,160 And so IPv6 was something that I used to struggle with a lot. 10 00:00:40,160 --> 00:00:54,540 I've seen when working with different clients that it's a general thing in the security community that it's kind of this thing that's hard to understand, and we prefer keeping our infrastructure on the legacy IP version, which it actually is when you're working with IPv4. 11 00:00:54,540 --> 00:01:15,360 And so when going through this process of wanting to understand IPv6, what really happened was that I realized after going through everything that the reason that it was so hard is that because over the years, IPv4 has gotten so many extensions and NATing and other technologies that you're putting in place that is... they're making the internet work, 12 00:01:15,360 --> 00:01:18,740 but really they're abstracting from what was actually intended. 13 00:01:18,900 --> 00:01:31,740 And so when understanding IPv6, what we really need to do is to dial back, understand IPv4, and from that, it's really easy to jump the next step, because then IPv6 is just a couple of more bits and a different way to write things. 14 00:01:32,340 --> 00:01:35,400 So yeah, I hope this is going to be useful to you. 15 00:01:37,800 --> 00:01:42,400 So... with IPv4, all of my knowledge had come from practical use. 16 00:01:42,400 --> 00:01:45,120 And that boiled down to something like the following. 17 00:01:45,120 --> 00:01:48,300 So this might also be the case for some of you. 18 00:01:48,640 --> 00:02:00,100 My understanding was that this was an IP address, which it also is, and that the subnet mask is probably 255.255.255.0, but only DHCP really knows. 19 00:02:00,340 --> 00:02:07,240 And the last one was that the default gateway was the same IP as my IP, but just with a 1 at the end. 20 00:02:07,400 --> 00:02:10,520 So these are not like set in stone. 21 00:02:10,520 --> 00:02:12,740 That's not actually how things work. 22 00:02:12,740 --> 00:02:19,780 But it's so close to, like, the configuration that you see most of the times, that you can probably wing it by doing something like that. 23 00:02:19,820 --> 00:02:32,960 And so that continued on to being that an IP address is something... a private IP address is one that starts with 192.168.something.something, or 10.something.something.something. 24 00:02:33,320 --> 00:02:35,460 And I didn't really understand why. 25 00:02:35,460 --> 00:02:40,200 I just knew that, like, that was probably a private IP address and the rest was the internet. 26 00:02:42,620 --> 00:02:48,020 And so this configuration that I'm showing up here, it's a fine way to do it. 27 00:02:48,020 --> 00:02:57,140 Now, this is not going to work if we're working with a network that's not, like, very standard, or what we see in, like, all our home routers. 28 00:02:57,220 --> 00:03:03,740 And that's where, you know, it becomes a problem, and we try to set this up, and then the network doesn't actually work. 29 00:03:04,380 --> 00:03:13,180 So specifically, this configuration is limited to exactly 253 client devices, and so you'll pretty quickly outgrow that for a private network. 30 00:03:13,360 --> 00:03:17,060 But let's take a look at what these numbers actually mean. 31 00:03:18,620 --> 00:03:20,500 So again, this is an IP address. 32 00:03:20,500 --> 00:03:23,920 It consists of four, we'll call them fields for now. 33 00:03:24,040 --> 00:03:25,820 One, two, three, four. 34 00:03:26,580 --> 00:03:32,900 And they each can have a value between zero and 255, giving us 256 possibilities for each field. 35 00:03:32,900 --> 00:03:36,240 And now, each of those numbers, they actually represent a binary value. 36 00:03:36,240 --> 00:03:37,760 We know that that's how computers work. 37 00:03:37,760 --> 00:03:45,080 And so to represent 256 bits, 256 possibilities in binary, you need 8 bits. 38 00:03:45,480 --> 00:03:51,700 And so every one of the fields is 8 bits, and that's what's called an octet. 39 00:03:51,700 --> 00:03:55,200 Like, we have one octet, two octets, three octets, four octets. 40 00:03:55,420 --> 00:03:57,520 And that gives us 32 bits. 41 00:03:57,620 --> 00:04:01,320 Every IPv4 address is 32 bits, and that's full stop. 42 00:04:02,580 --> 00:04:04,360 So next up is the subnet mask. 43 00:04:04,360 --> 00:04:11,140 Here we have 255.255.255.0, which is a very common configuration, as I mentioned, unlike most of our home routers. 44 00:04:12,440 --> 00:04:17,800 And so what the subnet mask actually does is that it makes your computer understand where to send a packet. 45 00:04:17,960 --> 00:04:29,240 If I need to send a packet to another machine that's on the same network as me, on the same Wi-Fi or behind the same router, it's in the same LAN, I need to send it out on that. 46 00:04:29,320 --> 00:04:34,540 But if I want to send a packet somewhere else, a server on the internet, for instance, I can't reach that. 47 00:04:34,540 --> 00:04:36,200 And so I have to send it to my router. 48 00:04:36,200 --> 00:04:42,700 But there needs to be some kind of mechanism where the computer can distinguish whether their packet goes one way or the other way. 49 00:04:42,700 --> 00:04:44,680 And that's what the subnet mask does. 50 00:04:45,020 --> 00:04:48,780 So if you convert this to binary, what we see... 51 00:04:49,300 --> 00:04:52,140 I didn't have to use a calculator for this, by the way. 52 00:04:53,660 --> 00:04:56,180 We see that this is what the subnet mask becomes. 53 00:04:56,320 --> 00:05:05,720 And so part of the reason why subnet masks can be a bit intimidating to understand is because 255.255.255.0 doesn't really mean anything. 54 00:05:05,720 --> 00:05:10,840 It's only when we look at the binary representation that we can understand what the computer is actually doing. 55 00:05:10,860 --> 00:05:12,180 So let's take a look at that. 56 00:05:12,600 --> 00:05:18,460 On top is the IP address of my machine, and on the bottom is the IP address that I want to speak to. 57 00:05:18,460 --> 00:05:21,780 And so in between those, we put the subnet mask. 58 00:05:21,960 --> 00:05:27,700 And so basically what the computer does is that it takes the subnet mask, it looks at it. 59 00:05:27,700 --> 00:05:32,320 If there's a one, the top one and the bottom one have to match. 60 00:05:32,320 --> 00:05:39,040 So if we look at the first ductet of the subnet mask, all of the first eight bits in both IP addresses have to match. 61 00:05:39,040 --> 00:05:42,880 If they do match, the packet is destined for our local network. 62 00:05:42,880 --> 00:05:48,860 If they don't match, we have to send it off to someone else who can figure out how to get the packet where it needs to be. 63 00:05:49,740 --> 00:05:51,280 So we take a look at the first. 64 00:05:51,280 --> 00:05:52,600 They have to match. 65 00:05:52,960 --> 00:05:54,640 All first eight bits match. 66 00:05:54,720 --> 00:05:58,640 The second ductet, okay, they're all ones, so they all have to match. 67 00:05:58,660 --> 00:06:00,740 We look at the two addresses, they all match. 68 00:06:00,740 --> 00:06:05,340 The third ductet of the subnet mask are all ones, so they all have to match. 69 00:06:05,340 --> 00:06:11,740 And we look at the source address, my IP address, and the destination address, and they also match. 70 00:06:12,060 --> 00:06:21,140 And so for the last ductet of the subnet mask, after checking all of them, we see that they don't actually have to match. 71 00:06:21,140 --> 00:06:23,440 Which is very convenient because they don't match. 72 00:06:23,440 --> 00:06:24,820 So that's fine. 73 00:06:24,820 --> 00:06:28,100 This packet is destined for my local network. 74 00:06:28,100 --> 00:06:30,200 So I can just send it out on the network. 75 00:06:32,120 --> 00:06:40,080 But if we change that, I've changed the destination address to the address that Google.com was resolving to at one point when I made this presentation. 76 00:06:40,960 --> 00:06:53,720 And so when we look at this, already from the beginning, we see that our subnet mask says that if a packet is destined for the local network, all of the bits in the first ductet have to match. 77 00:06:53,720 --> 00:06:55,220 And we see that that's not the case. 78 00:06:55,220 --> 00:07:03,060 So we already know by just checking the first one, that this packet is not destined for the local network. 79 00:07:03,060 --> 00:07:09,300 And so because of that, we send it to the default gateway, which is the last parameter that we configure. 80 00:07:10,540 --> 00:07:13,720 And so I'm going to do something that's a little bad. 81 00:07:14,000 --> 00:07:16,560 I'm gonna go back to the previous slide. 82 00:07:16,680 --> 00:07:21,280 And I'm gonna remove these so that we only have the subnet mask left. 83 00:07:21,280 --> 00:07:24,560 And I know that I just told you how all of this works. 84 00:07:24,580 --> 00:07:26,780 But we don't really need it anymore. 85 00:07:26,900 --> 00:07:34,960 So because subnet masks are confusing, when there's a much, much shorter way to actually write this. 86 00:07:34,960 --> 00:07:39,060 If you look at the binary representation here, it's very simple. 87 00:07:39,060 --> 00:07:41,260 It's a bunch of ones, and then it's a bunch of zeros. 88 00:07:41,580 --> 00:07:47,900 And so in modern network, the ones and the zeros in the subnet mask, they have to be contiguous. 89 00:07:47,900 --> 00:07:51,720 And they always have to start with the ones, and then they have the zeros. 90 00:07:52,040 --> 00:07:58,040 So the easier way to represent this would be to just write it in something called CIDR notation. 91 00:07:58,520 --> 00:08:04,560 And so the only thing that you do is that you count how many ones do we have before the zero. 92 00:08:04,640 --> 00:08:09,020 In this case, we have 8, we have 16, and we have 24. 93 00:08:09,520 --> 00:08:18,460 And so because of that, instead of writing both our IP address and our subnet mask, we can just write our IP address in CIDR notation. 94 00:08:18,460 --> 00:08:21,840 And by that, we're representing both values. 95 00:08:21,840 --> 00:08:26,920 So we end up with 192.168.1.27.24. 96 00:08:27,880 --> 00:08:32,040 And this is going to be really important for when we take a look at IPv6. 97 00:08:33,720 --> 00:08:35,540 So we get away with that. 98 00:08:35,680 --> 00:08:46,460 And we still can't avoid having to specify a default gateway, but at least this is much more condensed and easier to understand, and not as redundant as what we were looking at before. 99 00:08:48,160 --> 00:08:57,360 So before we use all this knowledge to learn about IPv6, I just want to quickly go over the layout of the current allocations of the IPv4 internet. 100 00:08:57,560 --> 00:09:01,920 And so that essentially means how many addresses do we have, and what are they used for. 101 00:09:02,260 --> 00:09:04,580 So this one is from January 2023. 102 00:09:04,620 --> 00:09:06,580 Not much has changed in the meantime. 103 00:09:06,800 --> 00:09:13,300 And what's very interesting is that you can see it's very, very, very full, except for the two boxes up in the corner. 104 00:09:14,820 --> 00:09:16,260 It's taken. 105 00:09:16,660 --> 00:09:27,840 Like, they're small, minor allocations within, like, other networks that you might still be able to get from, like, the regional internet registries. 106 00:09:28,460 --> 00:09:29,620 But it's full. 107 00:09:29,620 --> 00:09:31,940 Like, this is very, very full. 108 00:09:33,300 --> 00:09:41,740 And so then someone might say, and have also said, that, oh, but why don't we just repurpose the multicast space or the future use space? 109 00:09:41,740 --> 00:09:48,000 Like, they made a very nice convenient block up in the top right, so why don't we just, like, use that? 110 00:09:48,000 --> 00:09:51,160 Like, it's for future use, so we'll just start, like, using it. 111 00:09:51,460 --> 00:10:06,360 And so the problem is that a lot of devices actually have hard-coded that these addresses cannot be used, or some engineers decided that they could use them to do, like, some internal stuff, and so using them for actual IP addresses is not something that can actually be done. 112 00:10:06,360 --> 00:10:15,740 Like, I would obviously never name anyone who would do this, but, oh, I might be some technical glitches or something. 113 00:10:16,440 --> 00:10:19,700 That was completely unrelated to what I just said. 114 00:10:20,580 --> 00:10:29,380 So a challenge for all of you, by the way, can someone count how many times USDOD appears in, like, the internet routing table? 115 00:10:29,380 --> 00:10:33,760 It's a lot of times, and it's, like, okay, I mean, do they need that many IP addresses? 116 00:10:34,360 --> 00:10:35,540 What did you say? 117 00:10:35,540 --> 00:10:38,120 Ford Motor Company has a slash eight. 118 00:10:38,260 --> 00:10:48,500 And so from what we talked about before, we know that that means that the first octet is set, like, the number before the first dot of the IPv4 address. 119 00:10:48,500 --> 00:10:50,200 In this case, it would be 19. 120 00:10:50,200 --> 00:10:51,500 The rest is theirs. 121 00:10:51,560 --> 00:10:57,740 So every public IPv4 address that starts with 19 belongs to Ford Motor Company. 122 00:10:57,840 --> 00:11:03,320 Now, we have less than 256 of those to share between all the people on the planet. 123 00:11:03,320 --> 00:11:09,780 So Ford, the car company, they own one 223rd of the internet. 124 00:11:10,780 --> 00:11:12,240 And that takes me to my point. 125 00:11:12,280 --> 00:11:13,800 It's unsustainable. 126 00:11:15,100 --> 00:11:30,040 So after knowing all of this, we know it's 32 bits, like, this is an IPv4 address, and you look at it, and you're thinking, oh, this would all be solved if we just had more bits, double the bits. 127 00:11:30,040 --> 00:11:30,840 That's a lot of bits. 128 00:11:30,840 --> 00:11:32,160 That's 64 bits. 129 00:11:32,480 --> 00:11:46,780 And that would give us more addresses, sure, but if we go back and look at the allocations of the IPv4 internet, we see that not only is it very full, we also see that the same entities appear multiple times, essentially meaning that people run out, and then they grab, 130 00:11:46,780 --> 00:11:47,940 like, another block. 131 00:11:48,180 --> 00:12:01,020 And so it would be really cool if we could make a system that has so many addresses that as soon as we make an allocation, the person that we've given it to will never outgrow it. 132 00:12:01,020 --> 00:12:09,700 Like, we'll just give them so ridiculously many IP addresses that you'll only ever need one block that's gonna show up in, like, the internet routing table. 133 00:12:10,160 --> 00:12:13,320 And so 128 bits. 134 00:12:13,420 --> 00:12:17,140 Like, it's not double, it's double the double, and it's a lot of bits. 135 00:12:17,140 --> 00:12:24,240 So just to be sure that we're all on the same page, when we add a bit, it's not double the IP address. 136 00:12:25,480 --> 00:12:29,760 When we go from 32 bits to 64 bits, it's not double the addresses. 137 00:12:30,060 --> 00:12:34,080 When we go from 32 bits to 33 bits, it's double the addresses. 138 00:12:34,080 --> 00:12:46,320 So every time we add a bit, 33 bits is double the IPv4 internet, 34 bits is four times the IPv4 internet, 35, eight times that, and you get the drill, but 128 is, like, a lot of IP addresses. 139 00:12:46,320 --> 00:13:00,260 I think someone told me that the IPv6 internet is so huge that there's addresses enough to represent every grain of sand on the globe, or every star in the visible universe, or something crazy like that. 140 00:13:01,480 --> 00:13:02,140 Yeah. 141 00:13:02,140 --> 00:13:04,100 So that brings me to our next section. 142 00:13:04,740 --> 00:13:12,460 So to represent 128 bits, we can't use the same system with octets as we used in IPv4 and just separate them with a dot. 143 00:13:12,460 --> 00:13:15,180 It would look horrible. 144 00:13:16,280 --> 00:13:19,940 So IPv6 addresses work a bit differently. 145 00:13:20,200 --> 00:13:34,640 And so this is the IPv6 address that, again, Google.com resolved to at some point when I was doing this presentation, and it looks way more confusing than an IPv4 address, and that's, like, the big thing that I hear with people in IPv6, like, oh, I look at the addresses and, 146 00:13:34,640 --> 00:13:37,380 like, my head starts hurting, and it's so confusing, which is true. 147 00:13:37,600 --> 00:13:54,520 But what is really cool is that we can start breaking this up and understand how it works, and suddenly it goes from being, like, a random string of, like, colons and letters and stuff to actually making sense. 148 00:13:55,140 --> 00:13:56,800 So let's try to take a look at that. 149 00:13:57,080 --> 00:14:01,260 First of all, the numbers, they're in hex, and we'll get there in a second. 150 00:14:01,260 --> 00:14:07,360 But before we go that, I'm just going to tell you that we have eight fields, and each of them are 16 bits. 151 00:14:07,440 --> 00:14:11,300 So you have 16 bits, then a colon, 16 bits, then a colon, 16 bits. 152 00:14:11,340 --> 00:14:12,300 You get the drill. 153 00:14:13,140 --> 00:14:17,100 And now, so to make this easier, we're just going to have a look at the last field. 154 00:14:19,180 --> 00:14:27,200 And so the thing is that we have 16 bits here, and we know that the whole IPv4 internet is 32 bits. 155 00:14:27,200 --> 00:14:34,280 So actually, with only two fields from an IPv6 address, we can already represent all addresses in the IPv4 internet. 156 00:14:36,020 --> 00:14:36,860 Yeah. 157 00:14:36,860 --> 00:14:43,740 So in hex, just to understand hex, we count from zero, and then we count up to F. 158 00:14:44,260 --> 00:15:09,660 And so that's done by zero, one, two, three, four, five, six, seven, eight, nine, A, B, C, D, E, F, zero, one, two, three, four, five, six, seven, eight, nine, A, B, C, D, E, F, zero, one, two, three, four, five, six, seven, eight, nine, A, B, C, D, E, 159 00:15:09,660 --> 00:15:10,500 F. 160 00:15:10,760 --> 00:15:12,840 And it just keeps counting like that. 161 00:15:12,860 --> 00:15:18,440 Very important to understand to get, like, these addresses are actually... why they look so weird. 162 00:15:19,120 --> 00:15:19,500 Okay. 163 00:15:19,500 --> 00:15:20,720 Does that make sense? 164 00:15:21,200 --> 00:15:21,920 Okay. 165 00:15:22,480 --> 00:15:30,420 So now that we understand the basics of how hex numbers work, let's try to understand what information we can extrapolate from the different parts of an address. 166 00:15:31,480 --> 00:15:44,500 It's not a rule, but, like, most IPv6 addresses consist of a host, that's the first orange part, and then an... sorry, a host, the blue last part, and the network, the first orange part. 167 00:15:46,580 --> 00:15:55,460 And they're often separated in the middle by 64 bits for the network, here in orange, and 64 bits for the host, here in blue. 168 00:15:56,160 --> 00:16:12,280 So what we learned about in the IPv4 section, this would be a slash 64, because the blue part is our network, when we have an address that has the same first half as ours, we can send it to our local network. 169 00:16:12,280 --> 00:16:16,740 If it's an address outside of that, we have to send it to someone who knows how to pass it on. 170 00:16:17,000 --> 00:16:19,020 Usually our default gateway. 171 00:16:22,100 --> 00:16:32,440 So the reason that having 64 bits in the host part is actually that it allows for some pretty cool features. 172 00:16:34,140 --> 00:16:40,580 And so one of them is stateless address auto-configuration, and the other one is privacy extensions. 173 00:16:41,240 --> 00:16:48,580 And so I'm just going to go over what they are, because then we'll actually see how, like, we go from having a network, and then actually setting the last part. 174 00:16:48,580 --> 00:17:01,140 Because when you look at an IPv6 address, unless you've set it statically, you're not going to see 0, 0, 0, 0, 0, 1, A, 0, 0, 0, 0, and counting up like that. 175 00:17:02,740 --> 00:17:06,380 So what stateless address configuration is actually really cool. 176 00:17:06,860 --> 00:17:17,300 It uses the 64 bits that we have available as the subnet of the network, and then it generates an IP address by itself, just from knowing the first network part. 177 00:17:17,520 --> 00:17:27,040 And the process is called EUI64, and what it does is that it takes the 48-bit MAC address of the network interface, and then it expands it to 64 bits. 178 00:17:27,340 --> 00:17:37,580 So by that, we have, like, our network, which is the orange part, and then the last part is decided by calculating it based on the MAC address that the interface has. 179 00:17:39,360 --> 00:17:51,700 And so without doing any DHCP or anything, by just knowing the network that we're working on, our computer can pick an address for itself, because MAC addresses are pretty unique. 180 00:17:51,700 --> 00:17:53,700 It's unlikely that it's going to clash with anything. 181 00:17:53,700 --> 00:17:55,260 It's supposed to be unique. 182 00:17:55,420 --> 00:17:59,120 And by that, we can just pick an address by ourselves. 183 00:17:59,120 --> 00:18:03,580 We don't need to be told what IP address is available on the network. 184 00:18:04,540 --> 00:18:07,280 And the second cool feature is privacy extensions. 185 00:18:07,280 --> 00:18:14,180 So with pretty much every device on version 6 of the internet, you're suddenly vulnerable to tracking. 186 00:18:15,300 --> 00:18:24,620 Maybe someone realized before that if you have the same MAC address between every network that you move across, you'll be pretty easy to track. 187 00:18:24,820 --> 00:18:31,780 And so that would be pretty problematic that, like, you can be correlated across, like, many different networks. 188 00:18:32,040 --> 00:18:37,360 So what privacy extensions does is that it works by changing your IP address regularly. 189 00:18:38,660 --> 00:18:46,560 So we have the 64 bits in our host part, and they just change, like, over time. 190 00:18:46,560 --> 00:18:49,080 You visit a website, it uses one address. 191 00:18:49,080 --> 00:18:51,920 You visit another website, it uses another address. 192 00:18:51,920 --> 00:18:57,060 After some time, it changes to a third address, and it cycles through them. 193 00:18:57,060 --> 00:18:58,200 Which is pretty cool. 194 00:18:58,200 --> 00:19:01,860 Like, it gives an increased level of privacy. 195 00:19:04,380 --> 00:19:11,820 So the reason... yeah. 196 00:19:11,820 --> 00:19:28,820 And then I just wanted to mention the last really cool feature about IPv6 is that when you have this huge space, when you have 64 bits to work with, you do get the thing that, like, suddenly the subnets that you're making, the smallest meaningful subnet that you're making, 197 00:19:28,820 --> 00:19:32,760 64 bits, which is very standard, you can make them smaller. 198 00:19:32,760 --> 00:19:39,280 But, like, you make a 64-bit subnet, and suddenly it can contain pretty much an endless amount of addresses. 199 00:19:39,520 --> 00:19:45,420 Like, if you're working with IPv4, you have to decide, okay, do we want this network to be a slash 64? 200 00:19:45,420 --> 00:19:48,980 Then we have 250 free addresses that can join that network. 201 00:19:48,980 --> 00:19:53,440 With IPv6, you just always do a slash 64. 202 00:19:53,440 --> 00:19:55,600 Did I say 64 the other time? 203 00:19:55,600 --> 00:19:56,140 Yeah. 204 00:19:56,140 --> 00:20:04,220 With IPv4, you'll usually make a slash 24 network for your home network that limits it to 250 free addresses. 205 00:20:04,680 --> 00:20:13,980 And then, like, if you're an enterprise setting or something, you need to start making address plans to make sure that there will be enough addresses, considering what it is that you want to do. 206 00:20:13,980 --> 00:20:22,020 And then maybe you get an office in the future, and then suddenly, ah, it doesn't fit into the address plan, and then you're kind of screwed, because you're out of addresses. 207 00:20:22,180 --> 00:20:34,700 With IPv6, you can always make a slash 64 subnet, and you basically are able to put in... there's not a limit of 250 free or however many you've specified when you designed a network. 208 00:20:35,180 --> 00:20:39,820 You can just have pretty much an endless amount of machines be on that network. 209 00:20:40,120 --> 00:20:41,860 Which is a pretty cool feature. 210 00:20:44,300 --> 00:20:53,620 So, now that you know how to read an IPv6 address, looking at just, like, the same plain thing as we did before should hopefully be easier. 211 00:20:54,540 --> 00:20:59,740 And hopefully also, you know, not just easier to understand, but also easier to remember. 212 00:21:00,000 --> 00:21:06,520 Because if you work in the same environment, it's very likely that the first 64 bits are gonna be the same. 213 00:21:06,840 --> 00:21:20,440 We know that, like, depending on where you are geographically, or where you got your IP addresses from, the first part of the range that you got is usually gonna be the same. 214 00:21:20,440 --> 00:21:26,180 So, as you work with this, things are gonna be pretty familiar. 215 00:21:27,220 --> 00:21:31,780 And then you know the first part, and then the last part is up to you when you design the network. 216 00:21:31,780 --> 00:21:41,840 It's either gonna be decided by the host itself, or maybe you set it statically and it becomes something like 0, 0, 0, 0, 0, 0, 0, 0, 0, 1. 217 00:21:45,060 --> 00:21:48,600 So, let's just see how you should handle these addresses when using them. 218 00:21:49,960 --> 00:21:53,540 You heard me say... you heard me mention, like, a lot of zeros there. 219 00:21:53,600 --> 00:21:57,120 And so, what's really cool is that we're actually allowed to do this. 220 00:21:57,340 --> 00:22:00,420 Where instead of putting four zeros in each field, just put one. 221 00:22:00,420 --> 00:22:01,780 Like, a zero is a zero. 222 00:22:02,760 --> 00:22:07,200 And then, like, moving on from that, like, we're also allowed to do something else. 223 00:22:07,200 --> 00:22:10,860 We have three fields of zeros here right next to each other. 224 00:22:11,220 --> 00:22:14,580 And we're allowed to shorten that by doing a double colon. 225 00:22:14,760 --> 00:22:19,320 We know that an IPv6 address is 128 bits. 226 00:22:19,520 --> 00:22:24,940 So, if we see an address and we have a double colon, it means that everything between... 227 00:22:24,940 --> 00:22:29,420 you just expand it up to 128 bits in that section with zeros. 228 00:22:29,420 --> 00:22:32,440 And then, you have, like, the full IPv6 address. 229 00:22:33,000 --> 00:22:35,460 You can only have one double colon, though. 230 00:22:35,460 --> 00:22:38,120 So, that's very important to know. 231 00:22:38,120 --> 00:22:45,160 Because if you had multiple double colons, it wouldn't know, like, where the section in between them would go with all the zeros. 232 00:22:46,660 --> 00:22:49,500 So... and I think this is maybe what trips up a lot of people. 233 00:22:49,500 --> 00:22:54,280 Like, you both have, like, hex numbers and you have colons in your IP address. 234 00:22:54,380 --> 00:22:55,940 And you have double colons. 235 00:22:55,940 --> 00:22:58,420 And then, you have, like, slashes. 236 00:22:58,480 --> 00:23:04,000 And then, it just becomes, like, way too abstract from what you're familiar with. 237 00:23:06,680 --> 00:23:07,620 Yeah. 238 00:23:07,920 --> 00:23:14,780 So, the next thing that would probably be really good to just mention is how do you browse the web with this? 239 00:23:14,780 --> 00:23:19,260 We know that protocol handlers, HTTP, HTTPS, use colons. 240 00:23:19,260 --> 00:23:24,060 So, if you suddenly have a protocol handler, HTTPS colon slash slash. 241 00:23:24,060 --> 00:23:29,920 And then, you have this address, like, that seems to, like, mess something up. 242 00:23:31,580 --> 00:23:35,700 So, the problem with pasting it, yeah, in the address bar is what I just mentioned. 243 00:23:35,700 --> 00:23:39,780 Colons are used to indicate protocol handlers and used to indicate port numbers. 244 00:23:39,880 --> 00:23:44,100 So, putting in an address with a bunch of colons is just gonna make everything more confusing. 245 00:23:44,780 --> 00:23:46,680 So, that's not going to work. 246 00:23:46,680 --> 00:23:50,540 And so, what we instead do is that we put this address in square brackets. 247 00:23:50,560 --> 00:23:51,600 And then, we press enter. 248 00:23:52,440 --> 00:23:53,820 And then, we browse to the web. 249 00:23:54,080 --> 00:23:57,140 So, that's just, like, a good thing that's good to be aware of. 250 00:23:57,140 --> 00:23:58,700 Because you understand IPv6. 251 00:23:58,800 --> 00:23:59,880 You know how the addresses work. 252 00:23:59,880 --> 00:24:00,520 You see this. 253 00:24:00,520 --> 00:24:03,480 You're, like, oh, I want to try to browse to an IPv6 address. 254 00:24:03,480 --> 00:24:07,480 And then, it doesn't work because your browser's, like, what are all these colons doing? 255 00:24:08,700 --> 00:24:10,280 But this is the way to do it. 256 00:24:11,380 --> 00:24:19,840 So, lastly, in this section, I'm just gonna end it the same way that I did with the other one, by showing you a map of the internet. 257 00:24:20,180 --> 00:24:22,880 And so, in this case, it's IPv6. 258 00:24:23,300 --> 00:24:30,320 And as you can see here, our idea of using double double the amount of bits, as in an IPv4 address, it achieved what we wanted. 259 00:24:30,320 --> 00:24:34,180 Like, everyone seems to have pretty much one large IP block. 260 00:24:34,180 --> 00:24:38,080 And it's not a scattered mess that we saw with IPv4. 261 00:24:39,980 --> 00:24:48,020 And so, essentially, this is not even the whole IPv6 internet. 262 00:24:48,160 --> 00:24:52,920 This is just a part of the IPv6 internet that we have allocated today. 263 00:24:53,320 --> 00:24:57,740 So, people say, will we run out of addresses? 264 00:24:58,960 --> 00:25:02,340 And it seems like we're only having a couple of seconds left. 265 00:25:02,340 --> 00:25:03,720 Will we run out of addresses? 266 00:25:03,720 --> 00:25:04,240 No. 267 00:25:04,240 --> 00:25:07,580 Because this is one eighth of the IPv6 internet. 268 00:25:07,580 --> 00:25:11,120 And we can fuck up seven more times until we're out. 269 00:25:11,120 --> 00:25:12,320 Thank you very much.