A non-transitory computer readable storage medium, including instructions stored thereon for supporting unique multicast forwarding across multiple subnets in a high performance computing environment, which when read and executed by one or more computers cause the one or more computers to perform steps comprising:
- providing, at one or more computers, including one or more microprocessors, a first subnet, the first subnet comprising
- a plurality of switches, the plurality of switches comprising at least a leaf switch, wherein each of the plurality of switches comprise a plurality of switch ports,
- a plurality of host channel adapters, each host channel adapter comprising at least one host channel adapter port,
- a plurality of end nodes, wherein the plurality of end nodes are interconnected via the plurality of switches, and
- a subnet manager, the subnet manager running on one of the plurality of switches and the plurality of end nodes;
- configuring a switch port of the plurality of switch ports on a switch of the plurality of switches as a first router port;
- configuring a second switch port of the plurality of switch ports on a second switch of the plurality of switches as a second router port;
- interconnecting the first subnet with a second subnet via a first physical link between the first router port and a first port of the second subnet;
- interconnecting the first subnet with the second subnet via a second physical link between the second router port and a second port of the second subnet;
- sending, from an end node of the plurality of end nodes, a multicast packet to the first port of the second subnet via the first router port and the first physical link, wherein the multicast packet comprises a source global identifier (SGID);
- determining, by the second switch and upon receiving the multicast packet at the second switch, that the SGID of the multicast packet is associated with the first subnet and;
- based on the determined association, dropping the multicast packet.