Lecture 11: IP Addresses - IPv4 vs IPv6, Private vs Public vs Elastic IP
- 课程:[NEW] AWS Certified Advanced Networking Specialty 2026
- 视频时长:10:26
- 来源:Udemy Lecture 24112310
- Slide 数量:7
- 画面切换:约 00:19、02:28、06:07、06:47、09:10、10:02
扫描说明
按页面英文 transcript 的 152 个时间点逐一定位并检查视频画面,并复核所有高差异画面。架构图中的私有、公有、弹性 IP 以及 IPv6 地址逐步出现属于同一张幻灯片的动画构建,合并在对应小节中。
Transcript 来自 Udemy 页面自带的英文自动字幕,没有使用 ASR。下面保留页面原文,包括其中的语法或识别错误。
1. IP Addresses in VPC
时间范围:00:00–00:19
总结 / Summary
中文
本节概览在虚拟私有云(Virtual Private Cloud, VPC)中创建资源时可用的不同 IP 地址类型。
English
This introduction frames the different IP address types available when creating a Virtual Private Cloud (VPC) and launching resources inside it.
Transcript
00:00 Hi.
00:00 So in this lecture let's talk about how to use or what kind of IP addresses are available when you are
00:07 creating a AWS VPC and when you are launching your resources inside the VPC.
00:13 Okay.
00:13 So a quick refresher before we talk about VPC IP addresses.
2. IPv4 and IPv6 Addresses
时间范围:00:19–02:28
总结 / Summary
中文
IPv4 地址(IPv4 address)为 32 位,总空间约为 2^32;IPv6 地址(IPv6 address)为 128 位,总空间为 2^128。IPv6 的巨大地址空间用于缓解 IPv4 地址耗尽(IPv4 address exhaustion)问题,并可为未来规模提供充足容量。
English
IPv4 addresses contain 32 bits, giving an address space of approximately 2^32, while IPv6 addresses contain 128 bits and provide 2^128 possible values. The vastly larger IPv6 space addresses IPv4 exhaustion and provides substantial capacity for future growth.
Transcript
00:18 There are two types of IP addresses as you know IPv4 and IPv6.
00:23 Now if you go few decades back there were only IPv4 addresses.
00:27 And if you see these are 32 bit addresses.
00:30 And that's where you could have say unique around 4 billion addresses, that is two raised to 32.
00:36 But over the time because of, say, internet of things and every device used to have their own IP addresses,
00:43 we exhausted all IPv4 addresses.
00:45 So in 2011, there was a last public IPv4 address range that was allocated.
00:52 So which means there are no anymore available IPv4 addresses.
00:57 And this was the problem that was probably foreseen by the experts.
01:01 And that's where IPv6 addresses were introduced.
01:05 Now, IPv6 addresses are 128 bit in size.
01:05 That means they can address two raise to 128 addresses, which is this big number which I cannot read,
01:16 but it is said that it is more than sufficient for the foreseeable future for us.
01:22 So eventually what you will see that most of the applications website devices over the time will use
01:30 IPv6 addresses instead of IPv4 addresses.
01:34 Okay, so that's about IPv4 and IPv6 addresses.
01:37 And if you want to see this is how they look, IPv4 addresses are represented as four octet as you can
01:44 see.
01:44 And IPv6 addresses are represented in the eight blocks where every block comprises of four hexadecimal
01:52 numbers.
01:53 Something like this.
01:56 Right.
01:56 So that's about IPv4 and IPv6.
01:59 And in this lecture we will primarily focus on IPv4 addresses because for IPv6 addresses.
02:06 And to dive deeper, you need to really know other concepts in AWS, like using Nat, using DNS.
02:06 And that's where we will introduce IPv6 in this lecture.
02:17 But we are going to dive deep into IPv6 and the support for IPv6 in AWS in the later section of this
02:24 course.
02:24 Right.
02:25 So I hope it is fine.
02:27 Okay.
3. IPv4 Address: Private, Public and Elastic
时间范围:02:28–06:07
总结 / Summary
中文
实例的私有 IP 地址(Private IP address)从子网 CIDR 范围(subnet CIDR range)分配,用于 VPC 内通信。公有 IP 地址(Public IP address)允许通过互联网网关(Internet Gateway)与互联网通信,但自动分配的公有 IPv4 地址通常会在实例停止并重新启动后改变。弹性 IP(Elastic IP, EIP)由账户分配并持续保留,直到显式释放;它可以重新映射到另一实例,但未使用时也可能产生费用。
English
An instance's private IP address is allocated from its subnet CIDR range and is used for communication inside the VPC. A public IP address enables Internet communication through an Internet Gateway, but an automatically assigned public IPv4 address normally changes after an instance is stopped and started. An Elastic IP (EIP) is allocated to the account and remains reserved until explicitly released; it can be remapped to another instance and may incur charges when unused.
Transcript
02:28 So if we talk about IPv4 addresses.
02:31 So you could have your VPC which has the IPv4 Cidr range as you can see here.
02:37 And then you will have subnet which is also have a part of that range as subnet Cidr range.
02:44 And now inside this subnet if you launch say an EC2 instance, the first thing that it will get is a
02:44 private IP address.
02:51 Now that address it gets from the subnet Cidr range.
02:54 So it can be say this address now along with the private IP address.
02:59 If you want this EC2 instance to communicate with the internet directly then you will also assign a
03:05 public IP.
03:06 Now that really depends on the subnet setting.
03:08 So on the subnet if you enable auto assign public IP then EC2 instance will also have a public IP.
03:15 Now this public IP will be allocated from the Amazons pool of public IPS.
03:21 Right.
03:21 So it will have that public IP.
03:23 And now you can communicate with this instance over the internet using this public IP.
03:29 Okay.
03:29 Now what happens if you say stop the EC2 instance and start again.
03:34 So in that case the private IP will still remain with the instance but public IP will change.
03:41 So now it has got a new public IP.
03:44 So that's the behavior when you use public IP with your EC2 instance.
03:49 If you stop the instance and start the instance this IP will change.
03:54 So just remember that.
03:55 And here we are talking about IPv4 addresses okay.
03:59 So I hope it is clear.
04:01 Now what if you don't want this behavior.
04:04 Rather even if you stop and start the instance, you want that public IP to be with the instance.
04:09 Now for that you use something called elastic IP.
04:13 So elastic IPS are nothing but public IPS.
04:13 But these are static public IPS.
04:18 That means they remain with your EC2 instance unless you explicitly disassociate that right.
04:24 So elastic IP is allocated again from the public pool of IP addresses.
04:29 But it remains in your own AWS account, so it remains there until it is explicitly released.
04:37 Now further, even if you stop and start the instance, this IP will remain with your EC2 instance.
04:43 And one more important thing to know is that you can disassociate this elastic IP from one EC2 instance,
04:51 and you can associate that with another EC2 instance.
04:55 Now let's take an example.
04:57 Say this EC2 instance uh has some problem.
05:00 It crashes for example.
05:01 Right.
05:02 Now in that case you still want your application to be running on the same IP addresses because probably
05:07 your users are using that elastic IP.
05:10 Now in that case you can bring up another EC2 instance.
05:14 And then you can just associate this elastic IP with the new EC2 instance.
05:19 That means your user will continue to use your services.
05:23 So that's another benefit of using the elastic IPS.
05:28 Now just one small thing to understand is that when we say assigning IPS to the EC2 instance, actually
05:35 these IPS are assigned by something called Eni.
05:38 That is elastic network interface that comes with your EC2 instance.
05:42 And we are going to talk about that in the later section.
05:45 But for simplicity we are saying that IP addresses are assigned to EC2 instance, but actually they
05:52 are assigned to the elastic network interfaces.
05:55 Right.
05:56 So with that this is what the IPv4 addresses looks like in AWS.
06:01 And if you compare this, this will be the table which talks about the difference between these three
4. IPv4 Address – Comparison
时间范围:06:07–06:47
总结 / Summary
中文
对比表从通信范围(communication)、网络地址转换(Network Address Translation, NAT)、生命周期(lifecycle)、故障转移(failover)和成本(cost)等方面区分三类 IPv4 地址。私有 IP 主要用于 VPC 内部;公有 IP 由 AWS 自动提供互联网映射且生命周期与实例状态相关;弹性 IP 是可由用户保留和重新关联的静态公有 IPv4 地址(static public IPv4 address)。
English
The comparison distinguishes private, public, and Elastic IPv4 addresses by communication scope, Network Address Translation (NAT), lifecycle, failover behavior, and cost. Private IPs serve internal VPC communication, public IPs provide AWS-managed Internet mapping tied to instance lifecycle, and Elastic IPs are static public IPv4 addresses that customers can retain and reassociate.
Transcript
06:07 types of IP addresses.
06:08 Now we already talked about this.
06:10 So I'm not going to go over it again.
06:12 But hope you understand the difference.
06:12 Okay.
06:16 With this.
06:17 What we talked so far is mostly around IPv4 addresses, which is 32 bit.
06:22 But because we have now officially exhausted all the public IPv4 addresses, we have to now start adopting
06:30 IPv6 addresses.
06:32 And AWS does support that.
06:35 So AWS VPC supports IPv6 addresses.
06:38 And these addresses are 128 bits in length against the 32 bits in case of IPv4 addresses.
5. IPv6 Addresses
时间范围:06:47–09:10
总结 / Summary
中文
IPv6 地址(IPv6 address)为 128 位,使用八组十六进制(hexadecimal)字段表示。AWS 可以为 VPC 和子网分配 IPv6 CIDR 块(IPv6 CIDR block),实例获得可在互联网中路由的全球单播地址(global unicast address)。IPv6 不依赖 IPv4 中常见的公有地址网络地址转换(public-address NAT);访问仍必须由路由和安全控制共同允许。
English
IPv6 addresses contain 128 bits and are written as eight hexadecimal groups. AWS can allocate IPv6 CIDR blocks to a VPC and its subnets, and instances receive globally routable unicast addresses. IPv6 does not rely on the public-address NAT model commonly used with IPv4, although routing and security controls must still permit access.
Transcript
06:46 And that's where you can imagine how many addresses you can have with IPv6 addresses.
06:51 So that is two raised to 128 bits.
06:53 And that's a huge number.
06:55 Now when you want to assign the IPv6 Cidr ranges to your VPC, then you can assign this range with the
07:02 prefix in the range slash 44 to slash 60 in the increment of slash four block.
07:09 Now earlier AWS used to have the fixed Cidr prefix that is slash 56.
07:14 But recently AWS has changed that and for the subnets inside the VPC, you can assign IPv6 Cidr range
07:23 in the range of slash 44 to 64.
07:28 Now, when you want to assign these IPv6 ranges to your VPC, you get couple of options.
07:33 For example, you can assign your own IPv6 range and which means that you own that range.
07:41 Or you can use iPam, that is IP address manager, which we will cover later.
07:45 Or you can ask AWS to assign the IPv6 range.
07:50 And if AWS assigns this IPv6 range, then AWS uses the prefix of slash 56.
07:57 And that is fixed.
07:58 So it depends on how you are allocating this IPv6 range to your VPC.
08:03 And accordingly this prefix choices will differ.
08:07 So just remember that.
08:09 All right.
08:10 Now there is one fundamental difference between IPv4 and IPv6 addresses.
08:15 And that difference is that IPv6 addresses are globally unique and they are public, so there is no
08:22 private and public IPv6 addresses.
08:25 All addresses are public.
08:27 And further the behavior when you stop or start the instance, the IPv6 addresses will be persisted
08:34 so they don't change even if you restart the instance.
08:39 All right.
08:40 And finally, is it mutually exclusive to have IPv4 or IPv6 addresses inside your VPC.
08:46 So the answer is no.
08:48 Rather, you can use both IPv4 addresses and IPv6 addresses at the same time because VPC supports dual
08:55 stack mode.
08:56 So you can have both Cidr ranges to your VPC and then resources.
09:00 For example, EC2 instance also can have both IPv4 and IPv6 addresses, and this is called dual stack
09:08 mode.
09:10 And let me further explain this with the help of diagram.
6. VPC with IPv4 and IPv6 Subnets
时间范围:09:10–10:02
总结 / Summary
中文
VPC 可以采用双栈(dual-stack)模式,同时为资源提供 IPv4 和 IPv6 地址;也可以包含仅 IPv4(IPv4-only)或仅 IPv6(IPv6-only)的子网。双栈设计允许工作负载在迁移期间同时服务两种协议,但每种协议仍需要独立的 CIDR、路由和安全规则。
English
A VPC can operate in dual-stack mode, giving resources both IPv4 and IPv6 addresses, and it can also contain IPv4-only or IPv6-only subnets. Dual stack supports both protocols during migration, while each protocol still requires its own CIDR, routes, and security rules.
Transcript
09:10 So if you see this VPC you can see that there is IPv4 range as well as IPv6 range.
09:20 Now within that VPC you can have IPv4 only subnets or dual stack subnet, which has both the address
09:27 ranges and then IPv6 only subnet as well.
09:31 So VPC does support dual stack mode.
09:34 But just one thing to remember is that you cannot have IPv6, only VPC.
09:40 The VPC need to have IPv4 Cidr range.
09:44 However, if you see this subnet, subnet can be IPv6 only, but not the VPC.
09:50 So remember this important difference.
09:53 So with that I'm just providing a simple table which compares the IPv4 and IPv6 Cidr ranges for your
10:01 VPC.
7. IPv4 vs IPv6 Addresses
时间范围:10:02–10:26
总结 / Summary
中文
IPv4 与 IPv6 的关键差异包括地址长度、默认分配方式、VPC 和子网 CIDR 规划、公有连接模型以及安全控制。IPv4 常结合私有地址、NAT 和有限的公有地址使用;IPv6 提供极大的全球地址空间,但仍需通过路由表(Route Tables)、安全组(Security Groups)及网络 ACL(Network ACLs)限制访问。
English
The key IPv4 and IPv6 differences include address length, allocation behavior, VPC and subnet CIDR planning, public connectivity models, and security controls. IPv4 commonly combines private addressing, NAT, and scarce public addresses. IPv6 provides an enormous global address space, but Route Tables, Security Groups, and Network ACLs must still restrict access.
Transcript
10:02 So if you want just pause this video and you can read through all these important differences.
10:08 All right so that's about the IP addresses in VPC.
10:11 At very fundamental level.
10:13 And going forward we will again revisit these IP addresses in the context of different AWS networking
10:20 component.
10:21 So with that now let's go to the next lecture.
10:24 Thank you.
整讲总结 / Overall Summary
中文
VPC 中常见的 IPv4 地址包括私有 IP(Private IP)、公有 IP(Public IP)和弹性 IP(Elastic IP, EIP),三者在作用范围、生命周期、可重新映射性和成本上不同。IPv6 使用 128 位全球地址空间,可与 IPv4 组成双栈(dual stack),也可用于仅 IPv6 子网。无论使用哪种协议,地址分配本身并不等于允许访问;路由和防火墙规则仍然必不可少。
English
Common IPv4 address types in a VPC are private, public, and Elastic IP (EIP), each with different scope, lifecycle, remapping behavior, and cost. IPv6 provides a 128-bit global address space and can operate alongside IPv4 in dual stack or in IPv6-only subnets. With either protocol, address assignment alone does not grant access; routing and firewall rules remain essential.
返回顶部 ↑