好消息,超酷的在线虚拟网络实验室上线了!点击开始实验

为获得更好的浏览效果,建议您使用 Firefox 或者 Chrome 浏览器



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

 

关键字: MSR;IPv6; 路由策略

一、组网需求

      RTA上建立三条静态路由,RTB通过过滤引入其中的两条,RTC通过过滤引入其中的一条。

试验设备RTAMSR20-21),RTBMSR20-20,RTCMSR30-20

二、组网图

1 ISIS路由协议组网图

IP地址列表:

设备

接口

IPv6地址

RTA

E0/1

1::1/64

E0/0

2::1/64

RTB

E0/0

3::2/64

E0/1

4::1/64

RTC

G0/0

2::1/64

G0/1

2::2/64

三、配置步骤

1.使能RTA上的RIPng协议,引入三条静态路由。

2.通过在RTC上配置路由过滤规则,使接收到的三条静态路由部分可见,部分被屏蔽掉——20::040::0网段的路由是可见的,30::0网段的路由则被屏蔽。

3.通过在RTB上配置路由过滤规则,使接收到的两条静态路由部分可见,部分被屏蔽掉——40::0网段的路由是可见的,20::0网段的路由则被屏蔽。

 

RTA配置

< RTA >sys

System View: return to User View with Ctrl+Z.

[RTA]ipv6                             //全局视图下使能IPv6

[RTA]interface Ethernet 0/0

[RTA-Ethernet0/0]ip add 2::1/64        //配置E0/0IPv6地址

[RTA-Ethernet0/0]quit                   //退出接口视图,返回系统视图

// 配置三条静态路由

[RouterA] ipv6 route-static 20::1 32 ethernet 0/0

[RouterA] ipv6 route-static 30::1 32 ethernet 0/0

[RouterA] ipv6 route-static 40::1 32 ethernet 0/0

// 启动RIPNG协议并引入静态路由

[RouterA] router id 1.1.1.1

[RouterA] ripng

[RouterA-ripng-1] import-route static

 

RTB配置

<RT_B>sys

System View: return to User View with Ctrl+Z.

[RT_B]ipv6                             //全局视图下使能IPv6

[RT_B]interface Ethernet 0/0

[RT_B-Ethernet0/0]ipv6 address 3::2/64       //配置E0/1IPv6地址

[RT_B-Ethernet0/0]quit                    //退出接口视图返回系统视图

// 配置ACL6

[RTC] acl6 number 1

[RTC-acl6-basic-1] rule deny source 20::0 32

[RTC-acl6-basic-1] rule permit source any

// 启动RIPNG协议

[RTC] router id 3.3.3.3

[RTC] ripng

// 配置RIPNG对接收的外部路由进行过滤

[RTC-ripng-1] filter-policy 1 import

 

RTC配置

< RTC >sys

[RTC]ipv6                             //全局视图下使能IPv6

[RTC]interface GigabitEthernet 0/0

[RTC-GigabitEthernet0/0]ipv6 address 2::2/64

[RTC-GigabitEthernet0/0]quit

[RTC]interface GigabitEthernet 0/1

[RTC-GigabitEthernet0/1]ipv6 address 3::1/64

[RTC-GigabitEthernet0/1]quit

// 配置ACL6

[RTC] acl6 number 1

[RTC-acl6-basic-1] rule deny source 30::0 32

[RTC-acl6-basic-1] rule permit source any

// 启动RIPNG协议。

[RTC] router id 2.2.2.2

[RTC] ripng

// 配置RIPNG对接收的外部路由进行过滤。

[RTC-ripng-1] filter-policy 1 import

 

四、试验分析

    完成以上配置后,RTCRTA各地之间可以互通:

[RTA-2021]ping ipv6 200::1

  PING 200::1 : 56  data bytes, press CTRL_C to break

    Reply from 200::1

    bytes=56 Sequence=1 hop limit=63  time = 2 ms

    Reply from 200::1

    bytes=56 Sequence=2 hop limit=63  time = 2 ms

    Reply from 200::1

    bytes=56 Sequence=3 hop limit=63  time = 2 ms

    Reply from 200::1

    bytes=56 Sequence=4 hop limit=63  time = 2 ms

    Reply from 200::1

    bytes=56 Sequence=5 hop limit=63  time = 2 ms

 

  --- 200::1 ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 2/2/2 ms

RTBospfv3路由表如下

<RTB-2020>display ospfv routing

 

 E1 - Type 1 external route,    IA - Inter area route,    I  - Intra area route

 E2 - Type 2 external route,    *  - Selected route

 

            OSPFv3 Router with ID (21.21.21.21) (Process 100)

 ------------------------------------------------------------------------

 *Destination: 1::/64                                       

  Type       : I                                        Cost     : 1

  NextHop    : directly-connected                       Interface: Eth0/1

 

 *Destination: 100::1/128                                   

  Type       : I                                        Cost     : 1

  NextHop    : FE80::20F:E2FF:FE3A:FF54                 Interface: Eth0/1

 

 

            OSPFv3 Router with ID (22.22.22.22) (Process 200)

 ------------------------------------------------------------------------

 *Destination: 2::/64                                       

  Type       : I                                        Cost     : 1

  NextHop    : directly-connected                       Interface: Eth0/0

               

 *Destination: 200::1/128                                   

  Type       : I                                        Cost     : 1

  NextHop    : FE80::20F:E2FF:FE3A:FE8C                 Interface: Eth0/0

 

X Close
X Close