登录站点

用户名

密码

策略路由中set ip default next-hop和set ip next-hop的区别

热8已有 69 次阅读  2011-03-17 14:14
最近在研究策略路由,在配置下一跳时有两种实现方式,这两种方式在处理过程中是有很大区别的。详细区别如下描述:

Introduction

This document provides a sample configuration for policy-based routing (PBR) using the set ip default next-hop and set ip next-hop commands.

The set ip default next-hop command verifies the existence of the destination IP address in the routing table, and…

  • if the destination IP address exists, the command does not policy route the packet, but forwards the packet based on the routing table.

  • if the destination IP address does not exist, the command policy routes the packet by sending it to the specified next hop.

The set ip next-hop command verifies the existence of the next hop specified, and…

分享 举报

发表评论 评论 (5 个评论)

  • Bati-gol 2011-03-17 15:24
    以前在真实案例中使用过这个参数

    如果不加default,会先查询策略路由的下一条,然后查询直连路由,也就是策略路由比直连路由还要优先

    如果加上default
    会先查询直连路由,然后查询策略路由

    在核心交换机上做策略路由,这个参数很重要,不然会导致,直连网段的通信都指到了策略路由的下一条,所以这个参数必须加了,才能先查询直连路由,再查询策略路由,呵呵~

    所以建议在适当的网络环境中使用default参数,呵呵。。。
  • hflaq 2011-03-18 01:05
  • hflaq 2011-03-18 01:05
    策略路由中set ip default next-hop和set ip next-hop的区别
  • danielahj123 2011-03-18 10:54
    Bati-gol: 以前在真实案例中使用过这个参数

    如果不加default,会先查询策略路由的下一条,然后查询直连路由,也就是策略路由比直连路由还要优先

    如果加上default
    会先查
    很好的经验
  • Bati-gol 2011-03-18 11:25
    danielahj123: 很好的经验
    还有一个办法,就是在策略路由中调用的ACL中把内网之间的通信排除开
    acl deny   该vlan的网段  其他vlan的汇聚网段
    acl permit 该vlan的网段  any

    这样只是到外部的流量才会被丢到策略路由的下一条

    这样效果和使用default参数相同

    要是其他品牌的网络设备没有defalut参数的特性就只能用上面的方法排除开了。。。

    还是喜欢思科的东东,功能强大,哈哈~
涂鸦板