A network device with integrated topology discovery functions adapted to
virtual local area networks (VLANs). VLAN segments are mapped on a
network system formed from multiple network devices. One network device
creates and broadcasts a query packet for topology discovery in each
VLAN, in response to a command from a management console linked to that
network device. At each receiving network device, a query packet receiver
receives the query packet, and a reply packet is produced by a reply
packet generator. A reply packet transmitter sends the produced reply
packet back to the requesting network device. A query packet transmitter
forwards the received query packet to neighboring subordinate network
devices.