打印

MSR系列路由器IP策略路由功能的配置

MSR系列路由器IP策略路由功能的配置

MSR系列路由

IP策略路由功能的配置



关键字:MSR;策略路由



一、组网需求:

RTA、RTB、RTC使用OSPF保证全网路由可达,并且在RTA上察看路由表可以发现10.0.0.0/24的下一跳为RTC的G0/0接口地址。在RTA的G0/1接口上应用策略路由,使从10.0.2.0/24到10.0.0.0/24的流量重定向到RTB上。

设备清单:MSR系列路由器3台

二、配置步骤:

适用设备和版本:MSR系列、Version 5.20, Beta 1202后所有版本。

RTA配置

#

//定义ACL匹配目的地址是10.0.0.0/24

acl number 3000

rule 0 permit ip destination 10.0.0.0 0.0.0.255

#

//连接RTB的接口

interface GigabitEthernet0/0

port link-mode route

ip address 1.2.0.1 255.255.255.252

#

//连接10.0.2.0/24的接口

interface GigabitEthernet0/1

port link-mode route

ip address 10.0.2.1 255.255.255.0

//将策略路由应用到接口上

ip policy-based-route 2to0

#

//连接RTC的接口

interface GigabitEthernet5/0

port link-mode route

ip address 3.1.0.1 255.255.255.252

#

//连接10.0.1.0/24的接口

interface GigabitEthernet5/1

port link-mode route

ip address 10.0.1.1 255.255.255.0

#

//OSPF路由协议配置

ospf 1 router-id 1.1.1.1

import-route direct

area 0.0.0.0

  network 1.2.0.0 0.0.0.3

  network 3.1.0.0 0.0.0.3

#

//策略路由配置

policy-based-route 2to0 permit node 0

//定义匹配的流量

if-match acl 3000

//修改下一跳地址为RTB的G0/0接口地址

apply ip-address next-hop 1.2.0.2

#

RTB配置

#

//连接RTA的接口

interface GigabitEthernet0/0

port link-mode route

ip address 1.2.0.2 255.255.255.252

#

//连接RTC的接口

interface GigabitEthernet0/1

port link-mode route

ip address 2.3.0.1 255.255.255.252

#

//OSPF配置

ospf 1 router-id 2.2.2.2

area 0.0.0.0

  network 1.2.0.0 0.0.0.3

  network 2.3.0.0 0.0.0.3

#

RTC配置

#

//连接RTA的接口

interface GigabitEthernet0/0

port link-mode route

ip address 3.1.0.2 255.255.255.252

#

//连接RTB的接口

interface GigabitEthernet0/1

port link-mode route

ip address 2.3.0.2 255.255.255.252

#

//连接10.0.0.0/24的接口

interface GigabitEthernet1/0

port link-mode route

ip address 10.0.0.1 255.255.255.0

#

//OSPF的配置

ospf 1 router-id 3.3.3.3

import-route direct

area 0.0.0.0

  network 2.3.0.0 0.0.0.3

  network 3.1.0.0 0.0.0.3

#


三、配置关键点:

1) 在使用策略路由重定向时,如果出接口是广播类型的,如以太网接口,那么必须apply ip-address next-hop方式,而不能使用apply output-interface的方式。

[ 本帖最后由 吹动的电扇 于 2007-9-1 17:31 编辑 ]

TOP


感谢一直以来您对我们的支持!
当前时区 GMT+8, 现在时间是 2008-8-22 12:26 京ICP证060528 号

Designed By 17DST