版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
组播配置举例组播配置举例关键词:IGMP、IGMPSnooping、组播VLAN、PIM、MSDP、MBGP摘
要:本文主要介绍组播功能在具体组网中的应用配置,包括以下两种典型组网应用:域内的二、三层组播应用情况,以及域间的三层组播应用情况。缩略语:缩略语英文全名中文解释ASAutonomousSystem自治系统ASMAny-SourceMulticast任意信源组播BGPBorderGatewayProtocol边界网关协议BSRBootStrapRouter自举路由器C-BSRCandidate-BSR候选BSRC-RPCandidate-RP候选RPDRDesignatedRouter指定路由器IGMPInternetGroupManagementProtocol互联网组管理协议MBGPMulticastBorderGatewayProtocol组播边界网关协议MP-BGPMultiProtocolBorderGatewayProtocol多协议边界网关协议MSDPMulticastSourceDiscoveryProtocol组播源发现协议OSPFOpenShortestPathFirst开放最短路径优先PIM-DMProtocolIndependentMulticast-DenseMode协议无关组播—密集模式PIM-SMProtocolIndependentMulticast-SparseMode协议无关组播—稀疏模式RPRendezvousPoint汇集点RPFReversePathForwarding逆向路径转发RPTRendezvousPointTree共享树SPTShortestPathTree最短路径树SSMSource-SpecificMulticast指定信源组播
目
录1特性简介2应用场合3域内二、三层组播配置举例3.1组网需求3.2配置思路3.3配置步骤3.3.1RouterA的配置3.3.2RouterB的配置3.3.3RouterC的配置3.3.4RouterD的配置3.3.5SwitchA的配置3.3.6SwitchB的配置3.3.7SwitchC的配置3.4验证结果4域间三层组播配置举例4.1组网需求4.2配置思路4.3配置步骤4.3.1RouterA的配置4.3.2RouterB的配置4.3.3RouterC的配置4.3.4RouterD的配置4.3.5RouterE的配置4.3.6RouterF的配置4.4验证结果5相关资料5.1相关协议和标准
1
特性简介组播是指在IP网络中将数据包以尽力传送的形式发送到某个确定的节点集合,其基本思想是:源主机只发送一份数据,其目的地址为组播组地址;组播组中的所有接收者都可收到同样的数据拷贝,并且只有组播组内的主机可以接收该数据,而其它主机则不能收到。作为一种与单播和广播并列的通信方式,组播技术能够有效地解决单点发送、多点接收的问题,从而实现了IP网络中点到多点的高效数据传送,能够节约大量网络带宽、降低网络负载。以下是对各常用组播协议的简单介绍:1.IGMPIGMP是TCP/IP协议族中负责IP组播组成员管理的协议,用来在IP主机和与其直接相邻的组播路由器之间建立、维护组播组成员关系。IGMP运行于主机和与主机直连的路由器之间,其实现的功能是双向的:一方面,主机通过IGMP通知路由器希望接收某个特定组播组的信息;另一方面,路由器通过IGMP周期性地查询局域网内的组播组成员是否处于活动状态,实现所连网段组成员关系的收集与维护。2.IGMPSnoopingIGMPSnooping是运行在二层设备上的组播约束机制,用于管理和控制组播组。运行IGMPSnooping的二层设备通过对收到的IGMP报文进行分析,为二层端口和组播MAC地址建立起映射关系,并根据这个映射关系转发组播数据。3.组播VLAN在传统的组播点播方式下,当连接在二层设备上、属于不同VLAN的用户分别进行组播点播时,三层组播设备需要向该二层设备的每个VLAN分别发送一份组播数据;而当二层设备运行了组播VLAN之后,三层组播设备只需向该二层设备的组播VLAN发送一份组播数据即可,从而既避免了带宽的浪费,也减轻了三层组播设备的负担。4.PIMPIM是ProtocolIndependentMulticast(协议无关组播)的简称,表示可以利用静态路由或者任意单播路由协议(包括RIP、OSPF、IS-IS、BGP等)所生成的单播路由表为IP组播提供路由。组播路由与所采用的单播路由协议无关,只要能够通过单播路由协议产生相应的组播路由表项即可。PIM借助单播路由表对组播报文进行RPF检查,以实现对组播数据的转发。根据转发机制的不同,PIM分为以下两种模式:
PIM-DM:属于密集模式的组播路由协议,使用“推(Push)模式”传送组播数据,通常适用于组播组成员相对比较密集的小型网络;
PIM-SM:属于稀疏模式的组播路由协议,使用“拉(Pull)模式”传送组播数据,通常适用于组播组成员分布相对分散、范围较广的大中型网络。5.MSDP在基本的PIM-SM模式下,组播源只向本PIM-SM域内的RP注册,且各域的组播源信息是相互隔离的,因此RP仅知道本域内的组播源信息,只能在本域内建立组播分发树。如果能够有一种机制,使不同域内的RP共享其组播源信息,就可以实现组播数据的跨域传输。MSDP就是为了解决多个PIM-SM域之间的互连而开发的一种域间组播解决方案,用来发现其它PIM-SM域内的组播源信息。它通过在各域的RP之间建立MSDP对等体关系,使这些RP可以共享各域内的组播源信息。尽管MSDP是为域间组播开发的,但它在PIM-SM域内还有着一项特殊的应用——AnycastRP(任播RP)。AnycastRP是指在同一PIM-SM域内通过设置两个或多个具有相同地址的RP,并在这些RP之间建立MSDP对等体关系,以实现域内各RP之间的负载分担和冗余备份。6.MBGP当组播源与接收者分布在不同的AS中时,需要跨AS建立组播转发树。应用MP-BGP协议就可以专门跨AS传输组播路由信息。BGP-4协议仅应用于单播,MP-BGP是对BGP的多协议扩展,它在现有BGP-4的基础上增强了功能,使BGP能够为包括组播路由协议在内的多种路由协议提供路由信息:
MP-BGP可以同时为单播和组播维护路由信息,将它们储存在不同的路由表中,保持单播和组播之间路由信息相互隔离;
作为BGP的多协议扩展,MP-BGP可以同时支持单播和组播模式,为两种模式构建不同的网络拓扑结构;
原BGP-4所支持的单播路由策略和配置方法大部分都可应用于组播模式,从而可以根据路由策略为单播和组播维护不同的路由。MP-BGP在组播上的应用简称为MBGP(组播BGP)。2
应用场合利用组播技术可以方便地提供一些新的增值业务,包括在线直播、网络电视、网络电台、远程教育、远程医疗、视频会议等对带宽和数据交互的实时性要求较高的信息服务。如图1所示,是各常用组播协议在网络中的应用场合示意图。图1
常用组播协议应用场合示意图3
域内二、三层组播配置举例3.1
组网需求(1)
需求分析
某企业的核心网内部通过OSPF协议互连,并拥有两个视频源:Source1通过组播组G1()传送节目1,Source2则通过组播组G2()传送节目2。要求在核心网通过使用PIM-SM协议实现视频流的组播分发,并利用AnycastRP功能实现双RP负载分担和冗余备份,提高网络可靠性。
该企业的接入网按部门划分为多个VLAN以方便管理,各部门内的点播者(Receiver)有不同的点播需求:HostA和HostC点播节目1,HostE点播节目2。要求在接入网通过IGMP、IGMPSnooping和组播VLAN的结合使用,使视频流按需送达各点播者,提高带宽利用率。(2)
网络规划设备接口IP地址设备接口IP地址Source1-00/24Source2-00/24RouterAEth1//24RouterCEth1//24
S2/1/24
S2/1/24
S2/2/24
Loop0/32RouterBS2/1/24
Loop/32
S2/2/24RouterDEth1//24
Loop0/32
Eth1//24
Loop/32
S2/1/24图2
域内二、三层组播配置组网图3.2
配置思路(1)
配置核心网:
在所有路由器上都配置OSPF协议,并在其各接口上使能PIM-SM协议;
为了避免物理接口down而导致的网络振荡,将RouterB和RouterC各自的Loopback1接口配置为C-BSR、Loopback0接口配置为C-RP;
在RouterB和RouterC各自的Loopback1接口之间建立MSDP对等体关系,以实现AnycastRP功能。(2)
配置接入网:
在RouterC和RouterD的主机侧接口上使能IGMP协议;
在所有交换机上划分VLAN,并在VLAN内使能IGMPSnooping,同时使能丢弃未知组播数据报文功能,以防止交换机在没有二层组播转发表项时将组播数据在VLAN内广播;
在SwitchA上配置基于子VLAN的组播VLAN,以避免RouterC将不同VLAN内点播的相同组播数据重复发至SwitchA。3.3
配置步骤
说明:以下配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下配置不冲突。本文档不严格与具体软、硬件版本对应。
3.3.1
RouterA的配置1.配置步骤#配置OSPF协议。<RouterA>system-view[RouterA]ospf1[RouterA-ospf-1]area[RouterA-ospf-1-area-]network55[RouterA-ospf-1-area-]network55[RouterA-ospf-1-area-]network55[RouterA-ospf-1-area-]quit[RouterA-ospf-1]quit#使能IP组播路由,并在各接口上使能PIM-SM。[RouterA]multicastrouting-enable[RouterA]interfaceethernet1/1[RouterA-Ethernet1/1]pimsm[RouterA-Ethernet1/1]quit[RouterA]interfaceserial2/1[RouterA-Serial2/1]pimsm[RouterA-Serial2/1]quit[RouterA]interfaceserial2/2[RouterA-Serial2/2]pimsm[RouterA-Serial2/2]return2.配置文件<RouterA>displaycurrent-configuration#
sysnameRouterA#
multicastrouting-enable#interfaceEthernet1/1
portlink-moderoute
ipaddress
pimsm#interfaceSerial2/1
link-protocolppp
ipaddress
pimsm#interfaceSerial2/2
link-protocolppp
ipaddress
pimsm#ospf1
area
network55
network55
network55#return3.3.2
RouterB的配置1.配置步骤#配置OSPF协议。<RouterB>system-view[RouterB]ospf1[RouterB-ospf-1]area[RouterB-ospf-1-area-]network[RouterB-ospf-1-area-]network[RouterB-ospf-1-area-]network55[RouterB-ospf-1-area-]network55[RouterB-ospf-1-area-]quit[RouterB-ospf-1]quit#使能IP组播路由,并在各接口上使能PIM-SM。[RouterB]multicastrouting-enable[RouterB]interfaceserial2/1[RouterB-Serial2/1]pimsm[RouterB-Serial2/1]quit[RouterB]interfaceserial2/2[RouterB-Serial2/2]pimsm[RouterB-Serial2/2]quit[RouterB]interfaceloopback0[RouterB-LoopBack0]pimsm[RouterB-LoopBack0]quit[RouterB]interfaceloopback1[RouterB-LoopBack1]pimsm[RouterB-LoopBack1]quit#将Loopback1接口配置为C-BSR,将Loopback0接口配置为C-RP。[RouterB]pim[RouterB-pim]c-bsrloopback1[RouterB-pim]c-rploopback0[RouterB-pim]quit#配置MSDP对等体。[RouterB]msdp[RouterB-msdp]originating-rploopback1[RouterB-msdp]peerconnect-interfaceloopback1[RouterB-msdp]return2.配置文件<RouterB>displaycurrent-configuration#
sysnameRouterB#
multicastrouting-enable#interfaceSerial2/1
link-protocolppp
ipaddress
pimsm#interfaceSerial2/2
link-protocolppp
ipaddress
pimsm#interfaceLoopBack0
ipaddress55
pimsm#interfaceLoopBack1
ipaddress55
pimsm#ospf1
area
network
network
network55
network55#pim
c-bsrLoopBack1
c-rpLoopBack0#msdp
originating-rpLoopBack1
peerconnect-interfaceLoopBack1#return3.3.3
RouterC的配置1.配置步骤#配置OSPF协议。<RouterC>system-view[RouterC]ospf1[RouterC-ospf-1]area[RouterC-ospf-1-area-]network[RouterC-ospf-1-area-]network[RouterC-ospf-1-area-]network55[RouterC-ospf-1-area-]network55[RouterC-ospf-1-area-]quit[RouterC-ospf-1]quit#使能IP组播路由,在各接口上使能PIM-SM,并在主机侧接口上使能IGMP。[RouterC]multicastrouting-enable[RouterC]interfaceethernet1/1[RouterC-Ethernet1/1]pimsm[RouterC-Ethernet1/1]igmpenable[RouterC-Ethernet1/1]quit[RouterC]interfaceserial2/1[RouterC-Serial2/1]pimsm[RouterC-Serial2/1]quit[RouterC]interfaceloopback0[RouterC-LoopBack0]pimsm[RouterC-LoopBack0]quit[RouterC]interfaceloopback1[RouterC-LoopBack1]pimsm[RouterC-LoopBack1]quit#将Loopback1接口配置为C-BSR,将Loopback0接口配置为C-RP。[RouterC]pim[RouterC-pim]c-bsrloopback1[RouterC-pim]c-rploopback0[RouterC-pim]quit#配置MSDP对等体。[RouterC]msdp[RouterC-msdp]originating-rploopback1[RouterC-msdp]peerconnect-interfaceloopback1[RouterC-msdp]return2.配置文件<RouterC>displaycurrent-configuration#
sysnameRouterC#
multicastrouting-enable#interfaceEthernet1/1
portlink-moderoute
ipaddress
igmpenable
pimsm#interfaceSerial2/1
link-protocolppp
ipaddress
pimsm#interfaceLoopBack0
ipaddress55
pimsm#interfaceLoopBack1
ipaddress55
pimsm#ospf1
area
network
network
network55
network55#pim
c-bsrLoopBack1
c-rpLoopBack0#msdp
originating-rpLoopBack1
peerconnect-interfaceLoopBack1#return3.3.4
RouterD的配置1.配置步骤#配置OSPF协议。<RouterD>system-view[RouterD]ospf1[RouterD-ospf-1]area[RouterD-ospf-1-area-]network55[RouterD-ospf-1-area-]network55[RouterD-ospf-1-area-]network55[RouterD-ospf-1-area-]quit[RouterD-ospf-1]quit#使能IP组播路由,在各接口上使能PIM-SM,并在主机侧接口上使能IGMP。[RouterD]multicastrouting-enable[RouterD]interfaceethernet1/1[RouterD-Ethernet1/1]pimsm[RouterD-Ethernet1/1]quit[RouterD]interfaceethernet1/2[RouterD-Ethernet1/2]pimsm[RouterD-Ethernet1/2]igmpenable[RouterD-Ethernet1/2]quit[RouterD]interfaceserial2/1[RouterD-Serial2/1]pimsm[RouterD-Serial2/1]quit2.配置文件<RouterD>displaycurrent-configuration#
sysnameRouterD#
multicastrouting-enable#interfaceEthernet1/1
portlink-moderoute
ipaddress
pimsm#interfaceEthernet1/2
portlink-moderoute
ipaddress
igmpenable
pimsm#interfaceSerial2/1
link-protocolppp
ipaddress
pimsm#ospf1
area
network55
network55
network55#return3.3.5
SwitchA的配置1.配置步骤#全局使能IGMPSnooping。<SwitchA>system-view[SwitchA]igmp-snooping[SwitchA-igmp-snooping]quit#创建VLAN10,并把端口Ethernet1/2到Ethernet1/3添加到该VLAN中。[SwitchA]vlan10[SwitchA-vlan10]portethernet1/2toethernet1/3[SwitchA-vlan10]quit#创建VLAN20,并把端口Ethernet1/4添加到该VLAN中。[SwitchA]vlan20[SwitchA-vlan20]portethernet1/4[SwitchA-vlan20]quit#创建VLAN5,把端口Ethernet1/1添加到该VLAN中;在该VLAN内使能IGMPSnooping,并使能丢弃未知组播数据报文功能。[SwitchA]vlan5[SwitchA-vlan5]portethernet1/1[SwitchA-vlan5]igmp-snoopingenable[SwitchA-vlan5]igmp-snoopingdrop-unknown[SwitchA-vlan5]quit#配置VLAN5为组播VLAN,并把VLAN10和VLAN20都配置为该组播VLAN的子VLAN。[SwitchA]multicast-vlan5[SwitchA-mvlan-5]subvlan1020[SwitchA-mvlan-5]return2.配置文件<SwitchA>displaycurrent-configuration#
sysnameSwitchA#igmp-snooping#vlan5
igmp-snoopingenable
igmp-snoopingdrop-unknown#vlan10#vlan20#multicast-vlan5
subvlan1020#interfaceEthernet1/1
portaccessvlan5#interfaceEthernet1/2
portaccessvlan10#interfaceEthernet1/3
portaccessvlan10#interfaceEthernet1/4
portaccessvlan20#return3.3.6
SwitchB的配置1.配置步骤#全局使能IGMPSnooping。<SwitchB>system-view[SwitchB]igmp-snooping[SwitchB-igmp-snooping]quit#创建VLAN20,把端口Ethernet1/1到Ethernet1/3添加到该VLAN中;在该VLAN内使能IGMPSnooping,并使能丢弃未知组播数据报文功能。[SwitchB]vlan20[SwitchB-vlan20]portethernet1/1toethernet1/3[SwitchB-vlan20]igmp-snoopingenable[SwitchB-vlan20]igmp-snoopingdrop-unknown[SwitchB-vlan20]return2.配置文件<SwitchB>displaycurrent-configuration#
sysnameSwitchB#igmp-snooping#vlan20
igmp-snoopingenable
igmp-snoopingdrop-unknown#interfaceEthernet1/1
portaccessvlan20#interfaceEthernet1/2
portaccessvlan20#interfaceEthernet1/3
portaccessvlan20#return3.3.7
SwitchC的配置1.配置步骤#全局使能IGMPSnooping。<SwitchC>system-view[SwitchC]igmp-snooping[SwitchC-igmp-snooping]quit#创建VLAN30,把端口Ethernet1/1到Ethernet1/3添加到该VLAN中;在该VLAN内使能IGMPSnooping,并使能丢弃未知组播数据报文功能。[SwitchC]vlan30[SwitchC-vlan30]portethernet1/1toethernet1/3[SwitchC-vlan30]igmp-snoopingenable[SwitchC-vlan30]igmp-snoopingdrop-unknown[SwitchC-vlan30]return2.配置文件<SwitchC>displaycurrent-configuration#
sysnameSwitchC#igmp-snooping#vlan30
igmp-snoopingenable
igmp-snoopingdrop-unknown#interfaceEthernet1/1
portaccessvlan30#interfaceEthernet1/2
portaccessvlan30#interfaceEthernet1/3
portaccessvlan30#return3.4
验证结果当如上配置完成后,HostA和HostC能够收到视频节目1,HostE能够收到视频节目2。此外,通过相应的display命令还可查看设备上的各种配置及运行效果:(1)
通过使用displaymulticast-vlan命令可以查看交换机上组播VLAN的信息。例如:#查看SwitchA上所有组播VLAN的信息。<SwitchA>displaymulticast-vlan
Total1multicast-vlan(s)
Multicastvlan5
subvlanlist:
vlan10
20
portlist:
noport由上可知,VLAN5为组播VLAN,VLAN10和VLAN20为其子VLAN。(2)
通过使用displayigmp-snoopinggroup命令可以查看各交换机上IGMPSnooping组播组的信息。例如:#查看SwitchA上IGMPSnooping组播组的信息。<SwitchA>displayigmp-snoopinggroup
Total3IPGroup(s).
Total3IPSource(s).
Total3MACGroup(s).
Portflags:D-Dynamicport,S-Staticport,C-Copyport
Subvlanflags:R-RealVLAN,C-CopyVLAN
Vlan(id):5.
Total1IPGroup(s).
Total1IPSource(s).
Total1MACGroup(s).
Routerport(s):total1port.
Eth1/1
(D)(00:01:30)
IPgroup(s):thefollowingipgroup(s)matchtoonemacgroup.
IPgroupaddress:
(,):
Hostport(s):total0port.
MACgroup(s):
MACgroupaddress:0100-5e01-0101
Hostport(s):total0port.
Vlan(id):10.
Total1IPGroup(s).
Total1IPSource(s).
Total1MACGroup(s).
Routerport(s):total0port.
IPgroup(s):thefollowingipgroup(s)matchtoonemacgroup.
IPgroupaddress:
(,):
Hostport(s):total1port.
Eth1/2
(D)(00:03:23)
MACgroup(s):
MACgroupaddress:0100-5e01-0101
Hostport(s):total1port.
Eth1/2
Vlan(id):20.
Total1IPGroup(s).
Total1IPSource(s).
Total1MACGroup(s).
Routerport(s):total0port.
IPgroup(s):thefollowingipgroup(s)matchtoonemacgroup.
IPgroupaddress:
(,):
Hostport(s):total1port.
Eth1/4
(D)(00:02:16)
MACgroup(s):
MACgroupaddress:0100-5e01-0101
Hostport(s):total1port.
Eth1/4#查看SwitchC上VLAN30内IGMPSnooping组播组的详细信息。<SwitchC>displayigmp-snoopinggroupvlan30verbose
Total1IPGroup(s).
Total1IPSource(s).
Total1MACGroup(s).
Portflags:D-Dynamicport,S-Staticport,C-Copyport
Subvlanflags:R-RealVLAN,C-CopyVLAN
Vlan(id):30.
Total1IPGroup(s).
Total1IPSource(s).
Total1MACGroup(s).
Routerport(s):total1port.
Eth1/1
(D)(00:01:15)
IPgroup(s):thefollowingipgroup(s)matchtoonemacgroup.
IPgroupaddress:
(,):
Attribute:
Host
Hostport(s):total1port.
Eth1/2
(D)(00:02:35)
MACgroup(s):
MACgroupaddress:0100-5e02-0202
Hostport(s):total1port.
Eth1/2由上可知,SwitchA的端口Ethernet1/2和Ethernet1/4下都有组播组G1的接收者,SwitchC的端口Ethernet1/2下有组播组G2的接收者。(3)
通过使用displayigmpinterface命令可以查看各路由器的主机侧接口上IGMP的配置和运行情况。例如:#查看RouterC的主机侧接口Ethernet1/1上IGMP的配置和运行情况。<RouterC>displayigmpinterfaceethernet1/1
Ethernet1/1():
IGMPisenabled
CurrentIGMPversionis2
ValueofqueryintervalforIGMP(inseconds):60
ValueofotherquerierpresentintervalforIGMP(inseconds):125
ValueofmaximumqueryresponsetimeforIGMP(inseconds):10
QuerierforIGMP:(thisrouter)
Total1IGMPGroupreported由上可知,RouterC的接口Ethernet1/1上运行了IGMPv2,并由该接口作为IGMP查询器。(4)
通过使用displaymsdpbrief命令可以查看路由器之间MSDP对等体建立的情况。例如:#查看RouterB上MSDP对等体的简要信息。<RouterB>displaymsdpbriefMSDPPeerBriefInformationofVPN-Instance:publicnet
Configured
Up
Listen
Connect
Shutdown
Down
1
1
0
0
0
0
Peer'sAddress
State
Up/Downtime
AS
SACount
ResetCount
Up
00:10:17
?
1
0#查看RouterC上MSDP对等体的简要信息。<RouterC>displaymsdpbriefMSDPPeerBriefInformationofVPN-Instance:publicnet
Configured
Up
Listen
Connect
Shutdown
Down
1
1
0
0
0
0
Peer'sAddress
State
Up/Downtime
AS
SACount
ResetCount
Up
00:10:17
?
1
0由上可知,RouterB和RouterC各自的Loopback1接口之间已建立起了MSDP对等体关系。(5)
通过使用displaypimrouting-table命令可以查看路由器上PIM路由表的内容。例如:#查看RouterB上有关组播组的PIM路由表内容。<RouterB>displaypimrouting-table
VPN-Instance:publicnet
Total1(*,G)entry;1(S,G)entry
Totalmatched0(*,G)entry;0(S,G)entry#查看RouterC上有关组播组的PIM路由表内容。<RouterC>displaypimrouting-table
VPN-Instance:publicnet
Total1(*,G)entry;1(S,G)entry
Totalmatched1(*,G)entry;1(S,G)entry
(*,)
RP:(local)
Protocol:pim-sm,Flag:WC
UpTime:00:15:04
Upstreaminterface:Register
Upstreamneighbor:NULL
RPFprimeneighbor:NULL
Downstreaminterface(s)information:
Totalnumberofdownstreams:1
1:Ethernet1/1
Protocol:igmp,UpTime:00:15:04,Expires:-
(00,)
RP:(local)
Protocol:pim-sm,Flag:SPT2MSDPACT
UpTime:00:20:28
Upstreaminterface:Serial2/1
Upstreamneighbor:
RPFprimeneighbor:
Downstreaminterface(s)information:
Totalnumberofdownstreams:1
1:Ethernet1/1
Protocol:pim-sm,UpTime:
-,Expires:
-由上可知,组播组G1当前有效的RP为RouterC的Loopback0接口。4
域间三层组播配置举例4.1
组网需求(1)
需求分析
两个ISP拥有各自的网络:AS100和AS200,AS内部通过OSPF协议互连。AS200中的视频源(Source)通过组播组G()传送节目,AS100和AS200中都有该节目的点播者(Receiver):HostA和HostB。要求在AS内通过使用PIM-SM和IGMP协议实现视频流的组播分发和按需送达。同时根据业务需要,AS100独自构成组播域PIM-SM1,而AS200则划分为两个组播域:PIM-SM2和PIM-SM3。
为了解决组播域之间、以及各AS之间组播信息的交换,要求通过配置MSDP对等体实现各PIM-SM域之间组播源信息的交换,通过配置MBGP协议实现各AS之间组播路由信息的交换。(2)
网络规划设备接口IP地址设备接口IP地址RouterAEth1//24RouterDEth1//24
S2/1/24
S2/1/24
S2/2/24
POS5/1/24
Loop0/32
Loop0/32RouterBS2/1/24RouterES2/1/24
S2/2/24
S2/2/24
Loop0/32
Loop0/32RouterCS2/1/24RouterFEth1//24
S2/2/24
S2/1/24
POS5/1/24
Loop0/32
Loop0/32Source-00/24图3
域间三层组播配置组网图4.2
配置思路(1)
配置域内组播路由:
在所有路由器上都配置OSPF协议,在其各接口上使能PIM-SM协议,并在RouterA和RouterD的主机侧接口上使能IGMP协议;
为了避免物理接口down而导致的网络振荡,将RouterC、RouterD和RouterE各自的Loopback0接口配置为C-BSR和C-RP;
划分PIM-SM域,将RouterC和RouterD各自的POS5/1接口、RouterD和RouterE各自的Serial2/1接口配置为BSR的服务边界(即PIM-SM域的边界)。(2)
配置域间组播路由:
在PIM-SM域的RP之间,即RouterC和RouterD、RouterD和RouterE之间分别建立MSDP对等体关系;
在所有相邻路由器之间建立MBGP对等体关系,即RouterA、RouterB和RouterC两两之间、RouterD和RouterE之间、RouterE和RouterF之间分别建立IBGP/MBGP对等体关系,RouterC和RouterD之间则建立EBGP/MBGP对等体关系。4.3
配置步骤
说明:以下配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下配置不冲突。本文档不严格与具体软、硬件版本对应。
4.3.1
RouterA的配置1.配置步骤#配置OSPF协议。<RouterA>system-view[RouterA]ospf1[RouterA-ospf-1]area[RouterA-ospf-1-area-]network[RouterA-ospf-1-area-]network55[RouterA-ospf-1-area-]network55[RouterA-ospf-1-area-]network55[RouterA-ospf-1-area-]quit[RouterA-ospf-1]quit#使能IP组播路由,在各接口上使能PIM-SM,并在主机侧接口上使能IGMP。[RouterA]multicastrouting-enable[RouterA]interfaceethernet1/1[RouterA-Ethernet1/1]pimsm[RouterA-Ethernet1/1]igmpenable[RouterA-Ethernet1/1]quit[RouterA]interfaceserial2/1[RouterA-Serial2/1]pimsm[RouterA-Serial2/1]quit[RouterA]interfaceserial2/2[RouterA-Serial2/2]pimsm[RouterA-Serial2/2]quit[RouterA]interfaceloopback0[RouterA-LoopBack0]pimsm[RouterA-LoopBack0]quit#配置BGP协议和MBGP对等体,并引入直连和OSPF路由。[RouterA]bgp100[RouterA-bgp]router-id[RouterA-bgp]peeras-number100[RouterA-bgp]peeras-number100[RouterA-bgp]import-routedirect[RouterA-bgp]import-routeospf1[RouterA-bgp]ipv4-familymulticast[RouterA-bgp-af-mul]peerenable[RouterA-bgp-af-mul]peerenable[RouterA-bgp-af-mul]import-routedirect[RouterA-bgp-af-mul]import-routeospf1[RouterA-bgp-af-mul]return2.配置文件<RouterA>displaycurrent-configuration#
sysnameRouterA#
multicastrouting-enable#interfaceEthernet1/1
portlink-moderoute
ipaddress
igmpenable
pimsm#interfaceSerial2/1
link-protocolppp
ipaddress
pimsm#interfaceSerial2/2
link-protocolppp
ipaddress
pimsm#interfaceLoopBack0
ipaddress55
pimsm#bgp100
router-id
import-routedirect
import-routeospf1
undosynchronization
peeras-number100
peeras-number100
#
ipv4-familymulticast
import-routedirect
import-routeospf1
peerenable
peerenable#ospf1
area
network
network55
network55
network55#return4.3.2
RouterB的配置1.配置步骤#配置OSPF协议。<RouterB>system-view[RouterB]ospf1[RouterB-ospf-1]area[RouterB-ospf-1-area-]network[RouterB-ospf-1-area-]network55[RouterB-ospf-1-area-]network55[RouterB-ospf-1-area-]quit[RouterB-ospf-1]quit#使能IP组播路由,并在各接口上使能PIM-SM。[RouterB]multicastrouting-enable[RouterB]interfaceserial2/1[RouterB-Serial2/1]pimsm[RouterB-Serial2/1]quit[RouterB]interfaceserial2/2[RouterB-Serial2/2]pimsm[RouterB-Serial2/2]quit[RouterB]interfaceloopback0[RouterB-LoopBack0]pimsm[RouterB-LoopBack0]quit#配置BGP协议和MBGP对等体,并引入OSPF路由。[RouterB]bgp100[RouterB-bgp]router-id[RouterB-bgp]peeras-number100[RouterB-bgp]peeras-number100[RouterB-bgp]import-routeospf1[RouterB-bgp]ipv4-familymulticast[RouterB-bgp-af-mul]peerenable[RouterB-bgp-af-mul]peerenable[RouterB-bgp-af-mul]import-routeospf1[RouterB-bgp-af-mul]return2.配置文件<RouterB>displaycurrent-configuration#
sysnameRouterB#
multicastrouting-enable#interfaceSerial2/1
link-protocolppp
ipaddress
pimsm#interfaceSerial2/2
link-protocolppp
ipaddress
pimsm#interfaceLoopBack0
ipaddress55
pimsm#bgp100
router-id
import-routeospf1
undosynchronization
peeras-number100
peeras-number100
#
ipv4-familymulticast
import-routeospf1
peerenable
peerenable#ospf1
area
network
network55
network55#return4.3.3
RouterC的配置1.配置步骤#配置OSPF协议。<RouterC>system-view[RouterC]ospf1[RouterC-ospf-1]area[RouterC-ospf-1-area-]network[RouterC-ospf-1-area-]network55[RouterC-ospf-1-area-]network55[RouterC-ospf-1-area-]network55[RouterC-ospf-1-area-]quit[RouterC-ospf-1]quit#使能IP组播路由,并在各接口上使能PIM-SM。[RouterC]multicastrouting-enable[RouterC]interfaceserial2/1[RouterC-Serial2/1]pimsm[RouterC-Serial2/1]quit[RouterC]interfaceserial2/2[RouterC-Serial2/2]pimsm[RouterC-Serial2/2]quit[RouterC]interfacepos5/1[RouterC-Pos5/1]pimsm[RouterC-Pos5/1]quit[RouterC]interfaceloopback0[RouterC-LoopBack0]pimsm[RouterC-LoopBack0]quit#配置BSR的服务边界。[RouterC]interfacepos5/1[RouterC-Pos5/1]pimbsr-boundary[RouterC-Pos5/1]quit#将Loopback0接口配置为C-BSR和C-RP。[RouterC]pim[RouterC-pim]c-bsrloopback0[RouterC-pim]c-rploopback0[RouterC-pim]quit#配置BGP协议和MBGP对等体,并引入OSPF路由。[RouterC]bgp100[RouterC-bgp]router-id[RouterC-bgp]peeras-number100[RouterC-bgp]peeras-number100[RouterC-bgp]peeras-number200[RouterC-bgp]import-routeospf1[RouterC-bgp]ipv4-familymulticast[RouterC-bgp-af-mul]peerenable[RouterC-bgp-af-mul]peerenable[RouterC-bgp-af-mul]peerenable[RouterC-bgp-af-mul]import-routeospf1[RouterC-bgp-af-mul]quit[RouterC-bgp]quit#配置MSDP对等体。[RouterC]msdp[RouterC-msdp]peerconnect-interfacepos5/1[RouterC-msdp]return2.配置文件<RouterC>displaycurrent-configuration#
sysnameRouterC#
multicastrouting-enable#interfaceSerial2/1
link-protocolppp
ipaddress
pimsm#interfaceSerial2/2
link-protocolppp
ipaddress
pimsm#interfacePos5/1
link-protocolppp
ipaddress
pimbsr-boundary
pimsm#interfaceLoopBack0
ipaddress55
pimsm#bgp100
router-id
import-routeospf1
undosynchronization
peeras-number100
peeras-number100
peeras-number200#
ipv4-familymulticast
import-routeospf1
peerenable
peerenable
peerenable#ospf1
area
network
network55
network55
network55#pim
c-bsrLoopBack0
c-rpLoopBack0#msdp
peerconnect-interfacePos5/1#return4.3.4
RouterD的配置1.配置步骤#配置OSPF协议。<RouterD>system-view[RouterD]ospf1[RouterD-ospf-1]area[RouterD-ospf-1-area-]network[RouterD-ospf-1-area-]network55[RouterD-ospf-1-area-]network55[RouterD-ospf-1-area-]network55[RouterD-ospf-1-area-]quit[RouterD-ospf-1]quit#使能IP组播路由,在各接口上使能PIM-SM,并在主机侧接口上使能IGMP。[RouterD]multicastrouting-enable[RouterD]interfaceethernet1/1[RouterD-Ethernet1/1]pimsm[RouterD-Ethernet1/1]igmpenable[RouterD-Ethernet1/1]quit[RouterD]interfaceserial2/1[RouterD-Serial2/1]pimsm[RouterD-Serial2/1]quit[RouterD]interfacepos5/1[RouterD-Pos5/1]pimsm[RouterD-Pos5/1]quit[RouterD]interfaceloopback0[RouterD-LoopBack0]pimsm[RouterD-LoopBack0]quit#配置BSR的服务边界。[RouterD]interfaceserial2/1[RouterD-Serial2/1]pimbsr-boundary[RouterD-Serial2/1]quit[RouterD]interfacepos5/1[RouterD-Pos5/1]pimbsr-boundary[RouterD-Pos5/1]quit#将Loopback0接口配置为C-BSR和C-RP。[RouterD]pim[RouterD-pim]c-bsrloopback0[RouterD-pim]c-rploopback0[RouterD-pim]quit#配置BGP协议和MBGP对等体,并引入直连和OSPF路由。[RouterD]bgp200[RouterD-bgp]router-id[RouterD-bgp]peeras-number100[RouterD-bgp]peeras-number200[RouterD-bgp]import-routedirect[RouterD-bgp]import-routeospf1[RouterD-bgp]ipv4-familymulticast[RouterD-bgp-af-mul]peerenable[RouterD-bgp-af-mul]peerenable[RouterD-bgp-af-mul]import-routedirect[RouterD-bgp-af-mul]import-routeospf1[RouterD-bgp-af-mul]quit[RouterD-bgp]quit#配置MSDP对等体。[RouterD]msdp[RouterD-msdp]peerconnect-interfacepos5/1[RouterD-msdp]peerconnect-interfaceserial2/1[RouterD-msdp]return2.配置文件<RouterD>displaycurrent-configuration#
sysnameRouterD#
multicastrouting-enable#interfaceEthernet1/1
portlink-moderoute
ipaddress
igmpenable
pimsm#interfaceSerial2/1
link-protocolppp
ipaddress
pimbsr-boundary
pimsm#interfacePos5/1
link-protocolppp
ipaddress
pimbsr-boundary
pimsm#interfaceLoopBack0
ipaddress55
pimsm#bgp200
router-id
import-routedirect
import-routeospf1
undosynchronization
peeras-number100
peeras-number200#
ipv4-familymulticast
import-routedirect
import-routeospf1
peerenable
peerenable#ospf1
area
network
network55
network55
network55#pim
c-bsrLoopBack0
c-rpLoopBack0#msdp
peerconnect-interfacePos5/1
peerconnect-interfaceSerial2/1#return4.3.5
RouterE的配置1.配置步骤#配置OSPF协议。<RouterE>system-view[RouterE]ospf1[RouterE-ospf-1]area[RouterE-ospf-1-area-]network[RouterE-ospf-1-area-]network55[RouterE-ospf-1-area-]network55[RouterE-ospf-1-area-]quit[RouterE-ospf-1]quit#使能IP组播路由,并在各接口上使能PIM-SM。[RouterE]multicastrouting-enable[RouterE]interfaceserial2/1[RouterE-Serial2/1]pimsm[RouterE-Serial2/1]quit[RouterE]interfaceserial2/2[RouterE-Serial2/2]pimsm[RouterE-Serial2/2]quit[RouterE]interfaceloopback0[RouterE-LoopBack0]pimsm[RouterE-LoopBack0]quit#配置BSR的服务边界。[RouterE]interfaceserial2/1[RouterE-Serial2/1]pimbsr-boundary[RouterE-Serial2/1]quit#将Loopback0接口配置为C-BSR和C-RP。[RouterE]pim[RouterE-pim]c-bsrloopback0[RouterE-pim]c-rploopback0[RouterE-pim]quit#配置BGP协议和MBGP对等体,并引入OSPF路由。[RouterE]bgp200[RouterE-bgp]router-id[RouterE-bgp]peeras-number200[RouterE-bgp]peeras-number200[RouterE-bgp]import-routeospf1[RouterE-bgp]ipv4-familymulticast[RouterE-bgp-af-mul]peerenable[RouterE-bgp-af-mul]peerenable[RouterE-bgp-af-mul]import-routeospf1[RouterE-bgp-af-mul]quit[RouterE-bgp]quit#配置MSDP对等体。[RouterE]msdp[RouterE-msdp]peerconnect-interfaceserial2/1[RouterE-msdp]return2.配置文件<RouterE>displaycurrent-configuration#
sysnameRouterE#
multicastrouting-enable#interfaceSerial2/1
link-protocolppp
ipaddress
pimbsr-boundary
pimsm#interfaceSerial2/2
link-protocolppp
ipaddress
pimsm#interfaceLoopBack0
ipaddress55
pimsm#bgp200
router-id
import-routeospf1
undosynchronization
peeras-number200
peeras-number200#
ipv4-familymulticast
import-routeospf1
peer
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论