HCIE数通知识精-MSDP 技术(part-5)

2021-07-27 16:30:24 浏览数 (1)

(1)配置基于MSDP的Anycast RP示例

1.1.1. 组网需求

如图1所示,PIM-SM域拥有多个组播源和多个接收者。要求在PIM-SM域内建立MSDP对等体实现RP负荷分担。

图1 配置基于MSDP的Anycast RP组网图

1.1.2. 配置思路

设计方案:配置Anycast RP,接收者向拓扑距离最近的RP发起加入,组播源向拓扑距离最近的RP发起注册。步骤如下:

1. 配置各路由器的接口IP地址,在PIM-SM域内配置OSPF协议实现互联。

2. 使能组播功能,并在各接口上使能PIM-SM功能,在主机侧接口上使能IGMP功能。

3. 在RouterC和RouterD的Loopback10接口地址相同,配置C-RP。在Loopback1接口上配置C-BSR。

4. 在RouterC和RouterD的Loopback0接口上配置MSDP对等体。根据RPF规则,接收源RP发来的SA消息。

1.1.3. 操作步骤

1. 配置各路由器的接口IP地址和单播路由协议

# 按照图1,在PIM-SM域内,配置各路由器接口的IP地址和掩码,配置各路由器之间采用OSPF进行互连。具体配置过程略。

2. 使能组播功能,并配置PIM-SM功能

# 在所有路由器上使能组播功能,并在各接口上使能PIM-SM功能,在主机侧接口使能IGMP功能。其他路由器上的配置过程与RouterC上的配置相似,配置过程略。

代码语言:javascript复制
[RouterC] multicast routing-enable
[RouterC] interface gigabitethernet 1/0/0
[RouterC-GigabitEthernet1/0/0] pim sm
[RouterC-GigabitEthernet1/0/0] quit
[RouterC] interface gigabitethernet 2/0/0
[RouterC-GigabitEthernet2/0/0] pim sm
[RouterC-GigabitEthernet2/0/0] quit
[RouterC] interface gigabitethernet 3/0/0
[RouterC-GigabitEthernet3/0/0] pim sm
[RouterC-GigabitEthernet3/0/0] igmp enable
[RouterC-GigabitEthernet3/0/0] quit

3. 配置Loopback1、Loopback10接口,C-BSR、C-RP的位置

# 在RouterC和RouterD上分别配置Loopback1接口地址和相同的Loopback10接口地址,在Loopback1上配置C-BSR,在Loopback10上配置C-RP。RouterD上的配置过程与RouterC上的配置相似,配置过程略。

代码语言:javascript复制
[RouterC] interface loopback 1
[RouterC-LoopBack1] ip address 3.3.3.3 255.255.255.255
[RouterC-LoopBack1] pim sm
[RouterC-LoopBack1] quit
[RouterC] interface loopback 10
[RouterC-LoopBack10] ip address 10.1.1.1 255.255.255.255
[RouterC-LoopBack10] pim sm
[RouterC-LoopBack10] quit
[RouterC] pim
[RouterC-pim] c-bsr loopback 1
[RouterC-pim] c-rp loopback 10
[RouterC-pim] quit

4. 配置Loopback0接口和MSDP对等体

# 在RouterC上的Loopback0接口上配置MSDP对等体。

代码语言:javascript复制
[RouterC] interface loopback 0
[RouterC-LoopBack0] ip address 1.1.1.1 255.255.255.255
[RouterC-LoopBack0] pim sm
[RouterC-LoopBack0] quit
[RouterC] msdp
[RouterC-msdp] originating-rp loopback0
[RouterC-msdp] peer 2.2.2.2 connect-interface loopback0
[RouterC-msdp] quit

# 在RouterD上的Loopback0接口上配置MSDP对等体。

代码语言:javascript复制
[RouterD] interface loopback 0
[RouterD-LoopBack0] ip address 2.2.2.2 255.255.255.255
[RouterD-LoopBack0] pim sm
[RouterD-LoopBack0] quit
[RouterD] msdp
[RouterD-msdp] originating-rp loopback0
[RouterD-msdp] peer 1.1.1.1 connect-interface loopback0
[RouterD-msdp] quit

5. 检验配置效果

# 通过使用display msdp brief命令可以查看路由器之间MSDP对等体建立情况。RouterC和RouterD上MSDP对等体的显示信息如下:

代码语言:javascript复制
<RouterC> display msdp brief
MSDP Peer Brief Information of VPN-Instance: public net
  Configured   Up           Listen       Connect      Shutdown     Down
  1            1            0            0            0            0         

  Peer's Address     State     Up/Down time    AS     SA Count   Reset Count
  2.2.2.2            Up        00:10:17        ?      0          0
<RouterD> display msdp brief
MSDP Peer Brief Information of VPN-Instance: public net
  Configured   Up           Listen       Connect      Shutdown     Down
  1            1            0            0            0            0         

  Peer's Address     State     Up/Down time    AS     SA Count   Reset Count
  1.1.1.1            Up        00:10:18        ?      0          0

# 通过使用display pim routing-table命令可以查看路由器上的PIM路由。PIM-SM域内组播源S1(10.110.5.100/24)向组播组G(225.1.1.1)发送组播信息,用户User1加入组播组G,接收发往组G的组播数据。通过比较RouterC和RouterD上PIM路由的显示信息,可知当前有效RP是RouterC:S1向RouterC注册,User1向RouterC发起加入。

代码语言:javascript复制
<RouterC> display pim routing-table
VPN-Instance: public net
 Total 1 (*, G) entry; 1 (S, G) entry

 (*, 225.1.1.1)
     RP: 10.1.1.1 (local)
     Protocol: pim-sm, Flag: WC
     UpTime: 00:28:49
     Upstream interface: Register
         Upstream neighbor: NULL
         RPF prime neighbor: NULL
     Downstream interface(s) information:
     Total number of downstreams: 1
         1: GigabitEthernet3/0/0
             Protocol: static, UpTime: 00:28:49, Expires: -

 (10.110.5.1, 225.1.1.1)
     RP: 10.1.1.1 (local)
     Protocol: pim-sm, Flag: SPT 2MSDP ACT
     UpTime: 00:02:26
     Upstream interface: GigabitEthernet2/0/0
         Upstream neighbor: 10.110.1.2
         RPF prime neighbor: 10.110.1.2
     Downstream interface(s) information:
     Total number of downstreams: 1
         1: GigabitEthernet3/0/0
             Protocol: pim-sm, UpTime: 00:02:26, Expires: -
<RouterD> display pim routing-table

无输出信息。

# User1退出组播组G,S1停止向组播组G发送组播数据。使用reset multicast routing-table allreset multicast forwarding-tableall清除RouterC上的组播路由表项和转发表项。

代码语言:javascript复制
<RouterC> reset multicast routing-table all
<RouterC> reset multicast forwarding-table all

# 用户User2加入组播组G,S2(10.110.6.100/24)开始向组播组G发送组播数据。通过比较RouterC和RouterD上PIM路由的显示信息,可知当前有效RP是RouterD:S2向RouterD注册,User2向RouterD发起加入。

代码语言:javascript复制
<RouterC> display pim routing-table

无输出信息。

代码语言:javascript复制
<RouterD> display pim routing-table
VPN–Instance: public net  
Total 1 (*, G) entry; 1 (S, G) entry

(*, 225.1.1.1)
     RP: 10.1.1.1 (local)
     Protocol: pim-sm, Flag: WC RPT
     UpTime: 00:07:23
     Upstream interface: NULL, 
         Upstream neighbor: NULL
         RPF prime neighbor: NULL
     Downstream interface(s) information:
     Total number of downstreams: 1
         1: GigabitEthernet3/0/0,
             Protocol: pim-sm, UpTime: 00:07:23, Expires:-
 (10.110.6.100, 225.1.1.1)
     RP: 10.1.1.1 (local)
     Protocol: pim-sm, Flag: SPT 2MSDP ACT
     UpTime: 00:10:20
     Upstream interface: GigabitEthernet2/0/0
         Upstream neighbor: 10.110.2.2
         RPF prime neighbor: 10.110.2.2
     Downstream interface(s) information:
     Total number of downstreams: 1
         1: GigabitEthernet3/0/0
             Protocol: pim-sm, UpTime: 00:10:22, Expires: -

1.1.4. 配置文件

· RouterA的配置文件

代码语言:javascript复制
#
 sysname RouterA
#
 multicast routing-enable
#
interface GigabitEthernet1/0/0
 ip address 10.110.5.1 255.255.255.0
 pim sm
#
interface GigabitEthernet2/0/0
 ip address 10.110.1.2 255.255.255.0
 pim sm
#
ospf 1
 area 0.0.0.0
  network 10.110.1.0 0.0.0.255
  network 10.110.5.0 0.0.0.255
#
return

· RouterB的配置文件

代码语言:javascript复制
#
 sysname RouterB
#
 multicast routing-enable
#
interface GigabitEthernet1/0/0
 ip address 10.110.6.1 255.255.255.0
 pim sm
#
interface GigabitEthernet2/0/0
 ip address 10.110.2.2 255.255.255.0
 pim sm
#
ospf 1
 area 0.0.0.0
  network 10.110.2.0 0.0.0.255
  network 10.110.6.0 0.0.0.255
#
return

· RouterC的配置文件

代码语言:javascript复制
#
 sysname RouterC
#
 multicast routing-enable
#
interface GigabitEthernet1/0/0
 ip address 192.168.1.1 255.255.255.0
 pim sm
#
interface GigabitEthernet2/0/0
 ip address 10.110.1.1 255.255.255.0
 pim sm
#
interface GigabitEthernet3/0/0
 ip address 10.110.4.1 255.255.255.0
 pim sm
 igmp enable
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255
 pim sm
#
interface LoopBack1
 ip address 3.3.3.3 255.255.255.255
 pim sm
#
interface LoopBack10
 ip address 10.1.1.1 255.255.255.255
 pim sm
#
ospf 1
 area 0.0.0.0
  network 1.1.1.1 0.0.0.0
  network 3.3.3.3 0.0.0.0
  network 10.1.1.1 0.0.0.0
  network 10.110.1.0 0.0.0.255
  network 10.110.4.0 0.0.0.255
  network 192.168.1.0 0.0.0.255
#
pim
 c-bsr LoopBack1
 c-rp LoopBack10
#
msdp
 originating-rp LoopBack0
 peer 2.2.2.2 connect-interface LoopBack0
#
return

· RouterD的配置文件

代码语言:javascript复制
#
 sysname RouterD
#
 multicast routing-enable
#
interface GigabitEthernet1/0/0
 ip address 192.168.3.1 255.255.255.0
 pim sm
#
interface GigabitEthernet2/0/0
 ip address 10.110.2.1 255.255.255.0
 pim sm
#
interface GigabitEthernet3/0/0
 ip address 10.110.3.1 255.255.255.0
 pim sm
 igmp enable
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255
 pim sm
#
interface LoopBack1
 ip address 4.4.4.4 255.255.255.255
 pim sm
#
interface LoopBack10
 ip address 10.1.1.1 255.255.255.255
 pim sm
#
ospf 1
 area 0.0.0.0
  network 2.2.2.2 0.0.0.0
  network 4.4.4.4 0.0.0.0
  network 10.1.1.1 0.0.0.0
  network 10.110.2.0 0.0.0.255
  network 10.110.3.0 0.0.0.255
  network 192.168.3.0 0.0.0.255
#
pim
 c-bsr LoopBack1
 c-rp LoopBack10
#
msdp
 originating-rp LoopBack0
 peer 1.1.1.1 connect-interface LoopBack0
#
return

· RouterE的配置文件

代码语言:javascript复制
#
 sysname RouterE
#
 multicast routing-enable
#
interface GigabitEthernet1/0/0
 ip address 192.168.3.2 255.255.255.0
 pim sm
#
interface GigabitEthernet2/0/0
 ip address 192.168.1.2 255.255.255.0
 pim sm
#
ospf 1
 area 0.0.0.0
  network 192.168.1.0 0.0.0.255
  network 192.168.3.0 0.0.0.255
#
return

0 人点赞