1 / 20

第 10 章 局域网与 Internet 网互联

第 10 章 局域网与 Internet 网互联. 锐捷认证网络工程师 RCNA. 本章内容. 为什么需要 NAT NAT 基本概念 NAT 的监视和维护命令. 课程议题. 为什么需要 NAT NAT 基本概念 NAT 的监视和维护命令. NAT/NAPT 带来的好处. 解决 IPv4 地址空间不足的问题; 私有 IP 地址网络与公网互联; 10.0.0.0/8 , 172.16.0.0/12 , 192.168.0.0/16 非注册 IP 地址网络与公网互联; 建网时分配了全局 IP 地址-但没注册 网络改造中,避免更改地址带来的风险;

Download Presentation

第 10 章 局域网与 Internet 网互联

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 第10章局域网与Internet网互联 锐捷认证网络工程师RCNA

  2. 本章内容 • 为什么需要 NAT • NAT基本概念 • NAT的监视和维护命令

  3. 课程议题 • 为什么需要 NAT • NAT基本概念 • NAT的监视和维护命令

  4. NAT/NAPT带来的好处 • 解决IPv4地址空间不足的问题; • 私有IP地址网络与公网互联; • 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 • 非注册IP地址网络与公网互联; • 建网时分配了全局IP地址-但没注册 • 网络改造中,避免更改地址带来的风险; • TCP流量的负载均衡

  5. 课程议题 • 为什么需要 NAT • NAT基本概念 • NAT的监视和维护命令

  6. 什么是NAT/NAPT • NAT就是将网络地址从一个地址空间转换到另外一个地址空间的一个行为 • 纯软件NAT • 防火墙NAT • 路由器NAT • NAT的类型 • NAT(Network Address Translation) • 转换后,一个本地IP地址对应一个全局IP地址 • NAPT (Network Address Port Translation) • 转换后,多个本地地址对应一个全局IP地址

  7. NAT/NAPT的术语 • 内部网络 - Inside • 外部网络 - Outside • 内部本地地址-Inside Local Address • 内部全局地址-Inside Global Address • 外部本地地址-Outside Local Address • 外部全局地址-Outside Global Address 互联网 Outside Inside 外部网 企业内部网

  8. 静态与动态NAT • 静态NAT • 需要向外网络提供信息服务的主机 • 永久的一对一IP地址映射关系 • 动态NAT • 只访问外网服务,不提供信息服务的主机 • 内部主机数可以大于全局IP地址数 • 最多访问外网主机数决定于全局IP地址数 • 临时的一对一IP地址映射关系

  9. NAT示例 可以是动态或静态NAT

  10. 配置静态NAT • Red-Giant(config)#ip nat inside source static local-address global-address • 定义内部源地址静态转换关系 • Red-Giant(config)# interface interface-type interface-number • Red-Giant(config-if)#ip nat inside • 定义该接口连接内部网络 • Red-Giant(config)# interface interface-type interface-number • Red-Giant(config-if)#ip nat outside • 定义接口连接外部网络

  11. 配置动态NAT • Red-Giant(config)#ip nat pool address-pool start-address end-address {netmask mask | prefix-length prefix-length} • 定义全局IP地址池 • Red-Giant(config)#access-list access-list-number permit ip-address wildcard • 定义访问列表,只有匹配该列表的地址才转换 • Red-Giant(config)#ip nat inside sourcelist access-list-number pool address-pool • 定义内部源地址动态转换关系 • Red-Giant(config)# interface interface-type interface-number • Red-Giant(config-if)#ip nat inside • 定义该接口连接内部网络 • Red-Giant(config)# interface interface-type interface-number • Red-Giant(config-if)#ip nat outside • 定义接口连接外部网络

  12. 什么时候用NAPT • 缺乏全局IP地址 • 甚至没有专门申请的全局IP地址,只有一个连接ISP的全局IP地址 • 内部网要求上网的主机数很多 • 提高内网的安全性

  13. 静态与动态NAPT • 静态NAPT • 需要向外网络提供信息服务的主机 • 永久的一对一“IP地址 + 端口”映射关系 • 动态NAPT • 只访问外网服务,不提供信息服务的主机 • 临时的一对一“IP地址+ 端口”映射关系

  14. NAPT示例 可以是动态或静态NAPT

  15. 配置静态NAPT • Red-Giant(config)#ip nat inside source static {UDP | TCP} local-address port global-address port • 定义全局IP地址池 • Red-Giant(config)# interface interface-type interface-number • Red-Giant(config-if)#ip nat inside • 定义该接口连接内部网络 • Red-Giant(config)# interface interface-type interface-number • Red-Giant(config-if)#ip nat outside • 定义接口连接外部网络

  16. 配置动态NAPT • Red-Giant(config)#ip nat pool address-pool start-address end-address {netmask mask | prefix-length prefix-length} • 定义全局IP地址池,对于NAPT,一般就定义一个IP地址 • Red-Giant(config)#access-list access-list-number permit ip-address wildcard • 定义访问列表,只有匹配该列表的地址才转换 • Red-Giant(config)#ip nat inside sourcelist access-list-number pool address-pool [interface interface-type interface-number]} overload • 定义内部源地址动态转换关系 • Red-Giant(config)# interface interface-type interface-number • Red-Giant(config-if)#ip nat inside • 定义该接口连接内部网络 • Red-Giant(config)# interface interface-type interface-number • Red-Giant(config-if)#ip nat outside • 定义接口连接外部网络

  17. 课程议题 • 为什么需要 NAT • NAT基本概念 • NAT的监视和维护命令

  18. NAT的监视和维护命令 • 显示命令 • show ip nat statistics • show ip nat translations [verbose] • 清除状态命令 • clear ip nat translation * • clear ip nat translation outsidelocal-address global-address • 更多的命令用 clear ip nat ?

  19. 课程回顾 • 为什么需要 NAT程 • NAT基本概念 • NAT应用实例 • NAT的监视和维护命令

  20. Q&A

More Related