A method for generating one or more templates for configuring a network device in a network, the method comprising: receiving parameters for establishing phantom rendezvous points, RPs, in the network; apportioning a plurality of multicast groups among the phantom RPs; establishing, based on the parameters, at least one primary physical RP and at least one secondary physical RP for each of the phantom RPs using different values for respective subnet masks; and characterised by generating one or more templates based on the apportioning and establishing, wherein the one or more templates configure the network device to perform multicast packet routing when the network device is added to the network, wherein at least one of the phantom RPs has a first secondary physical RP and a second secondary physical RP, the method further comprising: after configuring the network device using the one or more templates: upon determining (905, 910, 915) that a first network device hosting the first secondary physical RP in the network is overloaded, changing a value of at least one subnet mask such that a mask value of the first secondary physical RP hosted on the first network device is less than a mask value of the second secondary physical RP hosted on a second network device in the network. receiving parameters for establishing phantom rendezvous points, RPs, in the network; apportioning a plurality of multicast groups among the phantom RPs; establishing, based on the parameters, at least one primary physical RP and at least one secondary physical RP for each of the phantom RPs using different values for respective subnet masks; and characterised by generating one or more templates based on the apportioning and establishing, wherein the one or more templates configure the network device to perform multicast packet routing when the network device is added to the network, wherein at least one of the phantom RPs has a first secondary physical RP and a second secondary physical RP, the method further comprising: after configuring the network device using the one or more templates: upon determining (905, 910, 915) that a first network device hosting the first secondary physical RP in the network is overloaded, changing a value of at least one subnet mask such that a mask value of the first secondary physical RP hosted on the first network device is less than a mask value of the second secondary physical RP hosted on a second network device in the network. after configuring the network device using the one or more templates: upon determining (905, 910, 915) that a first network device hosting the first secondary physical RP in the network is overloaded, changing a value of at least one subnet mask such that a mask value of the first secondary physical RP hosted on the first network device is less than a mask value of the second secondary physical RP hosted on a second network device in the network. upon determining (905, 910, 915) that a first network device hosting the first secondary physical RP in the network is overloaded, changing a value of at least one subnet mask such that a mask value of the first secondary physical RP hosted on the first network device is less than a mask value of the second secondary physical RP hosted on a second network device in the network.