Some embodiments can determine an internal virtual network identifier and/or an internal policy identifier for a packet based on a port on which the packet was received and/or one or more fields in the packet. The system can then process and/or forward the packet based on the internal virtual network identifier and/or the internal policy identifier. Some embodiments can perform remote port mirroring. Some embodiments can map a first set of QoS bits in a packet to a second set of QoS bits for use in a Transparent Interconnection of Lots of Links (TRILL) packet which encapsulates the packet. Some embodiments can efficiently support multiple multicast trees and for performing network layer multicasting in TRILL networks. Some embodiments can flood packets on a per-virtual-network basis.