Programming static multicast routes inload-balanced networks
View Patent ↗A network device in a network is provided. During operation, the network device can receive a static multicast route associated with a multicast group and a source of the multicast group. Here, the network device can include a plurality of ingress interfaces, each corresponding to a path via which the network device is reachable from the source. The network device can determine, based on an indicator in the static multicast route, that the network device is to dynamically select an ingress interface for the static multicast route. The network device can then determine respective weights allocated to the plurality of ingress interfaces and select the ingress interface for the static multicast route from the plurality of ingress interfaces based on their respective weights. Subsequently, the network device can program the static multicast route in forwarding hardware of the network device with the selected ingress interface.
1 . A method, comprising:
receiving, by a network device in a network, a static multicast route associated with a multicast group and a source of the multicast group, the network device comprising a plurality of ingress interfaces, each corresponding to a path via which the network device is reachable from the source, and the static multicast route comprising an indicator indicating that the network device is to dynamically select an ingress interface for the static multicast route;
determining respective weights allocated to the plurality of ingress interfaces;
based on a determination that the weights are equal, selecting, from the plurality of ingress interfaces, a reverse-path forwarding (RPF) interface associated with the source as the ingress interface for the static multicast route;
based on a determination that the weights are unequal, selecting an interface with a lowest weight as the ingress interface of the static multicast route; and
programming the static multicast route in forwarding hardware of the network device with the selected ingress interface.
2 . The method of claim 1 , further comprising incrementing a weight of the selected ingress interface.
3 . The method of claim 1 , further comprising:
receiving multicast traffic from the source at the plurality of ingress interfaces; and
forwarding, to a requesting host, the received multicast traffic based on the programmed static multicast route in the forwarding hardware.
4 . The method of claim 3 , further comprising discarding the multicast traffic received at an unselected ingress interface of the plurality of ingress interfaces.
5 . The method of claim 1 , wherein the plurality of ingress interfaces corresponds to equal-cost paths between the source and the network device.
6 . The method of claim 1 , further comprising:
determining an unavailability associated with the selected ingress interface;
selecting a new ingress interface for the static multicast route from available interfaces of the plurality of ingress interfaces; and
reprogramming the forwarding hardware to update the static multicast route with the new ingress interface.
7 . The method of claim 6 , wherein selecting the new ingress interface is based on one of:
respective weights allocated to the available interfaces of the plurality of ingress interfaces; and
a single available interface of the plurality of ingress interfaces.
8 . The method of claim 1 , further comprising:
receiving, by the network device, a configuration command comprising the static multicast route with the indicator;
detecting the indicator in the configuration command; and
selecting the ingress interface for the static multicast route from the plurality of ingress interfaces.
9 . The method of claim 8 , wherein the indicator specifies an RPF interface as the ingress interface for the source in the configuration command.
10 . A non-transitory computer-readable storage medium storing instructions to:
receive, at a network device in a network, a static multicast route associated with a multicast group and a source of the multicast group, the network device comprising a plurality of ingress interfaces, each corresponding to a path via which the network device is reachable from the source, and the static multicast route comprising an indicator indicating that the network device is to dynamically select an ingress interface for the static multicast route;
determine respective weights allocated to the plurality of ingress interfaces;
based on a determination that the weights are equal, select, from the plurality of ingress interfaces, a reverse-path forwarding (RPF) interface associated with the source as the ingress interface for the static multicast route from the plurality of ingress interfaces based on their respective weights;
based on a determination that the weights are unequal, select an interface with a lowest weight as the ingress interface of the static multicast route; and
program the static multicast route in forwarding hardware of the network device with the selected ingress interface.
11 . The non-transitory computer-readable storage medium of claim 10 , wherein the instructions are further to increment a weight of the selected ingress interface.
12 . The non-transitory computer-readable storage medium of claim 10 , wherein the instructions are further to:
receive multicast traffic from the source at the plurality of ingress interfaces; and
forward, to a requesting host, the received multicast traffic based on the programmed static multicast route in the forwarding hardware.
13 . The non-transitory computer-readable storage medium of claim 12 , wherein the instructions are further to discard the multicast traffic received at an unselected ingress interface of the plurality of ingress interfaces.
14 . The non-transitory computer-readable storage medium of claim 10 , wherein the plurality of ingress interfaces corresponds to equal-cost paths between the source and the network device.
15 . The non-transitory computer-readable storage medium of claim 10 , wherein the instructions are further to:
determine an unavailability associated with the selected ingress interface;
select a new ingress interface for the static multicast route from available interfaces of the plurality of ingress interfaces; and
reprogram the forwarding hardware to update the static multicast route with the new ingress interface.
16 . The non-transitory computer-readable storage medium of claim 15 , wherein the network device is to select the new ingress interface based on one of:
respective weights allocated to the available interfaces of the plurality of ingress interfaces; and
a single available interface of the plurality of ingress interfaces.
17 . The non-transitory computer-readable storage medium of claim 10 , wherein the instructions are further to:
receive, by the network device, a configuration command comprising the static multicast route with the indicator;
detect the indicator in the configuration command; and
select the ingress interface for the static multicast route from the plurality of ingress interfaces.
18 . A computer system, comprising:
one or more processing resources;
forwarding hardware; and
a non-transitory computer-readable storage medium storing instructions that when executed by the one or more processing resourced cause the computer system to:
receive a static multicast route associated with a multicast group and a source of the multicast group, the computer system comprising a plurality of ingress interfaces, each corresponding to a path via which the computer system is reachable from the source, and the static multicast route comprising an indicator indicating that the network device is to dynamically select an ingress interface for the static multicast route;
determine respective weights allocated to the plurality of ingress interfaces;
based on a determination that the weights are equal, select, from the plurality of ingress interfaces, a reverse-path forwarding (RPF) interface associated with the source as the ingress interface for the static multicast route;
based on a determination that the weights are unequal, select an interface with a lowest weight as the ingress interface of the static multicast route; and
program the static multicast route in the forwarding hardware with the selected ingress interface.