A method and system for forwarding traffic from a plurality of logical
networks using a single forwarding table. Traffic is received in the form
of packets with a key and a logical traffic identifier. The routing table
is traversed to a forwarding table entry having a longest prefixed search
value that matches the key and having a logical network identification
array in which the logical traffic identifier may be represented. If the
logical traffic identifier is represented in the logical network
identification array, then the packet is forwarded in accordance with
forwarding information associated with the forwarding table entry.