NAT_Static静态NAT的简单配置
原创
©著作权归作者所有:来自51CTO博客作者strive88的原创作品,请联系作者获取转载授权,否则将追究法律责任
R1的配置:
Press Enter to Start
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R1
R1(config)#int e0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#ip nat inside
R1(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
R1(config-if)#int s0
R1(config-if)#ip add 192.168.2.5 255.255.255.252
R1(config-if)#ip nat outside
R1(config-if)#clock rate 64000
R1(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
R1(config-if)#iend
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip nat inside source static 192.168.1.2 202.101.54.1
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.2.4
R1(config-router)#end
R2的配置:
Press Enter to Start
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R2
R2(config)#int e0
R2(config-if)#ip add 202.101.2.1 255.255.255.0
R2(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
R2(config-if)#int s0
R2(config-if)#ip add 192.168.2.6 255.255.255.252
R2(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#network 192.168.2.4
R2(config-router)#network 202.101.2.0
R2(config-router)#end
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#line vty 0 4
R2(config-line)#login
R2(config-line)#password cisco
R2(config-line)#end
在R1上查看NAT转换:
R1#sh ip nat statistics
Total active translations: 3 (0 static, 3 dynamic; 3 extended)
Outside interfaces: Serial0
Inside interfaces: Ethernet0
Hits: 5 Misses: 5
Expired translations: 5
Dynamic mappings:
-- Inside Source
Access list + 0interface refcount 0
Telnet到路由器R2上再查看:
C:>telnet 202.101.2.1
Trying 202.101.2.1 ... Open
R2>sh users
* 1 vty 1 idle 202.101.54.1
上一篇:扩展ACL控制列表的配置
下一篇:动态NAT的配置
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
mstp+vrrp+ospf+nat
mstp+vrrp+ospf+nat
优先级 ci Standard -
静态NAT配置
CCNA实验-静态NAT配置
CISCO 静态NAT -
NAT简单配置
NAT简单配置
NAT 端口映射 华为 数通 -
静态NAT+动态NAT+PAT配置
静态NAT+动态NAT+PAT配置拓扑图 总体配置:配置路由器ip地址及实现外网互通Router0Router&g
静态NAT 动态NAT cisco NAT cisco PAT配置