摘要 |
A network device for forwarding packets includes a plurality of interfaces including at least a source interface and a destination interface and a bridge module. The bridge module includes a receiving sub-module, a parsing sub-module, and a sending sub-module. The receiving sub-module receives a packet via the source interface. The parsing sub-module includes a media access control (MAC) table for saving MAC addresses and identifiers of interfaces corresponding to the MAC addresses, parses the packet to retrieve a destination MAC address of the packet, and queries the MAC table to retrieve an identifier of the destination interface. The sending sub-module receives the packet and the identifier of the destination interface, and sends the packet to the destination interface. The parsing sub-module determines whether the network device has an interface mirroring function, and sends the packet to a mirror interface if the network device has the interface mirroring function.
|