首页 | 互联网 | IT动态 | IT培训 | Cisco | Windows | Linux | Java | .Net | Oracle | 软件测试 | C/C++ | 嵌入式开发 | 存储世界 | 服务器
网络设备 | IDC | 安全 | 求职招聘 | 数字网校 | 网页设计 | 平面设计 | 技术专题 | 电子书下载 | 教学视频 | 源码下载 | 搜索 | 博客 | 论坛
欢迎光临中国IT实验室思科频道
Google
您现在的位置: 中国IT实验室 >> Cisco >> 考试认证 >> CCIE >> 正文

CCIE之路——路由过滤命令详解

 

  <1> Standard ACL

interface Serial 0
   ip address 172.16.5.1 255.255.255.0
   ip policy route-map sense
!
access-list 1 permit 172.16.6.0 0.0.0.255
access-list 2 permit 172.16.7.0 0.0.0.255
!
route-map sense permit 10
   match ip address 1
   set ip next-hop 172.16.4.2
!
route-map sense permit 20
   match ip address 2
   set ip next-hop 172.16.4.3

  <2> Extended ACL

interface Ethernet 0
   ip address 172.16.1.4 255.255.255.0
   ip policy route-map sense
!
access-list 105 permit tcp 172.16.1.0 0.0.0.255 eq ftp any
access-list 105 permit tcp 172.16.1.0 0.0.0.255 eq ftp-data any
access-list 106 permit tcp 172.16.1.0 0.0.0.255 eq telnet any
!
route-map sense permit 10
   match ip address 105
   set ip next-hop 172.16.2.1
!
route-map sense permit 20
   match ip address 106
   set ip next-hop 172.16.3.1

  <3> Length of the Packets

interface Ethernet0
   ip address 172.16.1.4 255.255.255.0
   ip policy route-map sense
!
route-map sense permit 10
   match length 1000 1600
   set ip next-hop 172.16.2.1
!
route-map sense permit 20
   match length 0 400
   set ip next-hop 172.16.3.1

  <4> Router's Packets

interface Ethernet0
   ip address 172.16.1.4 255.255.255.0
   ip policy route-map sense
!
ip local policy route-map sense
!
access-list 120 permit ip any 172.16.1.0 0.0.0.255
access-list 120 permit ospf any any
!
route-map sense permit 10
   match ip address 120
!
route-map sense permit 20
   match length 1000 1600
   set ip next-hop 172.16.2.1
!
route-map sense permit 30
   match length 0 400
   set ip next-hop 172.16.3.1

  注:如果没有第一个route-map条目,router本身的Packets及OSPF的Packets都会由于后两个route-map语句被转发到错误的地址。

上一页  [1] [2] [3] [4] [5] [6] [7] 下一页

【责编:Kittoy】
中国IT教育
相关产品和培训
文章评论
 友情推荐精华
 专题推荐

 ·节省成本才是“王道” VOIP案例应用…
 ·巧用网络流量 打造健康内网…
 ·无线路由器设置从入门到精通
 ·企业网管如何部署你的网络监控系统?
 ·负载均衡技术方案攻略
 ·中国IT实验室2007年技术热点盘点
 ·利用路由实现VPN的配置方法
 ·让你的局域网网速更上一层楼
 ·小命令大作用---Ping
 ·OSPF路由协议专题
 今日更新
 认证培训
 频道精选
 思科频道导航