- 0
- 0
- 约6.55千字
- 约 5页
- 2017-08-19 发布于重庆
- 举报
网络工程师交换试验手册之十七nat转换实验
网络工程师交换试验手册之十七:NAT转换实验实验目的:理解NAT地址转换的原理,熟悉NAT转换的配置过程。进一步理解NAT在扩展IP地址方面的巨大功效。理解NAT如何将内部地址转换成外部地址的过程。实验拓扑:
17.JPG (10.03 KB)
2007-6-25 11:29
实验内容:1.静态NAT首先在R1上起2个环回接口loop0和loop1,为每一个loop口分配一个IP地址,模拟2台内部PC机,R1的S1看成到外网的接口。而R3这里看成外部一台服务器。PC机想要与R3通信,不许利用NAT来将内部PC地址转换成R1上S0的地址实现。路由器的基本配置? ?R1#show ip int bInterface? ?? ?? ?? ?? ?? ?IP-Address? ?? ?OK? Method Status? ?? ?? ?? ?? ? ProtocolEthernet0? ?? ?? ?? ?? ?? ?unassigned? ?? ?YES unset??administratively down downLoopback0? ?? ?? ?? ?? ?? ?? ???YES manual up? ?? ?? ?? ?? ?? ???upLoopback1? ?? ?? ?? ?? ?? ?? ???YES manual up? ?? ?? ?? ?? ?? ???upSerial0? ?? ?? ?? ?? ?? ???? ?? ?YES manual up? ?? ?? ?? ?? ?? ???upSerial1? ?? ?? ?? ?? ?? ???unassigned? ?? ?YES unset??administratively down dowR2#show ip int bSerial0? ?? ?? ?? ?? ?? ???unassigned? ?? ?YES TFTP? ?up? ?? ?? ?? ?? ?? ???upSerial1? ?? ?? ?? ?? ?? ???? ?? ?YES manual up? ?? ?? ?? ?? ?? ???up此时用扩展PING以 和为源以为目的PINGR1#pingProtocol [ip]:Target IP address:% Bad IP addressTarget IP address: Repeat count [5]:Datagram size [100]:Timeout in seconds [2]:Extended commands [n]: ySource address or interface: Type of service [0]:Set DF bit in IP header? [no]:Validate reply data? [no]:Data pattern [0xABCD]:Loose, Strict, Record, Timestamp, Verbose[none]:Sweep range of sizes [n]:Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:.....Success rate is 0 percent (0/5)Source address or interface: 显然无法ping通,即内部地址无法直接与外部地址通信,于是我们启用NAT转换。◎启动NAT静态转换。R1(config)#int loop0R1(config-if)#ip nat inside 定义内部接口R1(config-if)#int loop1R1(config-if)#ip nat inside定义内部接口R1(config-if)#int s0R1(config-if)#ip nat outside定义外部接口R1(config)#ip nat inside source static 定义将内部的接口地址静态的的一对一的转换为R1(config)#ip nat inside source static 定义将内部的接口地址静态的的一对一的转换为此时用扩展Ping以 和为源以为目的PINGR1#debug ip nat 开放debug进行ping包时候的抓包转换测试。!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 32/32/36 ms00:36:36: NAT: s=-, d= [20]看到我
原创力文档

文档评论(0)