0% found this document useful (0 votes)
17 views

Switching modes

Uploaded by

ARUN
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Switching modes

Uploaded by

ARUN
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

In networking, switches use different modes to forward frames.

Here are the main


switching modes:
1. Store-and-Forward:
o Process: The switch receives the entire frame, checks it for errors using the
Frame Check Sequence (FCS), and then forwards it if it’s error-free.
o Advantages: High accuracy since it checks for errors before forwarding.
o Disadvantages: Higher latency due to the time taken to receive and check
the entire frame12.
2. Cut-Through:
o Process: The switch starts forwarding the frame as soon as it reads the
destination MAC address, without waiting for the entire frame.
o Advantages: Lower latency since it starts forwarding almost immediately.
o Disadvantages: Potentially forwards corrupted frames since it doesn’t
check for errors12.
3. Fragment-Free (also known as Modified Cut-Through):
o Process: The switch reads the first 64 bytes of the frame before forwarding.
This is because most errors and collisions are detected within the first 64
bytes.
o Advantages: Balances between latency and error checking.
o Disadvantages: Slightly higher latency than cut-through but lower than
store-and-forward12.
These modes help optimize network performance based on the specific needs of accuracy
and speed.
CAM (Content Addressable Memory) and TCAM (Ternary Content Addressable
Memory) are specialized types of memory used in networking devices for high-speed
data lookup and forwarding decisions. Here’s a breakdown of each:
CAM (Content Addressable Memory)
 Function: CAM is used for exact match lookups. It searches the entire memory in
one operation to find an exact match for the input data.
 Usage: Commonly used for MAC address tables in switches. When a frame arrives,
the switch uses CAM to quickly find the port associated with the destination MAC
address1.
 Output: Provides binary results (0 or 1), indicating whether a match was found 1.
TCAM (Ternary Content Addressable Memory)
 Function: TCAM extends CAM by allowing three possible states for each bit: 0, 1,
and X (don’t care). This makes it suitable for more complex searches.
 Usage: Used for routing tables, access control lists (ACLs), and Quality of Service
(QoS) policies. TCAM can perform longest prefix match lookups, which are essential
for routing decisions2.
 Output: Provides more flexible matching capabilities, allowing for partial matches
and prioritization of rules2.
Key Differences
 Match Type: CAM is for exact matches, while TCAM can handle partial matches
due to its ternary nature.
 Applications: CAM is typically used for Layer 2 switching (MAC address lookups),
whereas TCAM is used for Layer 3 routing (IP address lookups) and more complex
filtering tasks3.
These memory types are crucial for the efficient operation of modern network devices,
enabling them to make rapid forwarding decisions.
Here's a network that is already running spanning tree ( Layer 2 protocol) and there are a
number of switches

they'r
e identified as Bridge 1, Bridge 6, Bridge 5 and so on. You can see there are five of them
in this particular design and you can see that many of these switches are connected to
each other and if we didn't have spanning tree running there would be a loop on this
network already.
but on this network we already have spanning tree that's operational and it is configured
a number of different interfaces
there are three different types that you can see on the screen
one is the root port or RP this is the interface on a switch that is connected ultimately to
the single root bridge on the network
there's also a designated Port which would be any other Port that can forward traffic but
is not the port that is connected directly to the root bridge
and there are blocked ports these are ports where spanning tree has disabled that Port
from sending or receiving any traffic
you can see on this network that bridge 21 has a blocked port and Bridge 11 has a
blocked port and those have been blocked so that there is not a loop on the network
if we were communicating from Bridge 11 you can see there is a single root port and you
can follow that all the way back with those root ports to the final root Bridge
the designated ports are also available to be able to send and receive traffic
in this scenario let's say that we're on network A and we've been communicating with a
device on network M
you can see that we can communicate through Bridge 6 which has a designated port and
a root Port that allows us access to network M
but what if there is a problem on this network and we lose connectivity between Network
A and Bridge 6
now we need some other way to communicate to network M but as you can see there is a
blocked port on Bridge 11 so we would not be able to communicate through that
connection
Fortunately spanning tree recognizes that we have this disconnection and it begins
clearing out the existing configuration and relearning the topology of the existing Network

spanning tree has changed Bridge 5, so that the root Port is now on the other side and it
has removed the block port on Bridge 11 allowing us on Network A to be able to now
communicate all the way through the network back to network M without having another
loop on the network

Certainly! On a non-root bridge in the Spanning Tree Protocol (STP), there are three main
types of ports: root ports, designated ports, and blocked ports. Here’s a detailed
explanation of each:
1. Root Port
 Function: The root port is the port on a non-root bridge that has the best path
(lowest cost) to the root bridge.
 Selection Criteria: It is selected based on the lowest path cost to the root bridge.
If multiple ports have the same path cost, the port on the switch with the lowest
bridge ID is chosen. If there’s still a tie, the port with the lowest port ID is selected.
 State: The root port is always in the forwarding state, meaning it actively sends
and receives traffic.
 Role: It is the primary path for traffic to reach the root bridge.
2. Designated Port
 Function: A designated port is responsible for forwarding traffic to and from a
specific network segment. Each network segment has one designated port.
On non-root bridges, each network segment connected to the switch will have one
designated port. This port is responsible for forwarding traffic towards the root
bridge
This port has the best path (lowest cost) to the root bridge for a given network
segment. It forwards traffic towards the root bridge
A non root switch can have many designated ports, but it can have one root port
only.
 Selection Criteria: The designated port is chosen based on the lowest path cost
to the root bridge. If multiple ports have the same path cost, the port on the switch
with the lowest bridge ID is selected. If there’s still a tie, the port with the lowest
port ID is chosen.
 State: The designated port is always in the forwarding state.
 Role: It ensures that the segment remains connected to the rest of the network.

3. Blocked Port
 Function: A blocked port is a port that is not selected as either a root port or a
designated port. Its primary role is to prevent network loops.
 State: The blocked port is in the blocking state, meaning it does not forward traffic.
It only listens to BPDU (Bridge Protocol Data Unit) messages.
 Role: It ensures a loop-free network topology by blocking redundant paths.
Example Scenario:
Imagine a network with three switches: A (root bridge), B, and C, connected as follows:
 Switch A (root bridge) is connected to Switch B and Switch C.
 Switch B and Switch C are also directly connected to each other.
Port Roles:
1. Switch A (Root Bridge):
o All ports on Switch A are designated ports.
2. Switch B (Non-Root Bridge):
o The port on Switch B that connects to Switch A is the root port.
o The port on Switch B that connects to Switch C is the designated port for the
segment between B and C.
3. Switch C (Non-Root Bridge):
o The port on Switch C that connects to Switch A is the root port.
o The port on Switch C that connects to Switch B is in a blocking state to
prevent loops.
 Root Ports: Ports on Switch B and Switch C connecting to Switch A.
 Designated Port: Port on Switch B connecting to Switch C. The port with the lower
switch ID is selected as the designated port. So the other end will be blocking port
 Blocked Port: Port on Switch C connecting to Switch B.
This setup ensures that traffic flows efficiently while preventing loops.

What is a Designated Port?


A designated port is a port on a network switch that has been selected to forward traffic
to and from a specific network segment. It plays a crucial role in maintaining a loop-free
network topology.
Key Characteristics:
1. Forwarding Role: The designated port is responsible for forwarding frames to and
from the segment it is connected to. This ensures that the segment remains
connected to the rest of the network.
2. Selection Criteria: The designated port is chosen based on the lowest path cost
to the root bridge. If multiple ports have the same path cost, the port on the switch
with the lowest bridge ID is selected.
3. Forwarding State: Designated ports are always in the forwarding state, meaning
they actively send and receive traffic.
How is a Designated Port Selected?
1. Path Cost: The path cost to the root bridge is calculated for each port. The port
with the lowest path cost becomes the designated port for that segment.
2. Bridge ID: If multiple ports have the same path cost, the port on the switch with
the lowest bridge ID is selected as the designated port.
3. Port ID: If the bridge IDs are also the same, the port with the lowest port ID is
chosen.
Role in Network Topology:
 Root Bridge: On the root bridge, all ports are designated ports because they
provide the best path to the root bridge for their respective segments.
 Non-Root Bridges: On non-root bridges, each network segment connected to the
switch will have one designated port. This port forwards traffic towards the root
bridge.

Handling Changes in Network Topology:


 BPDU Exchange: Switches continuously exchange Bridge Protocol Data Units
(BPDUs) to monitor the network topology. If a change is detected, such as a link
failure, STP recalculates the best paths and updates the port roles accordingly 21.
 Convergence: During topology changes, STP may temporarily block all ports to
prevent loops until the new topology is stabilized. This process is known as
convergence2.

Switch bridge ID is 8 bytes. 2 bytes Priority field + 6 bytes Switch mac address.
Switches use BPDUs to exchange information to select their root bridge and configure a
loop- free network.
Once STP has created a loop free network, only root bridge multicasts BPDU to other
switches every 2 seconds.
A VLAN Database allows administrators to dynamically manage broadcast domains by
adding, modifying, or deleting them without affecting the overall network.

A routed port is a physical port on a network switch that is configured to behave like a
port on a router. Here are some key points about routed ports:
 Functionality: Unlike a regular switch port, a routed port is not associated with
any VLAN. It operates at Layer 3 of the OSI model, meaning it can have an IP
address assigned to it and can participate in routing protocols.
 Usage: Routed ports are typically used for inter-VLAN routing, connecting different
subnets, or connecting to other Layer 3 devices. This allows the switch to perform
routing functions without needing a separate router.
 Layer 2 Protocols: Since routed ports operate at Layer 3, Layer 2 protocols like
Spanning Tree Protocol (STP) do not function on these ports.
In essence, a routed port transforms a switch into a device capable of routing traffic,
providing greater flexibility and efficiency in network design.

A routed port serves several important purposes in a network:


1. Inter-VLAN Routing: Routed ports are often used to enable communication
between different VLANs. This is essential for networks that segment traffic for
security or organizational reasons 1.
2. Point-to-Point Links: They are ideal for creating point-to-point links between
network devices, such as connecting switches in the core and distribution layers of
a network2.
3. WAN Connections: Routed ports can be used to connect to WAN routers and
security devices, facilitating communication between different network segments
or external networks2.
4. Layer 3 Functionality: By operating at Layer 3, routed ports can have IP
addresses assigned to them and participate in routing protocols. This allows the
switch to perform routing functions, reducing the need for separate routers 3.
5. Simplified Network Design: Using routed ports can simplify network design by
reducing the number of devices needed and consolidating routing and switching
functions into a single device3.
In summary, routed ports enhance the flexibility and efficiency of network design by
enabling advanced routing capabilities directly on switches.

Yes, there is a relationship between routed ports and Switch Virtual Interfaces (SVIs), as
both are used to enable Layer 3 functionality on switches, but they serve different
purposes and are configured differently.
Routed Ports
 Function: A routed port is a physical port on a switch that is configured to operate
as a Layer 3 interface. It is not associated with any VLAN and can have an IP
address assigned to it.
 Usage: Ideal for point-to-point links between switches or routers, and for
connecting to external networks1.
 Configuration: Configured using the no switchport command, followed by
assigning an IP address.

SVI (Switch Virtual Interface)


 Function: An SVI is a virtual interface that represents a VLAN on a switch. It allows
the switch to route traffic between VLANs.
 Usage: Used for inter-VLAN routing within the same switch or across multiple
switches. Each VLAN can have an SVI, which acts as the default gateway for
devices within that VLAN2.
 Configuration: Configured by creating a VLAN interface (e.g., interface vlan 10)
and assigning an IP address to it.
Key Differences
 Layer 2 vs. Layer 3: Routed ports operate purely at Layer 3, while SVIs are
associated with VLANs and can handle both Layer 2 and Layer 3 traffic 2.
 STP: Routed ports do not participate in Spanning Tree Protocol (STP), whereas SVIs
do, since they are tied to VLANs2.
 Flexibility: SVIs are more flexible for internal routing within a switch, while routed
ports are better suited for external connections and point-to-point links 1.
In summary, both routed ports and SVIs enable Layer 3 capabilities on switches, but they
are used in different scenarios based on the network design requirements.

You might also like