Computer Network Tutorial

Introduction of Computer Network Types of Computer Network Network Topology Computer Networking Architecture Transmission Modes (Data Flow) Basic Networking Devices Integrate Services Digital Network (ISDN)

Model

OSI Model TCP/IP Model

Physical Layer

Digital Transmission Analog Transmission Transmission Media Switching

Data Link Layer

Error detection and Error correction Data Link Control Multiple Access Aloha

Network Layer

Network Layer - Logical Address Address Mapping Unicast Routing Protocol

Transport Layer

Process to Process Delivery User Datagram Protocol Transmission Control Protocol Stream Control Transmission Protocol Session Layer and Presentation Layer

Application Layer

Domain Name System Application Protocol E-mail Cryptography

Misc

Classes of Routing Protocols Classification of Routing Algorithms Controlled Access Protocols in Computer Networks Differences between IPv4 and IPv6 Fixed and Flooding Routing Algorithms Advantages and Disadvantages of Fibre Optics Cable APIPA Difference between Active and Passive FTP Fiber Optics and its Types Method of Joining and Fusion of Fiber Optic Cable Define Framing in Computer Network Disadvantages of Computer Network Mesh Topology Diagram in Computer Network Ring Topology in Computer Network Star Topology in Computer Networks 4G Mobile Communication Technology Advantages and Disadvantages of LAN Advantages and Disadvantages of MAN Advantages and Disadvantages of WAN Application Layer in OSI Model Cyclic Redundancy Check Example Data link layer in OSI model Difference between Transport and Network Layer Hamming Code Example Network Layer in OSI Model Session Layer in OSI Model Transport Layer in OSI Model Two Port Network in Computer Networks Uses of Computer Networks What is Computer Network What is Framing in a Computer Network Advantages and Disadvantages of Bus Topology Difference between Star Topology and Bus Topology Subnetting in Computer Network Subnetting Questions and Answers What is Bus Topology What is Network Topology and Types in Computer Networks Access Control in Networking Basic Characteristics of Computer Network Benefits of SOCKS5 Proxy in Computer Networks Computer Network viva Questions Difference between BOOTP and RARP Difference Between Network Topologies and Network Protocols Difference between NFC and RFID Difference Between Point-to-Point Link and star Topology Network Differences Between MSS and MTU Differences Between Trunk Port and Access Port Different Modes of Communication in Computer Networks MIME Protocol in Computer Networks Modes of Communication in Computer Networks Network Attack in Computer Network Port Address in Networking Simplest Protocol in Computer Network Sliding Window Protocol in Computer Network Stop And Wait Protocol in Computer Networks TCP 3-Way Handshake Process in Computer Networks What is a Proxy Server What is APPN What is ICMP Protocol What is Point-to-Point Protocol What is Port Address in Networking What is the HDLC Protocol What is VRRP Protocol Difference Between Analog and Digital Signals Difference Between Hub and Repeater Difference between Repeater and Switch Difference Between Transparent Bridge and Source Routing Bridge Source Routing Bridge in Computer Networks Transparent Bridge in Computer Networks Transport Protocol in Computer Networks Types of CSMA in Computer Networks What is Wired and Wireless Networking Network Security in Computer Network Disadvantages of Extranet Difference Between TELNET and FTP Define Protocol in Computer Networks Guided Transmission Media in Computer Network What is a Gateway in a Computer Network IGMP in Computer Networks LAN Protocols in Computer Networks MAN Meaning in Computer Modulation Techniques in Computer Networks Switching in DCN TCP/IP Applications What is IGMP? What is Modem in Networking What is Non-Persistent CSMA Difference between Cell Splitting and Cell Sectoring Forouzen Computer Network Open Loop and Closed Loop Congestion Control Types of Cluster Computing WAP-Wireless Access Point What are the elements of the Transport Protocol Difference between Gateway and Switch Flow Control in Data Link Layer Body Area Network Flooding in Computer Network Token Ring in Computer Networks VoIP in Computer Networks What is Infrared Transmission Congestion Control Techniques Forward Error Correction (FEC) Switching Techniques What is Telnet in Computer Network What are the Types of IPv4 Addresses IEEE 802.6 (DQDB) IEEE 802.15.4 Technology What is HDLC (High-level Data Link Control)? What is SMS Hubbing in Telecom? Circuit Switching in Computer Networks Communication Satellites in Computer Networks Features of HTTP Protocol IMAP4 (Internet Message Access Protocol) Internet Services How to Set up a Wireless Router Internetwork Routing in Computer Networks Distributed Computing System Features of GSM The 802.11 MAC Sublayer Protocol What is IEEE 802.3? What are Hubs and Switches in Computer Networks? What is Modem in a Computer Network? What is multicasting in Computer Networks? GSM -The Mobile Station What is Network Server? Slotted Aloha in Computer Network What is Ethernet in Computer Networks What is Arpanet? Radio Access Network (RAN) TCP 3-Way Handshake Process PING SWEEP (ICMP SWEEP) Print Server Private IP Address Security Services in Computer Networks Protocol Data Unit (PDU) CSMA with Collision Avoidance (CSMA/CA) What is Gateway in Computer Network? Advantages of Networking Data Link Layer Design Issues DHCP in Computer Networks Internet Security Association and Key Management Protocol (ISAKMP) What is Switch Hub? Telnet Full form in Networking Multimedia Systems Quality of Service in Computer Networks What is Carrier Sense Multiple Access (CSMA)? What is Circuit Switching What is Duplex Network? What is Web Protocol Network LAN Technologies Classes in Computer Network Low-Density Parity Check (LDPC) Wireless Internet Service Providers(Wisps) What is Handshaking? Cache Server What Is WSN Network? Check Sum Error Detection Linear Bus Topology Functions of the Transport Layer Infrared Transmission in Computer Networks Digital Signal in Computer Network Digital Data Transmission in Computer Networks Define Checksum with Example Computer Network Security Requirements Brust Errors in Computer Network Back Side Bus (BSB) 2-Dimension Parity Check in Computer Network Router and Brouter Microwave Transmission in Computer Networks Magnetic Media in Computer Network A One-Bit Sliding Window Protocol CDMA-Near-Far Problem Reference Models in Computer Networks Uni-cast, Broadcast, and Multicast in Computer Networks Uses Of Bridges in Computer Networks What are Gateways in Computer Network? How to Set Up a Home Network – A 7-Step Guide GSM in Computer Networks Multicast Routing Protocols in Computer Networks Network Components Types of Ethernet in Computer Networks BGP vs.EIGRP-What's the difference? Green Cloud Computing and its Strategies Packet Switching Router in Computer Network Advantages and Disadvantages of Routers ATM Network Automatic Repeat ReQuest (ARQ) Static Routing Algorithms in Computer Network TDMA – Technology Data Link Layer services provided to the Network Layer Transmission Impairments in Computer Networks Types of Modems What are Elementary Data Link Layer Protocols What is an Ad-hoc Network? What is the IEEE 802.11 Wireless LAN Standards? What Is Tunneling in Computer Networks? What is Twisted Pair Cable Advantages of Unguided Media Ethernet Topology in Computer Network Optical Fiber Modes and Configurations Optical Sources in Optical Fiber Communication 4 Layers of TCP/IP Hierarchical Routing Algorithm in Computer Networks Meaning of Data Communication Metropolitan Area Network Responsibilities of Transport Layer The Functions of Hub in Networking Tree Topology in Computer Network Types of Connections in Computer Network Authentication in Computer Network Buffering in Computer Networks MAC Protocol and its Classification Difference between Circuit Switching and Packet Switching Difference between Session and Cookies Broadcasting in Computer Networks CDMA in Computer Networks CDMA-Technology Components of Computer Network CRC in Data Communication CSMA-CA Protocol in Computer Network Difference between LAN and VLAN DIFFERENCE BETWEEN PHYSICAL AND LOGICAL TOPOLOGY Difference between TDM and FDM Differences Between URL and IP Address Differentiate between Synchronous TDM and Asynchronous TDM in Computer Network Diffеrеntiate Bеtwееn Datagram Approach and Virtual Circuit in Computer Network FDDI in Computer Network Functions of Bridge IEEE 802.11 in Computer Networks Internetworking in Computer Networks MAC in Data Link Layer Mac Sub Layer in Computer Networks MAN Meaning in Computer Radio Wave Transmission Single Sign-On (SSO) Token Passing in Computer Network Types of Data Transmission Types of Transmission Media in Computer Networks Advantagеs and Disadvantagеs of Li-Fi Benefits of Client Server Computing Bus and its Types Characteristics of Analog Signals Characteristics of NOS Choke Packet in Congestion Control Congestion Control Policy CSMA/CA in Computer Network Data Communication and Transmission Techniques Data Compression in Computer Networks Diffеrеncе bеtwееn SSH and Tеlnеt Diffеrеncе bеtwееn Static IP Addrеss and Dynamic IP Addrеssa Fiber Distributed Data Interface Network Time Protocol(NTP) Routing in Adhoc Networks Working of DNS Time Division Multiplexing (TDM) Types of Packet Switching Types of Protocols Types of Transmission Technology Use of Bluetooth in Computer Networks What is BBS? What is Code Correction? IEEE 802.11 Wireless LAN What is Stateless Protocol? Advantages of Networking in Computers DHCP Protocol in Computer Networks Difference between UTP and STP Cable Explain FTP in Computer Network Explain Hierarchical Model Explain HTTP in Computer Network Explain Nested Structure with Example Open Systems Interconnection Model Parallel Database System SMTP in Computer Network Space Division Switching Transmission Control Protocol (TCP) Types of IP Address Types of Routing in Computer Networks What is Duplex Transmission Data Link Layer Protocols Network Layer Protocols Session Layer Protocols

The 802.11 MAC Sublayer Protocol

Introduction

Wireless Local Area Networks (WLANs) operate under the IEEE 802.11 standard, commonly known as WiFi. Unlike traditional wired LANs, WLANs utilize radio waves at high frequencies to establish connections between devices. WLAN users have the flexibility to move within the network's coverage area.

Within the OSI network model, the MAC sublayer of 802.11 serves as the physical layer, governing the logical link control sublayer and other higher levels. Its primary function is to define the frame formats and encapsulate data for transmission

MAC Sublayer frame of IEEE 802.11

The IEEE 802.11 standard outlines the structure of a wireless LAN frame at the MAC Sublayer.

  • The first field, known as "Frame Control," comprises eleven subfields within two bytes. This field serves to convey essential frame control information.
  • Following the Frame Control field is the "Duration" field, spanning two bytes, indicating the duration required for the frame and its acknowledgment on the channel.
  • The address fields consist of the source address, destination address, and, where applicable, the BSSID (Basic Service Set Identifier). Each address field is six bytes long.
  • The "Sequence Control" field, occupying two bytes, stores frame sequence numbers.
  • Higher-level data is encapsulated within the "Data" field, which can vary in size. However, the maximum size of the data field is 2312 bytes.
  • Error detection is facilitated by the "FCS" (Frame Check Sequence) field, which is four bytes long and is responsible for identifying errors in the frame.

Avoidance of Collisions by 802.11 MAC Sublayer

In wireless networks, the 802.11 MAC sublayer employs the Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) protocol to mitigate collisions. Unlike collision detection, which is ineffective in wireless environments, CSMA/CA operates as follows:

  • When a station has a frame ready to transmit, it first senses the channel to determine if it's busy or idle.
  • If the channel is idle, the station waits for a specified Inter-Frame Gap (IFG) before transmitting the frame.
  • Once transmitted, the station waits for an acknowledgment (ACK) from the recipient. If the ACK is received within a specified time, the transmission is considered successful.
  • If the channel is busy, the station defers its transmission and retries after a random back-off period.
  • If no acknowledgment is received within a certain time frame or if collisions occur, the algorithm resets, and the station retries the transmission.

This protocol helps reduce the likelihood of collisions in wireless networks by allowing stations to sense the medium before transmitting and implementing back-off mechanisms to alleviate congestion.

The 802.11 MAC Sublayer's Coordination Features

Before transmission, the IEEE 802.11 MAC Sublayer utilizes two coordination functions to prevent collisions.

• One of its key responsibilities is the Distributed Coordination Function (DCF). • It is utilized in both Infrastructure BSS (Basic Service Set) and Independent BSS within wireless communication networks. This function is essential for distributed contention-based channel access and is a necessary component of CSMA/CA. • The Point Coordination Function (PCF) consists of three primary parts: msdt_li1, msdt_li2, and msdt_li3.

Regarding the Protocol Stack and Architecture of 802.16 Channels, data is scheduled to be transmitted from the base station to the subscriber through downlink channels.

Data Link Controls

The Data Link Layer provides the Data Link Control function to guarantee trustworthy data transport via the physical media. Data can only be sent by a single gadget at a time in half-duplex mode. At the link's end, concurrent data transmission from both devices results in information loss from collisions. Devices coordinate through the Data Link Layer to avoid these kinds of collisions.

The data connection layer provides three functions.

  • Line discipline
  • Flow Control
  • Error Control

Line Discipline

Line discipline, which controls data transfer, is a component of the data link layer that allows cooperation across link systems. It chooses when to transfer data and what kind of device is best.

Developing Line Discipline may be done in two ways.

  • ENQ/ACK 
  • Poll/choice

END/ACK.

The term END/ACK stands for Enquiry/Acknowledgment. It is employed when a special connection exists between two devices, and the intended recipient is the only device that can get the transmission. This is used when the wrong recipient is absent on the link.

In the END/ACK are the coordinates of the device that started the transmission and the recipient's state of readiness.

How End/Acceptance Works

The transmitter transmits an Enquiry (ENQ) frame to see if the receiver can receive the data.

In response, the recipient may provide an affirmative acknowledgement (ACK) to show that it is prepared to receive the transmission or a negative acknowledgement (NACK) to show that it cannot be accepted.

The responses that were given by the receiver are included below.

  • If the ENQ is answered positively, the sender will proceed with the data transfer, concluding with transmitting an EOT (END-of-transfer) frame.
  • If the ENQ is answered negatively, the sender terminates the connection and reopens the transmission later.
  • The ENQ frame is deemed to have failed to transmit if the sender does not hear back from the recipient, whether positive or negative. Consequently, before opting to give up, the sender makes three attempts to create a connection.

Poll/Select

A primary station and several subsidiary stations in network topology can function together using the Poll/Select mechanism of the line discipline.

Polling and Selection Process Operation

  • The primary device serves as the path for all communication, even when the intended receiver is a secondary device, due to one transmission line that links it to several secondary machines.
  • One device controls the communication link, while the other follows its instructions.
  • The main device, which grants entry to the communication channel, can be used to identify the initiation of a session.
  • When a gadget asks another device if it has any data to send, it is known as polling.
  • Selecting refers to preparing the secondary device to accept data from the original one.

Select

When the primary device has data to send, it uses the chosen mode.

Select (SEL) frames are sent by the primary device to the secondary device to start data transfer. Along with serving as a notice of the impending transmission, this frame contains the address of the targeted secondary device.

The secondary device confirms that it is ready after receiving the SEL frame.

The initial device sends two or more data frames to the specified secondary device if the latter is ready to accept the data. The secondary device acknowledges receipt of the data by sending a message following the transfer.

Poll

The primary device uses the Poll mode to get data from the secondary device.

When it wants to receive information, the primary device asks all linked devices whether they have any to send.

The first secondary device gets challenged for data by the primary poll. It signifies that there is no data available if it returns a NACK. The second backup device is next in line for the main poll.

It suggests it has data to send if it answers with an ACK. According to the protocol in utilization, the secondary device can send several consecutive frames, or it may be needed to broadcast an ACK before transmitting each frame.

Flow Control

A series of actions designed to notify the sender of the maximum data amount that may be sent while avoiding receiver overload.

The receiving device has limited speed and memory; therefore, before it reaches its limits, it must be able to alert the transmitting device to temporarily cease the communication.

A buffer is crucial because it gives the information that has to be processed a place to be stored.

For controlling the flow of information, two methods have been developed:

  • Stop-and-wait
  • Sliding window

Stop-and-wait

The sender uses the stop-and-wait strategy, which requires it to wait for a response before transmitting the next frame.

After getting an acknowledgement, the sender transmits another frame. Repeating this sending and receiving process continues until the sender sends the EOT (End of transmission) frame.

Advantages of implementing the stop-and-wait protocol's

This simple strategy, known as stop-and-wait, ensures that every frame is confirmed and confirmed before transmitting the next one.

Limitation with the stop-and-wait approach.

The stop-and-wait method is inefficient because every frame needs to travel the whole distance to the receiver, and an acknowledgement needs to travel back before the next frame is delivered. It follows that the entire link traversal time is used by each delivered and retrieved frame.

Sliding Window

  • Using the Sliding Window flow control approach, a sender can transmit numerous frames before getting a response.
  • Sliding Windows Control makes transmitting numerous consecutive frames possible, facilitating effective channel usage.
  • An ACK can recognize several frames.
  • The sliding window concept uses virtual containers on the sender and recipient sides.
  • The window, which can store frames at both ends, establishes the maximum number of frames that can be sent before the acknowledgement.
  • It is feasible to acknowledge frames even if they are not filled in.
  • Since the window's frames have a value modulo-n, which goes from 0 to n-1, they are numbered.
  • For example, the series of frames is 0 through 7 and then repeats if n = 8.
  • It is possible to send up to n-1 frames before getting a response since the number n-1 represents the window size.
  • The next frame the receiver wants to get is included in the ACK, along with its number. The receiver will send an ACK with the number 5 if, for example, it wishes to acknowledge the sequence of frames that contains frame number 4. When the sender receives the ACK with the number 5, it indicates that frames 0 through 4 have been successfully received.

Sender Window

  • For the first transmission, the sender window has n-1 frames. The left window boundary moves inward during frame transmission, resulting in a reduction in window size. The remaining number of frames in the sender window will be w-3, for example, if the window size is w and three frames are transmitted.
  • The sender window's increase upon acknowledgement shows the number of recognized frames.
  • Let us take a scenario where a 7-size window was delivered with frames 0 through 4, and no acknowledgement was received. Only two frames, 5 and 6, are in the sender window.
  • The sender window spans the following four frames if an ACK with the number 4 shows up, indicating that frames 0 through 3 arrived undamaged. Therefore, the six frames that make up the sender window are 5, 6, 7, 0, 1, and 2.

Receiver Window

  • At the start of transmission, the receiver window has n-1 frames rather than n frames.
  • The window gets smaller once the replacement frame arrives.
  • The number of frames that can be acknowledged before an ACK message is transmitted is indicated by the size of the receiver window, not the number of frames that have been received.
  • For example, if three frames arrive and the window size is indicated as "w," the number of accessible places in the window would be (w-3).
  • When the acknowledgement is sent, the receiver window grows by a number equal to the acknowledged frames.
  • The recipient window has seven frames, assuming a window size of 7. The boundary changes from 0 to 1, resulting in a decreased window size of six as soon as one frame is received. After two spaces remain after frames 0 through 4 have been communicated, the window size keeps getting smaller as frames are received. At that point, an acknowledgement has to be issued.

Error Control

Identifying errors and then retransmitting the data is known as error control.

Different Classes of Error Control

The ARQ protocol uses the stop-and-wait technique.

One approach is stop-and-wait ARQ, ensuring that missing or broken frames are transmitted again.

This method's fundamental principle is that before sending the subsequent frame, the sender will wait for the previous one to be acknowledged.

Four requirements are necessary for the retransmission to take place.

  • Until the acknowledgement arrives, the sender holds onto a copy of the most recent frame. If the sender receives the frame incorrectly, they might send the data again due to this replication.
  • The data and ACK frames are uniquely identifiable using an alternating numbering scheme of 0 and 1. The data 0 frame has arrived, and when the data 1 frame acknowledges its arrival, it verifies that it has arrived correctly and anticipates receiving the data 1.
  • The receiver delivers an unnumbered NAK frame if there is a transmission error in the final frame. The sender replies with the data after getting this frame.
  • Using a timer, the system assumes that a frame disappeared during transmission and will retransmit it if no acknowledgement is received within the specified time limit.

When it comes to retransmission, there are two scenarios to consider:

If the receiver detects a broken or incorrect frame, it sends a Negative Acknowledgement (NAK) frame. For instance, after sending the data 0 frame, if the receiver acknowledges it with an ACK 1 frame, indicating successful reception, the sender proceeds to transmit the data 1 frame. Subsequently, upon receiving an undamaged data 1 packet, the recipient sends an ACK 0, signaling readiness for the next frame containing data 0. However, if the receiver encounters errors and returns a NAK frame, the sender is obliged to resend the data 0 frame.

Upon sending a frame, the sender initiates a timer and awaits acknowledgment. Occasionally, due to various factors, the frame might not reach the recipient, resulting in a lack of acknowledgment, whether positive or negative. In such cases, the sender waits for the timer to expire. Upon timeout, the sender promptly resends the most recent frame.

ARQ with Sliding Window

The technique known as Sliding Window ARQ is used to keep error control during continuous transmission.

Three attributes are employed to facilitate retransmission.

  • In this case, the sender has to hold on to all of the frames they sent until they receive back.
  • For example, the sender needs to keep onto replicas of frames 3 and 4 until they have been effectively obtained if frames 0 through 4 have been delivered and the acknowledgement for frame 2 is the last one received.
  • In some situations, the receiver may send an ACK or a NAK. The sender is notified that an NAK frame has corrupted the data received. Numbering of the ACK and NAK frames is necessary to identify a frame since the sliding window operates as a continuous transmission method. A number indicates which frame the receiver expects to receive next in the ACK frame, while a number indicates which frame is damaged in the NAK frame.

To manage lost confirmations, the sliding window ARQ protocol has a timer. The sender begins with a timer and waits for a response before transmitting the next n-1 frames if no acknowledgement is received after n-1 frames have been sent. The sender will retrieve one or more frames depending on the protocol if the timeout expires.

Sliding window ARQ uses a few different techniques.

If an adequate acknowledgement is not obtained, the Go-Back-N ARQ protocol entails sending all subsequent frames again after a lost or damaged frame.

Retransmission can have one of three possible results.

  • The receiver sends a NAK frame when it receives a damaged frame.

Three frames were transmitted, and the figure indicates that the third had an error. Frames 0 and 1 had been correctly received, as verified by ACK 2. Nonetheless, a NAK 2 frame was transmitted when the receiver saw a mistake in frame 2. Frame 3, which was sent following the damaged frame, was thus also returned. Thus, frames 2 and 3 had to be resent by the sender.

  • Data frames are sent using sliding window protocols one after the other. The receiver receives subsequent frames out of sequence if a frame is lost. To fix this problem, the receiver sends an NAK for the missing frame after determining which was skipped by looking up each frame's sequence number.
  • After that, the transmitting device delivers the missing frame and all subsequent frames again. Senders are not required to wait for acknowledgement to transmit frames up to the window limit. When the window capacity is reached—if the acknowledgement is lost—the sender's timer starts to count. Retransmitting the frame since the last ACK occurs if the acknowledgement is not received in the allotted period.

ARQ with Selective-Reject feature

  • Regarding performance, the Go-Back-n ARQ strategy is less effective than the Selective-Reject ARQ method.
  • Only frames that have received a negative acknowledgement (NAK) are eligible for the retransmission procedure under this method.
  • Till the erroneous frame is accurately obtained, all defective frames are stored in the receiver's storage buffer.
  • The receiver must have the appropriate logic to reinsert the frames in the right order.
  • The search strategy employed by the sender needs to choose only the intended frame that has to be resent.