Add Book to My BookshelfPurchase This Book Online

Chapter 3 - Internet Group Management Protocol

Cisco Multicast Routing & Switching
William R. Parkhurst
  Copyright © 1999 The McGraw-Hill Companies

IGMP Router States
We have seen that a router can be in one of two states with respect to its query status on the network, being either the Querier or the Non-Querier, as shown in Figure 3-16. An IGMPv2-enabled router starts in the Initial state, sends a General Membership Query message, and sets the General Query timer. Whenever the General Query Timer expires, the timer is reset and a General Membership Query message is sent. If a router in the Querier state hears a General Membership Querier message from a router with a lower IP address, then the router makes a transition from the Query state to the Non-Querier state and sets the Other Querier Present Timer. While in the Non-Querier state, this Other Querier Present Timer is reset each time a General Membership Query is received from a router with a lower IP address. If the timer times out, then no General Membership Queries have been received during the Other Querier Present time and the router changes from the Non-Querier state to the Query state.
Figure 3-16: Query status state diagram for IGMPv2-enabled routers
The state diagram for a router in the Query state is shown in Figure 3-17 and the Non-Query state in Figure 3-18. When IGMPv2 is initialized, the router enters the initial state and sends General Membership Queries on all interfaces and then makes a transition to the Querier state. If no members are present on an attached network, the state for that interface will be No Members Present. Because no members are present on the network, the router does not need to periodically transmit General Membership Queries out of the interface.
Figure 3-17: State diagram for an IGMPv2 enabled router in the Query state
Figure 3-18: State diagram for an IGMPv2-enabled router in the Non-Querier state
Routers will be notified by hosts that want to join a particular group. A host can either transmit a version 1 or version 2 IGMP Membership report. If only version 2 Membership Reports are received, the router will make a transition to the Members Present state. If a version 1 report is received, then the router will make a transition to the Version 1 Members Present state, even though there may be version 2 hosts present.
While in the Version 1 Members Present state, the router needs to track whether or not version 2 hosts are present on the attached network. When the version 1 host timer expires, the router will either move to the Members Present state if there are version 2 hosts present or to the No Members Present state. As long as version 1 Membership Reports are being received, the router will stay in the Version 1 Members Present state.
In the Members Present State, the reception of version 2 Membership Reports refreshes the Group Membership Interval timer and the router stays in the Members Present state. If a version 1 Membership Report is received, a transition to the Version 1 Members Present state occurs. Recall that one enhancement to IGMP version 2 was the Leave Group Message. When a Leave Group Message is received, the router has no idea if this is the last host to leave the group because routers only need to track if there is at least one member of the group on the network and not the number of members. A Leave Group Message in the Members Present state causes a transition to the Checking Membership state, while a Leave Group message in the Version 1 Members Present state has no effect because there is at least one Version 1 host that is still a member of the group.
The state diagram for a router in the Non-Querier state is passive in nature because the router is only listening to Membership reports and Membership Queries and is not actively polling for group members (see Figure 3-18).
Configuring IGMP
Configuring IGMP on Cisco routers is very easy — you don’t have to do anything. When a multicast routing protocol is enabled on a router interface, IGMP is automatically enabled. A number of commands exist to tailor IGMP to suit your environment. IGMP interface commands can be listed by entering interface configuration mode and typing
router(config-if)aip igmp ?
access-group
IGMP group-access group
helper-address
IGMP helper address
join-group
IGMP join multicast group
querier-timeout
IGMP previous querier timeout
query-interval
IGMP host query interval
query-max-response-time
IGMP max query response value
version
IGMP version
By default, all hosts on a subnet are allowed to join all multicast groups. The groups that hosts on a subnet can join are controlled using the interface command:
ip igmp access-group access-list-number [version].
access-list-number
IP standard access-list number (1—99)
version
Optional. Changes the IGMP version number. Default is 2.
Example
Configure the ethernet 0 interface on a router such that hosts can only join multicast groups 239.0.0.0 through 239.255.255.255.
interface ethernet 0
ip igmp access-group 1
access-list 1 permit 239.0.0.0 0.255.255.255
To enable stub multicast routing, use the ip igmp helper-address in conjunction with the ip pim neighbor-filter command. This IGMP command causes the router to forward IGMP Host Reports and Leave Group messages received on the interface to the IP address specified. An example of this command and stub multicast routing is contained in Chapter 7, “Protocol Independent Multicast — Sparse Mode.”
ip igmp helper-address ip-address
IP address where IGMP Host Reports and Leave Group messages are forwarded
Example
See Chapter 7.
A router interface can be configured as though there are always receivers for a multicast group present on the interface. One reason to do this is to be able to ping all multicast routers. Sending a ping to a multicast group causes all routers that have joined that group to respond. To configure a router in order to join a multicast group on an interface, use the interface configuration command:
ip igmp join-group group-address
Multicast group IP address
Example
Configure interface ethernet 0 to join the multicast group 225.250.250.1.
interface ethernet 0
ip igmp join-group 225.250.250.1
The default IGMP query interval on an interface is 60 seconds. Every 60 seconds the router sends IGMP host-query messages on the interface. To modify this default value, use the interface command:
ip igmp query-interval seconds
seconds
Number of seconds between host-query messages. The value can be between 0 and 65535.
Example
Change the query interface on interface serial 0 to 3 minutes.
interface serial 0
ip igmp query-interval 180
Be very careful with this command. If the query interval is longer than the query timeout value, then IGMP is effectively broken on the interface. All neighbor routers should be configured with the same value.
The default Maximum Response Time that is advertised in IGMP queries is 10 seconds. This value can be modified using the interface command:
ip igmp query-max-response-time seconds
seconds
Maximum Response Time that is advertised in IGMP queries
Example
Configure the Maximum Response Time on interface ethernet 0 to 15 seconds.
interface ethernet 0
ip igmp query-max-response-time 15
A Non-Querier router on a multi-access network becomes the Querier if the current Querier times out. The default value for the time out is twice the Query Interval. To modify the Query Timeout Value, use the interface command:
ip igmp query-timeout seconds
seconds
Number of seconds a Non-Querier router will wait before taking over as Querier if the current Querier times out
Example
Change the Query Timeout Value to 60 seconds on interface serial 1
interface serial
ip igmp query-interval 30
ip igmp query-timeout 60
The ip igmp join-group command can be used to statically configure a router to join a multicast group. When this command is used, packets for the configured group are handled at the process level. To fast-switch the packets for a static group, use the interface command:
ip igmp static-group group-address
Group IP multicast address
Example
Configure interface ethernet 0 to join the multicast group 225.250.250.1.
interface ethernet 0
ip igmp static-group 225.250.250.1
When PIM is enabled on an interface, IGMP version 2 is automatically enabled. To change the version, use the interface command:
ip igmp version {2 | 1 }
Example
Configure the ethernet 0 interface to use IGMP version 1. If version 1 is configured on an interface, then the commands ip igmp query-max-response-time and ip igmp query-timeout cannot be used because they are version 2-specific.
interface ethernet 0
ip igmp version 1
Entries in the router’s IGMP cache can be deleted using the Exec command:
clear ip igmp group [group-name | group-address |interface-type interface-number]
group-name
Optional. Multicast group name. Defined either in DNS or by the ip host command
group-address
Optional. Multicast group address
interface-type
Specify the interface (ethernet 0, serial 0, and so on)
Examples
To clear a particular group, use clear ip igmp group 225.250.250.1.
To clear all groups on an interface, use clear ip igmp group ethernet 0.
To clear all groups, use clear ip igmp group.
IGMP Show and Debug Commands
The available show commands can be listed in Exec mode by typing
router#show ip igmp ?
groups
IGMP group membership information
interface
IGMP interface information
Additional show options can be found by entering
router#show ip igmp groups ?
Ethernet
IEEE 802.3
Hostname or A.B.C.D
IP name or group address
Loopback
Loopback interface
Null
Null interface
Serial
Serial
|
Output modifiers
<cr>
Example
Show all multicast groups on all interfaces
router#show ip igmp groups
IGMP-Connected Group Membership
Group Address
Interface
Uptime
Expires
Last Reporter
225.250.250.1
ethernet 0
03:05:59
Never
172.16.4.3
group-address
Multicast group address
interface
Interface where the group joined
Uptime
How long the group has been joined on the interface in hours, minutes, and seconds
Expires
The time when the group is removed from the table in hours, minutes, and seconds
Last Reported
IP address of the last host to report membership
The current state of IGMP on an interface along with IGMP timer values can be shown using the Exec command:
router#show ip igmp interface ?
Ethernet
IEEE 802.3
Loopback
Loopback interface
Null
Null interface
Serial
Serial
|
Output modifiers
<cr>
An individual interface can be displayed using
router#show ip igmp interface ethernet 0
ethernet 0 is up; line protocol is up
Internet address is 172.16.4.3/24
IGMP is enabled on interface
Current IGMP version is 2
CGMP is disabled on interface
IGMP query interval is 60 seconds
IGMP querier timeout is 120 seconds
IGMP max query response time is 10 seconds
Inbound IGMP access group is not set
IGMP activity: 1 joins, 0 leaves
Multicast routing is disabled on interface
Multicast TTL threshold is 0
Multicast groups joined (number of users): 225.250.250.1(1)
Finally, the operation of IGMP can be monitored using the debug ip igmp command:
router#debug ip igmp
05:09:55: IGMP: Received v2 Query from 172.16.4.1 (ethernet 0)
05:09:55: IGMP: Set report delay time to 7.0 seconds for 225.250.250.1 on ethernet 0
05:10:02: IGMP: Send v2 Report for 225.250.250.1 on ethernet 0
05:10:02: IGMP: Received v2 Report from 172.16.4.3 (ethernet 0) for 225.250.250.1
05:10:15: IGMP: Send Leave for 225.250.250.1 on ethernet 0
References
RFC 1054, “Host Extensions for IP Multicasting,” S. Deering, Stanford University, 1988
RFC 1112, “Host Extensions for IP Multicasting,” S. Deering, Stanford University, 1989
RFC 2236, “Internet Group Management Protocol—Version 2,” W. Fenner, Xerox PARC, 1997

 


 
Books24x7.com, Inc © 2000 –  Feedback