dfdr 发表于 2013-8-14 08:44:35

端口NAT小案例及延伸



R1:conf terint f1/0ip add 192.168.1.1255.255.255.0no shuno ip routingIpdefault-ga 192.168.1.2exitR2:conf terint f1/0ip add 192.168.1.2 255.255.255.0no shuint f1/1ip add 23.1.1.1255.255.255.0no shuip route 0.0.0.0 0.0.0.0 f1/1 //边界设置默认路由int f1/0ip nat inside //指定内接口exitint f1/1ipnat outside //exitaccess-list 1 permit 192.168.1.0   0.0.0.255//摘出内网地址段ip nat inside source list 1 int f1/1 overload    //指定端口,实现依赖端口转发数据R3:conf terint f1/0ip add 23.1.1.2255.255.255.0no shuint loo 0ip add 3.3.3.3   255.255.255.0no shuexit测试:R1#ping 3.3.3.3Type escape sequenceto abort.Sending 5, 100-byteICMP Echos to 3.3.3.3, timeout is 2 seconds:!!!!!Success rate is 100percent (5/5), round-trip min/avg/max = 264/328/380 ms拓展: 在案例基础上,实现外网也可以访问内网(用telnet来模拟即可)R2(config):ip nat inside source static tcp 192.168.1.1 23 3.3.3.3 23R3(config): line vtp 0 4 //password cisco //login//配置telnet的命令R3:telnet 23.1.1.1   可发现直接登录到R1上。

hx0011yy 发表于 2013-8-14 12:27:16

花前月下,不如花钱“日”下!*^_^*

xy123321 发表于 2013-8-15 08:18:44

路过,学习下

760176104 发表于 2013-8-15 18:36:03

路过,支持一下啦

qq591577286 发表于 2013-8-17 02:29:18

好好 学习了 确实不错

Q132284591 发表于 2013-8-18 22:43:02

学习了,不错,讲的太有道理了

tangbinde 发表于 2013-8-21 06:37:53

修养的艺术,其实就是说谎的艺术。
页: [1]
查看完整版本: 端口NAT小案例及延伸