静态NAT使用“外部”应与“内部”相同吗?
拓扑结构:

例如,假设我使用:
ip nat inside static source 192.168.1.1 10.1.1.50 如果我做相反的尝试
ip nat outside static source 10.1.1.100 192.168.1.50 为什么“内部”NAT规则在两方面都很好,而“外部”规则在返回时却失败了?
使用数据包追踪器,所以根据4321路由器,它是IOS15.4
配置(NAT内部)
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
ip cef
no ipv6 cef
!
!
spanning-tree mode pvst
!
!
interface GigabitEthernet0/0/0
ip address 192.168.1.2 255.255.255.0
ip nat inside
duplex auto
speed auto
!
interface GigabitEthernet0/0/1
ip address 10.1.1.1 255.255.255.0
ip nat outside
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip nat inside source static 192.168.1.1 10.1.1.50
ip classless
!
ip flow-export version 9
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end配置(NAT外)
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
ip cef
no ipv6 cef
!
!
spanning-tree mode pvst
!
!
interface GigabitEthernet0/0/0
ip address 192.168.1.2 255.255.255.0
ip nat inside
duplex auto
speed auto
!
interface GigabitEthernet0/0/1
ip address 10.1.1.1 255.255.255.0
ip nat outside
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip nat outside source static 10.1.1.100 192.168.1.50
ip classless
!
ip flow-export version 9
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end```发布于 2019-08-05 11:11:09
我相信您需要在命令中添加“附加路由”。
ip nat outside static source 10.1.1.100 192.168.1.50 add-route根据这的解释:
当您将ip nat外部源静态命令配置为为外部本地地址添加静态路由时,数据包和数据包的转换会出现延迟。丢包是因为当NAT配置为静态转换时,未为初始同步(SYN)数据包创建快捷方式。若要避免丢弃数据包,请配置ip nat外部源静态添加路由命令或ip路由命令。
https://networkengineering.stackexchange.com/questions/60748
复制相似问题