1 00:00:00,090 --> 00:00:00,930 So we've talked a lot 2 00:00:00,930 --> 00:00:02,130 about IPv4 in this course, 3 00:00:02,130 --> 00:00:04,010 but now let's talk about IPv6. 4 00:00:04,010 --> 00:00:04,843 So why? 5 00:00:04,843 --> 00:00:06,650 Well, because IPv4 was designed to provide 6 00:00:06,650 --> 00:00:10,200 4.3 billion addresses at the time of creation, 7 00:00:10,200 --> 00:00:13,090 and engineers who invented this protocol never thought 8 00:00:13,090 --> 00:00:15,120 that they would be all used. 9 00:00:15,120 --> 00:00:16,980 But it turns out that very, very soon 10 00:00:16,980 --> 00:00:19,060 they will all be exhausted, and so therefore, 11 00:00:19,060 --> 00:00:20,730 there needs to be a new scheme of IPs, 12 00:00:20,730 --> 00:00:24,200 and this is IPv6, which is a successor of IPv4. 13 00:00:24,200 --> 00:00:27,003 So IPv6 is designed to provide, and wait for it, 14 00:00:27,003 --> 00:00:32,003 3.4 times 10 at the power 38 unique IP addresses. 15 00:00:32,369 --> 00:00:35,180 So this is a lot of IP addresses, 16 00:00:35,180 --> 00:00:38,680 and every of these IPv6 addresses are going to be public 17 00:00:38,680 --> 00:00:39,670 and internet-routable. 18 00:00:39,670 --> 00:00:42,800 So there's no private range in the IPv6 range. 19 00:00:42,800 --> 00:00:46,490 So the format is X.X.X.X eight times, 20 00:00:46,490 --> 00:00:48,200 where X is hexadecimal, 21 00:00:48,200 --> 00:00:52,920 where the range can be from 0000 to ffff. 22 00:00:52,920 --> 00:00:56,940 So you don't need to know exactly how an IPv6 is formed, 23 00:00:56,940 --> 00:01:00,230 but these are some examples of IPv6. 24 00:01:00,230 --> 00:01:01,427 I'm not going to linger on it. 25 00:01:01,427 --> 00:01:02,630 You can have a look, 26 00:01:02,630 --> 00:01:04,500 but what's important for you is to just see one 27 00:01:04,500 --> 00:01:06,837 and say, "Oh, okay, this looks like an IPv6, 28 00:01:06,837 --> 00:01:10,230 "and IPv6 can take multiple forms." 29 00:01:10,230 --> 00:01:12,190 Okay, so why I'm talking about IPv6? 30 00:01:12,190 --> 00:01:15,450 Well, because we can enable IPv6 supports in our VPC. 31 00:01:15,450 --> 00:01:19,110 So IPv4 can never be disabled for your VPC and subnets, 32 00:01:19,110 --> 00:01:21,550 but you can enable IPv6, they're public IP addresses, 33 00:01:21,550 --> 00:01:23,660 to operate in dual stack mode. 34 00:01:23,660 --> 00:01:25,430 That means that your EC2 instances, 35 00:01:25,430 --> 00:01:26,900 when launched in your VPC, 36 00:01:26,900 --> 00:01:30,970 will get at least a private internal IPv4 and a public IPv6, 37 00:01:30,970 --> 00:01:34,370 and they can communicate using either IPv4 or IPv6 38 00:01:34,370 --> 00:01:36,670 to the internet through an internet gateway. 39 00:01:36,670 --> 00:01:37,640 So let's take an example. 40 00:01:37,640 --> 00:01:41,960 Our EC2 instance has a private IP, has an IPv6, 41 00:01:41,960 --> 00:01:43,420 which is by default public. 42 00:01:43,420 --> 00:01:45,210 And then if it wants to access the internet, 43 00:01:45,210 --> 00:01:46,760 it can do so through internet gateway. 44 00:01:46,760 --> 00:01:49,120 So internet gateway do provide connectivities 45 00:01:49,120 --> 00:01:51,110 for IPv4 and IPv6. 46 00:01:51,110 --> 00:01:54,450 And then my EC2 instance will be publicly accessible 47 00:01:54,450 --> 00:01:58,569 in this case because it has a public IPv6 address, 48 00:01:58,569 --> 00:02:01,750 and the internet gateway will provide internet connectivity. 49 00:02:01,750 --> 00:02:04,010 So here is an exam scenario for you, 50 00:02:04,010 --> 00:02:06,130 so around IPv6 troubleshooting. 51 00:02:06,130 --> 00:02:08,470 So, as you know, IPv4 cannot be disabled 52 00:02:08,470 --> 00:02:10,210 for your VPC and subnets. 53 00:02:10,210 --> 00:02:13,250 And so if you have an IPv6-enabled VPC 54 00:02:13,250 --> 00:02:16,210 and you cannot launch an EC2 instance in your subnets, 55 00:02:16,210 --> 00:02:18,850 then it's not because the instance can not acquire an IPv6, 56 00:02:18,850 --> 00:02:20,600 because the space is actually very, very large 57 00:02:20,600 --> 00:02:23,940 and there will be enough IPv6s for your EC2 instances. 58 00:02:23,940 --> 00:02:26,460 It's because there are no available IPv4 59 00:02:26,460 --> 00:02:27,980 left in your subnets. 60 00:02:27,980 --> 00:02:31,260 And the solution for this is to create an IPv4 CIDR 61 00:02:31,260 --> 00:02:32,093 in your subnet. 62 00:02:32,093 --> 00:02:34,930 So let's take a look at this VPC, there's an IPv4 space, 63 00:02:34,930 --> 00:02:37,000 and so also an IPv6 space. 64 00:02:37,000 --> 00:02:38,920 So we keep on launching EC2 instances 65 00:02:38,920 --> 00:02:41,953 that will get private IPv4 and public IPv6. 66 00:02:42,920 --> 00:02:45,061 So we launch, and we launch, we launch them. 67 00:02:45,061 --> 00:02:49,000 And then once we have exhausted the space of IPv4, 68 00:02:49,000 --> 00:02:51,730 if a user tries to create a new EC2 instance, 69 00:02:51,730 --> 00:02:54,890 it will get an error, not because the IPv6 right now, 70 00:02:54,890 --> 00:02:57,440 but because the IPv4 space within our subnets 71 00:02:57,440 --> 00:02:58,880 or our VPC ran out. 72 00:02:58,880 --> 00:03:01,839 In which case, well, what we do is that we add a new CIDR 73 00:03:01,839 --> 00:03:04,080 within our VPC in our subnets, 74 00:03:04,080 --> 00:03:05,817 and therefore we can start launching new EC2 instances 75 00:03:05,817 --> 00:03:10,370 and we'll get a different IPv4 address range for the IP, 76 00:03:10,370 --> 00:03:13,950 but we'll keep to work around this issue like this. 77 00:03:13,950 --> 00:03:17,530 Okay, so that's it for the theory on IPv6 in AWS, 78 00:03:17,530 --> 00:03:18,720 I will see you in the next lecture 79 00:03:18,720 --> 00:03:20,333 for just a little practice.