Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| zh:docs:guide-user:network:switch_router_gateway_and_nat [2021/06/30 06:42] – upgrade to current version biaji | zh:docs:guide-user:network:switch_router_gateway_and_nat [2021/07/01 07:44] – [OpenWrt as wireless access point (wireless-to-wired switch)] biaji | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| [[docs: | [[docs: | ||
| 以下是摘要: | 以下是摘要: | ||
| - | * 您可以决定是配置交换机, | + | * 您可以决定将设备配置为交换机, |
| - | * 您可以决定在个人家庭网络情况下如何处理IPv4双NAT问题 | + | * 您可以决定在个人家庭网络情况下如何处理IPv4的双NAT问题 |
| ===== OpenWrt的角色 ===== | ===== OpenWrt的角色 ===== | ||
| Line 18: | Line 18: | ||
| - | ===== Router/gateway and double NAT problem with IPv4 or mixed IPv4/ | + | ===== 作为路由器/网关时,IPv4或混用IPv4/IPv6情况下需要面对的双NAT问题 |
| <WRAP todo> | <WRAP todo> | ||
| - | Are you an OpenWrt | + | 您是OpenWrt的新手么?这个页面里的各种网络技术信息是不是看起来很可怕?感觉无所适从了?\\ |
| - | -> Just stop reading and use the default configuration for now. Your device will act as a router in a cascaded double | + | -> 您可以选择暂时放弃,转而使用默认配置。您的设备在双NAT场景下会作为一个路由工作,一般来说访问因特网不会有任何问题,您什么都不需要做。\\ |
| - | -> Alternatively, | + | -> 或者,先看看[[docs: |
| </ | </ | ||
| - | [[docs: | + | [[docs: |
| - | The problem of IPv4 is that if you simply add an additional IPv4 router to an existing router of your ISP (internet service provider), you will face a problem called | + | IPv4的问题在于:当你在现存的路由和ISP(互联网服务提供商)之间加上一个IPv4路由的时候,你就会遇到这个名为 |
| - | This double | + | 在一般情况下,比如浏览互联网的时候,这种双NAT的场景不会造成什么问题。但当你想在家里建一个服务器,以供互联网访问的时候,亦或玩一些端到端连接的网络游戏的时候(这些游戏经常用UDP协议并会对防火墙做一些类似“UDP打洞”的神奇操作),问题就出现了。 |
| - | To deal with this double | + | 为了解决双NAT问题,以尽量完美的使用IPv4,您需要从OpenWrt如何连接上游的几个选项中选择一个。请注意,在这些示例中,OpenWrt设备被认为是在网络“内部”的,诸如 客户端 |
| - | * **Upstream**: the connection from the OpenWrt | + | * **上游**: 由OpenWrt设备到您的网络基础设施 |
| - | * **Downstream**: your home client devices connecting to your OpenWrt | + | * **下游**: 您家里连接到OpenWrt设备的客户端设备 |
| There is a range of options to connect the upstream side of OpenWrt to your existing home network. Each option tries to work around the double NAT problem with different technical tricks or configuration: | There is a range of options to connect the upstream side of OpenWrt to your existing home network. Each option tries to work around the double NAT problem with different technical tricks or configuration: | ||
| Line 47: | Line 47: | ||
| | single | [[# | | single | [[# | ||
| - | ====== | + | ====== |
| - | | single | Three usage Variants: | + | | single | 三种用法: |
| Note that for all of these upstream connection variants, the following applies: | Note that for all of these upstream connection variants, the following applies: | ||
| + | |||
| * all variants can handle both wireless and wired clients on the downstream side (i.e. client devices connected to your LAN) | * all variants can handle both wireless and wired clients on the downstream side (i.e. client devices connected to your LAN) | ||
| * all variants can host software services for both downstream and upstream sides (like NAS shares) | * all variants can host software services for both downstream and upstream sides (like NAS shares) | ||
| Line 149: | Line 150: | ||
| Note: In case you are interested in creating a so called " | Note: In case you are interested in creating a so called " | ||
| - | ===== OpenWrt | + | ===== OpenWrt作为无线接入点(无线到有线交换机)===== |
| - | Follow: [[docs: | + | 遵循: [[docs: |
| - | As a wireless access point, | + | 作为一个无线接入点,OpenWrt将以有线连接至现存网络。供您的无线设备经由OpenWrt连接至有线网络所用。 |
| - | * the wired network provides Internet access | + | * 有线网络提供因特网访问 |
| * OpenWrts upstream side (the other wired network it will connect to) will be a wired connection to the existing router. So OpenWrt acts as a client of this existing other network. | * OpenWrts upstream side (the other wired network it will connect to) will be a wired connection to the existing router. So OpenWrt acts as a client of this existing other network. | ||
| * OpenWrts downstream side (the Wi-Fi network that OpenWrt will provide) will be an access point for your wireless clients | * OpenWrts downstream side (the Wi-Fi network that OpenWrt will provide) will be an access point for your wireless clients | ||