




已阅读5页,还剩6页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
实验二十:静态地址转换一、实验目的通过实验掌握静态NAT的配置方法及实际应用。二、实验描述根据需要将内部主机PC1:192.168.1.1和PC2:192.168.1.2私有地址转为能上外网的公有地址。三、实验拓扑四、实验设备1.R2801 1台2.S2960 1台3.PC 2台4.网线 3根5.串口线 1根五、实验步骤第1步:基本配置。PC1:192.198.1.1 网关:192.168.1.254PC2:192.168.1.2 网关:192.168.1.254R1(config)#int f0/0R1(config-if)#ip add 192.168.1.254 255.255.255.0R1(config-if)#no shutR1(config-if)#int s1/0R1(config-if)#ip add 200.20.20.1 255.255.255.0R1(config-if)#clock rate 64000配置接口的时钟速率为64000R1(config-if)#no shutR2(config)#int s1/0R2(config-if)#ip add 200.20.20.2 255.255.255.0R2(config-if)#no shutR2(config)#int loop 0配置回环接口的IP地址,这里用作模拟外网R2(config-if)#ip add 2.2.2.2 255.255.255.0第2步:配置路由协议R1(config)#route rip R1(config-router)#version 2R1(config-router)#no auto-summary R1(config-router)#network 200.20.20.0R1(config-router)#exitR2(config)#router rip R2(config-router)#version 2R2(config-router)#no auto-summaryR2(config-router)#network 200.20.20.0R2(config-router)#network 2.0.0.0R2(config-router)#exit第3步:在R1上配置静态内部地址转换R1(config)#ip nat inside source static 192.168.1.1 200.20.20.1 将内部地址192.168.1.1转为外网地址200.20.20.1R1(config)#ip nat inside source static 192.168.1.2 200.20.20.2将内部地址192.168.1.2转为外网地址200.20.20.2R1(config)#int f0/0R1(config-if)#ip nat inside定义内部接口R1(config-if)#int s1/0R1(config-if)#ip nat outside 定义外部接口R1(config-if)#exit验证测试:R1#sh ip nat translations查看当内网上外网时对应的地址转换情况Pro Inside global Inside local Outside local Outside global- 200.20.20.1 192.168.1.1 - - 200.20.20.2 192.168.1.2 - -第4步:PING 2.2.2.2 (虚拟外网地址)六、注意事项1.在配置的时候不要把inside和outside应用接口弄错2.要加上能能使数据包外发的路由协议。七、参考配置R1#sh runBuilding configuration.!hostname R1!interface FastEthernet0/0 ip address 192.168.1.254 255.255.255.0 ip nat inside!interface Serial1/0 ip address 200.20.20.1 255.255.255.0 ip nat outside clock rate 64000!router rip version 2 network 200.20.20.0 no auto-summary!ip nat inside source static 192.168.1.1 200.20.20.1ip nat inside source static 192.168.1.2 200.20.20.2!R2#sh runBuilding configuration.!hostname R2!interface Loopback0 ip address 2.2.2.2 255.255.255.0!interface Serial1/0 ip address 200.20.20.2 255.255.255.0!router rip version 2 network 2.0.0.0 network 200.20.20.0 no auto-summary!实验二十一:动态地址转换一、实验目的通过实验掌握动态NAT的配置方法及实际应用。二、实验描述你是公司的高级网络管理员,公司申请了100个公网IP地址为整个销售部门提供上网服务,销售部门的网段为192.168.1.0/24.合法地址不够每人分配一个,但是销售部门平均有三分之一的人在外跑业务,在公司内部的也不会一直需要网络服务,根据此情况解决公司全局地址不够一一映射的情况。三、实验拓扑四、实验设备1.R2801 2台2.S2960 1台3.PC 2台4.网线 3根5.串口线 1根五、实验步骤第1步:基本配置R1(config)#int f0/0R1(config-if)#ip add 192.168.1.254 255.255.255.0R1(config-if)#no shutR1(config-if)#int s1/0R1(config-if)#ip add 200.20.20.1 255.255.255.0R1(config-if)#clock rate 64000R1(config-if)#no shutR2(config)#int s1/0R2(config-if)#ip add 200.20.20.2 255.255.255.0R2(config-if)#no shutR2(config)#int loop 0R2(config-if)#ip add 2.2.2.2 255.255.255.0第2步:配置路由协议R1(config)#route rip R1(config-router)#version 2R1(config-router)#no auto-summary R1(config-router)#net 200.20.20.0R1(config-router)#exitR2(config)#router rip R2(config-router)#ver 2R2(config-router)#no auR2(config-router)#net 200.20.20.0R2(config-router)#net 2.0.0.0R2(config-router)#exit第3步:配置动态内部源地址转换R1(config)#ip nat pool jinghua 200.20.20.100 200.20.20.200 netmask 255.255.255.0定义转换地址池R1(config)#ip nat inside source list 1 pool jinghua定义内部本地地址池调用转换地址池地址R1(config)#access-list 1 permit 192.168.1.0 0.0.0.255定义可以转换的地址网段R1(config)#int f0/0R1(config-if)#ip nat inside定义内部接口R1(config-if)#int s1/0R1(config-if)#ip nat outside 定义外部接口R1(config-if)#exit验证测试:在PC1、PC2上分别PING 2.2.2.2在R1上显示转换表:R1#sh ip nat translations Pro Inside global Inside local Outside local Outside global- 200.20.20.100 192.168.1.1 - - 200.20.20.101 192.168.1.2 - -六、注意事项1. 在配置的时候不要把inside和outside应用接口弄错2. 要加上能能使数据包外发的路由协议。七、参考配置R1#sh runBuilding configuration.Current configuration : 834 bytes!version 12.4no service password-encryption!hostname R1!ip ssh version 1!interface FastEthernet0/0 ip address 192.168.1.254 255.255.255.0 ip nat inside duplex auto speed auto!interface FastEthernet0/1 no ip address duplex auto speed auto shutdown!interface Serial1/0 ip address 200.20.20.1 255.255.255.0 ip nat outside clock rate 64000!interface Serial1/1 no ip address shutdown!interface Serial1/2 no ip address shutdown!interface Serial1/3 no ip address shutdown!interface Vlan1 no ip address shutdown!router rip version 2 network 200.20.20.0 no auto-summary!ip nat pool jinghua 200.20.20.100 200.20.20.200 netmask 255.255.255.0ip nat inside source list 1 pool jinghuaip classless!access-list 1 permit 192.168.1.0 0.0.0.255!line con 0line vty 0 4 login!EndR2#sh runBuilding configuration.Current configuration : 689 bytes!version 12.4no service password-encryption!hostname R2!ip ssh version 1!interface Loopback0 ip address 2.2.2.2 255.255.255.0!interface FastEthernet0/0 no ip address duplex auto speed auto shutdown!interface FastEthernet0/1 no ip address duplex auto speed auto shutdown!interface Serial1/0 ip address 200.20.20.2 255.255.255.0!interface Serial1/1 no ip address shutdown!interface Serial1/2 no ip address shutdown!interface Serial1/3 no ip address shutdown!interface Vlan1 no ip address shutdown!router rip version 2 network 2.0.0.0 network 200.20.20.0 no auto-summary!ip classless!line con 0line vty 0 4 login!end实验二十二: PAT一、实验目的通过实验掌握PAT的配置方法及实际应用。二、实验描述为解决内网上外网时地址不足问题可使用PAT实现多个私有地址对应一个公有地址上网。三、实验拓扑四、实验设备1.R2801 2台2.S2960 1台3.PC 2台4.网线 3根5.串口线 1根五、实验步骤第1步:基本配置R1(config)#int f0/0R1(config-if)#ip add 192.168.1.254 255.255.255.0R1(config-if)#no shutR1(config-if)#int s1/0R1(config-if)#ip add 200.20.20.1 255.255.255.0R1(config-if)#clock rate 64000R1(config-if)#no shutR2(config)#int s1/0R2(config-if)#ip add 200.20.20.2 255.255.255.0R2(config-if)#no shutR2(config)#int loop 0R2(config-if)#ip add 2.2.2.2 255.255.255.0第2步:配置路由协议R1(config)#route rip R1(config-router)#version 2R1(config-router)#no auto-summary R1(config-router)#net 200.20.20.0R1(config-router)#exitR2(config)#router rip R2(config-router)#ver 2R2(config-router)#no auR2(config-router)#net 200.20.20.0R2(config-router)#net 2.0.0.0R2(config-router)#exit第3步:配置PAT地址转换R1(config)#ip nat pool jinghua 200.20.20.20 200.20.20.20 netmask 255.255.255.255告诉路由器外网地址范围R1(config)#ip nat inside source list 1 pool jinghua overload将内网地址和外网地址做转。overload,其转换方式是复用动态地址转换R
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 【正版授权】 ISO 3451-5:2025 EN Plastics - Determination of ash - Part 5: Poly(vinyl chloride)
- 【正版授权】 IEC 60950-21:2002 EN-D Information technology equipment - Safety - Part 21: Remote power feeding
- 【正版授权】 IEC 60364-7-712:2002 FR-D Electrical installations of buildings - Part 7-712: Requirements for special installations or locations - Solar photovoltaic (PV) power supply syst
- 【正版授权】 IEC 60228:2004 FR-D Conductors of insulated cables
- GB/T 21309-2025粮油检验涂渍油脂或石蜡大米检验
- 骨伤科考试试题及答案
- 校园安全知识培训课件通讯稿
- 森林采伐考试题及答案
- 透析器反应试题及答案
- 就业帮扶面试题及答案
- 2024年重庆永川区招聘社区工作者后备人选笔试真题
- 医学技术专业讲解
- 唯奋斗最青春+课件-2026届跨入高三第一课主题班会
- 留疆战士考试试题及答案
- 部编小学语文四年级上册第8单元省级获奖大单元作业设计
- SMT-快速换线推进报告-.课件11
- 楼板下加钢梁加固施工方案
- 斜坡脚手架搭设施工方案
- 建筑行业人才培养与发展战略研讨会
- 成人高等教育学士学位英语核心单词+短语
- 费森CRRT设备操作流程-CVVH
评论
0/150
提交评论