Patent attributes
Techniques for loop prevention while allowing multipath in a virtual Layer 2 (L2) network are described. In an example, a network interface card (NIC) supports the virtual L2 network. The NIC is configured to receive, via a first port of the NIC, an L2 frame that includes a source media access control (MAC) address and a destination MAC address. Based on a loop prevention rule, the NIC transmits the L2 frame via its ports except the first port. In an additional example, the NIC is further configured to send an L2 frame to a host via the first port of the NIC. The L2 frame can be a bridge protocol data unit (BPDU). Upon receiving a BPDU from the host via the first port, the NIC determines that the BPDU is looped back and disables the first port.