雏鹰部落

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 6088|回复: 11

[讨论/求助] 【ShangHai CCNA01 实验】NAT基本应用

[复制链接]
发表于 2007-8-6 17:22:59 | 显示全部楼层 |阅读模式
实验名称:【ShangHai NA实验】NAT基本应用

实验目的:利用NAT技术实现LAN访问令一LAN的HTTP服务器

实验拓扑:
见附件

实验过程:
以左端终端为HTTP80服务器,右端终端为客户端模拟局域网
服务器IP:172.16.1.1
客户端IP:172.16.10.1
左中右路由分别为HTTP-G ISP LAN-G
每台路由上均已键入:
Router>en
Router#conf t
Router(config)#no ip domain lookup
Router(config)#line con 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#logg sync
Router(config-line)#exit
Router(config)#host [name]

在HTTP-G端如下配置
HTTP-G(config)#ip nat inside source list 1 interface Serial1 overload
HTTP-G(config)#ip nat inside source static tcp 172.16.1.2 80 1.1.1.2 80 extendable
HTTP-G(config)#ip route 0.0.0.0 0.0.0.0 s1
HTTP-G(config)#int e0
HTTP-G(config-if)#ip address 172.16.1.2 255.255.255.0
HTTP-G(config-if)#no shutdown
HTTP-G(config-if)#ip nat inside
HTTP-G(config-if)#int s1
HTTP-G(config-if)#ip address 1.1.1.2 255.255.255.0
HTTP-G(config-if)#no shutdown
HTTP-G(config-if)#ip nat outside
HTTP-G(config-if)#exit
HTTP-G(config)#exit
HTTP-G#

三机都配置完毕后可查看到配置如下:
HTTP-G#show ip int br
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0                  172.16.1.1      YES manual up                    up      
Ethernet1                  unassigned      YES unset  administratively down down   
Serial0                    unassigned      YES unset  administratively down down   
Serial1                    1.1.1.2         YES manual up                    up      

在ISP端如下配置:
ISP(config)#int s0
ISP(config-if)#ip address 1.1.2.1 255.255.255.0
ISP(config-if)#clock rate 64000
ISP(config-if)#no shutdown
ISP(config-if)#int s1
ISP(config-if)#ip address 1.1.1.1 255.255.255.0
ISP(config-if)#clock rate 64000
ISP(config-if)#no shutdown
ISP(config-if)#exit
ISP(config)#exit
ISP#

三机都配置完毕后可查看到如下配置:
ISP#show ip int br
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0                  unassigned      YES unset  administratively down down   
Ethernet1                  unassigned      YES unset  administratively down down   
Serial0                    1.1.2.1         YES manual up                    up      
Serial1                    1.1.1.1         YES manual up                    up      

在LAN-G端做如下配置:
LAN-G(config)#access-list 1 permit 172.16.10.2
LAN-G(config)#ip nat inside source list 1 interface Serial0 overload
LAN-G(config)#ip route 0.0.0.0 0.0.0.0 Serial0
LAN-G(config)#int e0
LAN-G(config-if)#ip address 172.16.10.2 255.255.255.0
LAN-G(config-if)#no shut
LAN-G(config-if)#ip nat inside
LAN-G(config-if)#int s0
LAN-G(config-if)#ip address 1.1.2.2 255.255.255.0
LAN-G(config-if)#no shut
LAN-G(config-if)#ip nat outside
LAN-G(config-if)#exit
LAN-G(config)#exit
LAN-G#


三机都配置完毕后可查看到如下配置:
LAN-G#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0                  172.16.10.2     YES manual up                    up      
Ethernet1                  unassigned      YES unset  administratively down         down   
Serial0                    1.1.2.2         YES manual up                    up      
Serial1                    unassigned      YES manual administratively down         down   

注意事项:
1、        在HTTP-G端上,配置完端口映射后,不能忘记配置NAT
2、        各个NAT router的端口上不能忘记设置出入口(ip nat inside, ip nat outside)
3、        若之前做过其它实验,尽量将多余配置清空,或者在register 0x2142模式下重启

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
发表于 2008-9-10 20:13:25 | 显示全部楼层
x谢谢

谢谢啊
发表于 2008-12-16 09:54:34 | 显示全部楼层
好件不断
精彩无限


赞美楼竹

收签了
发表于 2009-5-2 14:58:41 | 显示全部楼层
cccccccccccccccccccc
发表于 2009-5-6 10:58:04 | 显示全部楼层
谢谢分享~~~~
发表于 2009-5-26 16:58:48 | 显示全部楼层
居然没回复可见      无限景仰LZ中
发表于 2009-6-14 00:21:04 | 显示全部楼层
kan l 半懂!
发表于 2009-6-15 11:47:28 | 显示全部楼层
好件不断
精彩无限
发表于 2009-8-8 13:56:17 | 显示全部楼层
非常感谢,谢谢发布
发表于 2009-8-31 21:37:49 | 显示全部楼层
thank you !!!!!!!!!!!!!!!!!!!!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )

GMT+8, 2024-6-22 04:15 , Processed in 0.097087 second(s), 19 queries , Gzip On.

快速回复 返回顶部 返回列表