7.3 BACKBONE NETWORK ARCHITECTURES 257
VLANs span which switches and also defines VLAN trunks—circuits that connect two
VLAN switches and enables traffic to flow from one switch to another. As a switch
builds its forwarding table, it receives information from other switches and inserts the
Ethernet addresses of computers attached to them into its forwarding table along with
the correct trunk to use to send frames to them.
In this case, switch 2 receives the frame, and uses the forwarding table to identify
that it needs to send the frame over the trunk to switch 3. It changes the frame by inserting
the VLAN ID and priority code into the tag field and transmits the frame over the trunk
to switch 3. Switch 3 receives the frame, looks the Ethernet address up in its forwarding
table, and identifies the specific computer the frame needs to be sent to. The switch
removes the VLAN tag information and transmits the revised frame to the destination
computer. In this way, neither the sending computer nor the destination computer are
aware that the VLAN exists. The VLAN is transparent.
Suppose the same sending computer (179.58.10.102) wants to send a message to a
computer on a different subnet in the same VLAN (e.g., 179.58.7.30 on the same switch
or 179.58.11.20 on switch 3). The sending computer recognizes that the destination is
on a different subnet, and therefore creates an Ethernet frame with a destination Ethernet
address of its router (179.58.10.1), and sends the frame to switch 2.
At this point, everything works the same as in the previous example. Switch 2 looks
up the destination Ethernet address in its forwarding table, and recognizes that the frame
needs to go to switch 1 because the router’s Ethernet address is listed in the forwarding
table as being reachable through switch 1. Switch 2 sets the VLAN tag information and
sends the frame over the trunk to switch 1. Switch 1 looks up the destination Ethernet
address in its forwarding table, and sees that the router is attached to it. Switch 2 removes
the VLAN tag field and sends the frame to the router.
The router is a layer-3 device, so when it receives the message, it strips off the
Ethernet frame and reads the IP packet. It looks in its routing table and sees that the
destination IP address is within a subnet it controls (either 179.58.7.x or 179.58.11.x
depending on which destination computer the packet was sent to). The router creates a
new Ethernet frame and sets the destination Ethernet address to the destination computer
(using an ARP if needed) and sends the frame to switch 1.
Switch 1 reads the Ethernet address and looks it up in its forwarding table. It discovers
the frame needs to go to switch 2 (for 179.58.7.30) or switch 3 (for 179.58.11.20), sets the
VLAN tag field, and forwards the frame over the trunk to the correct switch. This switch
in turn removes the VLAN tag information and sends the frame to the correct computer.
Until now, we’ve been talking about unicast messages—messages from one com-
puter to another—that are the majority of network traffic. However, what about broadcast
messages such as ARPs that are sent to all computers in the same subnet? Each com-
puter on a VLAN switch is assigned into a subnet with a matching VLAN ID. When
a computer issues a broadcast message, the switch identifies the VLAN ID of the sending
computer and then sends the frame to all other computers that have the same VLAN ID.
These computers may be on the same switch, or on different switches. For example, sup-
pose computer 179.58.10.102 issues an ARP to find an Ethernet address (e.g., the router’s
address). Switch 2 would send the broadcast frame to all attached computers with the
same VLAN ID (e.g., 179.58.10.103). Switch 2’s trunking information also tells it than
VLAN 10 spans switch 1 and switch 3, so it sends the frame to them. They, in turn,
use their tables to send it to their attached computers that are in the same VLAN (which