• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

08-IP组播配置指导

目录

04-组播VLAN配置

本章节下载 04-组播VLAN配置  (218.37 KB)

04-组播VLAN配置

目  录

1 组播VLAN······································································································································ 1-1

1.1 组播VLAN简介······················································································································· 1-1

1.2 组播VLAN配置任务简介·········································································································· 1-2

1.3 配置组播VLAN························································································································ 1-2

1.3.1 配置准备······················································································································· 1-2

1.3.2 配置组播VLAN·············································································································· 1-3

1.4 配置组播VLAN内IGMP Snooping转发表项的最大数量····························································· 1-3

1.5 组播VLAN显示和维护············································································································· 1-4

1.6 组播VLAN典型配置举例·········································································································· 1-4

 


1 组播VLAN

说明

在本章中,设备作为二层设备使用(组网图中用Switch表示),三层设备(组网图中用Router表示)的相关配置以H3C路由器产品为例。

 

1.1  组播VLAN简介

图1-1所示,在传统的组播点播方式下,当属于不同VLAN的主机Host A、Host B和Host C同时点播同一组播组时,三层设备(Router A)需要把组播数据在每个用户VLAN(即主机所属的VLAN)内都复制一份发送给二层设备(Switch A)。这样既造成了带宽的浪费,也给三层设备增加了额外的负担。

图1-1 未运行组播VLAN时的组播数据传输

 

可以使用组播VLAN功能解决这个问题。在二层设备上配置了组播VLAN后,三层设备只需把组播数据在组播VLAN内复制一份发送给二层设备,而不必在每个用户VLAN内都复制一份,从而节省了网络带宽,也减轻了三层设备的负担。

目前设备只支持基于子VLAN的组播VLAN:

图1-2所示,接收者主机Host A、Host B和Host C分属不同的用户VLAN。在Switch A上配置VLAN 10为组播VLAN,将所有的用户VLAN都配置为该组播VLAN的子VLAN,并在组播VLAN内使能IGMP Snooping。

图1-2 基于子VLAN的组播VLAN示意图

 

配置完成后,IGMP Snooping将在组播VLAN中对路由器端口进行维护,而在各子VLAN中对成员端口进行维护。这样,Router A只需把组播数据在组播VLAN内复制一份发送给Switch A即可,Switch A会将其分发给该组播VLAN内那些有接收者的子VLAN。

说明

·     有关IGMP Snooping的相关配置,以及路由器端口和成员端口的详细介绍,请参见“IP组播配置指导”中的“IGMP Snooping”。

·     有关VLAN Tag的详细介绍,请参见“二层技术-以太网交换配置指导”中的“VLAN”。

 

1.2  组播VLAN配置任务简介

表1-1 组播VLAN配置任务简介

配置任务

说明

详细配置

配置基于子VLAN的组播VLAN

必选

1.3 

配置组播VLAN内IGMP Snooping转发表项的最大数量

可选

1.4 

 

1.3  配置组播VLAN

1.3.1  配置准备

在配置组播VLAN之前,需完成以下任务:

·     创建相应的VLAN

·     在欲配置为组播VLAN的VLAN内使能IGMP Snooping

1.3.2  配置组播VLAN

首先需要把某个VLAN配置为组播VLAN,再将用户VLAN添加到该组播VLAN内,使其成为组播VLAN的子VLAN。

表1-2 配置基于子VLAN的组播VLAN

操作

命令

说明

进入系统视图

system-view

-

配置指定VLAN为组播VLAN,并进入组播VLAN视图

multicast-vlan vlan-id

必选

缺省情况下,VLAN不是组播VLAN

向组播VLAN内添加子VLAN

subvlan vlan-list

必选

缺省情况下,组播VLAN内没有子VLAN

 

说明

·     在已使能了IP组播路由的设备上不允许再配置组播VLAN。

·     要配置为组播VLAN的指定VLAN必须存在。

·     要添加到组播VLAN内的子VLAN必须存在,且不能是组播VLAN或其它组播VLAN的子VLAN。

·     组播VLAN内子VLAN的总数不得超过1024。

 

1.4  配置组播VLAN内IGMP Snooping转发表项的最大数量

用户可以调整组播VLAN内IGMP Snooping转发表项的最大数量,当所有组播VLAN内维护的表项总数达到最大数量后,将不再创建新的表项,直至有表项被老化或被手工删除。

表1-3 配置组播VLAN内IGMP Snooping转发表项的最大数量

操作

命令

说明

进入系统视图

system-view

-

配置组播VLAN内IGMP Snooping转发表项的最大数量

multicast-vlan entry-limit limit

必选

缺省情况下,组播VLAN内IGMP Snooping转发表项的最大数量与系统的工作模式有关,详细说明请参见“基础配置指导/设备管理”中的“配置系统工作模式”

 

说明

在对组播VLAN内IGMP Snooping转发表项的最大数量进行配置时,如果所有组播VLAN内的表项总数已超过了配置值,系统将提示用户删除多余表项,但并不会自动删除任何已存在的表项,同时也不再继续创建新的表项。

 

1.5  组播VLAN显示和维护

在完成上述配置后,在任意视图下执行display命令可以显示配置后组播VLAN的运行情况,通过查看显示信息验证配置的效果。

表1-4 组播VLAN显示和维护

操作

命令

查看组播VLAN的信息

display multicast-vlan [ vlan-id ] [ | { begin | exclude | include } regular-expression ]

 

1.6  组播VLAN典型配置举例

说明

缺省情况下,以太网接口、VLAN接口及聚合接口处于DOWN状态。如果要对这些接口进行配置,请先使用undo shutdown命令使接口状态处于UP

 

1. 组网需求

·     如图1-3所示,Router A通过接口GigabitEthernet3/0/1连接组播源(Source),通过接口GigabitEthernet3/0/2连接Switch A;Router A上运行IGMPv2,Switch A~Switch C上都运行版本2的IGMP Snooping,并由Router A充当IGMP查询器。

·     组播源向组播组224.1.1.1发送组播数据,Host A~Host D都是该组播组的接收者(Receiver),且分别属于VLAN 2~VLAN 5。

·     通过在Switch A上配置基于子VLAN的组播VLAN,使Router A通过组播VLAN向Switch A下分属不同用户VLAN的主机分发组播数据。

2. 组网图

图1-3 基于子VLAN的组播VLAN配置组网图

 

3. 配置步骤

配置IP地址

请按照图1-3配置各接口的IP地址和子网掩码,具体配置过程略。

配置Router A

# 使能IP组播路由,在各三层接口上使能PIM-DM,并在主机侧接口GigabitEthernet3/0/2上使能IGMP。

<RouterA> system-view

[RouterA] multicast routing-enable

[RouterA] interface Gigabitethernet 3/0/1

[RouterA-GigabitEthernet3/0/1]port link-mode route

[RouterA-GigabitEthernet3/0/1] pim dm

[RouterA-GigabitEthernet3/0/1] quit

[RouterA] interface GigabitEthernet 3/0/2

[RouterA-GigabitEthernet3/0/2]port link-mode route

[RouterA-GigabitEthernet3/0/2] pim dm

[RouterA-GigabitEthernet3/0/2] igmp enable

配置Switch A

# 全局使能IGMP Snooping。

<SwitchA> system-view

[SwitchA] igmp-snooping

[SwitchA-igmp-snooping] quit

# 创建VLAN 2~VLAN 5。

[SwitchA] vlan 2 to 5

# 配置端口GigabitEthernet3/0/2为Trunk端口,并允许VLAN 2和VLAN 3通过。

[SwitchA] interface GigabitEthernet 3/0/2

[SwitchA-GigabitEthernet3/0/2] port link-type trunk

[SwitchA-GigabitEthernet3/0/2] port trunk permit vlan 2 3

[SwitchA-GigabitEthernet3/0/2] quit

# 配置端口GigabitEthernet3/0/3为Trunk端口,并允许VLAN 4和VLAN 5通过。

[SwitchA] interface GigabitEthernet 3/0/3

[SwitchA-GigabitEthernet3/0/3] port link-type trunk

[SwitchA-GigabitEthernet3/0/3] port trunk permit vlan 4 5

[SwitchA-GigabitEthernet3/0/3] quit

# 创建VLAN 10,把端口GigabitEthernet3/0/1添加到该VLAN中,并在该VLAN内使能IGMP Snooping。

[SwitchA] vlan 10

[SwitchA-vlan10] port GigabitEthernet 3/0/1

[SwitchA-vlan10] igmp-snooping enable

[SwitchA-vlan10] quit

# 配置VLAN 10为组播VLAN,并把VLAN 2~VLAN 5都配置为该组播VLAN的子VLAN。

[SwitchA] multicast-vlan 10

[SwitchA-mvlan-10] subvlan 2 to 5

[SwitchA-mvlan-10] quit

配置Switch B

# 全局使能IGMP Snooping。

<SwitchB> system-view

[SwitchB] igmp-snooping

[SwitchB-igmp-snooping] quit

# 创建VLAN 2,把端口GigabitEthernet3/0/2添加到该VLAN中,并在该VLAN内使能IGMP Snooping。

[SwitchB] vlan 2

[SwitchB-vlan2] port GigabitEthernet 3/0/2

[SwitchB-vlan2] igmp-snooping enable

[SwitchB-vlan2] quit

# 创建VLAN 3,把端口GigabitEthernet3/0/3添加到该VLAN中,并在该VLAN内使能IGMP Snooping。

[SwitchB] vlan 3

[SwitchB-vlan3] port GigabitEthernet 3/0/3

[SwitchB-vlan3] igmp-snooping enable

[SwitchB-vlan3] quit

# 配置端口GigabitEthernet3/0/1为Trunk端口,并允许VLAN 2和VLAN 3通过。

[SwitchB] interface GigabitEthernet 3/0/1

[SwitchB-GigabitEthernet3/0/1] port link-type trunk

[SwitchB-GigabitEthernet3/0/1] port trunk permit vlan 2 3

配置Switch C

Switch C的配置与Switch B相似,配置过程略。

检验配置效果

# 查看Switch A上所有组播VLAN的信息。

[SwitchA] display multicast-vlan

 Total 1 multicast-vlan(s)

 

 Multicast vlan 10

   subvlan list:

    vlan 2-5

# 查看Switch A上IGMP Snooping组播组的信息。

[SwitchA] display igmp-snooping group

  Total 5 IP Group(s).

  Total 5 IP Source(s).

  Total 5 MAC Group(s).

 

  Port flags: D-Dynamic port, S-Static port, C-Copy port, P-PIM port

  Subvlan flags: R-Real VLAN, C-Copy VLAN

  Vlan(id):2.

    Total 1 IP Group(s).

    Total 1 IP Source(s).

    Total 1 MAC Group(s).

    Router port(s):total 0 port(s).

    IP group(s):the following ip group(s) match to one mac group.

      IP group address:224.1.1.1

        (0.0.0.0, 224.1.1.1):

          Host port(s):total 1 port(s).

            GE3/0/2                (D)

    MAC group(s):

      MAC group address:0100-5e01-0101

          Host port(s):total 1 port(s).

            GE3/0/2

 

  Vlan(id):3.

    Total 1 IP Group(s).

    Total 1 IP Source(s).

    Total 1 MAC Group(s).

    Router port(s):total 0 port(s).

    IP group(s):the following ip group(s) match to one mac group.

      IP group address:224.1.1.1

        (0.0.0.0, 224.1.1.1):

          Host port(s):total 1 port(s).

            GE3/0/2                (D)

    MAC group(s):

      MAC group address:0100-5e01-0101

          Host port(s):total 1 port(s).

            GE3/0/2

 

  Vlan(id):4.

    Total 1 IP Group(s).

    Total 1 IP Source(s).

    Total 1 MAC Group(s).

    Router port(s):total 0 port(s).

    IP group(s):the following ip group(s) match to one mac group.

      IP group address:224.1.1.1

        (0.0.0.0, 224.1.1.1):

          Host port(s):total 1 port(s).

            GE3/0/3                (D)

    MAC group(s):

      MAC group address:0100-5e01-0101

          Host port(s):total 1 port(s).

            GE3/0/3

 

  Vlan(id):5.

    Total 1 IP Group(s).

    Total 1 IP Source(s).

    Total 1 MAC Group(s).

    Router port(s):total 0 port(s).

    IP group(s):the following ip group(s) match to one mac group.

      IP group address:224.1.1.1

        (0.0.0.0, 224.1.1.1):

          Host port(s):total 1 port(s).

            GE3/0/3                (D)

    MAC group(s):

      MAC group address:0100-5e01-0101

          Host port(s):total 1 port(s).

            GE3/0/3

 

  Vlan(id):10.

    Total 1 IP Group(s).

    Total 1 IP Source(s).

    Total 1 MAC Group(s).

    Router port(s):total 1 port(s).

            GE3/0/1                (D)

    IP group(s):the following ip group(s) match to one mac group.

      IP group address:224.1.1.1

        (0.0.0.0, 224.1.1.1):

          Host port(s):total 0 port(s).

    MAC group(s):

      MAC group address:0100-5e01-0101

          Host port(s):total 0 port(s).

由此可见,IGMP Snooping在组播VLANVLAN 10)中维护路由器端口,而在各子VLANVLAN 2VLAN 5)中维护各自的成员端口。

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们