LAN Protocols and Network Devices - CSU359 - Shoolini University

LAN Protocols and Network Devices

1. Ethernet IEEE 802.3

Ethernet is a widely used protocol under IEEE 802.3 standards for local area networks (LAN). These networks are designed for connecting devices within a limited area like homes, offices, or labs, ensuring data exchange through a common framework. Let's explore the key features and structure of Ethernet.

1.1 Evolution and Speed Variants

Ethernet has evolved to accommodate increasing data speeds:

Modern Ethernet typically relies on fiber optic cables to support higher data rates efficiently.

1.2 Physical Connections and Topology

Ethernet follows a bus topology for its communication model. Devices (hosts) are connected to a common transmission medium. Ethernet cables, commonly found in homes and offices, connect computers to routers or switches for data exchange.

1.3 CSMA/CD: Medium Access Control

Ethernet uses Carrier Sense Multiple Access with Collision Detection (CSMA/CD) to manage data transmission:

1.4 Ethernet Frame Structure

graph LR Preamble["Preamble (8 bytes)"] --> Destination["Destination Address (6 bytes)"] Destination --> Source["Source Address (6 bytes)"] Source --> Length_Type["Length/Type (2 bytes)"] Length_Type --> Data_Padding["Data + Padding (variable)"] Data_Padding --> CRC["CRC (4 bytes)"]

The frame consists of several sections:

1.5 Frame Size Constraints

1.6 Protocol Efficiency

Efficiency is calculated by comparing the data size with the total frame size:

Efficiency = (Data Size / Total Frame Size) × 100

$= (1500 / 1518) \times 100 ≈ 98.81%$

While protocol efficiency measures payload capacity, it differs from channel efficiency, which accounts for transmission delays and other factors.

1.7 Handling Collisions

With CSMA/CD, collisions are expected but managed through retransmissions. However, unpredictable retransmission times can make real-time applications (like video calls) challenging. Advances in network infrastructure (e.g., fiber optic broadband) have improved performance, allowing Ethernet to support live streams and video calls, despite occasional packet losses.

1.8 Practical Considerations

Despite Ethernet’s theoretical limitations in handling real-time applications, modern implementations with faster cables and better bandwidth make Ethernet a reliable choice for streaming and communication today. Some performance drops during live sessions can still occur, often due to minor packet loss.

2. Token Ring Protocol (IEEE 802.5)

The Token Ring protocol, defined under IEEE 802.5, operates using a token-based strategy to manage data transmission within a network. While not as prevalent as Ethernet or wireless LAN, it offers unique advantages for specific use cases. Let’s explore its workings and structure in detail.

2.1 Key Characteristics

2.2 Token Passing and Priority Control

Token passing allows a host holding the token to transmit data, giving it control over the medium. This enables prioritization among hosts:

2.3 Frame Structure

SD AC FC DA/SA Data CRC FS
1 byte 1 byte 1 byte 12 bytes ≤ 4500 bytes 4 bytes 1 byte

The frame format includes:

2.4 Monitor Node and Error Handling

The monitor node plays a crucial role in error detection and token management:

2.5 Handling Destination and Token Issues

The protocol uses several mechanisms to manage transmission challenges:

2.6 Real-time Communication

Token Ring’s deterministic nature makes it suitable for real-time communication. Since there are no collisions, the maximum frame transmission time can be precisely calculated, enabling real-time applications in specialized environments, such as inter-office communication and corporate video conferencing.

2.7 Limitations and Practical Use

2.8 Example Calculation

Consider a scenario where each node holds the token for 1 millisecond, and the network bandwidth is 16 Mbps. The maximum frame size can be computed as:

Max Frame Size:
Max Frame Size = Bandwidth $\times$ Token Holding Time

$= 16 \times 10^6 \, \text{bits/sec} \times 1 \times 10^{-3} \, \text{sec}$

$= 16,000 \, \text{bits}$

The maximum frame size depends on the holding time and network bandwidth, ensuring fair use of the medium.

3. Wireless LAN Protocol (IEEE 802.11)

IEEE 802.11 defines the protocol for wireless local area networks (WLAN), enabling devices like smartphones, laptops, and IoT devices to communicate over radio waves. With the shift from wired to wireless networks, WLAN has become the preferred method for internet access, eliminating the need for Ethernet cables in most scenarios.

3.1 Key Features of 802.11

3.2 Frequency Bands

The 5 GHz band offers greater bandwidth, reducing contention between devices and increasing overall network speed.

3.3 Non-overlapping Channels

The 5 GHz band supports multiple non-overlapping channels, each with a bandwidth of 20 MHz:


Channel 1: 5.00 - 5.02 GHz
Channel 2: 5.02 - 5.04 GHz
...
Channel 23: 5.44 - 5.46 GHz

These channels operate independently, allowing simultaneous data transmissions without interference between them.

3.4 Duplex Communication

For example, one device may use Channel 1 for transmission, while another uses Channel 2, allowing both to communicate simultaneously without overlap.

3.5 Comparison of 2.4 GHz and 5 GHz Bands

Comparison Parameter 2.4 GHz 5 GHz
Channels 3 non-overlapping 23 non-overlapping
Interference Higher interference from devices like microwaves and cordless phones Lower interference due to fewer devices using this band
Speed Slower speeds (up to 600 Mbps) Faster speeds (up to 1 Gbps or more)
Coverage Range Wider coverage area, better at penetrating walls Shorter range, struggles to penetrate walls and obstacles
Network Congestion More prone to congestion in crowded areas Less congestion due to more channels available
Latency Higher latency Lower latency, better for real-time applications
Power Consumption Lower power consumption Higher power consumption
Use Case Ideal for IoT devices and long-range communication Best for high-speed applications like streaming and gaming
Device Compatibility Compatible with older devices Requires newer devices with 5 GHz support
Deployment Environment Better for outdoor use and larger areas Best suited for indoor environments with less obstruction

The 5 GHz band’s availability of more channels results in better performance for high-speed applications like video streaming and large file transfers.

3.6 Physical Layer and Radio Signals

3.7 Practical Usage and Impact

4. Network Devices and Their Functions

In addition to hosts and transmission media, various network devices play crucial roles in ensuring efficient data transfer. These devices operate at different layers of the OSI model, each serving specific purposes. Let’s explore some key network devices.

4.1 Repeater

4.2 Hub

4.3 Bridge

4.4 Switch

4.5 Router

4.6 Gateway (Brouter)

4.7 Summary of Key Differences

Device OSI Layer Ports Key Function
Repeater Physical 2 Restores weakened signal
Hub Physical Multi Broadcasts data to all ports
Bridge Data Link 2 Filters traffic by MAC address
Switch Data Link Multi Intelligent frame forwarding
Router Network Multi Routes packets using IP addresses
Gateway Data Link/Network Multi Combines bridge and router functions

4.8 Practical Applications

5. Network Segmentation, Collision Domain, and Broadcast Domain

To understand why routers and switches are the most popular network devices, we need to explore three key concepts: network segmentation, collision domains, and broadcast domains. These concepts help us grasp how data flows efficiently across networks and why certain devices are preferred over others.

5.1 Network Segment

5.2 Collision Domain

5.3 Broadcast Domain

5.4 Why Routers Are More Popular

5.5 Role of Switches

5.6 Summary: Router vs. Switch

Device Layer Function Key Benefit
Router Network Layer Routes based on IP addresses Controls broadcasts and selects paths
Switch Data Link Layer Filters based on MAC addresses Reduces collisions within LANs

While routers are more versatile and powerful, switches remain essential for managing traffic efficiently within local networks.

5.7 Conclusion

Routers dominate network infrastructure due to their ability to manage IP-based traffic and control broadcast domains. Switches complement routers by optimizing local traffic and reducing collisions. Together, these devices form the backbone of modern networks, balancing cost and performance.

6. Spanning Tree Protocol (STP)

The Spanning Tree Protocol (STP) is a crucial networking protocol designed to prevent loops in Ethernet networks. It draws directly from the concept of spanning trees in graph theory, ensuring that a network topology remains loop-free while still maintaining redundancy for fault tolerance. This section explains the need for STP, its working, and how it is implemented in real-world networks.

6.1 Why Do We Need Spanning Tree Protocol?

When switches or bridges are interconnected with multiple paths, loops can form. These loops can lead to infinite packet circulation through a process called flooding, which occurs when a switch doesn't know the destination MAC address. Without STP, loops can overwhelm a network with redundant packets, wasting bandwidth and leading to network failure.

6.2 How Loops Occur in a Network

6.3 What Is a Spanning Tree?

6.4 How Spanning Tree Protocol (STP) Works

STP prevents loops by identifying redundant paths and placing them in a blocking state. Here’s a step-by-step breakdown of the process:

6.5 Example: Building a Spanning Tree

Consider a network with four switches, B1, B2, B3, and B4. Each switch exchanges BPDUs to determine the root bridge, which is the switch with the lowest MAC address. If B1 has the smallest MAC address, it becomes the root. The shortest paths are calculated from the root, and redundant links are blocked to prevent loops.


Network Topology:
B1 (Root)
 |\
B2  B3
  \  |
   B4

Active Paths:
B1 to B2
B1 to B3
B2 to B4

Blocked Path:
B3 to B4 (to avoid a loop)
%% Network Topology and Active Paths %%
graph TD
    B1["B1 (Root)"]
    B2["B2"]
    B3["B3"]
    B4["B4"]

    B1 -->|Active Path| B2
    B1 -->|Active Path| B3
    B2 -->|Active Path| B4
  

Figure 1: Network Topology with Active Paths

%% Blocked Path to Prevent Loop %%
graph TD
    B3["B3"]
    B4["B4"]

    B3 -.->|Blocked Path to Avoid Loop| B4
  

Figure 2: Blocked Path to Avoid Loop

6.6 Protocol and Implementation

6.7 Real-World Application

STP is commonly used in enterprise networks to maintain a loop-free topology. For example, redundant connections between data centers or network racks ensure continuous service, even if a primary link fails.

6.8 Historical Insight

Radia Perlman, a renowned computer scientist, designed the Spanning Tree Protocol in the 1980s. She devised the algorithm in just one day by applying her knowledge of graph theory and algorithms, demonstrating how foundational concepts in computer science are crucial for solving real-world problems.

6.9 Key Takeaways