Professional Documents
Culture Documents
Lecture - 2 - Class Network2
Lecture - 2 - Class Network2
✓A bridge operates in both the physical and the data link layer.
✓ As a data link layer device, it can check the physical (MAC) addresses (source and
destination) contained in the frame.
✓A switch has a table used in filtering decisions.
✓A MAC address table is where a switch stores the mapping relationship
between MAC addresses and switch ports.
✓The MAC address table is empty after a switch is started and is populated
When the switch learns the mapping between MAC addresses and switch
ports during the process of data forwarding.
✓According to its table, frames for 7l:2B:13:45:61:42 leave through port 1; therefore,
there is no need for forwarding, and the frame is dropped.
✓ On the other hand, if a frame for 71:2B:13:45:61:41 arrives at port 2, the departing
port is port 1 and the frame is forwarded.
✓If no mapping exists for the destination MAC address, the switch floods
✓If a mapping exists for the destination MAC address, the switch checks if the port number
mapped to the destination MAC address is the port number of the port on which the frame
is received.
a) If the port numbers are not the same, the switch forwards the frame to the
port mapped to the frame’s destination, and sends the frame out from that port.
b) If the port numbers are the same, the switch discards the frame.
2. Upon receipt of a broadcast frame, the switch floods the frame out of all
ports other than the port on which the frame is received, without querying
the MAC address table.
.
✓Network reliability can be implemented at the card, device, and link levels
✓ When STP is deployed on a network, switches exchange STP BPDUs and calculate a loop-free
topology.
✓ Finally, one or more ports on the network are blocked to eliminate loops.
✓ On an Ethernet network, loops on a Layer 2 network may cause broadcast storms, MAC address
flapping, and duplicate data frames.
✓ STP is used to prevent loops on a switching network.
✓ STP running on a switch continuously monitors the network topology.
✓ When the network topology changes, STP can detect the changes and automatically adjust the
network topology.
✓ Therefore, STP can solve the Layer 2 loop problem and provide a solution for network redundancy.
✓ As shown in the figure, switches run STP and exchange STP BPDUs to monitor the network
topology.
✓ When the link between SW1 and SW3 is faulty, the blocked port is unblocked and enters the
forwarding state.
Application of STP on a Campus Network
✓ STP is used on Layer 2 networks of campus networks to implement link backup and eliminate loops.
STP Overview
✓Devices running STP exchange information with one another to discover loops on the
network, and block certain ports to eliminate loops.
✓When the network topology changes, STP can detect the change and automatically respond
to the change.
✓ In this way, the network status can adapt to the new topology, ensuring network reliability.
✓With the growth in scale of LANs, STP has become an important protocol for a LAN.
STP Basic Concepts
Root Bridge
Cost
Cost Calculation Methods
Root Path Cost (RPC)
Port ID (PID)
Bridge Protocol Data Unit (BPDU)
Comparison of configuration BPDUs is important
✓STP selects the optimal configuration BPDU in the following sequence:
➢Smallest BID of the root bridge
➢Smallest RPC
➢Smallest BID of the network bridge
➢Smallest PID
✓Among the four rules, the first rule is used to elect the root bridge on the network, and
the following rules are used to elect the root port and designated port.
• STP operations:
• Selects a root bridge.
• Each non-root switch elects a root port.
• Select a designated port for each network segment.
✓Blocks non-root and non-designated ports.
✓STP defines three port roles: designated port, root port, and alternate port.
✓A designated port is used by a switch to forward configuration BPDUs to the
connected network segment.
✓Each network segment has only one designated port.
✓In most cases, each port of the root bridge is a designated port.
✓The root port is the port on the non-root bridge that has the optimal path to the root
bridge.
✓A switch running STP can have only one root port, but the root bridge does not
have any root port.
✓If a port is neither a designated port nor a root port, the port is an alternate port. The
alternate port is blocked.
STP Calculation
STP Calculation
STP Calculation
STP Calculation
STP Port States
STP Port State Transition
Topology Change
✓Root Bridge Fault ✓ SW1 (root bridge) is faulty and stops sending BPDUs.
✓ In this case, the record about the received BPDUs becomes invalid, and SW2
cannot receive new BPDUs from the root bridge.
✓ Non-root bridges send configuration BPDUs to each other to elect a new root
bridge.
✓ After re-election, port A of SW3 transitions to the Forwarding state after two
intervals of the Forward Delay timer (the default interval is 15s).
➢ Due to the root bridge failure, it takes about 50s to recover from a
root bridge failure.
Virtual LANs (VLAN)
Issues Facing a Traditional Ethernet
VLAN
VLAN Implementation
VLAN Tag
➢Applicable scenario:
➢VLAN assignment:
✓To isolate the services of different enterprises and ensure service security,
assign interfaces connected to the enterprises' networks to different VLANs.
✓In this way, each enterprise has an independent network, and each VLAN
works as a virtual work group.
3. MAC Address-based VLAN Assignment
➢ Applicable scenario:
✓ The network administrator of an enterprise assigns PCs in the same
department to the same VLAN.
✓ To improve information security, the enterprise requires that only
employees in the specified department be allowed to access specific
network resources.
➢ VLAN assignment:
✓ To meet the preceding requirement, configure MAC address-based
VLAN assignment on SW1, preventing new PCs connected to the
network from accessing the network resources.
Quiz
1: Identify the Root Bridge and Port Roles 2. Identify the Root Bridge and Port Roles in the
Following Topology
3. Identify the Root Bridge and Port Roles in the Following Topology
Virtual LANs (VLAN)
VLAN
VLAN Implementation
VLAN Tag
➢Applicable scenario:
➢VLAN assignment:
✓To isolate the services of different enterprises and ensure service security,
assign interfaces connected to the enterprises' networks to different VLANs.
✓In this way, each enterprise has an independent network, and each VLAN
works as a virtual work group.
3. MAC Address-based VLAN Assignment
➢ Applicable scenario:
✓ The network administrator of an enterprise assigns PCs in the
same department to the same VLAN.
✓ To improve information security, the enterprise requires that
only employees in the specified department be allowed to
access specific network resources.
➢ VLAN assignment:
✓ To meet the preceding requirement, configure MAC address-
based VLAN assignment on SW1, preventing new PCs
connected to the network from accessing the network
resources.
Layer 2 Ethernet Interface Types
Access interface
✓ An access interface often connects to a terminal (such
as a PC or server) that cannot identify VLAN tags, or
is used when VLANs do not need to be differentiated.
✓ An access interface is used to connect a switch to a
terminal, such as a PC or server.
✓ In general, the NICs on such a terminal receive and
send only untagged frames.
✓ An access interface can be added to only one VLAN.
Layer 2 Ethernet Interface Types
Trunk interface
✓A trunk interface often connects to a switch, router, AP,
or voice terminal that can receive and send both tagged
and untagged frames.
✓A trunk interface allows frames that belong to multiple
VLANs to pass through and differentiates the frames
using the 802.1Q tag.
✓This type of interface is used to connect a switch to
another switch or a sub-interface on a device, such as a
router or firewall.
Example for Frame Processing on Access and Trunk Interfaces
3. Identify the Root Bridge and Port Roles in the Following Topology
Thank You