任务4.2-静态NAT的应用.ppt_第1页
任务4.2-静态NAT的应用.ppt_第2页
任务4.2-静态NAT的应用.ppt_第3页
任务4.2-静态NAT的应用.ppt_第4页
任务4.2-静态NAT的应用.ppt_第5页
已阅读5页,还剩14页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、任务4.2-静态NAT的应用,任务目标:,掌握如何配置静态NAT。,实训内容:,将Server1与Server2划分到相应的VLAN中。 在2811-1上进行静态NAT配置。 在2811-2上进行配置,使得整个链路贯通。 测试静态NAT效果。,实训网络拓扑:,图4-2-1 实训网络拓扑示意图,实训指导:,将Server1与Server2划分到相应的VLAN中。 配置S2960: S2960(config)#vlan 10 /创建VLAN10 S2960(config-vlan)#vlan 20 /创建VLAN20 S2960(config-vlan)#interface fastetherne

2、t 0/2 /进入到端口fa 0/2 S2960(config-if)#switchport access vlan 10 /将端口fa 0/2加入到VLAN10中,S2960(config-if)#interface fastethernet 0/3 /进入到端口fa 0/3 S2960(config-if)#switchport access vlan 20 /将端口fa 0/3加入到VLAN20中 S2960(config-if)#interface fastethernet 0/1 /进入到端口fa 0/1 S2960(config-if)#switchport mode trunk

3、/将端口fa 0/1设为中继端口,使其传输来自VLAN10和VLAN20的流量,在2811-1上进行静态NAT配置: 2811-1(config)#interface fastethernet 0/1 2811-1(config-if)#no shutdown 2811-1(config-if)#interface fastethernet 0/1.10 /接入子接口fa 0/1.10 2811-1(config-subif)#encapsulation dot1Q 10 /封装802.1Q协议,并将子接口fa 0/1.10划分到 VLAN10 2811-1(config-subif)#ip

4、address 192.168.0.1 255.255.255.0 /为子接口分配IP地址,2811-1(config-subif)#no shutdown /开启子接口 2811-1(config-subif)#interface fastethernet 0/1.20 /接入子接口fa 0/1.20 2811-1(config-subif)#encapsulation dot1Q 20 /封装802.1Q协议,并将子接口fa 0/1.20划分到VLAN20 2811-1(config-subif)#ip address 193.168.0.1 255.255.255.0 /为子接口分配IP

5、地址 2811-1(config-subif)#no shutdown /开启子接口,2811-1(config-subif)#interface fastethernet 0/1.10 2811-1(config-subif)#ip nat inside /定义为路由器地址转换的内部接口 2811-1(config-subif)#interface fastethernet 0/1.20 2811-1(config-subif)#ip nat inside /定义为路由器地址转换的内部接口 2811-1(config-subif)#interface fastethernet 0/0 281

6、1-1(config-if)#ip address 200.0.0.1 255.255.255.0,2811-1(config-if)#no shutdown 2811-1(config-if)#ip nat outside /定义为路由器 地址转换的外部接口 2811-1(config-if)#exit /退到全局模式 2811-1(config)#ip nat inside source static 192.168.0.2 200.0.0.3 /定义一对一内部地址静态转换映射关系 2811-1(config)#ip nat inside source static 193.168.0.2

7、 200.0.0.4 /定义一对一内部地址静态转换映射关系,2811-1(config)#ip route 0.0.0.0 0.0.0.0 200.0.0.2 /添加默认路由指向下一跳地址,在2811-2上进行配置,使得整个链路贯通。 2811-2(config)#interface fastethernet 0/0 2811-2(config-if)#ip address 200.0.0.2 255.255.255.0 2811-2(config-if)#no shutdown 2811-2(config-if)#interface fastethernet 0/1 2811-2(config-if)#ip address 201.0.0.1 255.255.255.0 2811-2(config-if)#no shutdown,测试静态NAT效果:PCa能够通过200.0.0.3浏览Server1,PCa能够通过200.0.0.4浏览Server2。,图4-2-2 PCa可通过200.0.0.3访问Server1,图4-2-3 PCa可通过200.0.0.4访问Server2,同时,发现PCa无法ping通Server1、Server2的内部本地IP,对Server1、Server2起到了保护作用。,图4-2-4

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论