配置NAT配置实验报告

nat  时间:2021-02-20  阅读:()

软件Z092苑红尚094372

实验二

一实验目的

1. 掌握静态NAT的特征、配置及调试方法。

2. 掌握动态NAT的特征、配置及调试方法。

3. 掌握NAPT的特征、配置及调试方法。

二实验设备

神州数码路由器主机

三实验拓扑

软件Z092苑红尚094372

四配置步骤

路由器A配置基本信息

Router#config

Router_config#int f0/3

Router_config_f0/3#ip add 192.168.1.1255.255.255.0

Router_config_f0/3#no shut

Router_config_f0/3#exit

Router_config#int f0/0

Router_config_f0/0#ip add 200.1.1.1255.255.255.0

Router_config_f0/0#no shut

Router_config_f0/0#exit

Router_config#router rip

Router_config_rip#network 200.1.1.0

Router_config_rip#^Z

Router#Jan 100:14:58 Configured from console 0 by

Router#show ip route

Codes:C-connected,S- static,R-RIP,B-BGP,BC-B GP connectedD-DEIGRP,DEX-external DEIGRP,O-OSPF,OIA-OSPF inter areaON 1 -OSPF NSSA external type 1,ON2-OSPF NSSA external type 2OE 1 -OSPF external type 1,OE2-OSPF external type 2

软件Z092苑红尚094372

DHCP-DHCP type,L1 - IS-IS level-1,L2- IS-IS level-2

VRF ID:0

C 192.168.1.0/24 is directly connected,FastEthernet0/3

C 200.1.1.0/24 is directly connected,FastEthernet0/0

R 202.1.1.0/24 [120,1]via 200.1.1.2(on FastEthernet0/0)路由器B

Router#config

Router_config#int f0/3

Router_config_f0/3#ip add 202.1.1.1255.255.255.0

Router_config_f0/3#no shut

Router_config#int f0/0

Router_config_f0/0#ip add 200.1.1.2255.255.255.0

Router_config_f0/0#no shut

Router_config_f0/0#exit

Router_config#router rip

Router_config_rip#network 202.1.1.0

Router_config_rip#network 200.1.1.0

Router_config_rip#^Z

Router#Jan 100:15:19 Configured from console 0 by

Router#show ip route

Codes:C-connected,S- static,R-RIP,B-BGP,BC-B GP connectedD-DEIGRP,DEX-external DEIGRP,O-OSPF,OIA-OSPF inter areaON 1 -OSPF NSSA external type 1,ON2-OSPF NSSA external type 2OE 1 -OSPF external type 1,OE2-OSPF external type 2

DHCP-DHCP type,L1 - IS-IS level-1,L2- IS-IS level-2

VRF ID:0

C 200.1.1.0/24 is directly connected,FastEthernet0/0

C 202.1.1.0/24 is directly connected,FastEthernet0/3

Router#

路由器A配置静态NAT

Router#config

Router_config#ip nat inside source static 192.168.1.10200.1.1.3

Router_config#ip nat inside source static 192.168.1.20200.1.1.4

Router_config#int f0/3

Router_config_f0/3#ip nat inside

Router_config_f0/3#int f0/0

Router_config_f0/0#ip nat outside

Router_config_f0/0#^Z

软件Z092苑红尚094372

Router#Jan 100:19:28 Configured from console 0 by

Router#show ip nat transtranslations --Translation entries

Router#show ip nat translations

Pro.Dir Inside local Inside global Outside local Outside global---- --- 192.168.1.10 200.1.1.3 --- ------- --- 192.168.1.20 200.1.1.4 --- ---Router#

配置动态NAT

Router#config

Router_config#no ip nat inside source static 192.168.1.10200.1.1.3

Router_config#no ip nat inside source static 192.168.1.20200.1.1.4

Router_config#ip nat pool aaa 200.1.1.100200.1.1.200255.255.255.0

Router_config#ip access-list standard 1

Router_config_std_nacl#deny 192.168.1.40

Router_config_std_nacl#permit 192.168.1.00.0.0.255

Router_config_std_nacl#exit

Router_config#ip nat inside source list 1 pool aaa

Router_config#^Z

Router#Jan 100:07:01 Configured from console 0 by

Router#show ip route

Codes:C-connected,S- static,R-RIP,B-BGP,BC-B GP connected

D-DEIGRP,DEX-external DEIGRP,O-OSPF,OIA-OSPF inter areaON 1 -OSPF NSSA external type 1,ON2-OSPF NSSA external type 2OE 1 -OSPF external type 1,OE2-OSPF external type 2

DHCP-DHCP type,L1 - IS-IS level-1,L2- IS-IS level-2

VRF ID:0

C 192.168.1.0/24 is directly connected,FastEthernet0/3

C 200.1.1.0/24 is directly connected,FastEthernet0/0

R 202.1.1.0/24 [120,1]via 200.1.1.2(on FastEthernet0/0)Router#show ip nat trantranslations --Translation entries

Router#show ip nat translations

软件Z092苑红尚094372

Router#

Router#c onf

Router_config#ip access-list standard 1

Router_config_std_nacl#permit 192.168.1.0255.255.255.0Router_config_std_nacl#^Z

Router#Jan 100:13:57 Configured from console 0 byRouter#show run

Building configuration. . .

Current configuration:

!

!version 1.3.3Hservice timestamps log dateservice timestamps debug dateno service password-encryption

!

!

!

!

!

!

!gbsc group default

!

!

!

!

!

!

!

!

!

!

!

!interface FastEthernet0/0ip address 200.1.1.1255.255.255.0no ip directed-broadcastip nat outside

!interface FastEthernet0/3ip address 192.168.1.1255.255.255.0no ip directed-broadcast

软件Z092苑红尚094372

ip nat inside

!interface Serial0/1no ip addressno ip directed-broadcast

!interface Serial0/2no ip addressno ip directed-broadcast

!interface Async0/0no ip addressno ip directed-broadcast

!

!

!

!router ripnetwork 200.1.1.0

!

!

!

!

!

!

!

!

!

!

!

!

!ip access-list standard 1deny 192.168.1.40255.255.255.255permit 192.168.1.0255.255.255.0

!

!

!

!

!

!ip nat pool aaa 200.1.1.100200.1.1.200255.255.255.0ip nat inside source list 1 pool aaa

软件Z092苑红尚094372

!

!

!

Router#

配置NAPT

Router#config

Router_config#no ip nat inside source list 1 pool aaa

Router_config#no ip nat pool aaa

Router_config#no ip access-list standard 1

Router_config#ip nat pool bbb 200.1.1.1200.1.1.1255.255.255.0

Router_config#ip access-list standard 10

Router_config_std_nacl#permit 192.168.1.0255.255.255.0

Router_config_std_nacl#exit

Router_config#ip nat inside source list 10 pool bbb overload

Router_config#^Z

Router#Jan 100:25:55 Configured from console 0 by

Router#show ip nat

Incomplete command

Router#show ip nat trantranslations --Translation entries

Router#show ip nat translations

Pro.Dir Inside local Inside global Outside local Outside global

ICMP OUT 192.168.1.20:512 200.1.1.1:33280 202.1.1.10:33280 202.1.1.10:332

80

ICMP OUT 192.168.1.40:512 200.1.1.1:25088 202.1.1.10:25088 202.1.1.10:250

88

ICMP OUT 192.168.1.30:512 200.1.1.1:16896 202.1.1.10:16896 202.1.1.10:168

96

ICMP OUT 192.168.1.10:512 200.1.1.1:8704 202.1.1.10:8704 202.1.1.10:870

4

Router#

五实验结果各种验证指令及结果

Ping 202.1.1.10

静态NAT

Pc0 

软件Z092苑红尚094372

Pc1

Pc2

软件Z092苑红尚094372

Pc3

动态NAT

Pc0:

LOCVPS(29.6元/月)KVM架构 香港/美国机房全场8折

LOCVPS商家我们还是比较熟悉的老牌的国内服务商,包括他们还有其他的产品品牌。这不看到商家的信息,有新增KVM架构轻量/迷你套餐,提供的机房包括香港云地和美国洛杉矶,适用全场8折优惠,月付29.6元起。LOCVPS是一家成立于2011年的稳定老牌国人商家,主要从事XEN、KVM架构的国外VPS销售,主推洛杉矶MC、洛杉矶C3、香港邦联、香港沙田电信、香港大埔、日本东京、日本大阪、新加坡等数据中心...

Virmach款低价VPS可选可以选择多个机房,新增多款低价便宜VPS主机7.2美元起

Virmach商家我们是不是比较熟悉?速度一般,但是人家价格低,而且机房是比较多的。早年的时候有帮助一个有做外贸也许需要多个机房且便宜服务商的时候接触到这个商家,有曾经帮助够买过上百台这样的低价机器。这里需要提醒的,便宜但是速度一般,尤其是中文业务速度确实不快,如果是外贸业务,那肯定是没有问题。这几天,我们有看到Virmach推出了夏季优惠促销,VPS首年8折,最低年付仅7.2美元,多机房可选,如...

Sharktech:美国/荷兰独立服务器,10Gbps端口/不限流量/免费DDoS防护60G,319美元/月起

sharktech怎么样?sharktech (鲨鱼机房)是一家成立于 2003 年的知名美国老牌主机商,又称鲨鱼机房或者SK 机房,一直主打高防系列产品,提供独立服务器租用业务和 VPS 主机,自营机房在美国洛杉矶、丹佛、芝加哥和荷兰阿姆斯特丹,所有产品均提供 DDoS 防护。此文只整理他们家10Gbps专用服务器,此外该系列所有服务器都受到高达 60Gbps(可升级到 100Gbps)的保护。...

nat为你推荐
淘宝收费淘宝要收费吗?如何免费开通黄钻怎样才能免费开通黄钻spgnux思普操作系统怎么样镜像文件是什么什么是文件镜像?什么是镜像文件?唱吧电脑版官方下载电脑怎么安装唱吧,要能用的,请教教程,谢谢直播加速怎么让已拍摄好的视频加速mate8价格华为mate8 128g售价多少钱gbk编码表GB GBK utf8码的区别freebsd安装FreeBSD下如何安装ports的方法购买流量现在中国移动怎么买流量
域名批量查询 美国主机排名 加勒比群岛 163网 xfce 美国php空间 搜狗12306抢票助手 申请空间 促正网秒杀 idc是什么 重庆电信服务器托管 ledlamp 如何登陆阿里云邮箱 阿里dns 阿里云邮箱个人版 网络速度 ubuntu安装教程 阿里云宕机故障 以下 回程 更多