所选语种没有对应资源,请选择:

本站点使用Cookies,继续浏览表示您同意我们使用Cookies。Cookies和隐私政策>

提示

尊敬的用户,您的IE浏览器版本过低,为获取更好的浏览体验,请升级您的IE浏览器。

升级

CloudEngine 8800, 7800, 6800, 5800 V200R002C50 配置指南-IP组播

本文档介绍了IP组播的配置,具体包括IP组播基础、IGMP配置、MLD配置、PIM(IPv4)配置、PIM(IPv6)配置、MSDP配置、组播VPN配置、组播路由管理(IPv4)配置、组播路由管理(IPv6)配置、IGMP Snooping配置、MLD Snooping配置、静态组播MAC地址配置、组播VLAN配置和组播网管配置。
评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
配置ASM的PIM-SM网络示例

配置ASM的PIM-SM网络示例

组网需求

图4-26所示,该网络接入了Internet。要求通过在交换机配置PIM-SM协议,为网络中的用户主机提供ASM服务,使得加入同一组播组的所有用户主机能够接收任意源发往该组的视频点播信息。

图4-26 配置ASM模型的PIM-SM域内组播组网图

配置思路

  1. 配置交换机接口IP地址和单播路由协议。组播域内路由协议PIM依赖单播路由协议,单播路由正常是组播协议正常工作的基础。

  2. 在所有提供组播服务的交换机上使能组播功能。使能组播功能是配置PIM-SM的前提。

  3. 在交换机所有接口上使能PIM-SM功能。使能PIM-SM功能之后才能配置PIM-SM的其他功能。

  4. 在与主机侧相连的交换机接口上使能IGMP。接收者能通过发送IGMP消息自由加入或者离开某个组播组。叶结点交换机通过IGMP协议来维护组成员关系列表。

  5. 在与主机侧相连的交换机接口上使能PIM Silent,防止恶意主机模拟发送PIM Hello报文,增加PIM-SM域的安全性。

    说明:

    如果用户主机所在网段相连着多台交换机,那么这些交换机的用户主机侧接口不能使能PIM Silent,如本图中的SwitchB、SwitchC的位置。

  6. 配置RP。在PIM-SM域中,RP是提供ASM服务的核心,是转发组播数据的中转站。建议RP的位置配置在组播流量分支较多的交换机上,如本图中的SwitchE的位置。

  7. 在与Internet相连的接口上配置BSR边界,自举报文不能通过该边界,使BSR只为该PIM-SM域服务,增加组播可控性。

操作步骤

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

    按照图4-26配置各交换机接口的IP地址和掩码,配置各交换机间采用OSPF进行互连,确保网络中各交换机间能够在网络层互通,并且之间能够借助单播路由协议实现动态路由更新。

    # 配置SwitchA的接口加入VLAN。SwitchB、SwitchC、SwitchD和SwitchE的配置与SwitchA相似,配置过程略。

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] vlan batch 10 20 30
    [*SwitchA] interface 10ge 1/0/1
    [*SwitchA-10GE1/0/1] port link-type trunk
    [*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
    [*SwitchA-10GE1/0/1] quit
    [*SwitchA] interface 10ge 1/0/2
    [*SwitchA-10GE1/0/2] port default vlan 20
    [*SwitchA-10GE1/0/2] quit
    [*SwitchA] interface 10ge 1/0/3
    [*SwitchA-10GE1/0/3] port link-type trunk
    [*SwitchA-10GE1/0/3] port trunk allow-pass vlan 30
    [*SwitchA-10GE1/0/3] quit
    [*SwitchA] commit
    

    # 配置SwitchA上VLANIF接口的IP地址。SwitchB、SwitchC、SwitchD和SwitchE的配置与SwitchA相似,配置过程略。

    [~SwitchA] interface vlanif 10
    [*SwitchA-Vlanif10] ip address 192.168.5.1 24
    [*SwitchA-Vlanif10] quit
    [*SwitchA] interface vlanif 20
    [*SwitchA-Vlanif20] ip address 10.110.1.1 24
    [*SwitchA-Vlanif20] quit
    [*SwitchA] interface vlanif 30
    [*SwitchA-Vlanif30] ip address 192.168.1.1 24
    [*SwitchA-Vlanif30] quit
    [*SwitchA] commit

    # 配置SwitchA上的路由协议。SwitchB、SwitchC、SwitchD和SwitchE的配置与SwitchA相似,配置过程略。

    [~SwitchA] ospf
    [*SwitchA-ospf-1] area 0
    [*SwitchA-ospf-1-area-0.0.0.0] network 10.110.1.0 0.0.0.255
    [*SwitchA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [*SwitchA-ospf-1-area-0.0.0.0] network 192.168.5.0 0.0.0.255
    [*SwitchA-ospf-1-area-0.0.0.0] commit
    [~SwitchA-ospf-1-area-0.0.0.0] quit
    [~SwitchA-ospf-1] quit

  2. 使能组播功能,在各接口上使能PIM-SM功能。

    # 在所有交换机使能组播功能,在各接口上使能PIM-SM功能。SwitchB、SwitchC、SwitchD和SwitchE的配置与SwitchA相似,配置过程略。

    [~SwitchA] multicast routing-enable
    [*SwitchA] interface vlanif 10
    [*SwitchA-Vlanif10] pim sm
    [*SwitchA-Vlanif10] commit
    [~SwitchA-Vlanif10] quit
    [~SwitchA] interface vlanif 20
    [~SwitchA-Vlanif20] pim sm
    [*SwitchA-Vlanif20] commit
    [~SwitchA-Vlanif20] quit
    [~SwitchA] interface vlanif 30
    [~SwitchA-Vlanif30] pim sm
    [*SwitchA-Vlanif30] commit
    [~SwitchA-Vlanif30] quit
    

  3. 在连接用户主机的接口上使能IGMP功能。

    # 在SwitchA连接用户主机的接口上使能IGMP功能。SwitchB和SwitchC的配置与SwitchA相似,配置过程略。

    [~SwitchA] interface vlanif 20
    [~SwitchA-Vlanif20] igmp enable
    [*SwitchA-Vlanif20] commit
    [~SwitchA-Vlanif20] quit
    

  4. SwitchA接口上使能PIM Silent。

    [~SwitchA] interface vlanif 20
    [~SwitchA-Vlanif20] pim silent
    [*SwitchA-Vlanif20] commit
    [~SwitchA-Vlanif20] quit
    

  5. 配置RP。

    说明:

    配置RP有两种方式:静态RP和动态RP两种。可以同时配置,也可以只配置其中一种。同时配置两种RP时,可以通过参数调整优先选择哪种RP。

    本实例同时配置两种RP,默认优选动态RP,静态RP作为备份。

    # 配置动态RP。需要将PIM-SM域的一个或多个交换机上配置为C-RP和C-BSR。本例中指定SwitchE同时为C-RP和C-BSR,在SwitchE上配置RP服务的组地址范围,及C-BSR和C-RP所在接口位置。

    [~SwitchE] acl number 2008
    [*SwitchE-acl4-basic-2008] rule permit source 225.1.1.0 0.0.0.255
    [*SwitchE-acl4-basic-2008] commit
    [~SwitchE-acl4-basic-2008] quit
    [~SwitchE] pim
    [*SwitchE-pim] c-bsr vlanif 60 
    [*SwitchE-pim] c-rp vlanif 60 group-policy 2008
    [*SwitchE-pim] commit
    [~SwitchE-pim] quit
    

    # 配置静态RP。需要在所有交换机上指定静态RP的地址,在SwitchA上配置如下。SwitchB、SwitchC、SwitchD和SwitchE的配置与SwitchA相似,配置过程略。

    说明:

    如果命令static-rp X.X.X.X后面选择参数preferred,优先选择静态RP作为本PIM-SM域的RP。

    [~SwitchA] pim
    [*SwitchA-pim] static-rp 192.168.2.2
    [*SwitchA-pim] commit
    [~SwitchA-pim] quit

  6. SwitchD与Internet相连的接口上配置BSR边界。

    [~SwitchD] interface vlanif 70
    [~SwitchD-Vlanif70] pim bsr-boundary
    [*SwitchD-Vlanif70] commit
    [~SwitchD-Vlanif70] quit

  7. 验证配置结果。

    # 通过使用display pim interface命令可以查看接口上PIM的配置和运行情况。例如SwitchC上PIM的显示信息如下:

    [~SwitchC] display pim interface
     VPN-Instance: public net
     Interface           State NbrCnt HelloInt     DR-Pri     DR-Address      
     Vlanif40            up         1       30          1     10.110.2.2 (local) 
     Vlanif50            up         1       30          1     192.168.3.2 

    # 通过使用display pim bsr-info命令可以查看交换机上BSR选举的信息。例如SwitchA和SwitchE上BSR信息分别如下(SwitchE上还显示C-BSR信息):

    [~SwitchA] display pim bsr-info
     VPN-Instance: public net
     Elected AdminScoped BSR Count: 0
     Elected BSR Address: 192.168.4.2
         Priority: 0
         Hash mask length: 30
         State: Accept Preferred
         Scope: Not scoped
         Uptime: 01:40:40
         Expires: 00:01:42
         C-RP Count: 1
    
    
    [~SwitchE] display pim bsr-info
     VPN-Instance: public net
     Elected AdminScoped BSR Count: 0
     Elected BSR Address: 192.168.4.2
         Priority: 0
         Hash mask length: 30
         State: Elected
         Scope: Not scoped
         Uptime: 00:00:18
         Next BSR message scheduled at: 00:01:42
         C-RP Count: 1
     Candidate AdminScoped BSR Count: 0
     Candidate BSR Address: 192.168.4.2
         Priority: 0
         Hash mask length: 30
         State: Elected
         Scope: Not scoped   
         Wait to be BSR: 0

    # 通过使用display pim rp-info命令可以查看Switch上获取的RP信息。例如SwitchA上RP信息如下:

    [~SwitchA] display pim rp-info
     VPN-Instance: public net
     PIM-SM BSR RP Number:1
     Group/MaskLen: 225.1.1.0/24
         RP: 192.168.4.2
         Priority: 0
         Uptime: 00:45:13
         Expires: 00:02:17
         BIDIR: N 
     PIM SM static RP Number:1
         Static RP: 192.168.2.2   
             BIDIR: N 
    

    # 通过使用display pim routing-table命令可以查看PIM协议组播路由表。组播源(10.110.3.100/24)向组播组(225.1.1.1/24)发送信息,HostA、HostB都加入了组播组(225.1.1.1/24)。显示信息如下:

    说明:

    缺省情况下,组成员端DR在收到组播源发来的第一份组播数据后就会触发SPT切换,新建(S,G)路由表项。因此,交换机上显示的(S,G)路由表项一般都是SPT切换后的(S,G)路由表项。

    [~SwitchA] display pim routing-table
    VPN-Instance: public net
     Total 1 (*, G) entry; 1 (S, G) entry
     
    (*, 225.1.1.1)
         RP: 192.168.4.2
         Protocol: pim-sm, Flag: WC
         UpTime: 00:13:46
         Upstream interface: Vlanif30 
             Upstream neighbor: 192.168.1.2
             RPF prime neighbor: 192.168.1.2
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif20
                 Protocol: igmp, UpTime: 00:13:46, Expires:-
     
    (10.110.3.100, 225.1.1.1)
         RP: 192.168.4.2
         Protocol: pim-sm, Flag: SPT ACT
         UpTime: 00:01:42
         Upstream interface: Vlanif10
             Upstream neighbor: 192.168.5.2
             RPF prime neighbor: 192.168.5.2
        Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif20
                 Protocol: pim-sm, UpTime: 00:01:42, Expires:-
    
    
    [~SwitchB] display pim routing-table
    VPN-Instance: public net
     Total 1 (*, G) entry; 1 (S, G) entry
     
    (*, 225.1.1.1)
         RP: 192.168.4.2
         Protocol: pim-sm, Flag: WC
         UpTime: 00:10:12
         Upstream interface: Vlanif90 
             Upstream neighbor: 192.168.2.2
             RPF prime neighbor: 192.168.2.2
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif40
                 Protocol: igmp, UpTime: 00:10:12, Expires:-
     
    (10.110.3.100, 225.1.1.1)
         RP: 192.168.4.2
         Protocol: pim-sm, Flag: 
         UpTime: 00:00:42
         Upstream interface: Vlanif90
             Upstream neighbor: 192.168.2.2
             RPF prime neighbor: 192.168.2.2
        Downstream interface(s) information:
         Total number of downstreams: none
    
    
    [~SwitchC] display pim routing-table
    VPN-Instance: public net
     Total 1 (*, G) entry; 1 (S, G) entry
     
    (*, 225.1.1.1)
         RP: 192.168.4.2
         Protocol: pim-sm, Flag: WC
         UpTime: 00:10:12
         Upstream interface: Vlanif50 
             Upstream neighbor: 192.168.3.2
             RPF prime neighbor: 192.168.3.2
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif40
                 Protocol: igmp, UpTime: 00:10:12, Expires:-
    
     (10.110.3.100, 225.1.1.1)
         Protocol: pim-sm, Flag: SPT ACT
         UpTime: 00:01:25
         Upstream interface: Vlanif50
             Upstream neighbor: 192.168.3.2
             RPF prime neighbor: 192.168.3.2
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif40
                 Protocol: pim-sm, UpTime: 00:01:25, Expires:-
    
    
    [~SwitchD] display pim routing-table
    VPN-Instance: public net
     Total 0 (*, G) entry; 2 (S, G) entry
     
     (10.110.3.100, 225.1.1.1)
         RP: 192.168.4.2
         Protocol: pim-sm, Flag: SPT LOC ACT
         UpTime: 00:00:42
         Upstream interface: Vlanif80
             Upstream neighbor: NULL
             RPF prime neighbor: NULL
         Downstream interface(s) information:
         Total number of downstreams: 2
             1: Vlanif30
                 Protocol: pim-sm, UpTime: 00:00:42, Expires:-
             2: Vlanif60
                 Protocol: pim-sm, UpTime: 00:00:42, Expires:-
    
    
    [~SwitchE] display pim routing-table
    VPN-Instance: public net
     Total 1 (*, G) entry; 1 (S, G) entry
     
     (*, 225.1.1.1)
         RP: 192.168.4.2 (local)
         Protocol: pim-sm, Flag: WC
         UpTime: 00:13:16
         Upstream interface: Register
             Upstream neighbor: 192.168.4.1
             RPF prime neighbor: 192.168.4.1
         Downstream interface(s) information:
         Total number of downstreams: 2
             1: Vlanif10
                 Protocol: pim-sm, UpTime: 00:13:16, Expires: 00:03:22
             1: Vlanif90
                 Protocol: pim-sm, UpTime: 00:13:16, Expires: 00:03:22
     
    (10.110.3.100, 225.1.1.1)
         Protocol: pim-sm, Flag: SPT ACT
         UpTime: 00:01:22
         Upstream interface: Vlanif60
             Upstream neighbor: 192.168.4.1
             RPF prime neighbor: 192.168.4.1
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif50
                 Protocol: pim-sm, UpTime: 00:01:22, Expires:-
    

配置文件

  • SwitchA的配置文件

    #
    sysname SwitchA
    #
    vlan batch 10 20 30
    #
    multicast routing-enable
    #
    interface Vlanif10
     ip address 192.168.5.1 255.255.255.0
     pim sm
    #
    interface Vlanif20
     ip address 10.110.1.1 255.255.255.0
     pim silent
     pim sm 
     igmp enable
    #
    interface Vlanif30
     ip address 192.168.1.1 255.255.255.0
     pim sm
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/0/2
     port default vlan 20
    #
    interface 10GE1/0/3
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    ospf 1
     area 0.0.0.0
      network 10.110.1.0 0.0.0.255
      network 192.168.1.0 0.0.0.255
      network 192.168.5.0 0.0.0.255
    #
    pim
     static-rp 192.168.2.2
    #
    return
  • SwitchB的配置文件

    #
    sysname SwitchB
    #
    vlan batch 40 90
    #
    multicast routing-enable
    #
    interface Vlanif40
     ip address 10.110.2.1 255.255.255.0
     pim sm
     igmp enable
    #
    interface Vlanif90
     ip address 192.168.2.1 255.255.255.0
     pim sm 
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 90
    #
    interface 10GE1/0/2
     port default vlan 40
    #
    ospf 1
     area 0.0.0.0
      network 10.110.2.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    pim
     static-rp 192.168.2.2
    #
    return
  • SwitchC的配置文件

    #
    sysname SwitchC
    #
    vlan batch 40 50
    #
    multicast routing-enable
    #
    interface Vlanif40
     ip address 10.110.2.2 255.255.255.0
     pim sm 
     igmp enable
    #
    interface Vlanif50
     ip address 192.168.3.1 255.255.255.0
     pim sm
    #
    interface 10GE1/0/1
     port default vlan 40
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    ospf 1
     area 0.0.0.0
      network 10.110.2.0 0.0.0.255
      network 192.168.3.0 0.0.0.255
    #
    pim
     static-rp 192.168.2.2
    #
    return
  • SwitchD的配置文件

    #
    sysname SwitchD
    #
    vlan batch 30 60 70 80
    #
    multicast routing-enable
    #
    interface Vlanif30
     ip address 192.168.1.2 255.255.255.0
     pim sm
    #
    interface Vlanif60
     ip address 192.168.4.1 255.255.255.0
     pim sm
    #
    interface Vlanif70
     ip address 10.110.4.1 255.255.255.0
     pim bsr-boundary
     pim sm
    #
    interface Vlanif80
     ip address 10.110.3.1 255.255.255.0
     pim sm
    #
    interface 10GE1/0/1
     port default vlan 80
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 70
    #
    interface 10GE1/0/3
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface 10GE1/0/4
     port link-type trunk
     port trunk allow-pass vlan 60
    #
    ospf 1
     area 0.0.0.0
      network 10.110.3.0 0.0.0.255
      network 10.110.4.0 0.0.0.255
      network 192.168.1.0 0.0.0.255
      network 192.168.4.0 0.0.0.255
    #
    pim
     static-rp 192.168.2.2 
    #
    return
  • SwitchE的配置文件

    #
    sysname SwitchE
    #
    vlan batch 10 50 60 90
    #
    multicast routing-enable
    #
    acl number 2008
     rule 5 permit source 225.1.1.0 0.0.0.255
    #
    interface Vlanif10
     ip address 192.168.5.2 255.255.255.0
     pim sm
    #
    interface Vlanif50
     ip address 192.168.3.2 255.255.255.0
     pim sm
    #
    interface Vlanif60
     ip address 192.168.4.2 255.255.255.0
     pim sm
    #
    interface Vlanif90
     ip address 192.168.2.2 255.255.255.0
     pim sm
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    interface 10GE1/0/3
     port link-type trunk
     port trunk allow-pass vlan 90
    #
    interface 10GE1/0/4
     port link-type trunk
     port trunk allow-pass vlan 60
    #
    ospf 1
     area 0.0.0.0
      network 192.168.2.0 0.0.0.255
      network 192.168.3.0 0.0.0.255
      network 192.168.4.0 0.0.0.255
      network 192.168.5.0 0.0.0.255
    #
    pim
     c-bsr Vlanif60
     c-rp Vlanif60 group-policy 2008
     static-rp 192.168.2.2 
    #
    return
翻译
下载文档
更新时间:2019-03-20

文档编号:EDOC1000166616

浏览量:66062

下载量:245

平均得分:
本文档适用于这些产品
相关文档
相关版本
Share
上一页 下一页