网络工程师 NAT.ppt_第1页
网络工程师 NAT.ppt_第2页
网络工程师 NAT.ppt_第3页
网络工程师 NAT.ppt_第4页
网络工程师 NAT.ppt_第5页
已阅读5页,还剩20页未读 继续免费阅读

下载本文档

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

文档简介

网络地址转换 NAT 网络地址转换 NAT IP地址可以是本地 Local 地址或全局 Global 地址 本地IPv4地址在网络内部可见 全局IPv4地址在网络外部可见 端口地址转换 PAT 转换内部源地址 NAT术语 Insidelocaladdress 内部本地地址 一个Inside网络中的设备 在Inside的IP地址 即内部主机的实际地址Insideglobaladdress 内部全局地址 一个Inside网络中的设备 在Outside的IP地址 即内部主机经NAT转换后去往外部的地址Outsidelocaladdress 外部本地地址 一个Outside网络中的设备 在Inside的IP地址 即外部主机由NAT设备转换后的地址Outsideglobaladdress 外部全局地址 一个Outside网络中的设备 在Outside的IP地址 即外部主机的真实地址 建立内部本地地址与内部全局地址间的静态转换 RouterX config ipnatinsidesourcestaticlocal ipglobal ip 将该接口标记为连接内部网络的接口 RouterX config if ipnatinside 将该接口标记为连接外部网络的接口 RouterX config if ipnatoutside 显示活动的转换 RouterX showipnattranslations 配置和检验静态转换 启用静态NAT地址映射示例 RouterX showipnattranslationsProInsideglobalInsidelocalOutsidelocalOutsideglobal 192 168 1 210 1 1 2 interfaces0ipaddress192 168 1 1255 255 255 0ipnatoutside interfacee0ipaddress10 1 1 1255 255 255 0ipnatinside ipnatinsidesourcestatic10 1 1 2192 168 1 2 建立动态源转换 指定上一步定义的ACL RouterX config ipnatinsidesourcelistaccess list numberpoolname 定义可根据需要进行分配的全局地址池 RouterX config ipnatpoolnamestart ipend ip netmasknetmask prefix lengthprefix length 定义允许那些要被转换的内部本地地址的标准IPACL RouterX config access listaccess list numberpermitsource source wildcard 显示活动的转换 RouterX showipnattranslations 配置和检验动态转换 动态地址转换示例 RouterX showipnattranslationsProInsideglobalInsidelocalOutsidelocalOutsideglobal 172 19 233 209192 168 1 100 172 19 233 210192 168 1 101 过载内部全局地址 PAT 配置过载 建立动态源转换 指定上一步定义的ACL RouterX config ipnatinsidesourcelistaccess list numberinterfaceinterfaceoverload 定义允许那些要被转换的内部本地地址的标准IPACL RouterX config access listaccess list numberpermitsourcesource wildcard 显示活动的转换 RouterX showipnattranslations 过载内部全局地址示例 RouterX showipnattranslationsProInsideglobalInsidelocalOutsidelocalOutsideglobalTCP172 17 38 1 1050192 168 3 7 105010 1 1 1 2310 1 1 1 23TCP172 17 38 1 1776192 168 4 12 177610 2 2 2 2510 2 2 2 25 hostnameRouterX interfaceEthernet0ipaddress192 168 3 1255 255 255 0ipnatinside interfaceEthernet1ipaddress192 168 4 1255 255 255 0ipnatinside interfaceSerial0descriptionToISPipaddress172 17 38 1255 255 255 0ipnatoutside ipnatinsidesourcelist1interfaceSerial0overload iproute0 0 0 00 0 0 0Serial0 access list1permit192 168 3 00 0 0 255access list1permit192 168 4 00 0 0 255 清除包含内部转换或同时包含内部转换与外部转换的简单动态转换条目 RouterX clearipnattranslationinsideglobal iplocal ip outsidelocal ipglobal ip 清除所有动态地址转换条目 RouterX clearipnattranslation 清除包含外部转换的简单动态转换条目 RouterX clearipnattranslationoutsidelocal ipglobal ip 清除扩展动态转换条目 PAT条目 RouterX clearipnattranslationprotocolinsideglobal ipglobal portlocal iplocal port outsidelocal iplocal portglobal ipglobal port 清除NAT转换表 未执行转换 转换表中没有包含转换 检验 不存在拒绝数据包进入NAT路由器的入站ACLNAT命令所引用的ACL是否允许所有必需的网络NAT池中是否有足够的地址路由器接口是否被正确定义为NAT内部接口或NAT外部接口 RouterX showipnatstatisticsTotalactivetranslations 1 1static 0dynamic 0extended Outsideinterfaces Ethernet0 Serial2Insideinterfaces Ethernet1Hits 5Misses 0 用show和debug命令显示信息 RouterX debugipnatNAT s 192 168 1 95 172 31 233 209 d 172 31 2 132 6825 NAT s 172 31 2 132 d 172 31 233 209 192 168 1 95 21852 NAT s 192 168 1 95 172 31 233 209 d 172 31 1 161 6826 NAT s 172 31 1 161 d 172 31 233 209 192 168 1 95 23311 NAT s 192 168 1 95 172 31 233 209 d 172 31 1 161 6827 NAT s 192 168 1 95 172 31 233 209 d 172 31 1 161 6828 NAT s 172 31 1 161 d 172 31 233 209 192 168 1 95 23312 NAT s 172 31 1 161 d 172 31 233 209 192 168 1 95 23313 问题示例 无法Ping通远程主机 问题示例 无法Ping通远程主机 续 转换表中无任何转换 RouterA showipnattranslationsProInsideglobalInsidelocalOutsidelocalOutsideglobal 问题示例 无法Ping通远程主机 续 路由器接口错误地定义成了NAT内部接口或NAT外部接口 RouterA showipnatstatisticsTotalactivetranslations 0 0static 0dynamic 0extended Outsideinterfaces Ethernet0Insideinterfaces Serial0Hits 0Misses 0 问题示例 无法Ping通远程主机 续 Ping仍然失败 转换表中仍没有转换 在要定义哪些地址要转换的ACL中包含错误的通配符位掩码 RouterA showaccess listStandardIPaccesslist2010permit0 0 0 0 wildcardbits255 255 255 0 问题示例 无法Ping通远程主机 续 转换现在可以执行 Ping仍然失败 RouterA showipnattranslationsProInsideglobalInsidelocalOutsidelocalOutsideglobal 172 16 17 20192 168 1 2 问题示例 无法Ping通远程主机 续 路由器B上没有到转换后的网络地址172 16 0 0的路由 RouterB shiprouteCodes C connected S static R RIP M mobile B BGPGatewayoflastresortisnotset10 0 0 0 24issubnetted 1subnetsC10 1 1 0 24isdirectlyconnected Serial0192 168 2 0 24issubnetted 1subnetsR192 168 2 0 24isdirectlyconnected Ethernet0192 168 1 0 24isvariablysubnetted 3subnets 3masksR192 168 1 0 24 120 1 via10 1 1 1 2d19h Serial0 问题示例 无法Ping通远程主机 续 路由器A通告了要被转换的网络192 168 1 0 但没有通告路由器要被转换到的网络地址172 16 0 0 RouterA shipprotocolRoutingProtocolis rip OutgoingupdatefilterlistforallinterfacesisnotsetIncomingupdatefilterlistforallinterfacesisnotsetSendingupdatesevery30seconds nextduein0secondsInvalidafter180seconds holddown180 flushedafter240Redistributing ripDefaultversioncontrol sendversion1 receiveanyversionAutomaticnetworksummarizationisineffectMaximumpath 4RoutingforNetworks 192 168 0 010 0 0 0Rout

温馨提示

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

评论

0/150

提交评论