当前位置:范文大全 > 调查报告 > 2020年IP通信实验报告——NAT实验2(4页)

2020年IP通信实验报告——NAT实验2(4页)

发布时间: 2021-11-04 14:38:41

  IP 通信基础实验报告 e NAT outside to inside 实验

  一、

  实验目的

  1、 掌握 NAT 的数据配置方法; 2、 理解和巩固 NAT 的基本原理; 二、

  实验内容(仿真程序‘ NAT_ out side to in side.pkt ’)

  一台 路由器和通过二层交换机与服务器相连,作为内网,通过配置,映射成外网地址,达到互连的目的。

  三、

  实验设备

  路由器

  2 台 PC 机

  1 台 交叉网线

  2 条 直通网线

  2 条 二层交换机

  1 台 服务器

  1 台 四、

  实验拓扑图

  五、

  配置步骤

  先必须配置主机 B A, B 的 的 P IP 地址;

  ====底层配置

  RT1

  Continue with configuration dialog [yes/no]: no

  Press RETURN to get started!

  Router>enable

  Router#conf t

  Router(config)#hostname RT1

  Enter configuration commands, one per line.

  End with CNTL/Z.

  RT1(config)#interface fastEthernet /

  RT1(config- - if)#no shutdown

  %LINK- -5 5- - CHANGED: Interface FastEthernet/, changed state to up

  %LINEPROTO- -5 5- - UPDOWN: Line protocol on Interface FastEthernet/, changed state to up

  RT1(config- - if)#ip address 11 1254 252525

  RT1(config- - if)#exit

  RT1(config)#interface fastEthernet 1/

  RT1(config- - if)#no shutdown

  RT1(config- - if)#ip address 2221 252525

  RT1(config- - if)#exit

  RT1(config)#

  RT2===================================================

  =========

  Continue with configuration dialog [yes/no]: no

  Press RETURN to get started!

  Router>enable

  Router#conf t

  Enter configuration commands, one per line.

  End with CNTL/Z.

  Router(config)#hostname RT2

  RT2(config)#interface fastEthernet 1/

  RT2(config- -i i f)#no shutdown

  %LINK- -5 5- - CHANGED: Interface FastEthernet1/, changed state to up

  %LINEPROTO- -5 5- - UPDOWN: Line protocol on Interface FastEthernet1/, changed state to up

  RT2(config- - if)#ip address 2222 252525

  RT2(config- - if)#exit

  RT2(config)#interf ace fastEthernet /

  RT2(config- - if)#no shutdown

  %LINK- -5 5- - CHANGED: Interface FastEthernet/, changed state to up

  %LINEPROTO- -5 5- - UPDOWN: Line protocol on Interface FastEthernet/, changed state to up

  RT2(config- - if)#ip address 19161.254 252525

  R R T2(config- - if)#exit

  RT2(config)#

  ====配置静态路由

  RT1

  RT1(config)#ip route 19161. 252525 2222 // 注意,这一条指令不需要,因为外网看不到内网

  RT2

  RT2(config)#ip route 111 252525 2221

  ====配置 NAT

  RT2

  RT2(config)#interface fastEthernet /====指明该端口是对内的端口

  RT2(config- - if)#ip nat insi de

  RT2(config- - if)#exit

  RT2(config)#interface fastEthernet 1/====指明该端口是对外的端口

  RT2(config- - if)#ip nat outside

  RT2(config- - if)#exit

  RT2(config)#ip nat inside source static 19161.1 2223====配置端口映射,指明外界对 3 2223 的访问被静态的转换到内网 1 19161.1 上

  六、

  验证方法及验证结果

   此时 ,可在 2 RT2 全局模式下使用“ show ip nat translations” ”

  查看 T NAT 结果,如下 图上部分

   用主机 1 PC1 去 去 g ping 服务器 P IP 地址 2223 ,再使用“ do show ip nat translations ”查看 T NAT 结果,如下 图下部分

  所示

相关热词搜索: 实验报告 实验 通信 报告 2020年IP通信实验报告——NAT实验2(4页)

版权所有:杨帆范文网 2010-2024 未经授权禁止复制或建立镜像[杨帆范文网]所有资源完全免费共享

Powered by 杨帆范文网 © All Rights Reserved.。鲁ICP备16030136号