MSDP描述了一种连接多PIM-SM域的机制。每种 PIM-SM 域都使用自己独立的RP ,它并不依赖于其它域内的RP ,配置了MSDP对等体的RP将其域内的活动组播源信息通过SA(活动源)消息通告给它的所有MSDP对等体,这样,一个PIM-SM域内的组播源信息就会被传递到另一个PIM-SM域。
通过以上对MSDP的描述,让我们进行实战,看一下MSDP是怎样实现的。
需求分析
1.PIM-SM网络采用单BSR管理域方式,拥有多个组播源S和多个接收者。在PIM-SM域内配置Anycast RP,当新成员加入组播组时,与接收者直接相连的交换机能够向拓扑距离最近的RP发起加入;
2.PIM-SM网络中运行OSPF提供单播路由,在SwitchC和SwitchD之间建立MSDP对等体。同时,SwitchC和SwitchD的Loopback10,Loopback0接口承担C-BSR和C-RP的角色;
3.此案例同时适用于以下产品:H3C 3600-EI、5600、3610、5510系列交换机。
组网图如下:
#p#
MSDP的配置过程
SwitchA配置:
1.创建vlan 130 140 150,并将端口E 0/1加入vlan 130, E 0/2加入vlan 150,E 0/3加入vlan 140
- [SwitchA]vlan 130
- [SwitchA-vlan 130]port Ethernet 0/1
- [SwitchA-vlan 130]vlan 140
- [SwitchA-vlan 140]port Ethernet 0/3
- [SwitchA-vlan 140]vlan 150
- [SwitchA-vlan 150]port Ethernet 0/2
2.分别给vlan 130 140 150设置vlan 虚接口地址
- [SwitchA-vlan 150]int vlan 130
- [SwitchA-interface-vlan 130]ip add 192.168.3.1 24
- [SwitchA-interface-vlan 130]int vlan 140
- [SwitchA-interface-vlan 140]ip add 192.168.4.1 24
- [SwitchA-interface-vlan 140]int vlan 150
- [SwitchA-interface-vlan 150]ip add 192.168.5.1 24
3.配置ospf路由
- [SwitchA-interface-vlan 150]quit
- [SwitchA]ospf
- [SwitchA-ospf-1]area
- [SwitchA-ospf-1-area 0.0.0.0]network 192.168.3.1 0.0.0.255
- [SwitchA-ospf-1-area 0.0.0.0]network 192.168.4.1 0.0.0.255
- [SwitchA-ospf-1-area 0.0.0.0]network 192.168.5.1 0.0.0.255
4.配置pim sm组播
- [SwitchA-ospf-1-area 0.0.0.0]quit
- [SwitchA-ospf-1]quit
- [SwitchA]multicast routing-enable
- [SwitchA]int vlan 130
- [SwitchA-interface-vlan 130]pim sm
- [SwitchA-interface-vlan 130]int vlan 140
- [SwitchA-interface-vlan 140]pim sm
- [SwitchA-interface-vlan 140]int vlan 150
- [SwitchA-interface-vlan 150]igmp enable
- [SwitchA-interface-vlan 150]pim sm
#p#
SwitchB配置:
1.创建vlan 120 130 ,并将端口E 0/1加入vlan 130, E 0/2加入vlan 120
- [SwitchB]vlan 130
- [SwitchB-vlan 130]port Ethernet 0/1
- [SwitchB-vlan 130]vlan 120
- [SwitchB-vlan 120]port Ethernet 0/2
2.分别给vlan 120 130设置vlan 虚接口地址
- [SwitchB-vlan 120]int vlan 130
- [SwitchB-interface-vlan 130]ip add 192.168.3.2 24
- [SwitchB-interface-vlan 130]int vlan 120
- [SwitchB-interface-vlan 120]ip add 192.168.2.2 24
3.配置ospf路由
- [SwitchB-interface-vlan 120]quit
- [SwitchB]ospf
- [SwitchB-ospf-1]area
- [SwitchB-ospf-1-area 0.0.0.0]network 192.168.2.2 0.0.0.255
- [SwitchB-ospf-1-area 0.0.0.0]network 192.168.3.2 0.0.0.255
4.配置pim sm组播
- [SwitchB-ospf-1-area 0.0.0.0]quit
- [SwitchB-ospf-1]quit
- [SwitchB]multicast routing-enable
- [SwitchB]int vlan 130
- [SwitchB-interface-vlan 130]pim sm
- [SwitchB-interface-vlan 130]int vlan 120
- [SwitchB-interface-vlan 120]pim sm
#p#
SwitchC配置:
1.创建vlan 110 120 140 ,并将端口E 0/1加入vlan 110, E 0/2加入vlan 120,E 0/3加入vlan 140
- [SwitchC]vlan 110
- [SwitchC-vlan 110]port Ethernet 0/1
- [SwitchC-vlan 110]vlan 120
- [SwitchC-vlan 120]port Ethernet 0/2
- [SwitchC-vlan 120]vlan 140
- [SwitchC-vlan 140]port Ethernet 0/3
2.分别给vlan 110 120 140设置vlan 虚接口地址
- [SwitchC-vlan 140]int vlan 110
- [SwitchC-interface-vlan 110]ip add 192.168.1.1 24
- [SwitchC-interface-vlan 110]int vlan 120
- [SwitchC-interface-vlan 120]ip add 192.168.2.1 24
- [SwitchC-interface-vlan 120]int vlan 140
- [SwitchC-interface-vlan 140]ip add 192.168.4.2 24
3.创建Loopback0,Loopback10,并在这些Loopback地址上使能pim sm
- [SwitchC-interface-vlan 140]quit
- [SwitchC]int Loopback 0
- [SwitchC-Loopback 0]ip add 1.1.1.1 32
- [SwitchC-Loopback 0]pim sm
- [SwitchC-Loopback 0]quit
- [SwitchC] int Loopback 10
- [SwitchC-Loopback 10]ip add 192.168.10.1 32
- [SwitchC-Loopback 10]pim sm
4.配置ospf路由
- [SwitchC-Loopback 10]quit
- [SwitchC]ospf
- [SwitchC-ospf-1]area
- [SwitchC-ospf-1-area 0.0.0.0]network 192.168.1.1 0.0.0.255
- [SwitchC-ospf-1-area 0.0.0.0]network 192.168.2.1 0.0.0.255
- [SwitchC-ospf-1-area 0.0.0.0]network 192.168.4.2 0.0.0.255
- [SwitchC-ospf-1-area 0.0.0.0]network 1.1.1.1 0.0.0.0
- [SwitchC-ospf-1-area 0.0.0.0]network 192.168.10.1 0.0.0.0
5.配置pim sm组播
- [SwitchC-ospf-1-area 0.0.0.0]quit
- [SwitchC-ospf-1]quit
- [SwitchC]multicast routing-enable
- [SwitchC]int vlan 110
- [SwitchC-interface-vlan 110]pim sm
- [SwitchC-interface-vlan 110]int vlan 120
- [SwitchC-interface-vlan 120]pim sm
- [SwitchC-interface-vlan 120]int vlan 140
- [SwitchC-interface-vlan 140]pim sm
6.配置rp 和 bsr
- [SwitchC-interface-vlan 140]quit
- [SwitchC]pim
- [SwitchC-pim]c-rp Loopback 0
- [SwitchC-pim]c-bsr Loopback 10 32
7.配置msdp
- [SwitchC-pim]quit
- [SwitchC]msdp
- [SwitchC-msdp] originating-rp LoopBack0
- [SwitchC-msdp] peer 2.2.2.2 connect-interface LoopBack0
#p#
SwitchD配置:
1.创建vlan 100 160,并将端口E 0/1加入vlan 100, E 0/2加入vlan 160
- [SwitchD]vlan 100
- [SwitchD-vlan 100]port Ethernet 0/1
- [SwitchD-vlan 100]vlan 160
- [SwitchD-vlan 160]port Ethernet 0/2
2.分别给vlan 100 160设置vlan 虚接口地址
- [SwitchD-vlan 160]int vlan 100
- [SwitchD-interface-vlan 100]ip add 192.168.0.1 24
- [SwitchD-interface-vlan 100]int vlan 160
- [SwitchD-interface-vlan 160]ip add 192.168.6.1 24
3.创建Loopback0,Loopback10,并在这些Loopback地址上使能pim sm
- [SwitchD-interface-vlan 160]quit
- [SwitchD]int Loopback 0
- [SwitchD-Loopback 0]ip add 2.2.2.2 32
- [SwitchD-Loopback 0]pim sm
- [SwitchD-Loopback 0]quit
- [SwitchD] int Loopback 10
- [SwitchD-Loopback 10]ip add 192.168.10.1 32
- [SwitchD-Loopback 10]pim sm
4.配置ospf路由
- [SwitchD-Loopback 10]quit
- [SwitchD]ospf
- [SwitchD-ospf-1]area
- [SwitchD-ospf-1-area 0.0.0.0]network 192.168.0.1 0.0.0.255
- [SwitchD-ospf-1-area 0.0.0.0]network 192.168.6.1 0.0.0.255
- [SwitchD-ospf-1-area 0.0.0.0]network 2.2.2.2 0.0.0.0
- [SwitchD-ospf-1-area 0.0.0.0]network 192.168.10.1 0.0.0.0
5.配置pim sm组播
- [SwitchD-ospf-1-area 0.0.0.0]quit
- [SwitchD-ospf-1]quit
- [SwitchD]multicast routing-enable
- [SwitchD]int vlan 100
- [SwitchD-interface-vlan 100]igmp enable
- [SwitchD-interface-vlan 100]pim sm
- [SwitchD-interface-vlan 100]int vlan 160
- [SwitchD-interface-vlan 160]pim sm
6.配置rp 和 bsr
- [SwitchD-interface-vlan 160]quit
- [SwitchD]pim
- [SwitchD-pim]c-rp Loopback 0
- [SwitchD-pim]c-bsr Loopback 10 32
7.配置msdp
- [SwitchD-pim]quit
- [SwitchD]msdp
- [SwitchD-msdp] originating-rp LoopBack0
- [SwitchD-msdp] peer 1.1.1.1 connect-interface LoopBack0
#p#
SwitchE配置:
1.创建vlan 110 160,并将端口E 0/1加入vlan 110, E 0/2加入vlan 160
- [SwitchE]vlan 110
- [SwitchE-vlan 110]port Ethernet 0/1
- [SwitchE-vlan 110]vlan 160
- [SwitchE-vlan 160]port Ethernet 0/2
2.分别给vlan 110 160设置vlan 虚接口地址
- [SwitchE-vlan 160]int vlan 110
- [SwitchE-interface-vlan 110]ip add 192.168.1.2 24
- [SwitchE-interface-vlan 110]int vlan 160
- [SwitchE-interface-vlan 160]ip add 192.168.6.2 24
3.配置ospf路由
- [SwitchE-interface-vlan 160]quit
- [SwitchE]ospf
- [SwitchE-ospf-1]area
- [SwitchE-ospf-1-area 0.0.0.0]network 192.168.1.2 0.0.0.255
- [SwitchE-ospf-1-area 0.0.0.0]network 192.168.6.2 0.0.0.255
4.配置pim sm组播
- [SwitchE-ospf-1-area 0.0.0.0]quit
- [SwitchE-ospf-1]quit
- [SwitchE]multicast routing-enable
- [SwitchE]int vlan 110
- [SwitchE-interface-vlan 110]pim sm
- [SwitchE-interface-vlan 110]int vlan 160
- [SwitchE-interface-vlan 160]pim sm
【编辑推荐】