欢迎来到天天文库
浏览记录
ID:39466486
大小:420.50 KB
页数:8页
时间:2019-07-04
《NAT加Overload和不加的区别》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、按图配置好各个路由交换和PC的IP地址。R1interfaceFastEthernet0/0ipaddress12.1.1.1255.255.255.0duplexautospeedauto!interfaceFastEthernet0/1ipaddress172.16.16.254255.255.255.0duplexautospeedautoR2interfaceFastEthernet0/0ipaddress12.1.1.2255.255.255.0duplexautospeedauto!int
2、erfaceFastEthernet0/1ipaddress192.168.1.254255.255.255.0duplexautospeedauto交换机什么都不用配置,当傻瓜交换机用!服务器PC1PC2PC3下面开始做NAT配置1、在R2上配置静态默认路由R2(config)#iproute0.0.0.00.0.0.012.1.1.12、配置NAT的ACLR2(config)#ipaccess-liststandardacl_natR2(config-std-nacl)#permit192.168
3、.1.00.0.0.2553、配置NAT池(为了实现效果,这里只给其中两台PC做NAT,方便等下测试!)R2(config)#ipnatpoolnat_pool12.1.1.312.1.1.4netmask255.255.255.04、配置NAT(不加Overload的)R2(config)#ipnatinsidesourcelistacl_natpoolnat_pool5、应用到接口R2(config)#interfacefastEthernet0/1R2(config-if)#ipnatinsid
4、eR2(config)#interfacefastEthernet0/1R2(config-if)#ipnatoutside完成,接下来测试!按原理说的话只其中两台PC能PING通服务器172.16.16.1再看一下R2上的NAT转换表R2#showipnattranslationsProInsideglobalInsidelocalOutsidelocalOutsideglobalicmp12.1.1.4:17192.168.1.1:17172.16.16.1:17172.16.16.1:17icm
5、p12.1.1.4:18192.168.1.1:18172.16.16.1:18172.16.16.1:18icmp12.1.1.4:19192.168.1.1:19172.16.16.1:19172.16.16.1:19icmp12.1.1.4:20192.168.1.1:20172.16.16.1:20172.16.16.1:20icmp12.1.1.3:10192.168.1.2:10172.16.16.1:10172.16.16.1:10icmp12.1.1.3:11192.168.1.2:1
6、1172.16.16.1:11172.16.16.1:11icmp12.1.1.3:12192.168.1.2:12172.16.16.1:12172.16.16.1:12icmp12.1.1.3:9192.168.1.2:9172.16.16.1:9172.16.16.1:9只能看到PC1和PC2的NAT转换,PC3不行!跟之前说的一样,因为没有加Overload。下面我们加Overload只要在刚才第四步后面加Overload就行了,加完再测试R2(config)#ipnatinsourcelis
7、acl_natpoolnat_pooloverload加完了,再测试。测试前先在R2上清一下NAT转换表R2#clearipnattranslation*测试结果,按原理应该三台PC都可以PING通服务器172.16.16.1。成功了!下面是R1和R2的配置R1#showrunning-configBuildingconfiguration...Currentconfiguration:471bytes!version12.4noservicetimestampslogdatetimemsecnose
8、rvicetimestampsdebugdatetimemsecnoservicepassword-encryption!hostnameR1!!!!!!!!!!!!!!!!!!interfaceFastEthernet0/0ipaddress12.1.1.1255.255.255.0duplexautospeedauto!interfaceFastEthernet0/1ipaddress172.16.16.254255.255.255.0duplexa
此文档下载收益归作者所有