In a wireless ad hoc network comprising a plurality of nodes (102), when a
method of the present invention determines that a source node and a
destination node belong to a common virtual local area network (VLAN),
information is routed to the destination node using only nodes that
belong to the common VLAN. If a path is not available to route the
information between the source node and the destination node using only
nodes that belong to the common VLAN, a default VLAN is used to route the
information at least partially through the ad hoc network. If, however,
the method of the present invention determines that the source node
belongs to a first VLAN and the destination node belongs to a second
VLAN, the source node or an intermediate node registers with the second
VLAN and continues routing the information using nodes that belong to the
second VLAN.