取消
显示结果 
搜索替代 
您的意思是: 
cancel
1338
查看次数
12
有帮助
3
回复

关于IOS系统的Domainless NAT问题

fermiwu8888
Spotlight
Spotlight

如下图所示:

在R3上做domainlessNAT, R5可以正常访问内网服务器R1的TCP23,80端口;而内部流量,比如R2的出局流量(比如对8.8.8.8的访问,R1,R2均有默认路由指向192.168.1.1  R3也有nat overload,只是没有定义ip nat inside/outside),无法被送入nvi中做匹配;在show ip nat tran中也无转换记录;不晓得是不是domainlessNAT需要额外的路由引导,比如PBR         附上设备的show run; @LinusT

 

domainlessNAT.png

domainlessNAT2.png

domainlessNAT3.png

1 个已接受解答

已接受的解答

LinusT
Cisco Employee
Cisco Employee
! 
interface Ethernet0/0
ip address 202.100.1.2 255.255.255.0
ip nat enable
duplex auto
!
interface Ethernet0/1
ip address 192.168.1.1 255.255.255.0
ip add 1.1.1.1 255.255.255.0 sec
no ip redirects
ip nat enable
duplex auto
!
ip nat pool stick 1.1.1.2 1.1.1.10 prefix-length 24
ip nat source list 10 pool stick overload
ip nat source static tcp 192.168.1.2 23 202.100.1.2 23 extendable
ip nat source static tcp 192.168.1.2 80 202.100.1.2 80 extendable
ip nat source list 101 int Ethernet0/0 overload
ip route 0.0.0.0 0.0.0.0 202.100.1.1
!
!
access-l 10 permit 192.168.1.0 0.0.0.255
access-l 101 permit tcp any host 10.1.1.2 eq 80
access-l 101 permit tcp any host 10.1.1.2 eq 23
!
control-plane
!
!


https://www.cisco.com/c/en/us/support/docs/ip/network-address-translation-nat/6505-nat-on-stick.html

在原帖中查看解决方案

3 条回复3

LinusT
Cisco Employee
Cisco Employee

今天有点忙,我晚上给你回复一下,嘿嘿

 

LinusT
Cisco Employee
Cisco Employee
! 
interface Ethernet0/0
ip address 202.100.1.2 255.255.255.0
ip nat enable
duplex auto
!
interface Ethernet0/1
ip address 192.168.1.1 255.255.255.0
ip add 1.1.1.1 255.255.255.0 sec
no ip redirects
ip nat enable
duplex auto
!
ip nat pool stick 1.1.1.2 1.1.1.10 prefix-length 24
ip nat source list 10 pool stick overload
ip nat source static tcp 192.168.1.2 23 202.100.1.2 23 extendable
ip nat source static tcp 192.168.1.2 80 202.100.1.2 80 extendable
ip nat source list 101 int Ethernet0/0 overload
ip route 0.0.0.0 0.0.0.0 202.100.1.1
!
!
access-l 10 permit 192.168.1.0 0.0.0.255
access-l 101 permit tcp any host 10.1.1.2 eq 80
access-l 101 permit tcp any host 10.1.1.2 eq 23
!
control-plane
!
!


https://www.cisco.com/c/en/us/support/docs/ip/network-address-translation-nat/6505-nat-on-stick.html

LinusT
Cisco Employee
Cisco Employee

请注意,

ip nat enable

此NAT语法已经被完全弃用差不多十多年了,在客户环境或者项目中不会遇到。

建议以后用EVE做实验的时候切换到CSR1Kv或C8Kv或 IOS-XR9Kv。

 

 

快捷链接