IP : IP 组播

Cisco IOS “ip igmp”和“ip igmp静态组” join-group命令使用

2016 年 10 月 24 日 - 机器翻译
其他版本: PDFpdf | 英语 (2016 年 4 月 21 日) | 反馈

简介

本文如何描述ip igmp join-groupip igmp在Cisco IOS内的静态function命令。

贡献用卢克De Ghein, Cisco TAC工程师。

请静态参加IGMP组

如果路由器有ip igmp join-group命令在任何接口,路由器变为组播流的一个接收方。此命令用于为了切换组播数据流向此路由器,不用一台实时直接连接的接收器或,不用发送PIM加入要求组播流的独立于协议的组播(PIM)邻接下行。然而,因为此路由器加入组播流,所有组播信息包被踢对CPU。这能导致高CPU,或者能导致速率防幅器(若有)或(CoPP)将点击的控制层面保护。

您能使用为了吸引此路由器的组播流的一更加好的替代方案是配置interface命令ip igmp的静态组。用此命令,路由器在接口能仍然吸引组播流和转发它,但是路由器不变为数据流的一个接收方。

如果路由器用此命令是在该接口的PIM指定路由器(DR) join-group interface命令的ip igmpip igmp static-group命令原因PIM发送加入请求上行往来源或往聚合点(RP),但是这只发生。为了保证命令生效并且吸引组播数据流,请使用on命令是该特定网络的DR的路由器。或者,您能做使用命令PIM博士为了执行此,配置ip pim dr优先级on命令接口和保证的路由器有最高的PIM DR优先级值在该网络的所有PIM路由器。

示例如下:

在本例中,有一来源用IP地址10.1.3.3和组的232.1.1.1一个接收方。

接收方是活跃的

这是在路由器R1的组播转发条目:

R1#show ip mroute 232.1.1.1 10.1.3.3
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
       L - Local, P - Pruned, R - RP-bit set, F - Register flag,
       T - SPT-bit set, J - Join SPT, M - MSDP created entry, E - Extranet,
       X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
       U - URD, I - Received Source Specific Host Report,
       Z - Multicast Tunnel, z - MDT-data group sender,
       Y - Joined MDT-data group, y - Sending to MDT-data group,
       G - Received BGP C-Mroute, g - Sent BGP C-Mroute,
       Q - Received BGP S-A Route, q - Sent BGP S-A Route,
       V - RD & Vector, v - Vector
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode

(10.1.3.3, 232.1.1.1), 01:54:48/00:02:54, flags: sT
Incoming interface: Ethernet1/0, RPF nbr 10.1.2.2
Outgoing interface list:
   Ethernet0/0, Forward/Sparse-Dense, 01:54:48/00:02:54

如输出所显示,接口Ethernet0/0在流出接口列表(油),并且(10.1.3.3, 232.1.1.1)组播数据流转发对接口Ethernet0/0。

这在组播转发情报基地(MFIB)条目可能也被观察:

R1#show ip mfib 232.1.1.1 10.1.3.3        
Entry Flags:   C - Directly Connected, S - Signal, IA - Inherit A flag,
               ET - Data Rate Exceeds Threshold, K - Keepalive
               DDE - Data Driven Event, HW - Hardware Installed
I/O Item Flags: IC - Internal Copy, NP - Not platform switched,
                NS - Negate Signalling, SP - Signal Present,
               A - Accept, F - Forward, RA - MRIB Accept, RF - MRIB Forward,
               MA - MFIB Accept
Forwarding Counts: Pkt Count/Pkts per second/Avg Pkt Size/Kbits per second
Other counts:     Total/RPF failed/Other drops
I/O Item Counts:   FS Pkt Count/PS Pkt Count
Default
(10.1.3.3,232.1.1.1) Flags:
   SW Forwarding: 0/0/0/0, Other: 0/0/0
   Ethernet1/0 Flags: A
   Ethernet0/0 Flags: F NS
     Pkts: 0/0

IGMP加入命令

如果路由器R1不收到一个PIM加入要求从路由器R4的组播流(因故),则组播流不流。一个可能的来源是PIM没有允许形成在路由器R1和R4之间的结邻,因为路由器属于不同的管理域。解决方案将转发从路由器R1的流量往路由器R4在一个静态方式。

ip igmp join-group命令在路由器R1的接口Ethernet0/0使用。这允许路由器R1发送PIM加入请求上行(对来源或RP)和吸引组播流(10.1.3.3, 232.1.1.1)。因为此接口在油,此流量然后转发对接口Ethernet0/0。然而,流量也被踢对CPU。

R1#show running-config interface Ethernet 0/0
!
interface Ethernet0/0
ip address 10.1.1.1 255.255.255.0
ip pim sparse-dense-mode
ip igmp join-group 232.1.1.1 source 10.1.3.3
end
R1#show ip mroute 232.1.1.1 10.1.3.3
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
       L - Local, P - Pruned, R - RP-bit set, F - Register flag,
       T - SPT-bit set, J - Join SPT, M - MSDP created entry, E - Extranet,
       X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
       U - URD, I - Received Source Specific Host Report,
       Z - Multicast Tunnel, z - MDT-data group sender,
       Y - Joined MDT-data group, y - Sending to MDT-data group,
       G - Received BGP C-Mroute, g - Sent BGP C-Mroute,
       Q - Received BGP S-A Route, q - Sent BGP S-A Route,
       V - RD & Vector, v - Vector
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode

(10.1.3.3, 232.1.1.1), 00:09:30/00:02:19, flags: sLTI
Incoming interface: Ethernet1/0, RPF nbr 10.1.2.2
Outgoing interface list:
   Ethernet0/0, Forward/Sparse-Dense, 00:00:40/00:02:19

L标志意味着组播数据流被踢。接口Ethernet0/0在油,因此流量被踢对CPU并且转发对接口Ethernet0/0。

MFIB条目显示内部拷贝(ICS)标志。这意味着此流的数据包被踢对CPU。

R1#show ip mfib 232.1.1.1 10.1.3.3
Entry Flags:   C - Directly Connected, S - Signal, IA - Inherit A flag,
               ET - Data Rate Exceeds Threshold, K - Keepalive
               DDE - Data Driven Event, HW - Hardware Installed
I/O Item Flags: IC - Internal Copy, NP - Not platform switched,
               NS - Negate Signalling, SP - Signal Present,
               A - Accept, F - Forward, RA - MRIB Accept, RF - MRIB Forward,
               MA - MFIB Accept
Forwarding Counts: Pkt Count/Pkts per second/Avg Pkt Size/Kbits per second
Other counts:     Total/RPF failed/Other drops
I/O Item Counts:   FS Pkt Count/PS Pkt Count
Default
(10.1.3.3,232.1.1.1) Flags:
   SW Forwarding: 0/0/0/0, Other: 0/0/0
   Ethernet1/0 Flags: A
   Ethernet0/0 Flags: F IC NS
     Pkts: 0/0

由于所有此组播流的流量被踢,能引起不需要的副作用,如前所述。

警告:除非用于测试环境,请勿使用ip igmp join-group命令

static命令的IGMP

ip igmp static-group命令在一个静态方式用于,解决方案为了转发从路由器R1的流量往路由器R4。在此方案中,路由器R1发送PIM加入请求上行(对来源或RP)并且吸引组播流(10.1.3.3, 232.1.1.1)。此流量然后转发对接口Ethernet0/0,因为此接口在油,但是流量没有被踢对CPU。

R1#show running-config interface Ethernet 0/0
!
interface Ethernet0/0
ip address 10.1.1.1 255.255.255.0
ip pim sparse-dense-mode
ip igmp static-group 232.1.1.1 source 10.1.3.3
end
R1#show ip mroute 232.1.1.1 10.1.3.3        
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
       L - Local, P - Pruned, R - RP-bit set, F - Register flag,
       T - SPT-bit set, J - Join SPT, M - MSDP created entry, E - Extranet,
       X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
       U - URD, I - Received Source Specific Host Report,
       Z - Multicast Tunnel, z - MDT-data group sender,
       Y - Joined MDT-data group, y - Sending to MDT-data group,
       G - Received BGP C-Mroute, g - Sent BGP C-Mroute,
       Q - Received BGP S-A Route, q - Sent BGP S-A Route,
       V - RD & Vector, v - Vector
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode

(10.1.3.3, 232.1.1.1), 00:07:41/stopped, flags: sTI
Incoming interface: Ethernet1/0, RPF nbr 10.1.2.2
Outgoing interface list:
Ethernet0/0, Forward/Sparse-Dense, 00:05:06/00:00:53

L标志不再出现。流量在此路由器没有被踢,但是转发对在油的接口。

同样地, MFB条目不显示ICS标志:

R1#show ip mfib 232.1.1.1 10.1.3.3
Entry Flags:   C - Directly Connected, S - Signal, IA - Inherit A flag,
               ET - Data Rate Exceeds Threshold, K - Keepalive
               DDE - Data Driven Event, HW - Hardware Installed
I/O Item Flags: IC - Internal Copy, NP - Not platform switched,
               NS - Negate Signalling, SP - Signal Present,
               A - Accept, F - Forward, RA - MRIB Accept, RF - MRIB Forward,
               MA - MFIB Accept
Forwarding Counts: Pkt Count/Pkts per second/Avg Pkt Size/Kbits per second
Other counts:     Total/RPF failed/Other drops
I/O Item Counts:   FS Pkt Count/PS Pkt Count
Default
(10.1.3.3,232.1.1.1) Flags:
   SW Forwarding: 0/0/0/0, Other: 0/0/0
   Ethernet1/0 Flags: A
   Ethernet0/0 Flags: F NS
     Pkts: 0/0

PIM DR角色

如果路由器R1不是接口的Etherent0/0, PIM DR ip igmp static-group命令ip igmp join-group命令不生效。

示例如下:

R1#show running-config interface Ethernet 0/0
!
interface Ethernet0/0
ip address 10.1.1.1 255.255.255.0
ip pim sparse-dense-mode
ip igmp static-group 232.1.1.1 source 10.1.3.3
end

注意:命令不允许来源将指定的(PIM SSM),或者将指定的来源(PIM稀疏的Mode/PIM Bidir模式)。

R1#show ip mroute 232.1.1.1 10.1.3.3        
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
       L - Local, P - Pruned, R - RP-bit set, F - Register flag,
       T - SPT-bit set, J - Join SPT, M - MSDP created entry, E - Extranet,
       X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
       U - URD, I - Received Source Specific Host Report,
       Z - Multicast Tunnel, z - MDT-data group sender,
       Y - Joined MDT-data group, y - Sending to MDT-data group,
       G - Received BGP C-Mroute, g - Sent BGP C-Mroute,
       Q - Received BGP S-A Route, q - Sent BGP S-A Route,
       V - RD & Vector, v - Vector
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode

(10.1.3.3, 232.1.1.1), 00:00:30/00:02:29, flags: sPT
Incoming interface: Ethernet1/0, RPF nbr 10.1.2.2
Outgoing interface list: Null

接口Ethernet0/0不在油。这是因为路由器R1不是在链路的PIM DR用ip igmp static-group命令

R1#show ip pim interface ethernet 0/0

Address         Interface               Ver/   Nbr   Query DR     DR
                                         Mode   Count Intvl Prior
10.1.1.1        Ethernet0/0             v2/SD 1     30     1     10.1.1.4

路由器R1也不发送PIM加入请求上行。因为组播条目未命中,这是明显的在路由器R2 :

R2#show ip mroute 232.1.1.1 10.1.3.3
Group 232.1.1.1 not found

这是可以观察的输出,当路由器R1是在接口Ethernet0/0的PIM DR :

R1#show ip pim interface ethernet 0/0

Address         Interface               Ver/   Nbr   Query DR     DR
                                         Mode   Count Intvl Prior
10.1.1.1         Ethernet0/0             v2/SD 1     30     1     10.1.1.1
R1#show ip mroute 232.1.1.1 10.1.3.3
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
       L - Local, P - Pruned, R - RP-bit set, F - Register flag,
       T - SPT-bit set, J - Join SPT, M - MSDP created entry, E - Extranet,
       X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
       U - URD, I - Received Source Specific Host Report,
       Z - Multicast Tunnel, z - MDT-data group sender,
       Y - Joined MDT-data group, y - Sending to MDT-data group,
       G - Received BGP C-Mroute, g - Sent BGP C-Mroute,
       Q - Received BGP S-A Route, q - Sent BGP S-A Route,
       V - RD & Vector, v - Vector
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode

(10.1.3.3, 232.1.1.1), 00:02:39/00:02:55, flags: sTI
Incoming interface: Ethernet1/0, RPF nbr 10.1.2.2
Outgoing interface list:
   Ethernet0/0, Forward/Sparse-Dense, 00:00:04/00:02:55

安全使用ip igmp join-group命令

为了排除故障问题,您也许希望执行测验与组播,实验室的均等外部。在这种情况下,请保证您使用ip igmp join-group命令以安全方式。原因您应该使用ip igmp join-group命令ip igmp static-group命令是,因为组播信息包被踢。同样地,如果执行一ping与组播目的地,路由器用命令是组播流的一个接收方,并且能回复到ping。

示例如下:

来源10.1.3.3是在路由器R3的一个IP地址。如果在路由器R1放置on命令Ethernet0/0接口并且从路由器R3 ping,则路由器R1能回复到ping。同样地,您可执行测验,好象在路由器R1的一台直接连接的接收器。ip igmp join-group命令在路由器R1的Ethernet0/0接口被放置,并且来源指定为了保证路由器R1只踢从该来源的流量(和响应对它)。

R1#show running-config interface Ethernet 0/0
!
interface Ethernet0/0
ip address 10.1.1.1 255.255.255.0
ip pim sparse-dense-mode
ip igmp join-group 232.1.1.1 source 10.1.3.3
end
R3#ping 232.1.1.1 source 10.1.3.3
Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 232.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 10.1.3.3

Reply to request 0 from 10.1.1.1, 2 ms
R3#

debug ip icmp命令在路由器R1表明ping到达,并且路由器R1发送回复:

R1#debug ip icmp
ICMP packet debugging is on
R1#

*Oct 30 11:35:41.133: ICMP: echo reply sent, src 10.1.1.1, dst 10.1.3.3,
topology BASE, dscp 0 topoid 0

关于命令使用的重要提示

除非对于测试目的在实验室或一临时测验在真实网络,最佳实践不是使用ip igmp join-group命令。在所有测验完成后,请删除命令。如果必须只静态转发组播数据流,请使用ip igmp static-group命令



Document ID: 119383