Selection of multicast router interfaces in an L2 switch connecting end hosts and routers, which is running IGMP and PIM snooping
Multicast traffic received by a subnet that uses IGMP/PIM snooping may be efficiently processed so that only required multicast router interfaces are used. A router may, for example, receive a source-specific PIM join/prune message indicating that a multicast receiver of the multicast traffic is to join/leave a multicast group to receive/stop traffic from a multicast source; determine whether the router is a first hop router relative to a subnet of the multicast source; and forward, when the router is a first hop router relative to the subnet of the multicast source and is a non-designated router, the source-specific PIM join/prune message towards the subnet.
1. A method comprising:
routing, by a network device, multicast traffic,
the multicast traffic being routed to multicast groups using protocol independent multicast (PIM);
receiving, by the network device, a source-specific PIM join message,
the source-specific PIM join message indicating that a device is to receive traffic from a multicast source associated with one of the multicast groups;
determining, by the network device, whether the network device is a designated network device or a non-designated network device for a subnet of the multicast source;
determining, by the network device and based on routing information associated with the multicast source, whether the network device is one hop away from the subnet of the multicast source; and
forwarding, by the network device and when the network device is the non-designated network device and is one hop away from the subnet of the multicast source, the source-specific PIM join message towards the subnet of the multicast source,
the source-specific PIM join message not being transmitted when the network device is the designated network device and is one hop away from the subnet of the multicast source.
2. The method of claim 1 , further comprising:
forwarding, by the network device, the source-specific PIM join message towards the subnet of the multicast source when the network device is the designated network device and is not one hop away from the subnet of the multicast source,
the source-specific PIM join message being forwarded based on the routing information associated with the multicast source.
3. The method of claim 1 , where forwarding the source-specific PIM join message includes:
forwarding the source-specific PIM join message to a Layer 2 Internet Group Management Protocol (IGMP) and PIM snooping switch in the subnet of the multicast source,
the Layer 2 IGMP and PIM snooping switch filtering the multicast traffic based on monitoring the source-specific PIM join message.
4. The method of claim 1 , where the source-specific PIM join message initiates a switchover to shortest path tree routing for traffic between the device and the multicast source.
5. The method of claim 1 , where forwarding the source-specific PIM join message towards the subnet of the multicast source includes:
setting an upstream neighbor field in the source-specific PIM join message to an address of the multicast source.
6. The method of claim 1 , further comprising:
receiving a source-specific PIM prune message indicating that the device is to leave the one of the multicast groups; and
forwarding the source-specific PIM prune message towards the subnet of the multicast source when:
the network device is one hop away from the subnet of the multicast source, and
the network device is the non-designated network device.
7. The method of claim 6 , where forwarding the source-specific PIM prune message towards the subnet includes:
setting an upstream neighbor field in the source-specific PIM prune message to an address of the multicast source.
8. The method of claim 6 , further comprising:
determining not to forward the source-specific PIM prune message when:
the network device is one hop away from the subnet of the multicast source, and
the network device is the designated network device.
9. The method of claim 6 , further comprising:
forwarding, based on the routing information, the source-specific PIM prune message when the network device is not one hop away from the subnet of the multicast source.
10. The method of claim 6 , where forwarding the source-specific PIM prune message includes:
forwarding the source-specific PIM prune message to a Layer 2 Internet Group Management Protocol (IGMP) and PIM snooping switch in the subnet of the multicast source to cause the routing information to be modified.
11. The method of claim 1 , where multicast traffic that is routed based on the source-specific PIM join message traverses a shortest path tree between the multicast source and the device.
12. A network device comprising:
one or more processors to:
route multicast traffic using protocol independent multicast (PIM) to determine traffic routes for the multicast traffic;
receive a source-specific PIM join message indicating that a device is to join a multicast traffic group,
the multicast traffic group receiving the multicast traffic from a multicast source;
determine, based on routing information associated with the multicast source, whether the network device is one hop away from a subnet corresponding to the multicast source;
determine whether the network device is a designated network device or a non-designated network device of the subnet corresponding to the multicast source; and
forward the source-specific PIM join message towards the subnet of the multicast source when:
the network device is one hop away from the subnet of the multicast source, and
the network device is the non-designated network device of the subnet corresponding to the multicast source.
13. The network device of claim 12 , where the one or more processors are further to:
determine not to transmit the source specific PIM join message, when:
the network device is one hop away from the subnet of the multicast source, and
the network device is the designated network device of the subnet.
14. The network device of claim 12 , where the one or more processors are further to:
forward, when the network device is the non-designated network device and is not one hop away from the subnet of the multicast source, the source-specific PIM join message when the network device is not a first hop relative to the subnet of the multicast source,
the source-specific PIM join message being forwarded based on the routing information associated with the multicast source.
15. The network device of claim 12 , where, when forwarding the source-specific PIM join message, the one or more processors are further to:
forward the source-specific PIM join message to a Layer 2 Internet Group Management Protocol (IGMP) and PIM snooping switch in the subnet to cause the routing information associated with the multicast source to be altered.
16. The network device of claim 12 , where the source-specific PIM join message initiates a switchover to shortest path tree routing for traffic between the device and the multicast source.
17. The network device of claim 12 , where, when forwarding the source-specific PIM join message towards the subnet of the multicast source, the one or more processors are further to:
set an upstream neighbor field in the source-specific PIM join message to an address of the multicast source.
18. The network device of claim 12 , where the one or more processors are further to:
receive a source-specific PIM prune message indicating that the device is to be removed from the one of the multicast groups;
forward, when the network device is one hop away from the subnet of the multicast source and the network device is the non-designated network device for the multicast source, the source-specific PIM prune message towards the subnet of the multicast source; and
determine not to forward the source specific PIM prune message when the network device is one hop away from the subnet of the multicast source and is the designated network device for the multicast source.
19. The network device of claim 18 , where, when forwarding the source-specific PIM prune message towards the subnet of the multicast source, the one or more processors are further to:
set an upstream neighbor field in the source-specific PIM prune message to an address of the multicast source.
20. A non-transitory computer-readable medium storing instructions, the instructions comprising:
one or more instructions that, when executed by one or more processors of a network device, cause the network device to:
route multicast traffic using protocol independent multicast (PIM) to determine traffic routes for the multicast traffic;
receive a source-specific PIM join message indicating that a device is to join a multicast traffic group to receive multicast traffic from a multicast source;
determine, based on routing information associated with the multicast source, whether the network device is one hop away from a subnet corresponding to the multicast source;
forward, when the network device is one hop away from the subnet and the network device is a non-designated network device for the subnet, the source-specific PIM join message towards the subnet of the multicast source,
the source-specific PIM join message not being forwarded when the network device is a designated network device for the subnet of the multicast source and is one hop away from the subnet of the multicast source;
receive a source-specific PIM prune message indicating that the device is to leave the multicast traffic group; and
forward, when the network device is one hop away from the subnet and the network device is the non-designated network device for the subnet, the source-specific PIM prune message towards the subnet of the multicast source,
the source-specific PIM prune message not being forwarded when the network device is the designated network device for the subnet of the multicast source and is one hop away from the subnet of the multicast source.