ccna培训课实验总结笔记

上传人:xzh****18 文档编号:34169484 上传时间:2018-02-21 格式:DOC 页数:86 大小:696KB
返回 下载 相关 举报
ccna培训课实验总结笔记_第1页
第1页 / 共86页
ccna培训课实验总结笔记_第2页
第2页 / 共86页
ccna培训课实验总结笔记_第3页
第3页 / 共86页
ccna培训课实验总结笔记_第4页
第4页 / 共86页
ccna培训课实验总结笔记_第5页
第5页 / 共86页
点击查看更多>>
资源描述

《ccna培训课实验总结笔记》由会员分享,可在线阅读,更多相关《ccna培训课实验总结笔记(86页珍藏版)》请在金锄头文库上搜索。

1、CCNA 培训课总结笔记-NAT 转换实验(十二) 2008-09-28 09:36:18标签:笔记 培训 NAT CCNA 转换 推送到技术圈 版 权 声 明 : 原 创 作 品 , 允 许 转 载 , 转 载 时 请 务 必 以 超 链 接 形 式 标 明 文 章 原 始 出 处 、作 者 信 息 和 本 声 明 。 否 则 将 追 究 法 律 责 任 。http:/ NAT 地址转换的原理, 熟悉 NAT 地址转换的配置命令及过程.理解 NAT 转换在节省 IP 地址资源方面的强大作用,理解 NAT 地址转换过程中是如何将内部地址转换为外部地址的.实验拓扑图一、静态 NAT实验内容:原理

2、是先在 R1 上建立两个环回接口 loopback0、loopback1,为每一个 loopback 口分配一个 IP 地址,用来模拟 2 台内部的 PC 机.R1 的 S1/0 看成外网的接口,而 R2 即当作是外部的某台服务器.若 PC 要想与R2 通信的话,只能利用 NAT 来将内部的 IP 地址转换成 R1 上的 S1/0口的地址来实现.路由器上的配置R1 上的配置RouterenRouter#conf t粘贴上基本的路由配置命令Router(config)#enable password ciscoRouter(config)#no ip domain-lookupRouter(co

3、nfig)#line con 0Router(config-line)# exec-timeout 0 0Router(config-line)# logging synchronousRouter(config-line)#Router(config-line)#line aux 0Router(config-line)# exec-timeout 0 0Router(config-line)# logging synchronousRouter(config-line)#line vty 0 4Router(config-line)#Router(config-line)# Router(

4、config-line)# exec-timeout 0 0Router(config-line)# password ciscoRouter(config-line)#Router(config-line)# loginRouter(config-line)#Router(config-line)#Router(config-line)#alias exec a sh ip int briRouter(config)#alias exec b sh ip routeRouter(config)#alias exec c sh ip route ripRouter(config)#alias

5、exec d sh run配置好名称,接口和逻辑接口的 IP 地址Router(config)#host R1R1(config)#int loopback0R1(config-if)#ip add 10.1.1.1 255.255.255.0R1(config-if)#int loopback1R1(config-if)#ip add 10.1.2.1 255.255.255.0R1(config-if)#int s1/0R1(config-if)#ip add 202.192.4.6 255.255.255.0 R1(config-if)#clock rate 64000R1(config

6、-if)#no shutR2 上的配置粘贴命令省略掉Router(config)#host R2R2(config)#int s1/1R2(config-if)#ip add 202.192.4.5 255.255.255.0R2(config-if)#no shut好了,现在从 R1 用扩展的 ping 以 10.1.1.1、10.1.2.1 为源地址以 202.192.4.5 为目的地址验证一下R1#ping Protocol ip: Target IP address: 202.192.4.5Repeat count 5: Datagram size 100: Timeout in se

7、conds 2: Extended commands n: ySource address or interface: 10.1.1.1Type of service 0: Set DF bit in IP header? no: Validate reply data? no: Data pattern 0xABCD: Loose, Strict, Record, Timestamp, Verbosenone: Sweep range of sizes n: Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 202

8、.192.4.5, timeout is 2 seconds:Packet sent with a source address of 10.1.1.1 .Success rate is 0 percent (0/5)R1#ping Protocol ip: Target IP address: 202.192.4.5Repeat count 5: Datagram size 100: Timeout in seconds 2: Extended commands n: ySource address or interface: 10.1.2.1Type of service 0: Set D

9、F bit in IP header? no: Validate reply data? no: Data pattern 0xABCD: Loose, Strict, Record, Timestamp, Verbosenone: Sweep range of sizes n: Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 202.192.4.5, timeout is 2 seconds:Packet sent with a source address of 10.1.2.1 .Success rate i

10、s 0 percent (0/5)明显是不能通的,因为内部地址无法直接与外部地址通信.那就让我们用下 NAT 来进行转换看下.在 R1 的 S1/0 上启用 NAT 静态转换R1(config)#int s1/0R1(config-if)#int loopback0R1(config-if)#ip nat insideR1(config-if)#exitR1(config)#int loop1R1(config-if)#ip nat insideR1(config-if)#exitR1(config)#int s1/0R1(config-if)#ip nat outsideR1(config-

11、if)#exitR1(config)#ip nat inside source static 10.1.1.1 202.192.4.6 (将内部的 loop0 地址静态的一对一转换为 202.192.4.6)R1(config)#ip nat inside source static 10.1.2.1 202.192.4.7 (将内部的 loop1 地址静态的一对一转换为 202.192.4.7)好了,现在用内部的逻辑地址扩展 pingR2 的目的为 202.192.4.5 地址R1#debug ip nat (开放 debug 进行发送 ping)包时抓包转换测试)IP NAT debugg

12、ing is onR1#ping Protocol ip: Target IP address: 202.192.4.5Repeat count 5: Datagram size 100: Timeout in seconds 2: Extended commands n: ySource address or interface: 10.1.1.1Type of service 0: Set DF bit in IP header? no: Validate reply data? no: Data pattern 0xABCD: Loose, Strict, Record, Timesta

13、mp, Verbosenone: Sweep range of sizes n: Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 202.192.4.5, timeout is 2 seconds:Packet sent with a source address of 10.1.1.1 !Success rate is 100 percent (5/5), round-trip min/avg/max = 48/76/96 msR1#*Mar 1 00:11:13.227: NAT: s=10.1.1.1-202

14、.192.4.6, d=202.192.4.5 10(这里很清楚地看到逻辑的源地址已经进行了转换,将转换后的地址与目的地址通信)*Mar 1 00:11:13.319: NAT*: s=202.192.4.5, d=202.192.4.6-10.1.1.1 10*Mar 1 00:11:13.319: NAT: s=10.1.1.1-202.192.4.6, d=202.192.4.5 11*Mar 1 00:11:13.415: NAT*: s=202.192.4.5, d=202.192.4.6-10.1.1.1 11*Mar 1 00:11:13.415: NAT: s=10.1.1.1

15、-202.192.4.6, d=202.192.4.5 12*Mar 1 00:11:13.463: NAT*: s=202.192.4.5, d=202.192.4.6-10.1.1.1 12*Mar 1 00:11:13.463: NAT: s=10.1.1.1-202.192.4.6, d=202.192.4.5 13*Mar 1 00:11:13.535: NAT*: s=202.192.4.5, d=202.192.4.6-10.1.1.1 13*Mar 1 00:11:13.535: NAT: s=10.1.1.1-202.192.4.6, d=202.192.4.5 14R1#*Mar 1 00:11:13.607: NAT*: s=202.192.4.5, d=202.192.4.6-10.1.1.1 14R1#pingProtocol ip: Target IP address: 202.192.4.5Repeat count 5: Datagram size 100: Timeout in seconds 2: Extended commands n: ySource address or interface: 10.1.2.1Type of service 0: Set DF bit in IP header? no: Validate re

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 总结/报告

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号