欢迎您访问我爱IT技术网,今天小编为你分享的电脑教程是网络协议方面的经验知识教程:CISCO DNAT(端口映射)的设置,下面是详细的分享!
CISCO DNAT(端口映射)的设置
CISCO DNAT(端口映射)的设置
实验拓扑如下:

实验目的:学习调试DNAT的配置,让192.168.1.0/24网段的地址可以用远程桌面到192.168.2.100上,中间不是走路由 走的是dnat。
实验要求:实现192.168.1.0/24网段可以通过远程桌面连接192.168.1.100这个IP连接到192.168.2.100上。在Router2上做DNAT
首先配置网络可通,192.168.2.0/24网段可以NAT成192.168.1.100上网,然后配置DNAT策略
可以NAT成192.168.1.100上网的配置如下:
router2#show running-config
Building configuration...
Current configuration : 916 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname router2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
ip cef
!
!
no ip dhcp use vrf connected
!
ip dhcp pool dhcppool
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
dns-server 202.106.0.20 202.106.46.151
!
!
no ip domain lookup
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.2.1 255.255.255.0
ip nat inside
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.1.100 255.255.255.0
ip nat outside
duplex auto
speed auto
!
ip route 0.0.0.0 0.0.0.0 192.168.1.2
!
ip http server
no ip http secure-server
ip nat inside source list 1 interface FastEthernet0/1 overload
!
access-list 1 permit 192.168.2.0 0.0.0.255
!
control-plane
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
!
!
End
测试是否可以正常上网

关键是DNAT,
命令如下
router2#conf t
router2(config)#ip nat inside source static tcp 192.168.2.100 3389 interface fastEthernet 0/1 3389
router2(config)#end
router2#wr
*Mar 2 07:08:40.959: %SYS-5-CONFIG_I: Configured from console by console
router2#wr
Building configuration...
[OK]
router2#
调试完毕
去192.168.1.0/24网段进行测试


OK 没有问题 测试成功!!!
本文出自 “依然、始终、永远” 博客
以上就是关于CISCO DNAT(端口映射)的设置的网络协议知识分享,更多电脑教程请移步到>>电脑教程。
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
