MSR系列路由器IPv6路由策略功能的配置
关键字: MSR;IPv6; 路由策略
在RTA上建立三条静态路由,RTB通过过滤引入其中的两条,RTC通过过滤引入其中的一条。
试验设备:RTA(MSR20-21),RTB(MSR20-20),RTC(MSR30-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::0和40::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/0的IPv6地址 [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 [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/1的IPv6地址 [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 [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 [RTC] ripng // 配置RIPNG对接收的外部路由进行过滤。 [RTC-ripng-1] filter-policy 1 import |
四、试验分析
完成以上配置后,RTC与RTA各地址之间可以互通:
[RTA-2021]ping ipv6 200::1
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 =
RTB的ospfv3路由表如下:
<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 (
------------------------------------------------------------------------
*Destination: 1::/64
Type : I
Cost : 1
NextHop : directly-connected
Interface: Eth0/1
*Destination: 100::1/128
Type : I
Cost : 1
NextHop : FE80::
OSPFv3 Router with ID (
------------------------------------------------------------------------
*Destination: 2::/64
Type : I
Cost : 1
NextHop : directly-connected Interface:
Eth0/0
*Destination: 200::1/128
Type : I
Cost : 1
NextHop : FE80::