当前位置:首页 > 技术与方案 > 网络管理相关

cisco NAT 的配置例子

(2012-09-06 07:28:14)

!
  version 12.0
  service timestamps debug uptime
  service timestamps log uptime
  no service password-encryption
  !
  hostname nat-r1
  !
  enable secret 5 $1$FEQr$INhRecYBeCb.UqTQ3b9mY0
  !
  ip subnet-zero
  !
   !
   !
   !
   interface Ethernet0
   ip address 172.18.150.150 255.255.0.0
   no ip directed-broadcast
   ip nat inside /* 定义此为网络的内部端口 */
  !
  interface Serial0
   ip address 192.1.1.161 255.255.255.252
   no ip directed-broadcast
   ip nat outside /* 定义此为网络的外部端口 */
  
   no ip mroute-cache
   no fair-queue
  !
  interface Serial1
   no ip address
   no ip directed-broadcast
   shutdown
  ! /* 定义从ISP那里申请到的IP在企业内部的分配策阅 */
  ip nat pool tech 192.1.1.100 192.1.1.120 netmask 255.255.255.0
  ip nat pool deve 192.1.1.121 192.1.1.150 netmask 255.255.255.0
  ip nat pool manager 192.1.1.180 192.1.1.200 netmask 255.255.255.0
  ip nat pool soft-1 192.1.1.170 192.1.1.179 netmask 255.255.255.0
  ip nat pool soft-2 192.1.1.151 192.1.1.159 netmask 255.255.255.0
  ip nat pool temp-user 192.1.1.160 192.1.1.160 netmask 255.255.255.0
   /* 将访问列表与地址池对应,以下为动态地址转换*/
  ip nat inside source list 1 pool tech
  ip nat inside source list 2 pool deve
  ip nat inside source list 3 pool manager
  ip nat inside source list 4 pool soft-1
  ip nat inside source list 5 pool soft-2
   /* 将访问列表与地址池对应,以下为复用动态地址转换*/
  ip nat inside source list 6 pool temp-user overload
   /* 将访问列表与地址池对应,以下为静态地址转换*/
  ip nat inside source static 172.18.100.168 192.1.1.168
  ip nat inside source static 172.18.100.169 192.1.1.169
  ip classless
  ip route 0.0.0.0 0.0.0.0 Serial0 /* 设置一个缺省路由 */
  ! /* 内部网访问地址表,他指出内部网络能访问外部网的地址段,
  分别定义是为了对应
   不同的地址池 */
 
更多
关闭窗口 打印 
网站首页    -    联系我们    -   收藏本站    -    网站地图                                                               客户服务热线:0571-85023000
本网站所有网页信息已申请知识产权和著作权保护,版权归四海光纤公司所有,未经授权禁止任何人复制或镜像,违者必究。
公司主营:杭州光纤光缆视频会议系统,是专业的通信网络工程、视频会议系统建设专家

中华人民共和国备案号:浙ICP备10018243号