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

本站点使用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配置和组播网管配置。
评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
配置基于PIM的Anycast RP示例

配置基于PIM的Anycast RP示例

组网需求

图4-28所示,HostA和HostB在网络中通过组播方式接收视频点播信息。当网络中负载较大或流量过于集中时,出现过RP压力过大、RP失效后路由收敛较慢等问题。HostB希望能够就近加入RP,从而快速接收到组播数据。

图4-28 配置基于PIM的Anycast RP组网图

配置思路

配置基于PIM的Anycast RP,可以缓解单个RP的压力,并实现主机的就近加入。

  1. 配置各交换机的接口IP地址和单播路由,实现网络层互通。

  2. 配置基本组播功能,实现组播数据可以转发。包括使能组播功能、在各接口启动PIM-SM并配置C-BSR和C-RP、在主机侧接口使能IGMP。

  3. 配置Anycast RP功能,使HostB能够快速接收组播数据。包括配置SwitchC和SwitchD为Anycast RP对等体,HostB就近加入SwitchD,SwitchA收到Source的组播数据后,封装成注册消息向SwitchC注册,SwitchC收到注册报文后,将注册报文转发给SwitchD,HostB可以收到组播源的数据。

操作步骤

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

    按照图4-28,在PIM-SM域内,配置各交换机接口的IP地址和掩码,配置各交换机之间采用OSPF进行互连。

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

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

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

    [~SwitchC] interface vlanif 10
    [*SwitchC-Vlanif10] ip address 192.168.1.2 24
    [*SwitchC-Vlanif10] quit
    [*SwitchC] interface vlanif 21
    [*SwitchC-Vlanif21] ip address 10.110.2.1 24
    [*SwitchC-Vlanif21] quit
    [*SwitchC] interface vlanif 30
    [*SwitchC-Vlanif30] ip address 192.168.3.1 24
    [*SwitchC-Vlanif30] quit
    [*SwitchC] interface loopback 0
    [*SwitchC-LoopBack0] ip address 192.168.150.1 32
    [*SwitchC-LoopBack0] quit
    [*SwitchC] interface loopback 1
    [*SwitchC-LoopBack1] ip address 192.168.150.2 32
    [*SwitchC-LoopBack1] quit
    [*SwitchC] commit

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

    [~SwitchC] ospf
    [*SwitchC-ospf-1] area 0
    [*SwitchC-ospf-1-area-0.0.0.0] network 10.110.2.0 0.0.0.255
    [*SwitchC-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [*SwitchC-ospf-1-area-0.0.0.0] network 192.168.3.0 0.0.0.255
    [*SwitchC-ospf-1-area-0.0.0.0] network 192.168.150.1 0.0.0.0
    [*SwitchC-ospf-1-area-0.0.0.0] network 192.168.150.2 0.0.0.0
    [*SwitchC-ospf-1-area-0.0.0.0] commit
    [~SwitchC-ospf-1-area-0.0.0.0] quit
    [~SwitchC-ospf-1] quit

  2. 在各交换机上配置组播基本功能。

    # 在SwitchC上使能组播路由功能,在所有接口上使能PIM-SM。SwitchA、SwitchB和SwitchD的配置与SwitchC类似,配置过程略。

    [~SwitchC] multicast routing-enable
    [*SwitchC] interface vlanif 10
    [*SwitchC-Vlanif10] pim sm
    [*SwitchC-Vlanif10] quit
    [*SwitchC] interface vlanif 21
    [*SwitchC-Vlanif21] pim sm
    [*SwitchC-Vlanif21] quit
    [*SwitchC] interface vlanif 30
    [*SwitchC-Vlanif30] pim sm
    [*SwitchC-Vlanif30] quit
    [*SwitchC] interface loopback 0
    [*SwitchC-LoopBack0] pim sm
    [*SwitchC-LoopBack0] quit
    [*SwitchC] interface loopback 1
    [*SwitchC-LoopBack1] pim sm
    [*SwitchC-LoopBack1] quit
    [*SwitchC] commit
    

    # 配置SwitchC和SwitchD的Loopback0接口为C-RP和C-BSR。SwitchD的配置与SwitchC类似,配置过程略。

    [~SwitchC] pim
    [*SwitchC-pim] c-bsr loopback 0
    [*SwitchC-pim] c-rp loopback 0
    [*SwitchC-pim] commit
    [~SwitchC-pim] quit
    

    # 在SwitchC和SwitchD与主机侧相连的接口使能IGMP功能。SwitchD的配置与SwitchC类似,配置过程略。

    [~SwitchC] interface vlanif 21
    [~SwitchC-Vlanif21] igmp enable
    [*SwitchC-Vlanif21] commit
    [~SwitchC-Vlanif21] quit
    

  3. 配置Anycast RP功能。

    # 配置SwitchC和SwitchD的Loopback0接口为Anycast RP,并配置SwitchC和SwitchD的Loopback1接口为各自的Anycast RP本地地址。SwitchD的配置与SwitchC类似,配置过程略。

    [~SwitchC] pim
    [~SwitchC-pim] anycast-rp 192.168.150.1
    [*SwitchC-pim-anycast-rp-192.168.150.1] local-address 192.168.150.2
    [*SwitchC-pim-anycast-rp-192.168.150.1] commit
    [~SwitchC-pim-anycast-rp-192.168.150.1] quit
    [~SwitchC-pim] quit
    

    # 配置SwitchC和SwitchD互为Anycast RP对等体。

    [~SwitchC-pim] anycast-rp 192.168.150.1
    [~SwitchC-pim-anycast-rp-192.168.150.1] peer 192.168.150.3
    [*SwitchC-pim-anycast-rp-192.168.150.1] commit
    [~SwitchC-pim-anycast-rp-192.168.150.1] quit
    [~SwitchC-pim] quit
    
    [~SwitchD-pim] anycast-rp 192.168.150.1
    [~SwitchD-pim-anycast-rp-192.168.150.1] peer 192.168.150.2
    [*SwitchD-pim-anycast-rp-192.168.150.1] commit
    [~SwitchD-pim-anycast-rp-192.168.150.1] quit
    [~SwitchD-pim] quit
    

  4. 验证配置结果。

    # 通过使用display pim rp-info命令可以查看SwitchC和SwitchD上的RP信息。

    [~SwitchC] display pim rp-info
     VPN-Instance: public net
     PIM-SM BSR RP Number:1
     Group/MaskLen: 224.0.0.0/4
         RP: 192.168.150.1 (local)
         Priority: 0
         Uptime: 00:45:19
         Expires: 00:02:11
         BIDIR: N
    
    [~SwitchD] display pim rp-info
     VPN-Instance: public net
     PIM-SM BSR RP Number:1
     Group/MaskLen: 224.0.0.0/4
         RP: 192.168.150.1 (local)
         Priority: 0
         Uptime: 02:27:56
         Expires: 00:01:39
         BIDIR: N
    

    由以上显示信息可知,SwitchC和SwitchD都作为网络中的RP,可以相互转发组播源注册信息。

    # 通过使用display pim routing-table命令可以查看交换机上的PIM表项。PIM-SM域内组播源Source(10.110.1.2/24)向组播组G(226.1.1.1)发送组播信息,用户HostB加入组播组G,接收发往组G的组播数据。Source向SwitchC注册,HostB向SwitchD发起加入。

    [~SwitchC] display pim routing-table
     VPN-Instance: public net
     Total 0 (*, G) entry; 1 (S, G) entry
    
     (10.110.1.2, 226.1.1.1)
         RP: 192.168.150.1 (local)
         Protocol: pim-sm, Flag: SPT 2MSDP ACT
         UpTime: 00:00:38
         Upstream interface: Vlanif10
             Upstream neighbor: NULL
             RPF prime neighbor: NULL
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif30
                 Protocol: pim-sm, UpTime: 00:01:15, Expires: -
    
    
    [~SwitchD] display pim routing-table
     VPN-Instance: public net
     Total 1 (*, G) entry; 1 (S, G) entry
    
     (*, 226.1.1.1)
         RP: 192.168.150.1 (local)
         Protocol: pim-sm, Flag: WC
         UpTime: 00:01:25
         Upstream interface: Register
             Upstream neighbor: NULL
             RPF prime neighbor: NULL
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif31
                 Protocol: igmp, UpTime: 00:01:25, Expires: -
    
     (10.110.1.2, 226.1.1.1)
         RP: 192.168.150.1 (local)
         Protocol: pim-sm, Flag: SPT 2MSDP ACT
         UpTime: 00:00:02
         Upstream interface: Vlanif30
             Upstream neighbor: 192.168.3.1
             RPF prime neighbor: 192.168.3.1
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif31
                 Protocol: pim-sm, UpTime: 00:00:02, Expires: -

配置文件

  • SwitchA的配置文件

    #
    sysname SwitchA
    #
    vlan batch 10 to 11
    #
    multicast routing-enable
    #
    interface Vlanif10
     ip address 192.168.1.1 255.255.255.0
     pim sm
    #
    interface Vlanif11
     ip address 10.110.1.1 255.255.255.0
     pim sm
    #
    interface 10GE1/0/1
     port default vlan 11
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    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
    #
    return
  • SwitchB的配置文件

    #
    sysname SwitchB
    #
    vlan batch 20
    #
    multicast routing-enable
    #
    interface Vlanif20
     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 20
    #
    ospf 1
     area 0.0.0.0
      network 192.168.2.0 0.0.0.255
    #
    return
  • SwitchC的配置文件

    #
    sysname SwitchC
    #
    vlan batch 10 21 30
    #
    multicast routing-enable
    #
    interface Vlanif10
     ip address 192.168.1.2 255.255.255.0
     pim sm
    #
    interface Vlanif21
     ip address 10.110.2.1 255.255.255.0
     pim sm
     igmp enable
    #
    interface Vlanif30
     ip address 192.168.3.1 255.255.255.0
     pim sm
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/0/3
     port default vlan 21
    #
    interface LoopBack0
     ip address 192.168.150.1 255.255.255.255
     pim sm
    #
    interface LoopBack1
     ip address 192.168.150.2 255.255.255.255
     pim sm
    #
    ospf 1
     area 0.0.0.0
      network 10.110.2.0 0.0.0.255
      network 192.168.1.0 0.0.0.255
      network 192.168.3.0 0.0.0.255
      network 192.168.150.1 0.0.0.0
      network 192.168.150.2 0.0.0.0
    #
    pim
     c-bsr LoopBack0
     c-rp LoopBack0
     anycast-rp 192.168.150.1
      local-address 192.168.150.2
      peer 192.168.150.3
    #
    return
  • SwitchD的配置文件

    #
    sysname SwitchD
    #
    vlan batch 20 30 to 31
    #
    multicast routing-enable
    #
    interface Vlanif20
     ip address 192.168.2.2 255.255.255.0
     pim sm
    #
    interface Vlanif30
     ip address 192.168.3.2 255.255.255.0
     pim sm
    #
    interface Vlanif31
     ip address 10.110.3.1 255.255.255.0
     pim sm
     igmp enable
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface 10GE1/0/2
     port default vlan 31
    #
    interface 10GE1/0/3
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface LoopBack0
     ip address 192.168.150.1 255.255.255.255
     pim sm
    #
    interface LoopBack1
     ip address 192.168.150.3 255.255.255.255
     pim sm
    #
    ospf 1
     area 0.0.0.0
      network 10.110.3.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
      network 192.168.3.0 0.0.0.255
      network 192.168.150.1 0.0.0.0
      network 192.168.150.3 0.0.0.0
    #
    pim
     c-bsr LoopBack0
     c-rp LoopBack0
     anycast-rp 192.168.150.1
      local-address 192.168.150.3
      peer 192.168.150.2
    #
    return
    
翻译
下载文档
更新时间:2019-03-20

文档编号:EDOC1000166616

浏览量:63670

下载量:242

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