Computer Network Module 2 Physical and Data Link Layer

Physical and Data Link Layer

2.1 Physical Layer: Communication mechanisms and Electromagnetic Spectrum,
Guided Transmission Media: Twisted pair, Coaxial, Fiber optics
2.2 Data Link Layer: DLL Design Issues (Services, Framing, Error Control, Flow
Control), Error Detection and Correction (Hamming Code, CRC, Checksum) ,
Elementary Data Link protocols , Stop and Wait, Sliding Window (Go Back N,
Selective Repeat), Medium Access Control sublayer Channel Allocation
problem, Multiple access Protocol( ALOHA, Carrier Sense Multiple Access,
(CSMA/CD)).

Physical Layer: Communication mechanisms and Electromagnetic Spectrum


The physical layer is the first layer of the OSI model of computer networking. It is responsible for transmitting raw data bits over a physical link, such as a cable or wireless connection. The physical layer is concerned with the physical characteristics of the transmission medium, such as its impedance, bandwidth, and propagation characteristics.

Communication Mechanisms

The two main communication mechanisms used by the physical layer are analog and digital signaling.

Analog Signaling

Analog signaling uses continuous waveforms to represent data. The amplitude, frequency, or phase of the waveform can be modulated to encode information. Analog signaling is often used for voice and video transmission.

Digital Signaling

Digital signaling uses discrete pulses to represent data. The presence or absence of a pulse, or the duration of a pulse, can be used to encode information. Digital signaling is more immune to noise than analog signaling and is often used for data transmission.

Electromagnetic Spectrum

The electromagnetic spectrum is the range of all possible electromagnetic radiation frequencies. The physical layer uses a portion of the electromagnetic spectrum for data transmission. The specific frequency range used depends on the type of transmission medium being used. For example, radio waves are used for wireless transmission, while light waves are used for fiber-optic transmission.

Properties of the Electromagnetic Spectrum

The electromagnetic spectrum has a number of properties that make it well-suited for data transmission. These properties include:

  • Propagation: Electromagnetic waves can propagate through a vacuum or through a medium, such as air or water.
  • Reflection: Electromagnetic waves can reflect off of objects. This property can be used to create antennas that focus radio waves.
  • Refraction: Electromagnetic waves can refract, or bend, when they pass through a medium with a different density. This property can be used to create lenses and prisms.
  • Absorption: Electromagnetic waves can be absorbed by objects. This property can be used to create filters that block certain frequencies of radiation.

Modulation

Modulation is the process of encoding information onto an electromagnetic wave. There are a number of different modulation techniques, each with its own advantages and disadvantages. The most common modulation techniques include:

  • Amplitude modulation (AM): AM modulates the amplitude of the carrier wave to encode information.
  • Frequency modulation (FM): FM modulates the frequency of the carrier wave to encode information.
  • Phase modulation (PM): PM modulates the phase of the carrier wave to encode information.

Demodulation

Demodulation is the process of recovering the information from a modulated electromagnetic wave. The demodulator uses the properties of the carrier wave to decode the information.


Guided Transmission Media: Twisted Pair, Coaxial, Fiber Optics

Guided transmission media are physical pathways that facilitate the transfer of data signals from one point to another. Three commonly used types are twisted pair cables, coaxial cables, and fiber optics.

Can I Use any Coaxial Cable for the Internet? The Beginner’s Guide ...

Twisted Pair Cables: Twisted pair cables consist of pairs of insulated copper wires twisted together. This configuration helps mitigate electromagnetic interference from external sources and reduces crosstalk between adjacent pairs. Twisted pair cables are widely employed in various applications, such as telephone lines and local area networks (LANs). Within this category, there are two main types: unshielded twisted pair (UTP) and shielded twisted pair (STP). UTP is commonly used in applications like Ethernet, while STP includes additional shielding for added protection against interference.

Coaxial Cables: Coaxial cables feature a central conductor surrounded by an insulating layer, a metallic shield, and an outer insulating layer. This design provides better protection against external electromagnetic interference compared to twisted pair cables. Coaxial cables are often used for transmitting cable television signals and broadband internet connections due to their higher bandwidth capabilities. The coaxial design allows for the transmission of signals with minimal loss over longer distances, making them suitable for various communication applications.

Fiber Optic Cables: Fiber optic cables use thin strands of glass or plastic fibers to transmit data signals using light pulses. These cables offer significant advantages, including high data transfer rates, immunity to electromagnetic interference, and the ability to transmit over long distances without signal degradation. Fiber optics are commonly employed in telecommunications networks, high-speed internet connections, and other applications where high bandwidth and reliability are crucial. The increasing demand for faster and more reliable data transmission has led to widespread adoption of fiber optic technology in various communication infrastructures.

The data link layer is the second layer in the OSI model of computer networking. It is responsible for providing reliable data transmission over a physical link. The data link layer is divided into two sublayers: the logical link control (LLC) sublayer and the media access control (MAC) sublayer.

Data Link Layer Services

The data link layer provides a number of services to the network layer, including:

  • Error detection and correction: The data link layer uses error detection and correction techniques to ensure that data is transmitted reliably over the physical link.
  • Framing: The data link layer divides data into frames and adds headers and trailers to each frame.
  • Flow control: The data link layer ensures that data is transmitted at a rate that the receiver can handle.
  • Access control: The data link layer controls access to the physical link in multiple-access environments.

Error Detection and Correction

Data corruption can occur during transmission due to a variety of factors, such as noise and interference. Error detection and correction techniques are used to detect and correct these errors.

Hamming Code

Hamming code is an error detection and correction code that uses extra bits to encode information about each data bit. This information can be used to detect and correct single-bit errors.

Cyclic Redundancy Check (CRC)

CRC is a more powerful error detection code than Hamming code. It can detect and correct multiple-bit errors. CRC is widely used in data link layer protocols.

Checksum

A checksum is a simple error detection technique that adds up the values of all the bits in a frame. The checksum is then transmitted with the frame. The receiver calculates the checksum of the received frame and compares it to the transmitted checksum. If the checksums match, then the frame is assumed to be error-free.

Elementary Data Link Protocols

Elementary data link protocols are protocols that provide basic data link layer services, such as error detection and correction, framing, and flow control.

Stop-and-Wait

Stop-and-wait is a simple data link protocol that uses a single frame at a time. The sender transmits a frame and then waits for an acknowledgment (ACK) from the receiver. If the sender does not receive an ACK within a certain amount of time, it resends the frame.

Sliding Window

Sliding window protocols are more efficient than stop-and-wait protocols because they allow multiple frames to be in transit at the same time. Go-Back-N and Selective Repeat are two common sliding window protocols.

Go-Back-N

Go-Back-N is a sliding window protocol that allows the sender to transmit multiple frames without waiting for an ACK for each frame. The receiver sends ACKs back to the sender to indicate which frames have been received correctly. If the sender does not receive an ACK for a frame, it resends that frame and all subsequent frames that have not been acknowledged.

Selective Repeat

Selective Repeat is a sliding window protocol that is similar to Go-Back-N, but it only resends frames that have not been acknowledged. This can improve efficiency in situations where there are a lot of errors.

Medium Access Control (MAC) Sublayer

The MAC sublayer is responsible for controlling access to the physical link in multiple-access environments. There are a number of different MAC protocols, each with its own strengths and weaknesses.

Channel Allocation Problem

The channel allocation problem is the problem of assigning channels to users in a multi-user system. There are a number of different channel allocation algorithms, each with its own goal. Some channel allocation algorithms aim to maximize the total throughput of the system, while others aim to minimize the delay or jitter experienced by users.

Multiple Access Protocols

Multiple access protocols are protocols that allow multiple users to share a single physical link. There are a number of different multiple access protocols, each with its own way of preventing collisions.

ALOHA

ALOHA is a simple multiple access protocol that does not use any collision avoidance mechanisms. This means that collisions are common, and the performance of the protocol degrades as the number of users increases.

Carrier Sense Multiple Access (CSMA)

CSMA is a multiple access protocol that uses carrier sensing to avoid collisions. Before transmitting a frame, a station listens to the channel to see if it is in use. If the channel is idle, the station transmits its frame. If the channel is busy, the station waits for a random amount of time and tries again.

Carrier Sense Multiple Access with Collision Detection (CSMA/CD)

CSMA/CD is a variation of CSMA that uses collision detection to further reduce the number of collisions. If a station detects a collision, it immediately stops transmitting and waits for a random amount of time before trying again.

Other Modules