静态 NAT 不起作用。获取“请求超时”。信息

网络工程 思科 路由 纳特 ospf
2022-02-16 04:34:59

我有这个网络,我需要配置 NAT 以使 VLAN 11 和 12 中的计算机能够访问 Internet。当我测试从计算机到 ISP 的两个公共 IP 地址的连接时,路由器 1.1.1.1 和 2.2.2.1 会显示Request timed out.消息. 数据包到达 ISP1 路由器但永远不会回来。

到目前为止,这是我的命令:

R1

R1(config)#interface serial 0/0/0
R1(config-if)#ip nat inside
R1(config-if)#exit
R1(config)#ip nat inside source static 1.1.1.2 1.1.1.1
R1(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.1
R1(config)#

ISP1

ISP1(config)#interface serial 0/0/0
ISP1(config-if)#ip nat outside
ISP1(config-if)#exit

显示 ip nat 翻译

R1#show ip nat translations 
Pro  Inside global     Inside local       Outside local      Outside global
---  1.1.1.1           1.1.1.2            ---                ---

R1 显示 ip 路由

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 1.1.1.1 to network 0.0.0.0

     1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       1.1.1.0/30 is directly connected, Serial0/0/0
L       1.1.1.2/32 is directly connected, Serial0/0/0
     2.0.0.0/30 is subnetted, 1 subnets
O       2.2.2.0/30 [110/66] via 10.1.11.2, 10:08:42, GigabitEthernet0/0
                   [110/66] via 10.1.12.2, 10:08:42, GigabitEthernet0/1
     10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C       10.1.11.0/24 is directly connected, GigabitEthernet0/0
L       10.1.11.1/32 is directly connected, GigabitEthernet0/0
C       10.1.12.0/24 is directly connected, GigabitEthernet0/1
L       10.1.12.1/32 is directly connected, GigabitEthernet0/1
O       10.2.21.0/24 [110/2] via 10.1.11.2, 10:08:42, GigabitEthernet0/0
O       10.2.22.0/24 [110/2] via 10.1.12.2, 10:08:42, GigabitEthernet0/1
S*   0.0.0.0/0 [1/0] via 1.1.1.1

ISP1 显示 ip 路由

ISP1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       1.1.1.0/30 is directly connected, Serial0/0/0
L       1.1.1.1/32 is directly connected, Serial0/0/0
     2.0.0.0/30 is subnetted, 1 subnets
O       2.2.2.0/30 [110/130] via 1.1.1.2, 00:29:20, Serial0/0/0
     10.0.0.0/24 is subnetted, 4 subnets
O       10.1.11.0/24 [110/65] via 1.1.1.2, 00:29:20, Serial0/0/0
O       10.1.12.0/24 [110/65] via 1.1.1.2, 00:29:20, Serial0/0/0
O       10.2.21.0/24 [110/66] via 1.1.1.2, 00:29:20, Serial0/0/0
O       10.2.22.0/24 [110/66] via 1.1.1.2, 00:29:20, Serial0/0/0

我对网络有点菜鸟,所以我不知道我应该提供什么其他信息。

我正在工作的网络

1个回答

您似乎对 NAT 的工作方式感到困惑。您想将您的网络地址转换为其他内容。NAT 已配置并且仅适用于单个路由器。您的 ISP 路由器不需要也不应该有任何 NAT 配置。

NAT 在您的本地路由器上配置。您将在 R1 上同时拥有内部和外部接口。接口将1.1.1.2是外部接口,10.1.11.1and10.1.12.1接口将是内部接口。您需要翻译10.1.11.0/2410.1.12.0/24地址。

您还需要小心使用两个 WAN 路由器。如果您获得非对称路由(流量从一个 WAN 路由器流出,但又回到另一个 WAN 路由器),您的 NAT 将中断,因为两个 WAN 路由器不共享 NAT 表。