A network device for controlling data flow can have a buffer configured to
receive a packet, a first determining unit configured to determine a
multicast group number from the packet, a first table storage unit
configured to store at least one first bit vector and at least one first
pointer, and configured to have the multicast group number indexed
thereto, and a second table storage unit configured to store at least one
second bit vector and at least one second pointer, and configured to have
the at least one first pointer indexed thereto. In addition, the device
can have a generating unit configured to generate at least one first
network identifier based on the at least one first bit vector and the at
least one second bit vector, a replication unit configured to replicate
the packet for the at least one first network identifier, and a first
forwarding unit configured to forward a replicated packet replicated by
the replication unit to a network destination associated with the at
least one first network identifier.