Introduction to Layer 2 Switching
Document Sample


Layer 2 Switching
Introduction to Layer 2 Switching
A switch is a network device that channels incoming data from various input ports to
specific output port of its intended destination.
Layer 2 switches operate at the data link layer of the Open Systems Interconnection
(OSI) communications model. The Data Link layer is concerned with moving data
across physical links in networks. In an Ethernet local area network (LAN)
environment, this means the switch looks at each packet or data unit and determines
from the Media Access Control (MAC) address which device the data unit or
message is intended for and switches it toward the destination output device.
Basic Switching Operation
Switches perform at dual speed transmission and are better than traditional hubs
which only transmit at single speed. In a shared Ethernet network using hub, when
one computer connects to an Ethernet network and wants to send data, it will listen
for any other traffic on the network segment to ensure the network is clear before it
attempts to transmit data. This means only one signal can be transmitted over the
network at any one time. If two or more computers attempt to transmit data at the
same time, collision occurs. The computer will then attempt to re-send the data after
a random time. This whole process is called carrier sense multiple access with
collision detection (CSMA/CD). As more devices are connected to this network,
collisions will occur, causing the overall network performance to be degraded. Using
switches, these collisions can be prevented.
In a switched network, each computer connecting to the switch is assigned a
dedicated segment. This isolation of individual devices in different segments is called
microsegmentation. Using microsegmentation, device collisions are no longer an
issue. When data is sent from a computer to the switch, it examines the destination
hardware address and forwards the data to the proper segment. If the data received
is within the same segment as the originating segment, it is filtered and dropped.
D-Link Australia & NZ Page 1 of 60
Version 1.0
Layer 2 Switching
Microsegmentation using Switch
Single Collision Domain using Hub
Figure 1. Switched vs Shared Network
Different switches support different modes of operation. One of the most commonly
implemented modes is called store-and-forward. A switch using store-and-forward
will wait for complete data or frame to be received and checked for errors before
forwarding it. Because of these conditions, switches using store-and-forward are
inherently slower. Data that fails cyclic redundancy check (CRC) or is a giant (more
than 1518 bytes) or a runt (less than 64 bytes) is filtered and discarded.
Dest
4
Addr
3 Destination
Data 1
Source
Store entire frame
2
Giant
CRC
Runt
Discard
Figure 2. Store-and-Forward Operation
Another mode used by switches is known as cut-through operation. Cut-through
operation does not perform error checking nor waits for complete data to be received
before forwarding. It forwards data as soon as the switch determines the destination
address from the frame header. The advantage of this method is in its fast operation.
D-Link Australia & NZ Page 2 of 60
Version 1.0
Layer 2 Switching
Using this mode, latency from the input to the output port can be significantly
decreased. The disadvantage, however, is that data with corrupted frames will not be
filtered because it does not perform error checks.
Dest 3
Addr
1 2 Destination
Data
Source
Store the
dest addr
only
Figure 3. Cut-Through Operation
A switch operation mode that harnesses the advantages of store-and-forward and
cut-through operation is called fragment-free operation, also known as modified cut-
through. The switch waits for the collision window at the first 64 bytes to pass before
forwarding any data. Fragment-free switching ensures data less than 64 bytes are
not forwarded to other network segments. Errors in data almost always occur within
the first 64 bytes, and data less than 64 bytes (runts) are often the cause of collision
fragments. With fragment-free operation, better checking than cut-through mode is
achieved and latency is kept to the minimal. Fragment-free operation however does
not identify oversized data above 1,518 bytes (giants).
D-Link Australia & NZ Page 3 of 60
Version 1.0
Layer 2 Switching
Spanning Tree
Switched networks may be designed in two ways: physically and logically. Physical
network configuration allows devices such as computers, switches, routers and
servers to communicate with each other. To plan the control of network resources for
optimal performance and create an efficient network, many different techniques may
be used. Examples are the control of network traffic to specific subnets, and the use
of redundant connections to maintain integrity of network.
Logical network configuration is determined by how traffic flows across a physical
network. Different techniques are used to minimize bottlenecks and links that are
heavily stressed. Examples are traffic flow management, prioritization, and quality of
service.
Network Looping
Network loops occur when there is broadcast traffic between subnets. Broadcast
packets from a source forwarded to multiple ports via a single link will return a
broadcast to the original source via the redundant link if more than one paths are
connected to two subnets. This can trigger the process to repeat and result in logical
flow of packets looping endlessly across the physical network.
Take for example, a computer in subnet A sends a data to another computer in
subnet B. The switch in subnet C and D do not know what the forwarding port of
destination device is, so it broadcast to all ports. When the switch in subnet B finds
the destination device, it completes the transmission. Subnet B however also
exchanges broadcasts with subnet C and D, and C and D will return broadcast to
subnet B. Subnet B will then response to the broadcast again and starts a cycle
between subnet A, C, and D. All the broadcast traffic that reach subnet B will be
forwarded to the destination device, but with multiple duplications, causing endless
loop in the network. This can result in delays for other legitimate traffic requirements.
D-Link Australia & NZ Page 4 of 60
Version 1.0
Layer 2 Switching
A
B C
D
Initial transmission
C & D rebroadcast to A
C & D rebroadcast to
each other
Figure 4. Looping in a Network
One technique to stop network looping and provide effective management of
redundant links is Spanning Tree Protocol (802.1d).
Spanning Tree Protocol (STP 802.1d)
Spanning Tree (802.1d) is a protocol that resides in network switches that allow all
Spanning Tree Protocol (STP) enabled devices to communicate with each other to
detect and manage redundant links within a network. It is a link management protocol
that provides path redundancy while preventing undesirable loops in the network.
Multiple active paths between stations can cause loops in the network leading to the
potential existence of duplicate messages. The switches will see stations appearing
on more than one port of the switch and confuse the forwarding algorithm, resulting
in duplicate frames being forwarded.
STP can provide path redundancy by defining a tree that spans across all switches in
an extended network. Spanning Tree Protocol will force the redundant data paths
into a standby state, so that if one network segment in the STP is unreachable, or if
STP costs change, the spanning tree algorithm will reconfigure the spanning tree
topology and re-establish the link by activating the standby path.
Using STP, devices can manage itself on a port-by-port basis, gathering information
such as media access control (MAC) addresses, switch and port priority, port
D-Link Australia & NZ Page 5 of 60
Version 1.0
Layer 2 Switching
identifier, path cost, root switch identifier, root port identifier, designated port
identifiers, and path cost from the port to the root switch. This information is sent to
other STP enabled devices on the network using Bridge Protocol Data Units (BPDU).
a. Bridge Protocol Data Units (BPDU)
The BPDU is a datagram used by switches to communicate with each other and
exchange information. A datagram is a self-contained, independent entity of data
carrying information to be routed from the source to the destination computer.
Information gathered from BPDUs of devices on the network will help in
configuration decisions. Configuration decisions include choice of root devices,
selection of switch to link a subnet and the root device, selection of root and
designated ports for communicating STP information, selection of shortest path
between a device and root switch, detection of loops, and removal of loops. When
there is a change in the network, BPDUs can be sent between the network
devices to see if reconfiguration is required. Using BPDUs exchange,
configuration and reconfiguration of spanning tree topology is possible.
BPDU BPDU BPDU
Switch Switch Switch
Figure 5. BPDU in a Spanning Tree Environment
A BPDU exchange will result in the following:
- One switch will be elected as the root switch.
- The shortest distance of each switch to the root switch will be calculated.
- A designated switch will be selected which is closest to the root switch through
which frames will be forwarded to the root.
- The selected port for each switch will be the port that provides the best path
from the switch to the root switch.
- Ports included in the Spanning Tree Protocol will be selected.
D-Link Australia & NZ Page 6 of 60
Version 1.0
Layer 2 Switching
In a BPDU exchange, the switch sends configuration BPDUs to communicate and
compute the spanning tree topology. A MAC frame conveying a BPDU sends the
switch group address to the destination address field. All switches connected to
the LAN on which the frame is transmitted receive the BPDU. Information
contained in the frame can be used to calculate a BPDU by the receiving switch.
b. Root Switch
The first step to establish a hierarchy between the STP-enabled devices is to
identify the logical starting point that STP can operate. Designating the root switch
is one of the first functions performed because it is the logical beginning of the
STP within a network. All the devices in the network exchange their bridge ID
(BID) which contains the MAC addresses and bridge priority. The priority settings
of each device can be configured by the system administrator. The device with the
lowest BID will be the root device. If all devices are enabled with default settings,
the switch with the lowest MAC address in the network becomes the root switch.
Once the root switch is determined, all the devices in the network will attempt to
find out how far they are from the root switch by sending BPDUs through all of its
ports. The port with the lowest path cost between the root switch and the device
itself will be designated as the root port.
Path cost is calculated based on certain values which can be changed by a
network administrator if required. The path cost follows a pattern and is lower with
higher speed links. For example, the path cost of a 100 Mbps link will be higher
than the 1Gbps link. Each switch in the network will have a root port that
communicates directly with the root switch for configuration and management
functions.
Once the root switch paths are identified, the rest of the network will need to
decide how to talk with each other. Although the root switch is the overall logical
center of the network, it cannot handle all the devices in the network by talking to
them concurrently. Therefore, another level of organization is needed at the
subnet level in determining a designated switch and designated ports. A
designated switch is the mouthpiece for a network segment where all STP traffic
between network segments is relayed from the designated port of a switch.
D-Link Australia & NZ Page 7 of 60
Version 1.0
Layer 2 Switching
Root Switch
Root Ports
Designated
Switch
Designated
Ports
Figure 6. STP Network with Designated Switch and Ports
Using this second level of hierarchy allows the network to recover from a loss of
the root switch and also allows reconfiguration of an individual segment without
disturbing other segments. Designated switches can also prevent network loops
due to the exchange of BPDUs between segments.
When the root and designated ports for the switches established, the STP can
begin to identify any redundant links in the network.
c. Port States
When the redundant links are found, they are added to the STP list on a port-to-
port basis. Since any port on the switch can contain a redundant link, each port
can be put into one of the five states to facilitate the management of network to
prevent logical loops:
- Blocking
When a switch is first turned on, all the ports, except the root port, are set to
blocking state so that no traffic can be forwarded until the switch determines
the root switch in the network. Blocking can eliminate looping in network until
all redundant links can be managed properly. The switch will time out after a
set time if there is no additional switches in the network and all ports will be
changed to listening state.
D-Link Australia & NZ Page 8 of 60
Version 1.0
Layer 2 Switching
- Listening
When a port is in listening state, it will attempt to find the system configuration
information from the traffic it is receiving to figure out if it should allowed to
forward network traffic. To do this, the port in the listening state will drop the
regular traffic and only forward or respond to the BPDUs or network
management commands. When two or more ports are found to be creating a
loop, the switch will activate the port with the lowest path cost to learning state
and the other ports with higher path cost will be disabled.
- Learning
The learning state allows the port to add its address to the forwarding table in
the switch so that other ports can recognize it, so that traffic can be switched
directly instead of performing broadcasts to learn the destination address.
Once the port address is recognized by the switch management module, it is
changed to the forwarding state.
- Forwarding
When the port is in the forwarding state, it is allowed to pass traffic between
other ports on the same switch, other network segment, and within itself. It
forwards frames received from the attached segment or switched from another
port for forwarding. It will incorporate station location information into its
address database, receive BPDUs and directs them to the system module, and
process the BPDUs received from the system module. It will also receive and
respond to the network management messages.
D-Link Australia & NZ Page 9 of 60
Version 1.0
Layer 2 Switching
Station Filtering
Addresses Database
Data Frames
Forwarding Learning
BPDUs BPDUs BPDU &
Port 1 System Port 2
network
Module mgt frames
All segment
frames
All segment
frames
Network
Mgt & Data Frame Network
Frames Forwarding Mgt
Frames
Figure 7. Active Port States
- Disabled
Ports are disabled when they are part of a network loop. Ports in disabled state
will not allow network traffic to be passed. It will not update the address
database as there is no learning. It will however still accept and process
BPDUs and network management traffic, but will not direct them to the system
module. It will not receive BPDUs for transmission from the system module.
Ports with disabled state can be activated if it is needed and disabled again
when it is not.
D-Link Australia & NZ Page 10 of 60
Version 1.0
Layer 2 Switching
Station Filtering
Addresses Database
Data Frames
Forwarding Disabled
BPDUs
Port 1 System Port 2
Module
All segment All segment
frames frames
Network
Mgt & Data Frame Network
Frames Forwarding Mgt
Frames
Figure 8. Disabled Port State (Port 2)
There are five states of STP where the port moves through:
- From initialization to blocking
- From blocking to listening or to disabled
- From listening to learning or to disabled
- From learning to forwarding or to disabled
- From forwarding to disabled
D-Link Australia & NZ Page 11 of 60
Version 1.0
Layer 2 Switching
Power-on
Initialization
Blocking
State
Listening Disabled
State State
Learning
State
Forwarding
State
Figure 9. Spanning Tree Protocol Port States
For STP to configure itself into a stable logical architecture takes about 30 to 60
seconds. This is fine with Ethernet links speeds using 10 Mbps and 100 Mbps.
However with Ethernet now also offering 1 Gbp and 10 Gbps link segments, 30 to 60
second reconfiguration time is no longer acceptable in view of the need for real-time.
To provide faster Spanning Tree functions, newer versions of STP have been
created. These include the Multiple Spanning Tree (MISTP) IEEE 802.1s, and Rapid
Spanning Tree (RSTP) IEEE 802.1w.
Multiple Spanning Tree, IEEE 802.1s
Multiple Spanning Tree Protocol (MISTP) 802.1s is an IEEE standard that allows
VLANs and STP to work together. It provides a way of allowing STP to exist across
different VLANs within a network.
Rapid Spanning Tree, IEEE 802.1w
Rapid Spanning Tree Protocol (RSTP) 802.1w is an evolution of the STP IEEE
802.1d standard. The main difference between STP and RSTP is in the negotiation
between nodes on the network. The BPDU format has changed due to the
consolidation of several aspects of STP to streamline performance. Unlike STP
which has five different states, RSTP only has three. Negotiation of BPDUs has been
D-Link Australia & NZ Page 12 of 60
Version 1.0
Layer 2 Switching
enhanced in RSTP for more efficiency. It can also detect and reconfigure logical
topology of a network faster than before because of enhanced communication
between nodes.
a. New Port States and Port Roles
RSTP IEEE 802.1w has three port states: discarding, learning, and forwarding.
Port states blocking, listening, and disabled in STP IEEE 802.1d are now
combined within RSTP discarding state. Functionally, there is no difference
between a port in the blocking state and a port in listening state. Both of them
discard frames and do not learn MAC addresses. It is assumed that a listening
port is either designated or root and on its way to the forwarding state. However,
in the forwarding state, it is not able to know whether the port is root or designated
and lead to failure of this state-based terminology. RSTP addresses this by
decoupling the role and the state of a port.
Power Up Discarding Learning Forwarding
Figure 10. RSTP Port States
The port role in RSTP is now a variable assigned to a given port. The root port
and designated port roles remain unchanged. The blocking port role is now split
into the backup and alternate port roles. In the Spanning Tree Algorithm (STA),
BPDUs determine the role of a port.
- Root Port Roles
The port that receives the best BPDU on a switch is the root port. This port is
the closest to the root switch based on path cost. The STA determines the role
of a port based on BPDU. The STA also selects the root switch in the switched
network. The root switch is the only switch in the network without a root port. All
other switches will receive BPDUs on at least one port.
D-Link Australia & NZ Page 13 of 60
Version 1.0
Layer 2 Switching
- Designated Port Role
On a given segment, there can be only one path towards the root switch. All
switches connected to a given segment listen to each other’s BPDUs and
agree on the switch sending the best BPDU as the designated switch for the
segment. The corresponding port on that switch is designated.
- Alternate and Backup Port Roles
An alternate port is a port blocked by receiving more useful BPDUs from
another switch. A backup port is a port blocked by receiving more useful
BPDUs from the same switch.
R Root Port Root
Switch
Designated Port D D
D
A Alternate Port
B Backup Port R R
B
A D
Figure 11. Port Roles
b. New BPDU Handling
Unlike the relay handling by non-root switches when it receives BPDUs on its root
port in STP previously, RSTP will send a BPDU with its current information every
two seconds even if it does not receive any BPDUs at the root switch. This two
seconds activity is known as ‘hello time’.
The advantage of using ‘hello time’ is in the faster aging of information to provide
up-to-date information. On a given port, if ‘hellos’ are not received for three
consecutive times, it can be aged out immediately. In this way, BPDUs in RSTP
can then be used as a ‘keep-alive’ mechanism between switches. A switch will be
D-Link Australia & NZ Page 14 of 60
Version 1.0
Layer 2 Switching
considered to have lost its connectivity to its direct neighboring root or designated
switch if it misses three BPDUs in a row, hence providing quick failure detection
using fast aging of information. Based on this architecture, if a switch does not
receive BPDUs from a neighbor, it can be certain that the connection to this
neighbor has been lost. RSTP can therefore detect failures much faster compared
to STP in the case of physical link failures.
When a switch receives inferior BPDUs because a link from the designated switch
has lost its link to the root switch, the designated switch will transmit the BPDUs
with information that it is now the root switch and the designated switch. The
receiving switch will then ignore the inferior BPDU and replace it with the one from
the designated root switch.
c. Rapid Transition to Forwarding State
Rapid transition is the most important feature in RSTP. The traditional STA
passively waits for the network to converge before turning a port into the
forwarding state. RSTP is able to actively confirm that a port can safely transit to
forwarding state without relying on any timer configuration. There is a feedback
mechanism that takes place between RSTP-compliant switches. To achieve fast
convergence on a port, the protocol relies upon two variables known as edge
ports and link types.
- Edge Ports
All ports connected directly to end stations cannot create bridging loops in the
network and can directly transit to forwarding state, bypassing listening and
learning.
- Link Types
RSTP can only achieve rapid transition to forwarding on edge ports and on
point-to-point links. The link type is automatically detected depending on the
duplex mode used for the port. When the port operates in full duplex, point-to-
point is assumed. When the port operates in half duplex, shared port is
assumed. Most switched networks today operate in full duplex using point-to-
point link, which makes them candidates for rapid transition to forwarding.
D-Link Australia & NZ Page 15 of 60
Version 1.0
Layer 2 Switching
d. Convergence with 802.1d
The figure below illustrates the way STP deals with a new link added to a switched
network:
Root
New
Connection
A
B C
P1
D
Figure 12. How STP works
When a new connection is established between Switch A and the Root Switch, it
is assumed that there is already an indirect connection between Switch A and the
Root Switch via Switch C and D. STA will disable the bridging loop by blocking a
port. The two ports that link Switch A and Root Switch are first put in listening
state. Once Switch A is able to hear the Root Switch directly, it propagates its
BPDUs on its designated ports towards the leaves of the tree. When Switch B and
C receive this information from Switch A, they relay it towards their leaves
immediately. When Switch D receives a BPDU from the root, it will block its port
P1 instantly.
Using the illustration above, it can be seen that STP efficiently calculates the new
topology of the network immediately. There is, however, a problem because twice
the forward delay has to elapse before the link between the Root Switch and
Switch A are eventually in the forwarding state. This essentially means a lapse of
D-Link Australia & NZ Page 16 of 60
Version 1.0
Layer 2 Switching
30 seconds disruption of traffic because the 802.1d algorithm lacks a feedback
mechanism advertising that the network has converged in a matter of seconds.
e. Convergence with 802.1w
RSTP deals with the same situation differently. Although the final topology is
similar to STP, the steps taken to reach the topology are not the same.
Root
Exchange
BPDU Block
A
B C
P1
D
Figure 13. RSTP Step 1
When two ports on the link between Switch A and the Root Switch come up, they
are put in designated blocking, similar to an STP environment. The steps in RSTP
change at this point, where a negotiation takes place between Switch A and the
Root Switch. The Switch A receives the Root Switch’s BPDU and blocks its non-
edge designated ports. This operation is called sync. Once sync is completed,
Switch A explicitly authorizes the Root Switch to put its port in forwarding state.
The potential bridging loop is then cut at a different location. The cut travels down
the tree along with the new BPDUs originated by the root through Switch A. At this
stage, the newly blocked ports on Switch A will then negotiate for a quick
transition to forwarding state with their neighboring ports on Switch B and Switch
C.
D-Link Australia & NZ Page 17 of 60
Version 1.0
Layer 2 Switching
Root
Forwarding
A
Non-edge
designated ports
Block
B C
P1
D
Figure 14. RSTP Step 2
Switch B only has edge designated port, so it has no other ports to block in order
to authorize Switch A to go to forwarding state. Switch C only has to block its
designated port to Switch D. It will reach the final network topology.
Root
A
Forwarding
B C
Non-edge Block
designated ports
D
Figure 15. RSTP Step 3
D-Link Australia & NZ Page 18 of 60
Version 1.0
Layer 2 Switching
Summary: Spanning Tree
The spanning tree protocol provides two main benefits to enterprise networks. Firstly,
it eliminates potential looping problems that can affect the networks. Secondly, it
allows the disabling or discarding of ports where redundant links can be deactivated
or activated when needed. With STP and RSTP, network management and network
recovery for increasing overall availability of a network is now made possible.
D-Link Australia & NZ Page 19 of 60
Version 1.0
Layer 2 Switching
Virtual Local Area Network (VLAN)
When a user broadcast information on the LAN, all users on the same LAN receive
the broadcast. To prevent broadcast from leaving a LAN, one solution is to use a
router, but this will take more time to process incoming data compared to a switch.
Virtual Local Area Network (VLAN) is developed as an alternative solution to using
routers to contain broadcast traffic.
Benefits of VLANs
VLANs can offer many advantages over traditional LANs.
a. VLANs Increase Performance
In a typical network, the traffic consists of very high percentage of broadcasts and
multicasts. With VLANs, such traffic to unnecessary destinations can be reduced.
b. VLANs Form Virtual Workgroups
In an environment where members of different departments or cross-functional
teams may need to work together on a project, to physically move members to the
same network segment of a LAN would not only be impractical, but also
troublesome, especially if the project is only for a short period. With VLANs,
members can be put into virtual workgroups. This formation of logical workgroups
can be carried out using software functions where the network managers need
only to reconfigure a new port for a particular subnet.
c. VLANs Ease Network Administration
Whenever a user moves in a network, new cable and station addressing are
needed. It is necessary to reconfigure network devices such as hubs and routers.
Using VLANs, when a user moves within the VLAN, there is no need to
reconfigure routers or hubs. Administrative work can therefore be reduced or
eliminated.
d. VLANs Enhance Network Security
The broadcast in the network may contain sensitive data. Placing users on a
VLAN can reduce the chance of intruder access to the data.
e. VLANs Reduce Cost
For an average company, owning network management facilities can be costly.
This cost will increase with increase number of users and demand for flexible
network. Using virtual networks, operating cost can be reduced.
D-Link Australia & NZ Page 20 of 60
Version 1.0
Layer 2 Switching
Types of VLANs
In general, there are two basic models for determining how a packet gets assigned to
a VLAN. They are based on port or protocol.
a. Port-Based VLANs
In a port-based VLAN, each port on the switch is assigned to a VLAN. For
example:
VLAN 1 VLAN 2
Switch No Ports Ports
1 1, 2, 3 -
2 2 1, 3, 4
3 1, 2, 3 -
4 1, 3 4 2, 5, 6
5 - 1, 2, 3, 4
VLAN 1 is built from the switch 1 ports 1, 2 and 3, switch 2 port 2, switch 3 ports 1,
2 and 3, switch 4 ports 1, 3 and 4. There is no port assigned to VLAN 1 on switch
5.
VLAN 2 is built from switch 2 ports 1, 3 and 4, switch 4 ports 2, 5, and 6, switch 5
ports 1, 2, 3, and 4. There is no port assigned to VLAN 2 on switch 1 and 3.
D-Link Australia & NZ Page 21 of 60
Version 1.0
Layer 2 Switching
VLAN1 VLAN2
3 4 5 6 3 4
2 3 2
1 2
Switch 3 Switch 4 1 1 Switch 5
3 4
3 2
Switch 2
Switch 1 2
1 1
Router
Figure 16. Port-Based VLAN Example
Port-based VLAN is easy to troubleshoot because the assignment of physical port
is known. If hubs are connected to the switches, all users connecting to a specific
hub can only be assigned to a common VLAN.
b. Protocol-Based VLANs
In protocol-based VLANs, the delivery of packets depends on layer 3 addresses
and protocols, such as IP, IPX, NetBIOS. It is a flexible way to group users
logically. IP subnet or IPX network can be assigned its own VLAN. Two methods
used to indicate membership when a packet is transferred between switches are
implicit and explicit.
In implicit method, the VLAN membership of a packet is indicated by the MAC
address. All the switches that support a particular LAN must share a common
MAC address table.
In explicit method, the VLAN membership of a packet is indicated by a tag added
to the packet. This method is defined in the IEEE 802.1q standard. When a packet
arrives at its local switch, the VLAN membership can be determined as port-based,
MAC address-based, or protocol-based. When the packet is transferred to other
D-Link Australia & NZ Page 22 of 60
Version 1.0
Layer 2 Switching
switches, the VLAN membership can either be detected implicitly (through MAC
address) or explicitly (through a tag that was added by the first switch). Port- and
protocol-based VLANs prefer explicit tagging. MAC address-based VLANs are
almost always implicit. IEEE 802.1q specification supports port-based assignment
with explicit tagging. For example:
VLAN 1 VLAN 2
Switch No. IP Addresses IP Addresses
1 - -
2 - -
3 192.168.1.100, -
192.168.1.101
4 192.168.1.102, 192.168.2.100,
192.168.1.103 192.168.2.101
5 - 192.168.2.102,
192.168.2.103,
192.168.2.104
VLAN 1 is built from with the IP addresses 192.168.1.100 and 192.168.1.101
through switch 3 and IP addresses 192.168.1.102 and 192.168.1.103 through
switch 4. Switches 1, 2 and 5 have no IP address assigned to VLAN 1.
VLAN 2 is built from with the IP address 192.168.2.100 and 192.168.2.101
through switch 4 and IP addresses 192.168.2.102, 192.168.2.103 and
192.168.2.104 through switch 5. Switch 1, 2 and 3 have no IP address assigned
to VLAN 2.
D-Link Australia & NZ Page 23 of 60
Version 1.0
Layer 2 Switching
VLAN1 VLAN2
192.168. 192.168.
192.168. 192.168. 192.168. 1.103 192.168. 192.168. 192.168. 192.168. 2.104
1.100 1.101 1.102 2.100 2.101 2.102 2.103
Switch 3 Switch 4 Switch 5
Switch 2
Switch 1
Router
Figure 17. Protocol-Based (IP address) VLAN Example
When a computer is moved within the same VLAN, it does not need any
reconfiguration. If a computer is moved to another VLAN, the IP address must be
reassigned.
The advantage of protocol-based method is that it optimizes the traffic control. The
broadcast can be segmented according to the protocol used. It can be used in
mixed networks with different protocols. With these added advantages, however, it
also means higher complexity of network management. Network administrators
and managers will need to have knowledge of how the various protocols work. In
the case of tagging, it also means that the maximum packet size has been
increased, and this can lead to counter errors using some devices. In addition,
switches will also have to be managed according to IEEE 802.1q specification.
IEEE 802.1q VLAN
IEEE 802.1q VLAN is an open-vendor VLAN protocol. It enables interoperability of
VLAN between different manufacturers. This standard defines the operation of VLAN
D-Link Australia & NZ Page 24 of 60
Version 1.0
Layer 2 Switching
bridges that permit the definition, operation and administration of VLAN topologies
with a Bridged LAN infrastructure.
a. Tagged and Untagged Frame
A tagged frame is a frame that contains a tag header immediately following the
source MAC address field. It is a 32-bit VLAN tag. An untagged frame is a frame
that does not contain a tag header. The frame with a VLAN tag has a maximum
allowable frame size to be extended to 1522 bytes.
DA SA Tagged Data CRC
8100 Priority CFI VID
0 15 18 19 31
802.1q Tag Canonical Format
Protocol Type Indicator
User Priority VLAN Identifier
Figure 18. Tagged Frame
b. VID and PVID
VLAN Identifier (VID) uniquely identifies the VLAN to which the frame belongs. It is
a 12-bit portion of a VLAN tag that can identify 4096 VLANs. VID 0 and VID 1 are
reserved for specific purposes. VID 0 is also known as the Null VLAN. It means
that there is no VLAN identifier present in the frame. VID 1 is the default VID value
used for tagging frames. VID 4095 is reserved too.
In VLAN classification, the VID associated with an untagged frame is determined
based on the port of arrival of the frame into the switch. This classification
mechanism requires the association of the PVID with each VID. The PVID of a
given port provides the VID for untagged frames received through that port. The
PVID for each port should contain a valid VID value and should not contain the
D-Link Australia & NZ Page 25 of 60
Version 1.0
Layer 2 Switching
value of the Null VID. For example, a port with PVID 3 will assign all untagged
packets to VLAN 3.
c. Egress Ports
Egress ports are a set of ports that are transmitting traffic for a VLAN as either
tagged or untagged frames. Any port that belongs to a VLAN must be an Egress
port (“E”). All VLAN frames can be transferred out of Egress ports.
d. Switching Rules for Tagged and Untagged Ports
When an incoming tagged packet is going into a switch, the switch will check for
the tagged VID and switch the frame to the specified VLAN group. It will not check
the PVID of the incoming port.
When the packet is forwarded to a tagged egress port, the tagged packet will
remain unchanged. If the packet is forwarded to an untagged egress port, the tag
will be removed from the packet before leaving the switch.
Tagged packet
Tagged remains unchanged
Member
of VLAN 2 Tagged packet
DA SA Tag Data CRC
VID = 2
CRC Data Tag SA DA 802.1q
Switch
Tagged packet
DA SA Data CRC
Untagged Untagged packet
Member
of VLAN 2 Tag is removed to
become untagged
packet
Figure 19. Switching Rules for Incoming Tagged Packets
When an incoming untagged packet is forwarded to a switch, the switch will check
for the PVID of the incoming port and switch the frame to the specified VLAN
group.
When the packet is forwarded to a tagged egress port, the tag will be added to the
outgoing packet before leaving the switch. If the packet is forwarded to an
untagged egress port, the outgoing packet will remain unchanged.
D-Link Australia & NZ Page 26 of 60
Version 1.0
Layer 2 Switching
A tag is added to the
packet to become a
Tagged tagged packet
Member
of VLAN 2 Tagged packet
PVID = 2 DA SA Tag Data CRC
CRC Data SA DA 802.1q
Switch
Untagged
DA SA Data CRC
packet
Untagged Untagged packet
Member
of VLAN 2 Untagged packet
remains unchanged
Figure 20. Switching Rules for Incoming Untagged Packets
Summary: Virtual Local Area Network
Virtual Local Area Network (VLAN) allows better security, improves performance,
simplifies administration and reduces cost. VLAN is formed by segmenting a network
logically. IEEE 802.1q is the open standard specification for VLANs implementation.
Different manufacturers’ switches can interoperate with VLANs efficiently.
D-Link Australia & NZ Page 27 of 60
Version 1.0
Layer 2 Switching
Link Aggregation
With the increase of data traffic and higher demand on quality of service, high
availability of network has become an essentiality in every organization. Link
aggregation is a method that combines multiple physical network links between two
devices into a single logical link to increase bandwidth and high availability of the
communication channel between devices such as switches and end stations. Using
link aggregation, the system can maximize the runtime and minimize the loss of
service interruption at a reasonable cost. Two or more Fast Ethernet or Gigabit
Ethernet connections can be combined to increase the bandwidth capability and
create resilient and redundant links. Link aggregation can also provide load balancing,
reduce hardware and software failures, and backup core resources. The processing
and communications activity is distributed across several links in a trunk so that no
single link may be overwhelmed.
Many manufacturers have been supporting proprietary link aggregation schemes for
Ethernet and Fast Ethernet for some years. The standardized implementation of link
aggregation is IEEE 802.3ad. With this standard, switches from different vendors can
be used to bond network links to provide faster bandwidth using aggregated links.
Using link aggregation, link speed can reach up to 8 Gbps.
IEEE 802.3ad supports Ethernet, Fast Ethernet, and Gigabit Ethernet. Aggregated
links can use a combination of these speeds on a single logical link. The network
traffic can be distributed across ports and the administration of which data flow
across each port is handled automatically within the aggregated link.
Link Aggregation Technology
Link aggregation technology is also called trunking or bonding. It combines multiple
physical links between two devices into one logical path. The logical path is called an
aggregate link.
D-Link Australia & NZ Page 28 of 60
Version 1.0
Layer 2 Switching
Switch
One logical link –
aggregate link
Switch
Figure 21. Link Aggregation
IEEE 802.3ad Standard
The IEEE 802.3ad standard lists the following main goals and objectives for link
aggregation (Source: IEEE Standard 802.3, 2000 Edition, p. 1215):
- Increased bandwidth
The capacity of multiple links is combined into one logical link.
- Increased availability
The failure or replacement of a single link within a Link Aggregation Group need
not cause failure from the perspective of a MAC Client.
- Linearly incremental bandwidth
Bandwidth can be increased in unit multiples as opposed to the order-of-
magnitude increase available through Physical Layer technology options (10 Mbps,
100 Mbps, 1000 Mbps, etc).
- Load sharing
MAC Client traffic may be distributed across multiple links.
- Automatic configuration
In the absence of manual overrides, an appropriate set of Link Aggregation
Groups is automatically configured, and individual links are allocated to those
groups.
D-Link Australia & NZ Page 29 of 60
Version 1.0
Layer 2 Switching
- Rapid configuration and reconfiguration
In the event of changes in physical connectivity, Link Aggregation will quickly
converge to a new configuration, typically on the order of 1 second or less.
- Deterministic behavior
Depending on the selection algorithm chosen, the configuration can be made to
resolve deterministically; i.e. the resulting aggregation can be made independent
of the order in which events occur, and be completely determined by the
capabilities of the individual links and their physical connectivity.
- Low risk of duplication or mis-ordering of frames
During both steady-state operation and link (re-) configuration, there is a high
probability that frames are neither duplicated nor mis-ordered.
- Support of existing IEEE 802.3 MAC Clients (frames transmitted are ordinary
MAC frames)
No change is required to existing higher-layer protocols or application to use Link
Aggregation.
- Backwards compatibility with aggregation-unaware devices
Links that cannot take part in Link Aggregation – either because of their inherent
capabilities, management configuration, or the capabilities of the devices to which
they attach – operate as normal, individual IEEE 802.3 frame format.
- Accommodation of differing capabilities and constraints
Devices with differing hardware and software constraints on Link Aggregation are,
to the extent possible, accommodated.
- No change to the IEEE 802.3 frame format
Link Aggregation neither adds to, nor changes the contents of frames exchanged
between MAC clients.
- Network Management Support
The standard specifies appropriate management objects for configuration,
monitoring, and control of Link Aggregation.
D-Link Australia & NZ Page 30 of 60
Version 1.0
Layer 2 Switching
According to IEEE 802.3, Link Aggregation does not support the following:
- Multipoint Aggregations
The mechanisms specified in this clause do not support aggregations among
more than two systems.
- Dissimilar MACs
Link Aggregation is supported only on links using the IEEE 802.3 MAC (Gigabit
Ethernet and FDDI are not supported in parallel but dissimilar PHYs such as
copper and fiber are supported).
- Half duplex operation
Link Aggregation is supported only on point-to-point links with MACs operating in
full duplex mode.
- Operation across multiple data rates
All links in a Link Aggregation Group operate at the same data rate (e.g. 10 Mbps,
100 Mbps or 1000 Mbps).
Benefits of Link Aggregation
Link Aggregation provides the following benefits:
a. Higher Link Availability
Link aggregation allows link members to backup each other dynamically. When
one link breaks down, the rest will take over its task quickly and automatically.
Unlike Spanning Tree Protocol, link aggregation is able to take over broken links
faster and transparently, usually within a second.
b. Increased Link Capacity
Performance is improved, as the capacity of an aggregated link is higher than
individual link. The data rates for standard LAN technology is 10, 100, and 1000
Mbps. Link aggregation can fill up the gaps where intermediate performance level
is most appropriate. For example, 400 Mbps using link aggregation instead of a
single 1 Gbps link, which may be an overkill in some environment.
c. Improvements with existing hardware without additional cost
When there is a need to increase the link capacity, two or more lower-speed links
can be aggregated. It is not necessary to change the hardware.
D-Link Australia & NZ Page 31 of 60
Version 1.0
Layer 2 Switching
Link Aggregation Applications
There are a number of situations where link aggregation is commonly deployed:
a. Switch-to-Switch Connections
More than one workgroups are joined together to form one aggregated link. Two
switches are connected using four 100 Mbps links. If one of the links fails between
the switches, the other links in the link aggregation group will take over the traffic
and the connection will maintain. This configuration, however, will reduce the
number of ports available for connection to other external devices.
100 Mbps
4 x 100 Mbps
100 Mbps
Figure 22. Switch-to-Switch Connections with Link Aggregation
b. Switch-to-Station (Server or Router) Connections
Most servers today can saturate a single 100 Mbps link with many applications
available. But many applications need more than this link capacity, which can
become the limiting factor for the overall system performance.
Take the example of two servers connected to the switch with four 100 Mbps links.
In this case, link aggregation is used to improve the performance for the link-
constrained station. Aggregating multiple links can offer better performance
without upgrading the server or the switch.
D-Link Australia & NZ Page 32 of 60
Version 1.0
Layer 2 Switching
4 x 100 Mbps 4 x 100 Mbps
1000 Mbps
Figure 23. Switch-to-Server Connection with Link Aggregation
c. Station-to-station Connections
When no switch is involved, the aggregation is linked directly between a pair of
end stations. This high-speed connection is useful for multi-processing or server
redundancy applications where high performance is needed to maintain real-time
server coherence.
100 100
Mbps Mbps
4 x 100 Mbps
Figure 24. Station-to-Station with Link Aggregation
Summary: Link Aggregation
The two fundamental benefits for link aggregation are increased capacity and
increased resiliency. The high-bandwidth and duplex capabilities of link aggregation
can fulfill the demanding applications running in high-performance environments.
D-Link Australia & NZ Page 33 of 60
Version 1.0
Layer 2 Switching
Multicasting
Multicasting is a useful and cost effective method to send large multimedia files
across networks. Multicasting has the ability to send out a single data stream to
multiple clients. It is the preferred transmission method for most multimedia
applications.
Multicasting can provide broadcast-quality television channels over IP-based
networks to home users and enable service providers to supply integrated voice,
video and data over IP-based xDSL or fiber network.
Types of Communication
There are three types of communication between computers in a network.
- Unicast
One computer talks directly to another. In a conventional Ethernet network, most
Internet Protocol (IP) packets are sent using unicast or host-to-host transmission.
All the computers in a network can transmit and receive packets. The computer
will listen to the packets that are sent in the network and look for those that are
meant for it. It will interrupt the processor and pass the packet to the operating
system to process.
Unicast is good for communicating directly with one or a few computers. However,
when communicating with many computers, unicast becomes inefficient. It will
send a copy of each packet to every receiving computer. Unicast uses up
bandwidth very quickly, especially when sending large multimedia files.
Sending
Computer
Receiving
Computers
Figure 25. Unicast Communication
D-Link Australia & NZ Page 34 of 60
Version 1.0
Layer 2 Switching
- Broadcast
One computer talks to all computers. Broadcast uses a special broadcast address
to communicate with all the computers connected in a network. When there are
packets addressed to the broadcast address, all the computers in the network will
pick up the packets and pass them to the operating system to process. Broadcast
is useful when one computer needs to send information to all the computers in the
network. However, not all the computers are interested to receive the information.
Sending
Computer
Receiving
Computers
Figure 26. Broadcast Communication
- Multicast
One computer talks to a select group of others. A computer sends out one stream
of packets addressed to the multicast group’s address and receivers who are
interested in receiving the data and are programmed to listen for data with these
addresses. Multicasting allows one computer to send data to many interested
receivers without interrupting computers that are not interested in the data.
Multicast transmission sends one stream of data that is separated as it passes
through the routers and sent on the receivers.
D-Link Australia & NZ Page 35 of 60
Version 1.0
Layer 2 Switching
Sending
Computer
Interested
Receiving
Computer
Interested
Receiving
Computer
Interested
Receiving
Computer
Figure 27. Multicast Communication
Benefits for Multicasting
Multicasting optimizes the performance of the network. As only one multicast data
stream is sent out, multicast can minimize traffic redundancy and conserve
bandwidth usage on the network. It controls the traffic on the network and reduces
the load on the network devices to enhance network efficiency. The receiving clients
on the network can choose whether or not to listen to a multicast address. The
packets are only sent to them when they request for them.
Multicast is scalable across different sized network. It is especially suitable for WAN.
It provides people from different locations to access to data streams such as video or
live presentation without taking up excessive bandwidth. It will broadcast data to only
users that wants it.
Multicast Addresses
The unicast IP addresses uniquely identify a single destination IP host. The multicast
IP addresses specify an arbitrary group of IP hosts. Computers that want to receive
this traffic will need to join the group.
IP multicast addresses have been assigned to the old class D address space by the
Internet Assigned Number Authority (IANA). The addresses are denoted with a
binary 1110 prefix in the first four bits of the first octet. The IP multicast addresses
are range from 224.0.0.0 to 239.255.255.255.
D-Link Australia & NZ Page 36 of 60
Version 1.0
Layer 2 Switching
Octet 1 Octet 2 Octet 3 Octet 4
1110xxxx xxxxxxxx xxxxxxxx xxxxxxxx
Class D IP Address
Figure 28. Multicast Address Format
The table below is a list of reserved multicast addresses taken directly from the IANA
database. It contains the network protocol function which the IP addresses have
been assigned.
Address Usage Address Usage
224.0.0.1 All Hosts 224.0.0.11 Mobile-Agents
224.0.0.2 All Multicast Routers 224.0.0.12 DHCP Server/Relay Agent
224.0.0.3 Unassigned 224.0.0.13 All PIM Routers
224.0.0.4 DVMRP Routers 224.0.0.14 RSVP-Encapsulation
224.0.0.5 OSPF Routers 224.0.0.15 All CBT Routers
224.0.0.6 OSPF Designated Routers 224.0.0.16 Designed-SBM
224.0.0.7 ST Routers 224.0.0.17 All SBMS
224.0.0.8 ST Hosts 224.0.0.18 VRRP
224.0.0.9 RIP2 Routers 224.0.0.19 Unassigned
to 255
224.0.0.10 IGRP Routers
IANA has reserved the range of 224.0.0.0 through 224.0.0.255 for use by network
protocols on a local network segment. In addition, the IANA also reserved the range
239.0.0.0 to 239.255.255.255 as administratively scoped addresses for use in the
private multicast domains. These private multicast addresses are similar in nature to
reserved IP unicast ranges and IANA will not assign them to any other group or
protocol. Network managers are free to use multicast addresses in this range inside
a domain without conflicting with others elsewhere on the Internet. The purpose of
administratively scoped addresses is to conserve the limited multicast address space
for reuse in different parts of the network.
D-Link Australia & NZ Page 37 of 60
Version 1.0
Layer 2 Switching
Multicast MAC Addresses
The Ethernet specification has made provisions for broadcast and multicast packets
transmissions. Bit 0 of Octet 0 in the IEEE MAC address indicates whether the
destination address is a unicast or a broadcast/multicast.
Octet 0 Octet 1 Octet 2 Octet 3 Octet 4 Octet 5
7 0 7 0 7 0 7 0 7 0 7 0
xxxxxx11 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
Broadcast / Multicast Bit
Locally Administrated Address
Figure 29. IEEE 802.3 Ethernet MAC Address Format
If bit 0 is set, then the MAC frame is meant for an arbitrary group of hosts or all the
hosts on the network. IP multicast at Layer 2 makes use of this capability to transmit
IP multicast packets to a group of hosts on a LAN segment.
Layer 3 IP multicast addresses are mapped into IEEE MAC addresses for Ethernet
LANs. IP multicast frames use MAC addresses beginning with the 24-bit prefix of
0x0100.5Exx.xxxx. Only half of these MAC addresses are available for use by IP
multicast. This leaves 23 bits of MAC address space for mapping Layer 3 IP
multicast addresses into Layer 2 MAC addresses. All Layer 3 IP multicast addresses
have the first 4 of the 32 bits set to 0x1110. There is only 28 bits of meaningful IP
multicast address.
32 bits
28 bits Multicast Address
1110
IP Multicast Address 239.255.0.1
5 bits lost
MAC Multicast
01-00-5e-7f-00-01
Address
25-bit Prefix 23 bits
48 bits
Figure 30. IP Multicast to Ethernet MAC Address Mapping
D-Link Australia & NZ Page 38 of 60
Version 1.0
Layer 2 Switching
All 28 bits of Layer 3 IP multicast address information cannot be mapped into the
available 23 bits MAC address space, 5 bits of address information are lost in the
mapping process. This results in 25 or 32:1 address ambiguity when a Layer 3 IP
multicast address is mapped to a Layer 2 IEEE MAC address. This in essence
means that each IP multicast MAC address can represent 32 IP multicast addresses.
32 IP Multicast Addresses
224.1.1.1
224.129.1.1
225.1.1.1
225.129.1.1 Multicast MAC Addresses
.
. 0x0100.5E01.0101
.
238.1.1.1
238.129.1.1
239.1.1.1
239.129.1.1
Figure 31. MAC Address Ambiguities Example
The 32:1 address ambiguity can result in some problems. For example, if a host
wants to receive information for multicast group 224.1.1.1, it will program the
hardware registers in the network interface card to interrupt the CPU when a frame
with it receives a destination multicast MAC address of 0x0100.5E00.0101. But the
same multicast MAC address is also used for 31 other IP multicast groups. When
any of these 31 other groups are active in the LAN, the host’s CPU will always
receive interrupts whenever a frame is received from any of these 31 other groups.
The CPU will need to examine the IP portion of each received frame to confirm
whether it is the desired group. This can impact the hosts available CPU power, and
can also cause problems when trying to constrain multicast flooding in Layer 2 LAN
switches based on these multicast MAC addresses.
D-Link Australia & NZ Page 39 of 60
Version 1.0
Layer 2 Switching
Internet Group Management Protocol (IGMP)
Internet Group Management Protocol (IGMP) specifies how a host can register a
router in order to receive specific multicast traffic. It is used with IPv4 to control and
limit the flow of multicast traffic through a network automatically. IPv4 or Internet
Protocol version 4 is a session-layer protocol that manages the flow of incoming,
outgoing, and forwarding of messages in TCP/IP networks using address tracking.
IGMP manages multicast groups and traffic through the use of query and report
messages. IGMP messages are used by multicast hosts to signal their local multicast
router when they wish to join a specific multicast group and receive the group traffic.
In IGMPv2, hosts can also signal the local multicast router when they want to leave
an IP multicast group and no longer wishes to receive the multicast group traffic.
The multicast router is able to maintain the members in a multicast group on a per
interface basis using the information obtained through IGMP. For a multicast group
membership to be active on an interface, at least one host that is interested in
receiving the multicast group traffic must exist. The routers will send out IGMP query
messages to the interfaces on the network periodically to see if any group members
exist.
Internet Group Management Protocol Version 1 (IGMPv1)
IGMPv1 messages are transmitted inside IP datagrams and contain the following
fields:
0 4 7 15 23 31
Version Type Unused Checksum
Group Address
Figure 32. IGMPv1 Message Format
- Version Field
It is set to 1. This field is eliminated in version 2.
- Type Field
There are two types of IGMP messages used between hosts and routers. They
are Membership Query and Membership Report.
D-Link Australia & NZ Page 40 of 60
Version 1.0
Layer 2 Switching
- Checksum Field
This is a 16-bit checksum field. The checksum field is zero when computing the
checksum.
- Group Address Field
The Group Address field contains the multicast group address when a
Membership Report is being sent. This field is zero when used in the Membership
Query and will be ignored by the hosts.
IGMPv1 Query-Response Process
The IGMP uses a Query-Response model that allows the multicast router to
determine which multicast groups are active on the local subnet.
A 224.1.1.1
IGMPv1 Report
Querier 3
Router A
1 224.1.1.1
B
Suppressed
Query to 2
IGMPv1 224.0.0.1
Non-Querier
Router B 224.2.2.2
C
Report
4
Figure 33. IGMPv1 Query-Response Model Example
For example, Computer A and B want to receive multicast traffic for group 224.1.1.1.
Computer C wants to receive multicast traffic for group 224.2.2.2. Router A is the
IGMP Querier for the subnet and it is responsible for performing the queries. Router
B is a non-querier and it only listens and records the responses from the hosts.
The IGMPv1 Query-Response mechanism in the above figure works as follows:
- Step 1
The IGMP Querier, Router A, periodically multicasts an IGMPv1 Membership
Query to the All-Hosts multicast group (244.0.0.1) on the local subnet. The default
D-Link Australia & NZ Page 41 of 60
Version 1.0
Layer 2 Switching
period is 60 seconds. All hosts with multicast enabled must listen to this group so
that queries can be received.
- Step 2
All hosts receive the IGMPv1 Membership Query, and one computer (Computer A
in the above figure) will respond first by multicasting an IGMPv1 Membership
Report to the multicast group, 224.1.1.1, of which the computer is the member.
This report informs the routers on the subnet that a computer is interested in
receiving multicast traffic for group 224.1.1.1.
- Step 3
Because Computer B is listening to multicast group 224.1.1.1, it hears the IGMPv1
Membership Report that was multicast by Computer A. Computer B, therefore,
suppresses the sending of its report for group 224.1.1.1 because Computer A
already has informed the routers on the subnet that there is at least one computer
interested in receiving multicast traffic for group 224.1.1.1. This Report
Suppression mechanism helps reduce the amount of traffic on the local network.
- Step 4
Computer C has also received the ICMPv1 Membership Query and responds by
multicasting an IGMPv1 Membership Report to the multicast group 224.2.2.2 of
which it is a member. This report informs the routers on the subnet that a host is
interested in receiving multicast traffic for group 224.2.2.2.
After the Query-Response exchange, Router A will know that there are active
receivers for multicast groups 224.1.1.1 and 224.2.2.2 on the local subnet. Router B
has been eavesdropping on the whole process and knows the same information as
Router A.
If there are many multicast routers on a subnet, it is a waste of bandwidth when more
than one of them sends IGMPv1 Queries. The router which is responsible for sending
all IGMPv1 Queries on the subnet is called the IGMPv1 Querier. IGMPv1 relies on
the Layer 3 IP Multicast Routing protocol (such as PIM, DVMRP) to elect a
Designated Router for the subnet.
D-Link Australia & NZ Page 42 of 60
Version 1.0
Layer 2 Switching
IGMPv1 Join Process
IGMPv1 reduces the latency time for joining multicast groups. There is no longer
need to wait for the next Membership Query before a Membership Report may be
sent to join a multicast group. When a computer wants to receive messages from a
particular multicast group, it can send one or more unsolicited Membership Reports
instantly to join the group.
A
IGMPv1
Querier
Router A
B 224.3.3.3
Unsolicited
Report
IGMPv1
Non-Querier
Router B
C
Figure 34. IGMPv1 Join Process
For example, Computer B wants to receive traffic from multicast group 224.3.3.3.
Instead of waiting for the next Membership Query from Router A, it immediately
multicasts an unsolicited IGMPv1 Membership Report to group 224.3.3.3 to inform
the routers on the subnet of its desire to join this group.
IGMPv1 Leave Process
IGMPv1 uses a very simple method for computers to leave a multicast group – it just
quietly go away. There is no Leave Group message in IGMPv1 to notify the routers in
the subnet that a computer does not want to receive the multicast traffic from a
specific group. The computer just stops to process the traffic for the multicast group
and stops responding to IGMP Queries with IGMP Membership Reports for the group.
The routers will know that there are no active receivers for a particular multicast
group on the subnet when they stop getting Membership Reports. IGMPv1 routers
use a countdown timer with an IGMP group on a subnet. When a Membership Report
for a group is received, the timer will reset. The timeout interval is typically three
times the Query Interval, which is 3 minutes. This means that the router may
D-Link Australia & NZ Page 43 of 60
Version 1.0
Layer 2 Switching
continue to forward multicast traffic onto the subnet for up to 3 minutes after all hosts
have left the multicast group.
General General General General
Query Query Query Query
Query Resp.
Interval
(10 seconds)
Query Interval Query Interval Query Interval
(60 seconds) (60 seconds) (60 seconds)
Leave Latency
3 x Query Interval (3 minutes)
Last Host Quietly Group Traffic
Leaves Group Finally Stops
Figure 35. IGMPv1 Leave Group Timing
Internet Group Management Protocol Version 2
The major difference between IGMP version 1 and version 2 is the limitation of
joining and leaving multicast group in version 1. IGMPv2 was developed to address
the shortcomings of IGMPv1.
The Query and Membership Report messages in IGMPv2 are the same as IGMPv1
messages except for two areas. The first difference is that GMPv2 Query messages
are broken into two categories.
- General Queries
These queries perform the same function as IGMPv1 Queries.
- Group-Specific Queries
These queries are directed to a single group.
The second difference is in the Membership Reports IGMP Type codes.
D-Link Australia & NZ Page 44 of 60
Version 1.0
Layer 2 Switching
In IGMPv1, Membership Query message contains the Version and the Type fields. In
IGMPv2, these two fields have been combined to form an 8-bit value which is
identical to the IGMPv2 Type code for a Membership Query. The IGMPv2 Type code
for version 1 Membership Report was developed to provide compatibility between
IGMPv1 and IGMPv2. This enables the IGMPv2 computers and routers to recognize
IGMPv1 messages when other IGMPv1 computers or routers are on the network.
0 7 15 23 31
Type Max. Resp. Time Checksum
Group Address
Figure 36. IGMPv2 Message Format
- Type Field
In IGMPv2, the following four messages types are used between computers and
routers:
- Membership Query (Type code = 0x11)
There are two subtypes of Membership Query messages: General Query and
Group-Specific Query.
- Version 1 Membership Report (Type code = 0x12)
This is provided for backward compatibility with IGMPv1.
- Version 2 Membership Report (Type code = 0x16)
- Leave Group (Type code = 0x17)
- Maximum Response Time Field
This field is not used in IGMPv1 messages. Maximum Response Time field is
used only in Membership Query messages. It specifies the maximum time in 1/10
of a second that a computer may wait to respond to a Query message. The default
value is 100, which is 10 seconds.
Maximum Response Time field is used by hosts as the upper limit for random
setting of their group report-timers, which is used by the Report Suppression
mechanism. The value in this field may be changed to control either the burstiness
of membership response or leave latency.
- Checksum Field
D-Link Australia & NZ Page 45 of 60
Version 1.0
Layer 2 Switching
This is the 16-bit checksum field which is zeroed when making checksum
computation.
- Group Address Field
When a General Query is sent, the Group Address field is set to zero to
differentiate it from a Group-Specific Query. The Group-Specific Query contains
the multicast group of the group being queried. When a membership Report or
Leave Group message is sent, this field is set to the target multicast group
address.
Query-Response Tuning
The Maximum Response Time field permits the response time to be configured on
the IGMP Querier. It informs all the hosts of the upper limit on the delay of their
responses to the query by placing the delay value in this field. Tuning the Maximum
Response Time value can control the burstiness of the response process. This is
very important when there are many active groups on a subnet and responses are
spread over a long period of time. For example, the figure below shows General
Queries and Responses for IGMPv2 default timer settings for a subnet with 18 active
groups spread across 18 different hosts. The 18 reports tend to spread across the
entire Query-Response Interval. This is due to the random selection of the report-
timer values by the hosts in their Report Suppression process. This is affected by the
randomness of the host’s random-number algorithm in their IGMPv2 implementation.
The responses are spread across most of the Query-Response Interval.
General Query General Query
Query Resp.
Interval =
10 seconds
Query Interval = 125 seconds
Query Response Interval
Host Membership Reports
Figure 37. IGMPv2 Query-Response Tuning
D-Link Australia & NZ Page 46 of 60
Version 1.0
Layer 2 Switching
By increasing the Maximum Response Time value as shown in the figure below, the
period over which hosts may spread their responses to the General Query increases,
thereby decreasing the burstiness of the responses. Increasing the Query Response
Interval by using a larger Maximum Response Time value also increases the leave
latency because the Query Router must now wait longer to make sure that there are
no more hosts for the group on the subnet. There is a need therefore to balance
between burstiness and leave latency.
General Query General Query General Query
Query Query Query
Resp. Resp. Resp.
Interval Interval Interval
Query Interval Query Interval
General Query General Query General Query
Query Query Query
Resp. Resp. Resp.
Interval Interval Interval
Query Interval Query Interval
Figure 38. Decreasing Response Burstiness
IGMPv2 Leave Group and Group-Specific Query Messages
IGMPv2 defines new Leave Group message type to enable computers to send a
message when they wish to leave the group. When the last host in the group that
response to the query with a Membership Report, it should send a Leave Group
message to the All-Routers multicast group.
IGMPv2 also defines another new message type called Group-Specific Query. The
Group-Specific Query is sent by the IGMP Query Router to a single group instead of
all groups. The Group Address field will contain the target group that is being queried.
IGMPv2 hosts will then receive this message respond in the same manner as what
they do to a General Query. Group-Specific Queries help reduce Leave Group
D-Link Australia & NZ Page 47 of 60
Version 1.0
Layer 2 Switching
latency by using smaller Maximum Response Time value. The default value is 1
second.
IGMPv2 Leave Process
As earlier noted in this document, IGMPv1 does not have an efficient Leave process.
With the addition of Leave Group and Group-Specific messages in IGMPv2 and
configurable Maximum Response Time field, leave latency can be reduced
substantially.
The figure below shows IGMPv2’s Leave process. Computer B and C are currently
members of multicast group 224.1.1.1. Computer B is going to leave first.
A
1
B 224.1.1.1
IGMPv2 Leave to
224.0.0.2
Router A
2
3
Group Specific C
Query to 244.1.1.1 224.1.1.1
224.1.1.1
Member Report
Figure 39. IGMPv2 Leave Process – Computer B leaves first
For Computer B to leave the group, the following sequence of events will take place:
1. Computer B multicast an IGMPv2 Leave Group message to the All-Router
multicast group (224.0.0.2) to inform all routers on the network that it is going to
leave the group.
2. Router A is the IGMP Query Router. It hears the Leave Group message from
Computer B. Router A multicasts a Group-Specific Query to determine whether
any hosts remain for group 224.1.1.1. Therefore, only computers that are
members of this group will respond.
3. Computer C is still the member of group 224.1.1.1. When it hears the Group-
Specific Query, it will respond to the query with an IGMPv2 Membership Report to
inform the routers in the network that there are still members of this group. The
D-Link Australia & NZ Page 48 of 60
Version 1.0
Layer 2 Switching
Report Suppression mechanism is used here to avoid an implosion of responses
when multiple members of the group are on the subnet.
Computer C is the last member of the group 224.1.1.1. The figure below shows the
sequence when the last computer is leaving the group.
A
B
IGMPv2
Router A
2 1
C 224.1.1.1
Group Specific Leave to
Query to 244.1.1.1 224.0.0.2
3
No Response
Group 224.1.1.1
Membership Deleted
Figure 40. IGMPv2 Leave Process – Computer C leave last
For Computer C, which is the last computer, to leave the group, the following
sequence of events will take place:
1. Computer C multicasts an IGMPv2 Leave Group message to the All-Routers
multicast group (224.0.0.2) to inform all routers on the subnet that it is leaving
the group.
2. Router A hears the Leave Group message and sends a Group-Specific Query
to determine whether there is any remaining computer in the group 224.1.1.1.
3. As there are no remaining members of group 224.1.1.1 on the network, no
computers will response to the Group-Specific Query. Router A waits for a
Last Member Query Interval (which is default to 1 second) and sends another
Group-Specific Query where there is still no response. The default number of
tries is two. At this point, Router A will time out this group and stop forwarding
its traffic onto this network.
IGMPv1 and IGMPv2 Interoperability
D-Link Australia & NZ Page 49 of 60
Version 1.0
Layer 2 Switching
IGMPv2 is designed to be backward compatible with IGMPv1. To achieve this, RFC
has defined some special interoperability rules. These are a few interoperability
scenarios:
a. IGMPv2 Hosts with IGMPv1 Routers
When IGMPv1 routers see an IGMPv2 report, it will treat it as an invalid IGMP
message type and ignore it. To maintain proper group membership, the IGMPv2
host must therefore send IGMPv1 reports only when IGMPv1 router is active as
the IGMP Querier.
A
1
IGMPv1
Router A IGMPv1 2
Querier IGMPv2
B
IGMPv1
Report
Figure 41. IGMPv2 Host and IGMPv1 Router Interaction
The IGMPv2 hosts can differentiate between IGMPv1 and IGMPv2 Queries. It can
be done by examining the octet corresponding to the Maximum Response Time
field. In IGMPv1 Queries, this field is zero whereas IGMPv2 Queries contains a
non-zero Maximum Response Time value. Therefore, when an IGMPv1 Query is
heard, the host will mark the interface as an IGMPv1 interface and stop sending
IGMPv2 messages.
To maintain this interface state, the IGMPv2 hosts will start a 400-second,
IGMPv1 router countdown timer whenever an IGMPv1 Query is received on the
interface. This timer is reset when another IGMPv1 Query is received. When this
countdown timer expires, the interface is once again marked as an IGMPv2
interface to allow IGMPv2 messages to be sent again.
Using this approach, IGMPv2 host must be prepared to allow Membership
Reports to be suppressed by either IGMPv1 or IGMPv2 Membership Report from
other hosts on the network.
D-Link Australia & NZ Page 50 of 60
Version 1.0
Layer 2 Switching
b. IGMPv1 Hosts with IGMPv2 Routers
IGMPv1 hosts will respond in the usual way when there is IGMPv1 or IGMPv2
Queries because they are in essence the same format. The difference is only in
the second octet of the IGMPv2 message, which is ignored by IGMPv1 hosts.
3
A IGMPv1
224.1.1.1
1 V1 Report
IGMPv2
Router A IGMPv2 2
Querier IGMPv2
B
224.1.1.1
V2 Report
Figure 42. IGMPv1 Host and IGMPv2 Router Interaction
If an IGMPv2 router is the IGMP Querier, and there are IGMPv1 hosts on the LAN
that are members of a group, the IGMPv1 Reports for that group are always
received. This situation exists because IGMPv2 Reports do not trigger Report
Suppression in IGMPv1 hosts. In addition, IGMPv1 hosts do not understand
IGMPv2 Reports, so ignore them. Therefore, both IGMPv1 and IGMPv2 Reports
are received in response to a General Query.
If the IGMP Query Router processes the Leave Group message, it will respond by
sending a Group-Specific Query to the group in the Leave Group message.
However, IGMPv1 hosts will ignore this message and treat it as an invalid IGMPv1
message type. If IGMPv1 host is the last member of the group, it will not respond
to the Group-Specific Query and the IGMPv2 router will timeout this group wrongly.
So, IGMPv2 Leave process has to be suspected for a group with IGMPv1 host as
a member of the group.
c. Mixed IGMPv1 and IGMPv2 Routers
There are different implementations for IGMPv1 and IGMPv2 mixed environment.
However, there is no single method that is completely reliable. As IGMPv1 router
cannot detect IGMPv2 router, the network administrator has no choice but to
configure IGMPv2 router as GMPv1 router. Because of this, it is impossible for
them to agree on the query router.
D-Link Australia & NZ Page 51 of 60
Version 1.0
Layer 2 Switching
Summary: Internet Group Management Protocol
IGMP is used as the basic signaling mechanism to inform the routers on a subnet of
a host’s desire to become a member of a particular multicast group. IGMPv2
extended this signaling mechanism to allow hosts to signal when they want to leave a
multicast group. This extension significantly reduces the leave latency and allows
routers and switches to respond quickly and shut off the flow of unnecessary
multicast traffic to parts of the networks where it is no longer needed.
IGMP is the only mechanism that a host can use to inform the router its desire to
receive multicast traffic for a specific group. The hosts need not know which routing
protocol is used by the routers on the network. It is the responsible of the routers to
understand the multicast routing protocol and make sure that the multicast traffic is
delivered to the members of the group throughout the network.
D-Link Australia & NZ Page 52 of 60
Version 1.0
Layer 2 Switching
Internet Group Management Protocol Snooping
Internet Group Management Protocol (IGMP) Snooping enables switches to “listen
in” on IGMP conversation to intelligently forward multicast packets to hosts that want
to receive the packets, instead of all the ports on VLAN. It is a switch feature that
directly captures IGMP packets or frames. IGMP snooping can passively snoop on
IGMP Query, Report, and Leave packets that are sent between IP multicast routers
and hosts to learn the multicast group membership of the packets. IGMP snooping
checks packets as they move around a network. It picks out group registration
information and configures the multicast stream so that the multicast traffic is only
sent to ports that have members of the particular multicast group or groups. IGMP
snooping does not generate any extra network traffic and significantly reduces the
multicast traffic passing through the switches. It helps to constrain the flooding of
multicast traffic in switches.
Using IGMP Snooping
IGMP Snooping uses the switch in networks to snoop on IGMP conversation
between host and router. The purpose is to “listen in” to IGMP Reports requests for
multicast groups, and act upon the requests. On the surface, this seems a relatively
simple solution to put in practice and additional load IGMP Snooping places on a
switch is expected to be minimal. IGMP is after all designed to minimize its impact on
host and router CPU and network bandwidth. Unfortunately, this true statement does
not necessarily apply to Layer 2 devices such as LAN switches.
Joining a Group with IGMP Snooping
The following example illustrates what will happen in a Layer 2 only switch when a
few hosts join a multicast group and the status is set up in the switch’s table to
constrain multicast flooding.
1. Computer A wants to join the multicast group 224.1.1.1. It therefore multicasts an
unsolicited IGMP Membership Report to the group with a destination MAC
address (01-00-5E-01-01-01). As there is no entry in the table for the multicast
MAC address initially, the Membership Report is flooded to all ports on the switch.
D-Link Australia & NZ Page 53 of 60
Version 1.0
Layer 2 Switching
Switch
CPU Table
224.1.1.1 A
0
Router 2
1 Switching Engine
B
3
Table Entry after Computer A joins
MAC Address Ports
01-00-5E-01-01-01 0, 1, 2
Figure 43. Joining a Group with IGMP Snooping – Step 1
2. When the CPU in the switch receives the IGMP Report multicast by computer A
on Port 2, the CPU will use the information in the IGMP Report to set up a table
entry. The information in the table will include the port number of Computer A, the
router and the switch’s internal CPU. Any future multicast frames addressed to the
multicast MAC address 0x0100.5E01.0101 will be constrained to Port 0, 1, 2 and
will not flood to the other ports on the switch.
3. Assuming that Computer B wants to join the group and sends an unsolicited IGMP
Report for the same group. The switch will forward the IGMP Membership Report
to the external ports 1 and 2 based on the entry. The CPU in the switch will also
receive the IGMP Membership Report and it adds port 3 that the reports heard to
the table entry for MAC address 0x0100.5E01.0101.
Switch
CPU Table
A
0
Router 2
1 Switching Engine
B
3 224.1.1.1
Table Entry after Computer B joins
MAC Address Ports
01-00-5E-01-01-01 0, 1, 2, 3
Figure 44. Joining a Group with IGMP Snooping – Step 2
D-Link Australia & NZ Page 54 of 60
Version 1.0
Layer 2 Switching
4. At this point, all multicast frames addressed to multicast MAC address
0x0100.5E01.0101 will be constrained to Computer A and B, the router and the
internal CPU. This will appear that the steps necessary to cover the join process in
IGMP Snooping have been taken care of. Using Layer 2 only switches in this
scenario, however, has potential serious performance impact.
Performance Impact of IGMP Snooping Using Layer 2 Devices
The port connecting to the switch’s internal CPU, port 0, is in the table entry and this
port is included so that the Switching Engine can continue to pass IGMP messages
addressed to this group to the CPU. If the port is not added, the CPU will not hear the
IGMP Report from Computer B when it is trying to join the group. Therefore, in order
to receive any future IGMP Reports, the Switching Engine has to send all the frames
for MAC address 0x0100.5E01.0101 to the internal CPU. It will run into performance
problems when trying to implement IGMP Snooping in this way.
If Computer A multicast a 1.5Mbps MPEG video steam to the target group, 224.1.1.1.
The multicast MAC address of the video frame will also be 0x0100.5E01.0101. The
work load of the CPU to examine all multicast frame passing through the switch to
find an occasional IGMP packet will result in a drastic reduction in the overall switch
performance. Sometimes, it will cause failure to the switch.
Many low cost Layer 2 switches with IGMP Snooping will suffer from this problem. In
some cases, the switch will drop both multicast and unicast traffic flows through it. In
other cases, the Switching Engine will continue to forward both multicast and unicast
without any drop in packets to keep up the incoming traffic stream although the
internal CPU starts to drop them. These drops at the internal CPU will result in
missed IGMP packets that will seriously affect Join and Leave latencies.
To resolve these problems, it is therefore necessary to redesign the Switching
Engine in these LAN switches with new ASICs and tables. It will look into the frame
and examine Layer 3 information before making a switch decision. The table is
programmed to forward frames with IGMP messages to process in the CPU in
addition to providing other Layer 3 information. The large video stream in this case
will not interrupt the CPU as it flows through the switch. Only a few frames are sent to
the CPU in one second and the CPU can handle them easily.
D-Link Australia & NZ Page 55 of 60
Version 1.0
Layer 2 Switching
Switch
CPU Table
A
0
Router 2
1 Switching Engine
B
3 224.1.1.1
MAC Address L3 Ports
01-00-5E-xx-xx-xx IGMP 0
01-00-5E-01-01-01 Not IGMP 1, 2, 3
Figure 45. Switch Architecture with Layer 3 mechanism
Leaving a Group with IGMP Snooping
The IGMP Leave Group message is the only message that a host transmits that is
not multicast to the target group address. If Computer A leaves the group, its
departure will cause the following sequence of events to occur:
1. Computer A signals it is leaving the group and multicasts a Leave Group message
to the All Routers multicast group, 224.0.0.2 (MAC address 0x0100.5E00.0002).
This message is intercepted by the switch’s CPU and will not be forwarded to
other ports.
Switch
1
2 CPU Table IGMP Leave Group
224.1.1.1 A
IGMP General Query 0 (0010.5E00.0002)
224.0.0.1 2
(0010.5E00.0001)
1 Switching Engine B
3
Router
MAC Address L3 Ports
01-00-5E-xx-xx-xx IGMP 0
01-00-5E-01-01-01 Not IGMP 1, 3
Figure 46. Leaving a Group with IGMP Snooping – Step 1, 2 & 3
D-Link Australia & NZ Page 56 of 60
Version 1.0
Layer 2 Switching
2. The CPU in the switch will responds to the Leave Group message by sending an
IGMP General Query back to the port with Computer A (Port 2) to see whether
there are any other computers of this group on the port. This may occur when
multiple hosts are connected to the switch port using a hub.
3. If another IGMP Report is received from a computer connected to the same port
(Port 2), the CPU will discard the original Leave Group message from Computer A.
If there is no IGMP Report is received on this port, the CPU will delete the port
from table entry.
4. Assuming Computer B is leaving the group and sends an IGMP Leave Group
message. The Leave Group message is intercepted by the switch’s CPU.
Switch
5
6 CPU Table
IGMP General Query
224.0.0.1 A
IGMP Leave Group 0
224.1.1.1 2 (0010.5E00.0001)
(0010.5E00.0002) Switching Engine 3
B
Router 1 IGMP Leave Group
224.1.1.1
4 (0010.5E00.0002)
MAC Address L3 Ports
01-00-5E-xx-xx-xx IGMP 0
Figure 47. Leaving a Group with IGMP Snooping – Step 4, 5 & 6
5. The CPU will respond to this Leave Group message by sending another General
Query back to the port with Computer B (port 3). It will check whether there are
other hosts that are members for the same group.
6. If there are no other computers (on port 3), no IGMP Report for this group is
received and the switch will delete this port in the table entry. This is the last non-
router port in the table, so the switch’s CPU will delete the table entries for this
group and forwards the IGMP Leave Group message to the router for normal
processing.
D-Link Australia & NZ Page 57 of 60
Version 1.0
Layer 2 Switching
Maintaining a Group with IGMP Snooping
The Leave process described above assumes all hosts will send Leave Group
message when they leave. Unfortunately, according to IGMP Snooping standard
specification (RFC2236), a host may send a Leave Group message when it leaves
the group. This means that it is not a compulsory step. Because of this specification,
Leave Group message may not be received, and when that happens, it is necessary
to fall back to maintenance procedure using General Query/Report mechanism to
detect when a host has left the group.
Assuming that Computer A and B are in multicast group 224.1.1.1. The following
steps will occur when performing the maintenance procedure:
1. The router periodically multicasts a General Query to the All Hosts group,
224.0.0.1, with MAC address 0x0100.5E00.0001. The CPU in the switch
intercepts the General Query and retransmits it to all the ports on the switch.
Switch
1
CPU Table
IGMP General Query
224.0.0.1
0 A
(0010.5E00.0001) 2
Switching Engine
1 B
Router
3
MAC Address L3 Ports
01-00-5E-xx-xx-xx IGMP 0
01-00-5E-01-01-01 Not IGMP 1, 2, 3
Figure 48. Maintaining a Group with IGMP Snooping – Step 1
2. The hosts that are members of the group will respond by sending an IGMP Report.
The CPU in the switch will intercept all IGMP messages and therefore the hosts
will not hear each other’s IGMP Report. This can override the host’s report
suppression mechanism, forcing each host to send an IGMP Report. In this case,
it will be necessary for the CPU in the switch to receive IGMP Report from each
port to maintain the ports with members in the port list.
D-Link Australia & NZ Page 58 of 60
Version 1.0
Layer 2 Switching
Switch
2
CPU Table IGMP Report
224.1.1.1
0 (0010.5E01.0101) A
2
Switching Engine
1 B
Router
3
MAC Address L3 Ports
01-00-5E-xx-xx-xx IGMP 0
01-00-5E-01-01-01 Not IGMP 1, 2, 3
Figure 49. Maintaining a Group with IGMP Snooping – Step 2
3. In order to keep the IGMP Group Membership State alive in the router, the switch
must forward one IGMP Report to the router.
IGMP Snooping and Send-Only Source
The multicast source does not need to join the multicast group therefore there is no
need to send IGMP Membership Reports. This can be a problem for LAN switches
that depends on the IGMP Snooping to constrain multicast traffic flooding. For
example:
Switch
CPU Table
First Packet to A
224.1.1.1 0
(0010.5E01.0101) 2
1
Switching Engine 3 B
MAC Address L3 Ports
01-00-5E-xx-xx-xx IGMP 0
Figure 50. IGMP Snooping and Send-Only Sources
Assuming Computer A is a send-only source in the multicast group 224.1.1.1, and
assumed that there are no other hosts on the switch that join this multicast group. If
Computer A starts to send a large MPEG video stream to the multicast group without
sending an IGMP Membership Report to the group, in order for the switch to detect
D-Link Australia & NZ Page 59 of 60
Version 1.0
Layer 2 Switching
this situation, the CPU will have to indiscriminately listen to all multicast frames
flowing through. Some low-cost switches will not be able to handle this situation
properly because they do not have sufficient CPU power. The CPU in this case will
suffer drastic performance degradation. The send-only sources will flood all other
ports on the switch until some hosts join the group and send the IGMP Membership
Report to the group.
Using Layer 3-aware switch on the other hand will detect this unconstrained flow of
multicast traffic and respond by updating the table with the entries accordingly. It will
constrain the source-only multicast flow to only the router ports.
Switch
CPU Table
First Packet to A
224.1.1.1 0
(0010.5E01.0101) 2
1
Switching Engine 3 B
MAC Address L3 Ports
01-00-5E-xx-xx-xx IGMP 0
01-00-5E-01-01-01 Not IGMP 1
Summary: IGMP Snooping
The issues arising from using IGMP Snooping with Layer 2 switches have been
substantially reduced with the use of Layer 3 switches. All the IGMP messages
transmitted by the hosts are sent with the same destination MAC address as the
multicast data itself except for IGMPv2 Leave Group messages. They will correspond
to the All-Routers multicast address 224.0.0.2, MAC address 0x0100.5E00.0002.
D-Link Australia & NZ Page 60 of 60
Version 1.0
Get documents about "