0% found this document useful (0 votes)
9 views15 pages

CN Mod2

The document provides an overview of the Data Link Layer, detailing its key functions such as framing, physical addressing, flow control, error control, and access control. It discusses error detection and correction methods including VRC, LRC, CRC, and checksum, as well as data compression techniques like Huffman coding. Additionally, it covers multiple access protocols, including random access methods like ALOHA and CSMA, and controlled access protocols such as reservation, polling, and token passing.

Uploaded by

Asheeqa Kp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views15 pages

CN Mod2

The document provides an overview of the Data Link Layer, detailing its key functions such as framing, physical addressing, flow control, error control, and access control. It discusses error detection and correction methods including VRC, LRC, CRC, and checksum, as well as data compression techniques like Huffman coding. Additionally, it covers multiple access protocols, including random access methods like ALOHA and CSMA, and controlled access protocols such as reservation, polling, and token passing.

Uploaded by

Asheeqa Kp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Here is a more detailed and elaborated version of the summary to help you grasp the concepts

effectively:

---

### **Data Link Layer Overview**


- **Purpose**: Converts raw physical layer data into a reliable communication link.
- **Key Functions**:
1. **Framing**: Breaks the continuous bit stream into manageable frames.
2. **Physical Addressing**:
- Adds headers to identify the source and destination.
- For inter-network communication, identifies the next network device.
3. **Flow Control**: Prevents data overflow at the receiver by synchronizing data production and
absorption rates.
4. **Error Control**:
- Detects and retransmits lost/damaged frames.
- Identifies duplicate frames and eliminates them.
5. **Access Control**:
- Manages link usage when multiple devices share the link.

---

### **Error Detection and Correction**


- **Goal**: Ensure transmitted data is received accurately.
- **Error Types**:
1. **Single-bit Error**: A single bit is altered (0 → 1 or 1 → 0).
2. **Burst Error**: A sequence of bits is altered; more common than single-bit errors.

#### **Error Detection Methods**


| **Method** | **Description**
| **Performance** |
|-----------------------------|--------------------------------------------------------------------------------------------------------------
-------------------------------------|----------------------------------------------------------------------|
| **Vertical Redundancy Check (VRC)** | Adds a parity bit to ensure an even number of 1s. Single-bit
errors are detectable. Cannot reliably detect burst errors if the total number of errors is even. |
| **Longitudinal Redundancy Check (LRC)** | Organizes data in a grid and adds parity for columns.
Effective at detecting burst errors unless identical errors occur in the same position across rows. |
| **Cyclic Redundancy Check (CRC)** | Uses binary division with a predetermined divisor. CRC
remainder detects errors. Can detect all burst errors within the divisor's bit length. |
| **Checksum** | Adds the sum of data blocks to ensure accuracy.
| Limited to detecting minor errors. |

#### **Error Correction Techniques**


1. **Backward Error Correction**:
- Receiver requests retransmission of data from the sender.
2. **Forward Error Correction**:
- Receiver corrects errors using redundant bits embedded in the data.

#### **Hamming Code**


- **Purpose**: Identifies and corrects a single-bit error by adding redundancy.
- **Formula**: \( 2^r \geq m + r + 1 \), where:
- \( m \): Data bits
- \( r \): Redundant bits
- **Working**:
- Assign redundant bits (\( r \)) to specific positions (e.g., \( 2^0, 2^1, 2^2, \dots \)).
- At the receiver, calculate parity bits to identify and correct the error.

---

### **Data Compression**


- **Purpose**: Reduce the number of bits required for data representation.
- **Benefits**:
- Saves storage space.
- Increases transmission efficiency.
- Reduces costs for hardware and bandwidth.

#### **Compression Types**


| **Type** | **Description** | **Examples**
|
|-------------|-------------------------------------------------------------------------------------------------------------|----------------
------------|
| **Lossless** | Original data can be perfectly reconstructed without loss. |
Huffman Encoding |
| **Lossy** | Some data loss occurs, but the result closely resembles the original.
| JPEG (images), MPEG (videos) |

#### **Huffman Coding**


- **Key Concepts**:
- Assigns shorter codes to frequent symbols and longer codes to rare ones.
- Codes are unique and prefix-free.
- **Steps**:
1. Build a frequency-sorted list of symbols.
2. Combine two least frequent symbols into a subtree with a parent node.
3. Assign binary codes (0 for left, 1 for right).
4. Repeat until all symbols form a tree.

---

### **Data Link Control**


- **Definition**: Ensures proper coordination of data transmission across the link.
- **Components**:
1. **Line Discipline**:
- Determines which device can transmit.
- Types:
- **ENQ/ACK**: Uses Enquiry and Acknowledgment for dedicated links.
- **Poll/Select**: Used in master-slave setups; master polls slaves for data or selects a slave to
receive data.
2. **Flow Control**:
- Prevents data loss by synchronizing sender and receiver speeds.
3. **Error Control**:
- Detects, informs, and retransmits lost or corrupted frames.

#### **Comparison of Line Discipline Methods**


| **Method** | **When Used** | **Mechanism**
|
|------------------|-------------------------------------|-----------------------------------------------------------------------------------
-----------------------|
| **ENQ/ACK** | Dedicated links | Sender sends ENQ; receiver replies ACK (ready) or
NAK (not ready). |
| **Poll/Select** | Primary-secondary communication | Primary device polls secondaries for data (poll)
or notifies a secondary to receive (select). |

Here’s an **elaborated version** of each topic from your PDF. I've expanded on the explanations while
keeping them structured and easy to follow.

---

### **Flow Control**


Flow control ensures that the sender does not overwhelm the receiver with data. It synchronizes the data
flow rate between sender and receiver.

#### **Techniques:**
1. **Stop-and-Wait**:
- The sender transmits one frame and waits for an acknowledgment (ACK) before sending the next
frame.
- If the ACK is not received within a specific time, the sender retransmits the frame.
- **Advantages**:
- Simple and ensures error detection for every frame.
- **Disadvantages**:
- Inefficient for high-speed networks because the channel remains idle during the wait time.

2. **Sliding Window**:
- Both sender and receiver maintain a "window" that limits the number of frames in transit.
- Multiple frames can be sent before waiting for an ACK.
- Windows slide forward as frames are acknowledged, making this method more efficient.
- **Key Features**:
- Uses sequential frame numbering (e.g., if \( n = 8 \), numbers are \( 0, 1, ..., 7, 0, 1, ...\)).
- Receiver acknowledges frames using a single ACK for several frames.

| **Feature** | **Stop-and-Wait** | **Sliding Window** |


|----------------------|-------------------------|------------------------------|
| **Efficiency** | Low | High |
| **Frames Sent** | One at a time | Multiple frames at once |
| **Acknowledgment** | Per frame | Cumulative for multiple frames |

---

### **Error Control**


Error control ensures that the receiver gets error-free data by detecting and retransmitting corrupted or
lost frames.

#### **Mechanism**:
1. **Automatic Repeat Request (ARQ)**:
- Used for retransmission when errors are detected.
- **Retransmission Scenarios**:
- **Damaged frame**: Frame is corrupted during transmission.
- **Lost frame**: Frame does not reach the receiver.
- **Lost acknowledgment**: Receiver’s ACK does not reach the sender.

2. **Types of ARQ**:
1. **Stop-and-Wait ARQ**:
- A simple method where the sender waits for an ACK before sending the next frame.
- Retransmits the last frame if no ACK is received within a timeout.
2. **Sliding Window ARQ**:
- Maintains copies of frames until ACKs are received.
- **Go-Back-n ARQ**: Retransmits the damaged frame and all subsequent ones.
- **Selective-Repeat ARQ**: Only retransmits the erroneous frame.

| **ARQ Method** | **Retransmission** | **Efficiency** |


|-----------------------|---------------------------------------|---------------------------|
| **Stop-and-Wait** | One frame at a time | Low |
| **Go-Back-n** | Damaged frame + subsequent frames | Moderate |
| **Selective-Repeat** | Only the damaged frame | High |

---

### **Multiple Access Protocols**


When multiple devices share the same communication medium, multiple access protocols are used to
coordinate their access.

#### **Types**:
1. **Random Access**:
- Devices transmit data without a fixed schedule.
- **Protocols**:
1. **Pure ALOHA**:
- Transmits data whenever a frame is ready.
- Collisions can occur if multiple devices send simultaneously.
- Vulnerable time = \( 2T_f \) (twice the frame time).
2. **Slotted ALOHA**:
- Time is divided into slots.
- Devices transmit only at the start of a slot, reducing collisions.
- Vulnerable time = \( T_f \).
3. **CSMA (Carrier Sense Multiple Access)**:
- Reduces collisions by sensing the medium before transmitting.
- **Variants**:
- **1-Persistent CSMA**: Sends immediately if idle; high collision chances.
- **Non-Persistent CSMA**: Waits randomly if busy; reduces collisions.
- **P-Persistent CSMA**: Combines 1-persistent and non-persistent approaches.

2. **Controlled Access**:
- Devices consult each other to determine who transmits.
- **Methods**:
- **Reservation**: Devices reserve time slots.
- **Polling**: Central controller polls devices for permission to send.
- **Token Passing**: Devices pass a token; only the token-holder transmits.

| **Type** | **Collision Management** | **Efficiency** |


|-----------------------|------------------------------------|-------------------------------|
| **ALOHA (Pure)** | None | Low |
| **Slotted ALOHA** | Time-slot synchronization | Moderate |
| **CSMA** | Sensing before sending | High |
| **CSMA/CD** | Detects and aborts collisions | Higher |
| **CSMA/CA** | Avoids collisions entirely | Highest |

---

### **Sliding Window ARQ**


1. **Sender Window**:
- Sends multiple frames based on the window size.
- Retransmits unacknowledged frames when a timeout occurs.
2. **Receiver Window**:
- Buffers frames received out of order in **Selective-Repeat ARQ**.
- Discards subsequent frames in **Go-Back-n ARQ** until the missing frame is retransmitted.

---

### **Error Detection Techniques**


1. **Vertical Redundancy Check (VRC)**:
- Adds a parity bit to ensure an even/odd number of 1s in the frame.
2. **Longitudinal Redundancy Check (LRC)**:
- Adds parity bits for columns in a data block.
3. **Cyclic Redundancy Check (CRC)**:
- Uses binary division to append a remainder (CRC code) to the data for error checking.
4. **Checksum**:
- Adds the sum of data blocks to verify correctness.

---

### **CSMA Variants**


- **CSMA/CD (Collision Detection)**:
- Monitors the medium for collisions.
- Stops transmission upon collision and retries after a random backoff time.
- **CSMA/CA (Collision Avoidance)**:
- Used in wireless networks to prevent collisions by deferring transmission.

---

### **ALOHA Protocols**


1. **Pure ALOHA**:
- Sends data anytime; collisions are possible.
- Vulnerable time = \( 2T_f \).
2. **Slotted ALOHA**:
- Transmits only at the start of slots to reduce collisions.
- Vulnerable time = \( T_f \).

Here’s an **elaborated explanation** starting from **Multiple Access Protocols** to the final topics,
covering all aspects in detail.

---

### **Multiple Access Protocols**


Multiple access protocols manage communication when multiple devices (stations) share a common
communication channel.

---

#### **1. Random Access**


- No station has priority or control over others.
- Stations compete for the channel.
- Collisions are possible if multiple stations transmit simultaneously.

##### **Types of Random Access Protocols:**

1. **ALOHA**:
- Originated with pure ALOHA, where stations send data whenever it’s ready.
- **Types**:
- **Pure ALOHA**:
- Vulnerable time = \( 2T_f \) (twice the frame time).
- Collisions occur if frames overlap during this time.
- Relies on acknowledgment (ACK) for successful transmissions.
- **Efficiency**: \( \text{Maximum efficiency} = 18.4\% \).
- **Slotted ALOHA**:
- Time is divided into discrete slots.
- Frames are sent only at the beginning of time slots, reducing collisions.
- Vulnerable time = \( T_f \).
- **Efficiency**: \( \text{Maximum efficiency} = 36.8\% \).

| **Feature** | **Pure ALOHA** | **Slotted ALOHA** |


|-----------------------|----------------------------------|---------------------------------|
| Vulnerable Time | \( 2T_f \) | \( T_f \) |
| Collision Probability | High | Reduced |
| Efficiency | 18.4% | 36.8% |

2. **Carrier Sense Multiple Access (CSMA)**:


- Stations sense the medium before transmitting.
- Reduces, but does not eliminate, collisions due to propagation delay.

| **CSMA Variant** | **Mechanism** |


**Advantages** | **Disadvantages** |
|--------------------------|-----------------------------------------------------------------------------------------------|-----------------
-----------|---------------------------|
| **1-Persistent CSMA** | Sends immediately if channel is idle. | Fast
response. | High collision chances. |
| **Non-Persistent CSMA** | Waits randomly if channel is busy, reducing collision chances.
| Low collision probability. | Slower response. |
| **P-Persistent CSMA** | Sends with a probability \( p \) when the channel is idle; waits for the next slot
otherwise. | Balances efficiency/collisions. | Complex implementation. |

3. **CSMA/CD (Collision Detection)**:


- Detects collisions during transmission.
- On collision detection:
- Transmission is aborted immediately.
- A **JAM signal** is sent to notify other stations.
- Backoff mechanism is used to retry after a random time.
- Commonly used in wired networks like Ethernet.

4. **CSMA/CA (Collision Avoidance)**:


- Used in wireless networks where collision detection is impractical.
- **Strategies**:
1. **Interframe Space (IFS)**:
- Waits a short time before transmitting to avoid collisions with ongoing transmissions.
2. **Contention Window**:
- Divides time into slots; stations pick a random slot to send data.
- Adapts dynamically to collisions using exponential backoff.
3. **Acknowledgment**:
- Ensures successful delivery by requiring explicit ACK from the receiver.

| **CSMA Type** | **Collision Handling** | **Use Case** |


|----------------------|--------------------------------------|----------------------------------|
| CSMA/CD | Detects and aborts collisions. | Wired networks (e.g., Ethernet) |
| CSMA/CA | Avoids collisions proactively. | Wireless networks (e.g., Wi-Fi) |

---

#### **2. Controlled Access Protocols**


Stations coordinate access to the medium by agreeing on which station sends at any time.

##### **Types of Controlled Access Protocols**:


1. **Reservation**:
- Stations reserve time slots in advance.
- A reservation frame precedes the data frames.
- Example:
- For \( N \) stations, there are \( N \) mini-slots for reservation.
- Only stations with reservations transmit data.

2. **Polling**:
- A central controller (primary station) polls secondary stations one by one.
- Only the polled station can transmit.
- Efficient for low traffic but introduces delays under high traffic.

3. **Token Passing**:
- A special token circulates in the network.
- Only the station holding the token can transmit.
- Reduces collisions but requires efficient token management.

---

### **ALOHA Protocols**


1. **Pure ALOHA**:
- Transmits frames without coordination.
- Collisions occur if frames overlap during the vulnerable time (\( 2T_f \)).
- Stations retransmit after a random backoff time.

2. **Slotted ALOHA**:
- Reduces collision chances by dividing time into discrete slots.
- Stations transmit only at the beginning of slots.

| **Metric** | **Pure ALOHA** | **Slotted ALOHA** |


|---------------------|-----------------------------|------------------------------|
| Vulnerable Time | \( 2T_f \) | \( T_f \) |
| Efficiency | \( 18.4\% \) | \( 36.8\% \) |

---

### **CSMA Variants**


- **1-Persistent**:
- Transmits immediately when the channel is idle.
- High collision probability.
- **Non-Persistent**:
- Waits a random time if the channel is busy.
- Reduces collision chances but increases delays.
- **P-Persistent**:
- Combines 1-persistent and non-persistent approaches, balancing efficiency and collision avoidance.

---
### **CSMA/CD (Collision Detection)**
1. **Steps**:
- Sense the medium before transmitting.
- If idle, transmit; monitor the medium for collisions.
- If a collision is detected:
- Stop transmission.
- Send a JAM signal to notify others.
- Backoff and retry after a random time.

2. **Energy Levels**:
- **Zero**: Channel idle.
- **Normal**: Successful transmission.
- **Abnormal**: Collision detected (energy level doubles).

---

### **CSMA/CA (Collision Avoidance)**


Designed for wireless networks:
- **Interframe Space (IFS)**: Defers transmission after sensing an idle channel.
- **Contention Window**: Randomly selects a slot for transmission.
- **Acknowledgment**: Confirms successful frame delivery.

---

### **Summary of Access Methods**


| **Method** | **Mechanism** | **Advantages** | **Disadvantages**
|
|----------------------|---------------------------------------------|---------------------------------|----------------------------------|
| Random Access | Stations transmit as needed. | Simple, decentralized. | High
collision probability. |
| Controlled Access | Stations coordinate for medium access. | Reduces collisions. | Overhead
for coordination. |
| CSMA/CD | Detects collisions and aborts transmission. | Efficient for wired networks. |
Inefficient for long propagation delays. |
| CSMA/CA | Avoids collisions using IFS and contention. | Best for wireless networks. |
Increased complexity. |

Here's a **detailed, elaborate, and fully comprehensive short note** covering all topics and subtopics from
the uploaded materials. This format ensures that every critical detail is included, making it easy to study
and understand.

---

## **Comprehensive Short Note on Networking Topics**

### **1. Token Passing**


- **Definition**: A controlled access method where stations in a network are organized into a **logical
ring**.
- **How It Works**:
- A special packet called a **token** circulates among the stations.
- The station holding the token has the exclusive right to transmit data.
- Once data transmission is complete, the token is passed to the next station.
- Stations without data to send pass the token to the next station.
#### **Key Features**:
- Token passing eliminates collisions by ensuring only one station transmits at a time.
- Token management ensures:
- Tokens are not lost or duplicated.
- High-priority stations can access the channel when needed.

#### **Topologies for Token Passing**:


1. **Physical Ring**:
- Stations pass the token sequentially.
- Failure of a single link disrupts the entire system.
2. **Dual Ring**:
- A secondary ring serves as a backup.
- Activates automatically when the primary ring fails.
3. **Bus Ring**:
- Stations are connected in a bus topology but form a logical ring for token management.
4. **Star Ring**:
- Uses a hub that logically maintains the ring.
- Offers fault tolerance; failed links can be bypassed by the hub.

---

### **2. IEEE Standards**


- Developed as **Project 802** to standardize LAN and MAN protocols.
- Covers the **Physical Layer** and the **Data Link Layer** (split into LLC and MAC sublayers).

#### **Standards and Their Roles**:


| **Standard** | **Description** | **Access Method** |
|--------------|-----------------------------------|-----------------------------------|
| IEEE 802.2 | Logical Link Control (LLC) | Uniform protocol for flow and error control. |
| IEEE 802.3 | Ethernet | CSMA/CD. |
| IEEE 802.4 | Token Bus | Combines Ethernet's physical bus with Token Ring's access
method. |
| IEEE 802.5 | Token Ring | Token passing in a logical ring. |
| IEEE 802.11 | Wireless LAN (Wi-Fi) | CSMA/CA. |
| IEEE 802.15 | Bluetooth (PAN) | Ad-hoc, personal area networks. |

---

### **3. Wired LAN Protocols**


#### **3.1 Ethernet (IEEE 802.3)**
- Uses **CSMA/CD** for medium access.
- **Frame Format**:
- **Preamble (7 bytes)**: Alerts the receiver about the incoming frame.
- **Start Frame Delimiter (1 byte)**: Marks the start of the frame.
- **Destination/Source Address (6 bytes each)**: Contains MAC addresses.
- **Length/Type (2 bytes)**: Specifies payload length or type.
- **Data**: Encapsulated information from higher layers.
- **CRC (4 bytes)**: Detects errors in transmission.

---

#### **3.2 Token Ring (IEEE 802.5)**


- Uses **Token Passing** for collision-free communication.
- **Frame Types**:
- **Token Frame**: Allows access to the medium.
- **Data/Command Frame**: Contains transmitted data.
- **Abort Frame**: Ends transmission in case of errors.

**Frame Format**:
| **Field** | **Description** |
|---------------------|--------------------------------------------------------------------------------------------------|
| Start Delimiter | Marks the start of the frame. |
| Access Control | Includes priority, token bit, and reservation fields. |
| Frame Control | Indicates whether the frame contains data or control information.
|
| Destination/Source Address | 6-byte MAC addresses of the recipient and sender.
|
| Data | Encapsulated data from higher layers. |
| CRC | Error-checking field. |
| End Delimiter | Marks the end of the frame. |
| Frame Status | Indicates whether the frame has been successfully read by the recipient.
|

---

#### **3.3 Token Bus (IEEE 802.4)**


- Combines Ethernet's physical topology with Token Ring's collision-free feature.
- Operates as a **logical ring** using tokens.

---

### **4. Fiber Distributed Data Interface (FDDI)**


- High-speed LAN over **fiber optic cables**.
- Features a **dual-ring topology**:
- Primary ring for data.
- Secondary ring for backup.

**Access Method**: **Token Passing**.

**Frame Format**:
| **Field** | **Purpose** |
|---------------------|-------------------------------------------------------------------------------------------------|
| Start Delimiter | Indicates frame arrival. |
| Frame Control | Specifies data or control type. |
| Destination/Source Address | MAC addresses for communication. |
| Data | Information from higher layers. |
| CRC | Ensures data integrity. |
| End Delimiter | Marks the end of the frame. |

---

### **5. Wireless LANs (IEEE 802.11)**


- Covers both **Basic Service Set (BSS)** and **Extended Service Set (ESS)**:
- **BSS**: A single group of stations with or without an access point (AP).
- **ESS**: Multiple BSSs interconnected via a distribution system.

#### **MAC Sublayer**


1. **Distributed Coordination Function (DCF)**:
- Uses **CSMA/CA** to avoid collisions.
2. **Point Coordination Function (PCF)**:
- Poll-based access for time-sensitive transmissions.

---

### **6. Bluetooth (IEEE 802.15)**


- Designed for short-range personal area networks (PANs).
- **Architecture**:
- **Piconet**: One primary and up to seven active secondary devices.
- **Scatternet**: Multiple interconnected piconets.

#### **Frame Format**:


| **Field** | **Purpose** |
|---------------------|-------------------------------------------------------------------------------------------------|
| Access Code | Identifies the piconet. |
| Header | Includes address, type, flow control, acknowledgment, and error correction.
|
| Payload | Contains data from higher layers. |

---

### **7. Summary of Access Methods**


| **Access Method** | **How It Works** | **Example**
|
|-------------------------|-----------------------------------------------------------------------------------|---------------------------|
| **Token Passing** | A token circulates to grant transmission rights. | Token
Ring, FDDI |
| **CSMA/CD** | Senses the medium and detects collisions. | Ethernet
|
| **CSMA/CA** | Avoids collisions by deferring transmission and using acknowledgments. |
Wi-Fi (IEEE 802.11) |
| **Polling** | A central controller polls devices to allow transmission. | PCF in Wi-Fi
|

Here’s a detailed and well-structured short note focusing on **Wired LANs** and **Wireless LANs**,
covering all topics and subtopics from your document. It is designed to make learning efficient and
comprehensive.

---

## **Wired LANs**

### **Overview**
- **Wired LANs** use physical cables (like twisted pair, coaxial, or fiber optics) to connect devices.
- Standards for wired LANs are developed under **IEEE Project 802**.

---

### **1. IEEE Standards for Wired LANs**


- **IEEE Project 802**:
- Defines standards for LANs and MANs.
- Covers the first two layers of the OSI model:
- **Physical Layer**: Specifies hardware connections.
- **Data Link Layer**: Split into:
1. **Logical Link Control (LLC)**: Handles flow and error control.
2. **Media Access Control (MAC)**: Defines access methods for each LAN type.

#### **Key IEEE Standards for Wired LANs**


| **Standard** | **Purpose** | **Access Method** |
|--------------|----------------------------|-----------------------------------|
| IEEE 802.3 | Ethernet | CSMA/CD. |
| IEEE 802.4 | Token Bus | Combines Ethernet’s physical bus and Token Ring's access. |
| IEEE 802.5 | Token Ring | Token Passing in a logical ring. |

---

### **2. Ethernet (IEEE 802.3)**


- **Definition**: A widely used LAN technology that implements **CSMA/CD** (Carrier Sense Multiple
Access with Collision Detection) for medium access.

#### **Key Features**:


1. **Access Method**:
- Uses **CSMA/CD**:
- Senses the channel before transmitting.
- Detects collisions and retransmits after a random backoff time.
2. **Addressing**:
- Each device has a unique **6-byte MAC address**.
3. **Frame Format**:
- **Fields**:
- **Preamble (7 bytes)**: Alerts the receiver of an incoming frame.
- **SFD (1 byte)**: Marks the start of the frame.
- **Destination/Source Address (6 bytes each)**: Contains MAC addresses.
- **Length/Type (2 bytes)**: Specifies payload length or type.
- **Data**: Encapsulated upper-layer information.
- **CRC (4 bytes)**: Detects errors in transmission.

| **Field** | **Purpose** |
|---------------------|-------------------------------------------------------------------------------------------------|
| Preamble | Alerts the receiver about the incoming frame. |
| SFD | Marks the start of the frame. |
| Destination Address | Physical address of the recipient. |
| Source Address | Physical address of the sender. |
| Length/Type | Indicates the size or type of the payload. |
| Data | Contains user data from higher layers. |
| CRC | Ensures error detection. |

---

### **3. Token Ring (IEEE 802.5)**


- **Definition**: A LAN technology where devices are connected in a **logical ring**, using **Token
Passing** for access control.

#### **Key Features**:


1. **Access Method**:
- **Token Passing**:
- A special packet (token) circulates through the network.
- Only the station holding the token can transmit data.
2. **Frame Types**:
- **Token Frame**: Allows access to the medium.
- **Data/Command Frame**: Contains transmitted data.
- **Abort Frame**: Terminates the frame in case of an error.
3. **Frame Format**:
- **Fields**:
- **Start Delimiter (SD)**: Marks the beginning of the frame.
- **Access Control (AC)**: Contains priority and token status.
- **Frame Control (FC)**: Indicates data or control type.
- **Destination/Source Address**: MAC addresses.
- **Data**: Encapsulated information from upper layers.
- **CRC**: Ensures error detection.

---

### **4. Token Bus (IEEE 802.4)**


- **Definition**: A hybrid LAN technology that combines Ethernet's physical topology with Token Ring's
**collision-free access method**.
- **Key Feature**:
- Devices are arranged in a **bus topology** but operate as a **logical ring** using token passing.

---

### **5. Fiber Distributed Data Interface (FDDI)**


- **Definition**: High-speed LAN standard using **fiber optic cables**.
- **Key Features**:
- **Dual Ring Topology**:
- Primary ring for data transmission.
- Secondary ring for backup.
- **Access Method**: Token Passing.
- **Frame Format**:
- Similar to Token Ring, with fields for addresses, data, CRC, and delimiters.

---

## **Wireless LANs**

### **Overview**
- **Wireless LANs (WLANs)** use radio waves for communication, eliminating the need for physical
cables.
- Defined by **IEEE 802.11** standards.

---

### **1. Architecture of Wireless LANs**


#### **Basic Service Set (BSS)**:
1. **Ad-hoc Mode**:
- Stations communicate directly without an access point (AP).
- Ideal for temporary networks.
2. **Infrastructure Mode**:
- Stations communicate via an AP.
- Enables connectivity with other networks.

#### **Extended Service Set (ESS)**:


- Multiple interconnected BSSs.
- Stations communicate via APs connected through a distribution system (DS).

---
### **2. MAC Sublayer in WLANs**
1. **Distributed Coordination Function (DCF)**:
- Implements **CSMA/CA**:
- Stations sense the channel before transmitting.
- Avoids collisions using acknowledgments and backoff mechanisms.
2. **Point Coordination Function (PCF)**:
- Poll-based access method.
- Used for time-sensitive transmissions.

---

### **3. Frame Format in WLANs**


| **Field** | **Purpose** |
|---------------------|-------------------------------------------------------------------------------------------------|
| Frame Control | Indicates frame type and control information. |
| Duration/ID | Indicates the duration for which the medium is occupied. |
| Address 1-4 | Contains source, destination, and intermediate addresses. |
| Data | Contains user data from higher layers. |
| CRC | Ensures error detection. |

---

### **4. Bluetooth (IEEE 802.15)**


- **Definition**: A wireless LAN technology for personal area networks (PANs).
- **Architecture**:
1. **Piconet**:
- One primary and up to seven active secondary devices.
- Communication can be one-to-one or one-to-many.
2. **Scatternet**:
- Interconnected piconets where a device acts as a primary in one and a secondary in another.

#### **Frame Format**:


| **Field** | **Purpose** |
|---------------------|-------------------------------------------------------------------------------------------------|
| Access Code | Identifies the piconet. |
| Header | Includes address, type, flow control, acknowledgment, and error correction.
|
| Payload | Contains data or control information. |

---

### **Comparison of Wired and Wireless LANs**


| **Feature** | **Wired LAN** | **Wireless LAN** |
|-----------------------|-----------------------------------------|-----------------------------------------|
| Medium | Physical cables (e.g., twisted pair). | Radio waves. |
| Mobility | Limited to cable range. | High mobility. |
| Installation Cost | High (cabling and infrastructure). | Low (no cabling). |
| Speed | Higher (e.g., Gigabit Ethernet). | Lower (e.g., 802.11n or 802.11ac). |
| Reliability | More reliable (less interference). | Prone to interference (walls, devices). |
| Security | Easier to secure (physical access). | Requires encryption (WEP, WPA, WPA2). |

---

This short note captures all key aspects of **Wired and Wireless LANs**, making it easy to understand
while retaining all critical points. Let me know if you need further elaboration!

You might also like