NAT 无法在数据包返回时进行转换

网络工程 纳特
2022-03-06 20:45:44

文本

我目前正在使用上面的网络。每当我从网络发送数据包时,在返回到路由器时,它无法转换回来并最终丢弃数据包。我怎么能从静态 1-1 翻译中获得返回数据包。

路由器1

Current configuration : 1478 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 192.168.0.1 255.255.255.0
 ip helper-address 192.168.80.2
 ip nat inside
 duplex auto
 speed auto
!
interface FastEthernet0/0.1
 encapsulation dot1Q 10
 ip address 192.168.10.1 255.255.255.0
 ip helper-address 192.168.80.2
 ip nat inside
!
interface FastEthernet0/0.2
 encapsulation dot1Q 20
 ip address 192.168.20.1 255.255.255.0
 ip helper-address 192.168.80.2
 ip nat inside
!
interface FastEthernet0/0.3
 encapsulation dot1Q 30
 ip address 192.168.30.1 255.255.255.0
 ip helper-address 192.168.80.2
 ip nat inside
!
interface FastEthernet1/0
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial2/0
 ip address 129.137.107.130 255.255.255.128
 ip nat outside
!
interface Serial3/0
 no ip address
 clock rate 2000000
 shutdown
!
interface FastEthernet4/0
 no ip address
 shutdown
!
interface FastEthernet5/0
 no ip address
 shutdown
!
router eigrp 1
 network 129.137.107.128 0.0.0.127
 network 192.168.0.0
 network 192.168.10.0
 network 192.168.20.0
 network 192.168.30.0
 auto-summary
!
ip nat inside source list 10 interface Serial2/0 overload
ip classless
!
ip flow-export version 9
!
!
access-list 10 permit 192.168.0.0 0.0.255.255
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

路由器0

Current configuration : 2231 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 192.168.1.1 255.255.255.0
 ip helper-address 192.168.80.2
 ip nat inside
 duplex auto
 speed auto
!
interface FastEthernet0/0.1
 encapsulation dot1Q 2
 ip address 192.168.2.1 255.255.255.0
 ip helper-address 192.168.80.2
 ip nat inside
!
interface FastEthernet0/0.2
 no ip address
 shutdown
!
interface FastEthernet0/0.3
 encapsulation dot1Q 20
 ip address 192.168.20.1 255.255.255.0
 ip helper-address 192.168.80.2
 ip nat inside
!
interface FastEthernet0/0.5
 encapsulation dot1Q 40
 ip address 192.168.40.1 255.255.255.0
 ip helper-address 192.168.80.2
 ip nat inside
!
interface FastEthernet0/0.6
 encapsulation dot1Q 50
 ip address 192.168.50.1 255.255.255.0
 ip helper-address 192.168.80.2
 ip nat inside
!
interface FastEthernet0/0.7
 encapsulation dot1Q 60
 ip address 192.168.60.1 255.255.255.0
 ip helper-address 192.168.80.2
 ip nat inside
!
interface FastEthernet0/0.8
 encapsulation dot1Q 70
 ip address 192.168.70.1 255.255.255.0
 ip helper-address 192.168.80.2
 ip nat inside
!
interface FastEthernet1/0
 ip address 192.168.80.1 255.255.255.0
 ip helper-address 192.168.80.2
 ip nat inside
 duplex auto
 speed auto
!
interface Serial2/0
 ip address 129.137.107.129 255.255.255.128
 ip nat outside
 clock rate 2000000
!
interface Serial3/0
 no ip address
 clock rate 2000000
 shutdown
!
interface FastEthernet4/0
 no ip address
 shutdown
!
interface FastEthernet5/0
 no ip address
 shutdown
!
router eigrp 1
 network 129.137.107.128 0.0.0.127
 network 192.168.1.0
 network 192.168.2.0
 network 192.168.10.0
 network 192.168.20.0
 network 192.168.30.0
 network 192.168.40.0
 network 192.168.50.0
 network 192.168.60.0
 network 192.168.70.0
 network 192.168.80.0
 auto-summary
!
ip nat inside source list 10 interface Serial2/0 overload
ip nat inside source static tcp 192.168.80.3 80 129.137.107.131 80 
ip classless
!
ip flow-export version 9
!
!
access-list 10 permit 192.168.0.0 0.0.255.255
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end
2个回答

网络看起来是私有的。您不需要在专用网络内进行 NAT,例如通过串行链路。你可以简单地穿过。

如果您坚持通过串行链路进行 NAT,则应在右侧的路由器上完成。左侧的路由器不应通过串行路由(内部没有 ip nat)。只有在必要时,它才会在上游链路(左上角)上进行 NAT。

除非有充分的理由采用这种拓扑结构,否则您的整个设计都需要进行重大修改。

在 Router1 上设置动态 NAT 是不必要的。