Virtual Local Area Network elements are used to replace physical networking components to facilitate testing network configurations where a physical connection to a network is not available or inconvenient.
VLANs can be configured to create a network with any arbitrary MAC address size, so they can be used to simulate smaller networks such as ARCNET that has one octet address, or larger networks such as Ethernet or IP. These simulations are restricted to supporting unicast and broadcast messages, more sophisticated simlulations of multicast address or IP routers performing NAT may be added in the future.
The VLAN component creates a virtual network with a collection of connection nodes, or stations. Each node has a unique address:
<VLAN> <Node address="node_address" server="server_label" promiscuous="flag" /> ...additional nodes... </VLAN>
Node component is a connection to the network. All traffic being sent on
the network will have the
node_address as a source address.
promiscuous flag is “y” or “Y” if the node listens for all traffic on the VLAN,
and may also “spoof” other devices by including both a source and destination address.
For these and other samples, the components are described in configuration starting from the bottom of a stack and proceeding up. In the coorisponding diagrams, upstream traffic goes from left to right, the downstream traffic from right to left.
This sample configuration file creates a virtual network with three nodes:
<BFR> Create a network with three nodes: <VLAN> <Node address="1" server="a" promiscuous="y" /> <Node address="2" server="b" /> <Node address="3" server="c" /> </VLAN> On the first node, bind a debugger: <Debug client="a" prefix="a" /> On the second node, bind a console: <Console client="b" /> On the third node, bind an echo: <Echo client="c" /> </BFR>
In this sequence, the user enters a broadcast message on the console, such as this:
The message travels downstream from the console to node
B (1). The node recognizes recognises
that it should be distributed to all of the other nodes in the VLAN, so it provides a copy
of the message to
A (2) and an additional copy to
C (3). These two messages, number (2)
and (3) are between two peers, so they are not strictly upstream or downstream messages.
A sends the packet upstream to the
Debug component (4) which prints the message
C sends its copy of the packet upstream to the
Echo component (5). The
component swaps the source and desination address and send it back down to
C (6). Then
recognises the destination address for
B and sends the packet to it (7).
B receives the packet and sends it upstream to the console, which prints the packet.
A at address
1 is set as promiscuous so it will receive a copy of
every packet on the network, including those sent from
B. So in addition to the
debugging messages that are in the stream of packets on other nodes, node
A will print
out the contents of every message on the LAN.