AWS · Advanced Networking Specialty

网络课程笔记

Lecture 087 · 6 张幻灯片

幻灯片、双语总结及 Transcript · 图片已内嵌,可离线阅读。

原文默认收起
lecture-087.md

Lecture 87: TGW Architecture: Centralized egress internet

  • 课程:[NEW] AWS Certified Advanced Networking Specialty 2026
  • 视频时长:09:00
  • 来源:Udemy Lecture 29137606
  • Slide 数量:6
  • 画面切换:00:49、02:28、05:32、06:20、08:15

扫描说明

逐条检查了 Udemy 页面中的 114 条 Transcript cue,并对全长 9:00 的视频画面逐段扫描。依据标题页、TGW 集中路由概览、集中出口路由表与流量、NAT 高可用/性能要点、Blackhole 与跨 VPC 路由,以及成本/治理六个独立 Slide/画面阶段,共划分出 6 个小节。

Transcript 来自 Udemy 页面自带的英文自动字幕,没有使用 ASR。下面保留页面原文,包括其中的语法或识别错误。

1. Transit Gateway 集中式互联网出口

时间范围:00:00–00:49

Transit Gateway centralized egress to internet title slide

总结 / Summary

中文

企业拥有大量虚拟私有云(Virtual Private Cloud, VPC)时,可用中转网关(Transit Gateway, TGW)把应用 VPC 的互联网出口集中到共享服务 VPC(shared services VPC)或出口 VPC(egress VPC)。应用 VPC 不再各自部署互联网网关(Internet Gateway, IGW)和网络地址转换网关(Network Address Translation Gateway, NAT Gateway),从而把路由、检查与运维控制集中到专门的网络团队。

English

Enterprises with many VPCs can use a Transit Gateway to centralize internet egress in a shared-services or egress VPC. Application VPCs no longer need independent Internet Gateways and NAT Gateways, allowing routing, inspection, and operations to be governed by a dedicated networking team.

Transcript

00:00 Hello and welcome to this lecture.

00:02 Now that you understood how transit gateway works and we already covered different attachment

00:07 types of the transit gateway.

00:09 Now with this knowledge, we can definitely build a lot of interesting architectures and

00:15 then these architectures can support different network routing scenarios.

00:20 Now one of such architecture is centralize the networking access through transit gateway

00:25 and you will typically come across this kind of architecture in the enterprises where there

00:30 are a lot of VPCs and then you want to have better control over the traffic which flows

00:35 through this VPCs and typically for that you will have a shared services VPC and all the

00:41 traffic going to the internet or to other VPCs you can route through this shared services VPC.

2. Application VPC 与 Shared Services VPC 的 Hub-and-Spoke

时间范围:00:49–02:28

Centralized routing with Transit Gateway connecting application VPCs to a shared services VPC

总结 / Summary

中文

多个应用 VPC(application VPC)作为辐条(spoke)连接到 TGW,共享服务 VPC(shared services VPC)作为集中网络服务节点。所有去互联网的流量都先由 TGW 转发到共享服务 VPC;同一位置还可部署网络设备(network appliance)来监控互联网流量或 VPC 间流量。该中心辐射拓扑(hub-and-spoke topology)是后续集中出口和集中流量检查架构的基础。

English

Multiple application VPCs attach to the TGW as spokes, while a shared-services VPC hosts centralized network services. Internet-bound traffic is routed through the shared-services VPC, where network appliances can also monitor internet and inter-VPC traffic. This hub-and-spoke topology is the foundation for centralized egress and inspection designs.

Transcript

00:49 So it looks something like this.

00:51 On the left side you have application VPCs and on the right side you have shared services VPC.

00:56 Then you connect all these VPCs using the transit gateway and now if you want to have

01:01 centralized egress access, then all the traffic will be routed through this shared services VPC.

01:08 So any of the application VPCs doesn't have their own internet gateway, but rather all

01:15 the traffic to internet is routed to this shared services VPC.

01:20 And similarly, you can also monitor all the traffic which is going to internet or any

01:25 traffic that flows between the VPCs through this network appliances which you can deploy

01:30 in shared services VPC.

01:33 So here in next two to three lectures, we are going to talk about all such architectures

01:39 and for your networking certification exam, these are very important architectures because

01:45 I'm sure there will be questions around such scenarios.

01:49 So make sure that you understand all these architectures well enough.

01:54 So first use case that we will talk about is how do you implement the centralized egress

02:00 access using the transit gateway, which means all these application VPCs, when they want

02:06 to reach to the internet, the traffic should flow through this shared services VPC.

02:12 So architecture will look something like this.

02:14 On the left side, you have application VPCs, on the right side you have egress VPC and

02:19 then you connect all these VPCs to the transit gateway.

02:23 Now with respect to the traffic flow, the most important part here is how do you configure

3. Centralized Egress 的路由表与双向流量

时间范围:02:28–05:32

Centralized internet egress architecture with NAT gateways TGW attachments and route tables

总结 / Summary

中文

应用子网路由表(application subnet route table)把默认路由 0.0.0.0/0 指向 TGW。应用 VPC 附件共用的 TGW 路由表(TGW route table)再把默认路由指向出口 VPC 附件,并可用 10.0.0.0/8 黑洞路由(blackhole route)禁止辐条间通信。出口 VPC 附件的 TGW 路由表传播各应用 VPC 的 CIDR,用于回程。出口 VPC 中,TGW ENI 所在子网把默认路由指向同可用区的 NAT Gateway;NAT 子网把默认路由指向互联网网关(Internet Gateway, IGW),并把应用 VPC CIDR 的回程指向 TGW。正反向路径因此保持对称,并尽量留在相同可用区(Availability Zone, AZ)。

English

Each application subnet sends 0.0.0.0/0 to the TGW. A shared TGW route table for the application-VPC attachments forwards the default route to the egress-VPC attachment and can use a 10.0.0.0/8 blackhole route to block spoke-to-spoke traffic. The egress attachment route table propagates the application-VPC CIDRs for return traffic. In the egress VPC, the TGW-ENI subnet routes to the NAT Gateway in the same AZ, while the NAT subnet sends internet traffic to the IGW and return traffic for application CIDRs back to the TGW. This keeps the forward and return paths symmetric and AZ-local where possible.

Transcript

02:28 the route tables and that's how the traffic will be routed to the right destination.

02:34 So if you talk about the route table for this VPC, that is for the application subnet, we

02:39 are saying that all the traffic to the internet will go to the transit gateway, which is obvious.

02:46 Now with respect to the routing for this attachment of the VPCs, now typically all these spoke

02:52 VPC attachment will have a common route table because routing requirements are the same.

02:57 So this route table will look something like this.

03:00 Again we are saying that all the traffic going to internet will go through this egress VPC

03:05 attachment and additionally we have added this black hole route.

03:10 Now this black hole route right now is to prevent the inter VPC communication and shortly

03:16 I am going to talk more about this black hole route table entry.

03:20 Okay, so this is a route table for this attachment in which you have route propagated for egress VPC attachment.

03:27 So I hope that is clear.

03:29 Now for the route table of egress VPC attachment, typically all the traffic will flow back from

03:35 the internet and you need to route back it to respective VPCs.

03:38 So as you might have guessed, this would have the route propagated from both these attachment

03:44 to respective VPC CIDR ranges, right?

03:44 So that's obvious.

03:49 And now as the traffic from this VPC reaches to the transit gateway ENI is here in the

03:55 egress VPC, all this traffic has to be forwarded to the NAT gateway and that's where there

04:02 will be a route table entry for this subnet to forward all the traffic.

04:06 Now for NAT gateway subnet, the route table entry will have default route to the internet,

04:12 which is obvious and for all the return traffic from the internet, it will send the traffic

04:17 back to the transit gateway.

04:20 And from there, as there is this route table here, it will be sent back to the respective VPCs.

04:27 So this is how you will configure your route tables.

04:30 So if instance A here initiates the traffic to the internet, the flow will look something

04:36 like this, right?

04:38 And similarly, the return traffic will come back from the internet and go to the originating instance.

04:45 Now, in this case, you know that transit gateway tries to maintain the traffic in the same

04:50 AC in which it is originated.

04:53 So if instance B, for example, here initiates the traffic, then transit gateway will send

04:58 it to the NAT gateway in different AC.

05:02 And doing that actually helps you with the high availability of the NAT gateways as well

05:07 as your inter AC data transfer cost is saved.

05:12 So this is a better architecture where you are leveraging multiple availability zones.

05:18 So just keep that in mind.

05:19 Okay, so important thing to know about this architecture is that we have NAT gateways

05:25 in each AC, which provides high availability as well as it saves inter AC data transfer cost.

05:32 And in this case, if any of the AC fails, then also your traffic will be routed to another

4. NAT Gateway 的跨 AZ 高可用与容量

时间范围:05:32–06:20

Centralized egress important considerations for NAT Gateway high availability and scale

总结 / Summary

中文

出口 VPC 应在每个可用区(Availability Zone, AZ)部署 NAT Gateway,以提供高可用性(high availability)并避免跨可用区数据传输费(inter-AZ data transfer charge)。某个 AZ 发生故障时,流量可经 TGW 转移到另一 AZ 的 NAT Gateway。视频给出的当时容量是:每个唯一目标最多约 55,000 个并发连接,并可从 5 Gbps 扩展到 100 Gbps;这些限制会变化,应核对当前 AWS 配额。

English

The egress VPC should deploy a NAT Gateway in every Availability Zone for high availability and to avoid inter-AZ data-transfer charges. If one AZ fails, traffic can be routed through a NAT Gateway in another AZ. The lecture cites then-current capacity of about 55,000 simultaneous connections to one unique destination and scaling from 5 to 100 Gbps; current AWS quotas should be checked.

Transcript

05:37 AC automatically.

05:38 Now, with respect to the NAT gateway performance, because we are now centralizing all the egress

05:45 through a NAT gateway, it shouldn't happen that NAT gateway is a bottleneck and in that

05:50 case you should know NAT gateway performance.

05:53 So as of today, it supports 55,000 simultaneous connection to a unique destination and with

06:00 respect to the bandwidth, it can scale up to 100 Gbps.

06:04 Now this bandwidth limits might change in the future, but this is how it looks as of today.

06:09 Now, earlier I talked about the black hole route in the attachment route table, right?

06:16 Now let's try to understand more about why we need that route.

5. Blackhole Route 与 Inter-VPC Communication

时间范围:06:20–08:15

Centralized egress route tables showing direct inter VPC routes and blackhole behavior

总结 / Summary

中文

如果应用 VPC 附件的 TGW 路由表只有指向出口 VPC 的默认路由,那么 VPC A 到 VPC B 的流量也会绕经 NAT Gateway,再返回 TGW,造成低效路径和额外 NAT 处理费。若希望允许 VPC 间通信(inter-VPC communication),应把各辐条附件路由传播到同一 TGW 路由表,让流量直接经 TGW 到达目标 VPC。若策略要求隔离辐条,则保留覆盖内部 CIDR 的黑洞路由(blackhole route),明确丢弃这类流量。

English

If the spoke-attachment TGW route table contains only a default route to the egress VPC, traffic from VPC A to VPC B also detours through the NAT Gateway and back to the TGW, creating an inefficient path and extra NAT charges. To allow inter-VPC communication, propagate the spoke routes into the same TGW route table so traffic goes directly through the TGW. To enforce spoke isolation, retain a blackhole route covering the internal CIDR space.

Transcript

06:20 So this is the architecture.

06:22 Now what if you remove this black hole route, right?

06:25 Now let's try to trace down then what happens if VPC A tries to communicate with VPC B.

06:33 So in that case, traffic again will originate here.

06:37 Now with this route table, it will go to the transit gateway.

06:41 Now at this point, there is only one route that is a default route, which goes to egress VPC attachment.

06:47 So it will go here, it will go to the NAT gateway.

06:50 And now because the destination is VPC B here, NAT gateway will use this second route

06:50 here to return back the traffic to the transit gateway and then it will go like this.

07:03 Now this is not very efficient in the sense that inter-VPC communication is also going

07:09 through the NAT gateway.

07:09 So you will pay additional cost of the NAT gateway.

07:13 So rather, if you want to allow the inter-VPC communication, you should add the route table

07:19 entries right here in this particular route table.

07:23 So it will look something like this, right?

07:26 Now you are propagating the corresponding attachment routes into the same route table

07:32 and now the traffic directly goes from one VPC to another through the transit gateway.

07:38 It doesn't go through this shared services VPC.

07:38 But in this architecture, we did not want to allow inter-VPC communication and that's

07:47 where we had added that black hole route.

07:50 So I hope that is clear.

07:52 Okay, so this is one of the architecture that is very common and we have seen questions around this.

07:58 So make sure you understand all the routes that you see in this route table.

08:03 And now finally, before we stop for this lecture, you need to also understand the cost element here.

08:09 Now centralizing access through the NAT gateway doesn't necessarily give you a lot of cost benefits.

08:15 That's for the reason that transit gateway itself has two costs associated with it.

6. 集中出口的 Cost 与 Operational Control

时间范围:08:15–09:00

Centralized egress important considerations including NAT and TGW cost comparison

总结 / Summary

中文

集中出口不一定带来明显成本节省:除 NAT Gateway 的小时费和每 GB 数据处理费(per-GB data processing charge)外,还要支付 TGW 附件费(attachment charge)与 TGW 每 GB 数据处理费。它的主要价值往往是治理与控制(governance and control)——把数百个 VPC 的出口、路由表和安全服务集中管理,而不是单纯降低网络账单。设计时应把 NAT、TGW、跨 AZ 和数据传输费用一起建模。

English

Centralized egress does not necessarily produce major cost savings. In addition to the NAT Gateway hourly and per-GB processing charges, the design incurs TGW attachment and per-GB processing charges. Its primary value is often governance and operational control—centralizing egress, routing, and security services for hundreds of VPCs—rather than reducing the network bill. NAT, TGW, inter-AZ, and data-transfer costs should be modeled together.

Transcript

08:21 One per attachment and also data processing charge per GB.

08:27 So if you make your calculation, it doesn't really make a lot of difference.

08:32 But I would say this kind of architecture is more beneficial if you want to have more

08:37 control over your traffic.

08:40 And that's where you will see this kind of architecture more in the enterprises where

08:44 there are hundreds of VPCs and there is a separate team who manages the transit gateway

08:49 and shared services VPC.

08:52 Okay, so I hope that is clear.

08:54 With that, we will stop for this lecture.

08:56 So thanks for watching and stay tuned.

整讲总结 / Overall Summary

中文

集中式互联网出口(centralized internet egress)把应用 VPC 的 0.0.0.0/0 流量经中转网关(Transit Gateway, TGW)送到出口 VPC(egress VPC),再由同可用区(Availability Zone, AZ)的网络地址转换网关(Network Address Translation Gateway, NAT Gateway)和互联网网关(Internet Gateway, IGW)访问公网。核心是配置成对的 VPC 路由表与 TGW 路由表:出口附件传播辐条 CIDR 以保证回程,黑洞路由(blackhole route)用于阻止 VPC 间通信,或传播辐条路由以允许直接通信。每 AZ 部署 NAT Gateway 可提高可用性并减少跨 AZ 费用,但 TGW 与 NAT 都收取附件或数据处理费用,因此架构价值主要来自集中治理,而非必然的成本节省。

English

Centralized internet egress sends application-VPC default traffic through a Transit Gateway to an egress VPC, then through an AZ-local NAT Gateway and Internet Gateway. Correct paired VPC and TGW route tables are essential: the egress attachment propagates spoke CIDRs for return traffic, while blackhole routes block inter-VPC communication or propagated spoke routes enable it directly. Deploying a NAT Gateway per AZ improves availability and reduces inter-AZ charges, but both TGW and NAT incur processing costs, so the main benefit is centralized governance rather than guaranteed savings.

返回顶部 ↑