首页/网络/BGP 与广域网速查/route-map 序号与 continue
路由过滤与重分发66 条

route-map 序号与 continue

条目按序号顺序执行;IOS 支持 continue 语句:命中后按指定序号继续处理,用于把多组 set 叠加到同一路由上。

BGP 与广域网速查网络更新于 2026-10-12
序号seq 数字,越小越先执行
continue命中后跳转指定序号继续处理
典型用法先设 weight 再设 LOCAL_PREF 的双段策略
兼容continue 的平台支持情况以文档为准

continue 示例

continue 示例
route-map RM-CONT permit 10
 match ip address prefix-list PL-A
 set weight 200
 continue 20
route-map RM-CONT permit 20
 set local-preference 150
不用 continue 时,命中首个 permit 条目即结束,后续条目的 set 不会执行。

易错点

  • 误以为多个条目会依次执行:默认命中即停,需要 continue 才继续
  • continue 的目标条目又带 match 条件:条件不满足时该段 set 不生效

数据来源与参考

  • Cisco: route-map continue 语句
​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌