Computer Networking Design
What is IEEE 802.1Q protocol?
• IEEE 802.1Q or VLAN Tagging was devised by the 802.1 work group
for sharing of the physical Ethernet link among a number of
independent multiple logical networks.
• This protocol forms the underlying principle of the CISCO NEXUS
1000V switch which is most commonly used for cloud computing.
• Together with the VMWare VSphere Operating System, this
protocol along with QoS, PVLAN, ERSPAN and CLI forms the heart
of the cloud computing environment.
• This protocol explains the meaning of Virtual LAN with respect to
bridging between the Medium Access Control protocol and the
802.1D Spanning Tree protocol.
802.1Q protocol application-Hypervizor
What is the Medium Access Control Data
• This layer, also known as MAC, is a sub-layer of the Data Link Layer.
• It provides the addressing and the Channel Access Control mechanism so
that multiple nodes or different terminals are able to communicate in a
Local Area Network.
• The hardware that is used for this is known as the Medium Access
• Each and every device has a unique MAC id.
THE ADDRESSING MECHANISM
• This mechanism provides a unique MAC address to each device in the network. This ensures
that the packets are delivered to the proper device because even though the devices may have
different IP addresses, it is possible that they may be in the same sub-network.
• The address usually consists of 6 groups of hexadecimal digits or numbers which are separated
either by a colon (:) or by hyphen (-) in the order of transmission.
Channel Access Control Mechanism
• This mechanism does the job of making it possible different nodes or
stations which are connected to the same physical network to share it.
• Some of the examples of the networks are ring, bus, hub etc. This is also
known as the Multiple Access Control Protocol. It either detects or avoid
collisions among the packets if the packet mode contention channel
access method is used or reserves resources if a circuit switched
channelized Control Access Method is used.
• One of the examples of the Channel Access Control Mechanism is the
CSMA/CD(Carrier Sense Multiple Access with Collision Detection).
802.1D Spanning Tree Protocol
• This protocol was devised to ensure that there is no looping in a bridged
network especially in a bridged LAN.
• Bridging is usually used in packet switched networks and makes no
assumptions on where a particular address is located in the network.
• It uses the concept of flooding and the source address in the packet
header to locate the device. Once this device has been located, its address
is stored in the MAC address table so that it need not be broadcasted
• Bridging is constrained by the fact that it uses flooding, so it is limited to
LAN’s. This protocol is implemented widely in the 802.1Q protocol to avoid
bridging loops when nodes in different VLAN’s communicate.
What is the Spanning Tree?
• As the name of the protocol suggests, it creates a spanning tree within a mesh network
of bridges and disables those links that are not a part of the tree which would leave us
with only one active path between two active nodes.
• Here, all the vertices of the grid are connected but note that no cycle is formed, which
forms the basis of the spanning tree protocol.
• Our main aim is not to form bridging loops in a network and avoid further broadcasts as
well as multicasts. It can also be said to be the maximum set of the edges of the grid
which connects all the vertices or the minimum set of the edges which forms no cycle.
Spanning Tree Protocol Explanation
• The network diagram shown above will be used to explain the spanning tree. Here the the boxes represent
bridges in the network whereas the numbers in these boxes represent the bridge id and the clouds represent the
network segments. The steps involved in finding the root bridge is explained in the next slide.
Find the root bridge
• The root bridge is the one with the minimum bridge id. #3 in this case. Each of these bridges
have a unique bridge id and a configurable priority number.
• For comparison of 2 bridge id’s, their priority is compared first. If they are equal, then their
MAC address is compared.
• For example, if two bridges have a priority of 10 and one has a MAC address of
0300.0000.2222 and the other has a MAC address of 0300.0000.4444, then the previous one
will be chosen as the root bridge.
Select the least cost path to the root bridge
• The tree has the property that any message from a device in the tree will traverse the least cost
path from that device to the root. The cost of traversing a path is the sum of the cost of that
• This is governed by the following rules:-
• After the root bridge has been chosen, each of the bridges in the network determines the cost of
each possible of itself to the root bridge. From these, it chooses that path which has the least
cost. The port that connects to that path would then become the root port (RP).
• The bridges on the network segment determine the least cost path from the network segment
to the root. The port which then connects this bridge to the network segment becomes the
Designated Port (DP).
• Any port which is neither a root port nor a designated port becomes a Blocked port (BP).
Example application of VLAN Tagging
• Consider for example that a company has many departments and it wants to
conserve the resources by using only one physical network and assigning different
logical networks for each of the departments that the company has.
• For this, the network administrator assigns a unique VLAN to each department. An
Edge device, which are particularly routers assign a frame address to each data
frame that is received from a given department.
• After this frame is transmitted to the respective VLAN, this tag is removed from
the data frame before transmitting it to other computer in the same department.
• This method is analogous to the one that is used in the Cloud Computing because
the main aim of cloud computing is to use a centralized physical resource and
nodes in different networks would share these resources thus forming a logical
Frame Address Format
Tag Protocol Identifier(TPID)-This field is used to distinguish between tagged frames and untagged frames and is
located in the same position as the Ether Type field. It is set to a value of 0×8100 to identify it as a tagged IEEE 802.1Q
Priority Code Point (PCP)-This is a 3 bit field and it indicates the 802.1p priority. This field is used to distinguish
between the priority of different frames with 0 being the best effort and 7 being the highest. This can be used to
prioritize between different types of traffic i.e. voice, data, video etc.
Canonical Format Indicator (CFI)-This is a 1 bit field which indicated whether the MAC address is in canonical format
or not. A canonical format indicates that the least significant bit is transmitted first. Most of the modern devices use
the canonical format.
VLAN identifier (VID)-This is a 12 bit field which specifies the VLAN to which the frame belongs. If this value is 0, then
it does not belong to any VLAN and the 802.1Q tag only contains the priority.
The hexadecimal value of 0xFFF is usually reserved. The rest of the values can be used allowing up to 4094 tags.