0% found this document useful (0 votes)
24 views52 pages

Direct Link Networks Overview

This lecture discusses direct link networks and Ethernet. 1. Direct link networks can be point-to-point, with each node directly connected to all others, or multiple access, where all nodes share the same physical medium. 2. Ethernet uses CSMA/CD for media access and operates at speeds of 10 Mbps, 100 Mbps, 1 Gbps, or 10 Gbps depending on the standard. It uses frames containing source and destination addresses, length, data payload, and CRC.

Uploaded by

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

Direct Link Networks Overview

This lecture discusses direct link networks and Ethernet. 1. Direct link networks can be point-to-point, with each node directly connected to all others, or multiple access, where all nodes share the same physical medium. 2. Ethernet uses CSMA/CD for media access and operates at speeds of 10 Mbps, 100 Mbps, 1 Gbps, or 10 Gbps depending on the standard. It uses frames containing source and destination addresses, length, data payload, and CRC.

Uploaded by

Israr Ahmad
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

AdvancedComputerNetworks

Lecture #5
Instructor: Dr. Niamat Ullah

DirectLinkNetworks - 1

1. PhysicalConnectingHosts
2. Hardware BuildingBlocks (NodesandLinks)
3. Encoding (NRZ, NRZI, Manchester, 4B/5B)
4. Framing

DataLinkLayer
Diferent functionsat the link level
Encoding
Framing
Error detection/correction
Reliabledelivery
Media accesscontrol

Directly-ConnectedNetworks

Point - to - point links: Each node isdirectly


connectedtoallothersviaalink

Multiple access: Allnodes share the same physical


medium
point-to-point

multiple access
4

PhysicalMedium
Signalstravelthrough the medium andrepresentbits
ShannonsCapacityTheorem

C = B log2(1+S/N)
Defnesthe upper bound on the linkcapacity C in Hz
Can be used toevaluate the error-freebandwidth of aline
5

ShannonsTheorem: Example

Voice-grade phoneline: B =3,300 -300 Hz = 3 KHz


TypicalSNR = 30 dB, where

dB = 10 xlog10(S/N)

For 30 db S/N =1,000

C = 3,000 xlog2(1+1,000) 30 Kbps

Higher bandwidth B (in Hz), higher capacity

Encoding
Mapbinarybitsintosignals
Example: Lowsignal representsa 0, high signal representsa 1
Non Return-to-Zero (NRZ)
Problem: Longperiodsof silence (zero) orhigh signalsarepossible
Baselinewander (receiverloses trackof referencesig)
Clockrecovery (receiverloses clocksynchronization)

The receiver keeps an average of the signal it has seen so


far, and then uses this average to distinguish between
low and high signals. The problem, of course, is that too
many consecutive 1s or 0s cause this average to
change, making it more difficult to detect a significant
7
change in the signal.

Encoding: MoreSchemes

NRZInverted (NRZI): Switch from current state torepresent a 1

This solves the problemof consecutive 1s, but obviously doesnothing for
consecutive 0s.

Manchester Encoding: XORthe bit stream with the clock

Because both 0sand 1s result ina transition to the signal, theclock can be
efectively recoveredat thereceiver.

TheproblemwiththeManchesterencoding
schemeisthatitdoublestherateatwhichsignal
transitionsaremade onthelink, whichmeansthat
thereceiverhashalfthetimetodetect eachpulseof
thesignal. Therateatwhichthesignalchangesis
calledthelinks baudrate.
In thecaseoftheManchesterencoding, thebit rate
ishalfthebaudrate, sotheencodingisconsidered
only 50% efcient.

4B/5BEncodingScheme

Encode 4-bit symbols into 5-bit codes


A final encoding that we consider, called 4B/5B, attempts
to address the inefficiency of the Manchester encoding
without suffering from the problem of having extended
durations of high or low signals.
Each codeword has no more than one starting zero, and
no more than two trailing zeros
No more than 3-consequtive zeros
The idea of 4B/5B is to insert extra bits into the bitstream
so as to break up long sequences of 0s or 1s.
Then use NRZI to solve the consecutive 1s problem
80% efficiency (1 bit is overhead)
10

Exampleof 4B/5BEncoding

4-bit data
symbol

5-bit code

4-bit data
symbol

5-bit code

0000

11110

1000

10010

0001

01001

1001

10011

0010

10100

1010

10110

0011

10101

1011

10111

0100

01010

1100

11010

0101

01011

1101

11011

0110

01110

1110

11100

0111

01111

1111

11101

Thus, when sent back-to-back, no pair of 5-bit codes results in more than three
consecutive 0s being transmitted. The resulting 5-bit codes are then transmitted
using the NRZI encoding, which explains why the code is only concerned about
consecutive 0sNRZI already solves the problem of consecutive 1s.
The 4B/5B encoding results in 80% efficiency.

11

Framing
The processofgroupingbitsintoframes (messagesorpackets)
Typicallyimplementedbythenetworkadaptor
Whyframes?

12

Byte-OrientedFraming

BISYNC: Binarysynchronouscommunication
Frame isa collection ofbytes
Needto indicatethebeginning andendof a frame
Sentinel charactersareused

SYN: Synchronization character


SOH: Start of header
STX, ETX: Start of text, Endof text
CRC: Cyclicredundancy check
13

Problem withByte-orientedFraming
ETX may occur in the payload
Precede it with a DLE (data-link-escape) character
Problem propagates, precede DLE with another
DLE (extra overhead)
Point-to-Point (PPP) protocol used by IP

STX: 0111110
Payload: 1,500 bytes
Checksum: 2 or 4 bytes

Overhead: 8/1508 =0.5%


14

Byte-countingFraming

Include the # of bytesin the frameasa feldinthe header


Digital DataCommunicationsProtocol (DDCMP)

Count: Specifes # of bytesin the body


CRC ensuresthatcountfeldisnotcorrupted
15

Bit-orientedFraming
High-LevelData LinkControl (HDLC)

Beginning/end of frame, fag: 01111110


Instead ofinsertingbytesdobitstufng
Senderaddsa 0 after fve consecutive 1s
Receiver removeszero afterfve 1s
16

Sender

ExampleofBit-stufng

1111110111111111110111110

Receiver
11111010111110111110101111100

17

DirectLinkNetworks 11

1. Error Detection
2. Ethernet (IEEE 802.3)

Single bit errors are the least


likely type of errors in serial data
transmission because the noise
must have a very short duration
which is very rare.
Example:
If data is sent at 1Mbps then each
bit lasts only 1/1,000,000 sec. or 1
s.
For a single-bit error to occur, the
noise must have a duration of only
1 s, which is very rare.

The term burst error means that


two or more bits in the data unit
have changed from 1 to 0 or from 0
to 1.
Burst errors does not necessarily
mean that the errors occur in
consecutive bits, the length of the
burst is measured from the first
corrupted bit to the last corrupted
bit. Some bits in between may not
have been corrupted.

Burst error is most likely to happen


in serial transmission since the
duration of noise is normally longer than
the duration of a bit.
The number of bits affected depends on
the data rate and duration of noise.
Example:
If data is sent at rate = 1Kbps then a noise of
1/100 sec can affect 10 bits.(1/100*1000)
If same data is sent at rate = 1Mbps then a noise
of 1/100 sec can affect 10,000 bits.(1/100*106)

Checksum

802.3 Ethernet
Carrier-sense multiple access with collision detection
(CSMA/CD).
CS = carrier sense
MA = multiple access
CD = collision detection
Base Ethernet standard is 10 Mbps.
100Mbps, 1Gbps, 10Gbps standards came later

Ethernet CSMA/CD
CSMA/CD (carrier sense multiple access with collision
detection) media access protocol is used.
Data is transmitted in the form of packets.
Sense channel prior to actual packet transmission.
Transmit packet only if channel is sensed idle; else,
defer the transmission until channel becomes idle.
After packet transmission is started, the node monitors
its own transmission to see if the packet has
experienced a collision.
If the packet is observed to be undergoing a collision,
the transmission is aborted and the packet is
retransmitted after a random interval of time using
Binary Exponential Backoff algorithm.

CSMA/CD (Ctnd..)
After first collision, each station waits for 0 or 1 slot before
trying again.
After second collision, they pick either 0, 1, 2, or 3 slots at
random to wait.
After 3rd. collision, number of slots to wait is between 0 and 23
-1.
In general, after I collisions, wait is between 0 and 2i 1.
After 10 collisions, randomization interval frozen at 1023
slots.
After 16 collisions, error!

Ethernet Frame Structure


Preamble:
7 bytes with pattern 10101010 followed by one byte with
pattern 10101011
Used to synchronize receiver, sender clock rates
Addresses: 6 bytes, frame is received by all adapters on a
LAN and dropped if address does not match
Length: 2 bytes, length of Data field
CRC: 4 bytes generated using CR-32, checked at receiver, if
error is detected, the frame is simply dropped
Data Payload: Maximum 1500 bytes, minimum 46 bytes
If data is less than 46 bytes, pad with zeros to 46 bytes

Length

Ethernet
Physical Media :10 Base5
10 Base2
10 BaseT
10 BaseFL

Thick Co-axial Cable with Bus Topology


Thin Co-axial Cable with Bus Topology
UTP Cat 3/5 with Tree Topology
Multimode/Singlemode Fiber with Tree
Topology

Maximum Segment Length


10 Base5

- 500 m with at most 4 repeaters (Use Bridge to extend


the network)
10 Base2 - 185 m with at most 4 repeaters (Use Bridge to extend
the network)
10 BaseT - 100 m with at most 4 hubs (Use Switch to extend the
network)

Fast Ethernet
100 Mbps bandwidth
Uses same CSMA/CD media access protocol and packet
format as in Ethernet.
100BaseTX (UTP) and 100BaseFX (Fiber) standards
Physical media :100 BaseTX - UTP Cat 5e
100 BaseFX - Multimode / Singlemode Fiber
Full Duplex/Half Duplex operations.

Fast Ethernet
Provision for Auto-Negotiation of media speed:
10 Mbps or 100Mbps (popularly available for copper
media only).
Maximum Segment Length
100 Base TX - 100 m
100 Base FX - 2 Km (Multimode Fiber)
100 Base FX - 20 km (Singlemode Fiber)

Gigabit Ethernet
1 Gbps bandwidth.
Uses same CSMA/CD media access protocol as in Ethernet
and is backward compatible (10/100/100 modules are
available).
1000BaseT (UTP), 1000BaseSX (Multimode Fiber) and
1000BaseLX (Multimode/Singlemode Fiber) standards.
Maximum Segment Length
1000 Base T
- 100m (Cat 5e/6)
1000 Base SX - 275 m (Multimode Fiber)
1000 Base LX - 512 m (Multimode Fiber)
1000 Base LX - 20 Km (Singlemode Fiber)
1000 Base LH - 80 Km (Singlemode Fiber)

10 Gig Ethernet
10 Gbps bandwidth.
Uses same CSMA/CD media access protocol as in
Ethernet.
Propositioned for Metro-Ethernet
Maximum Segment Length
10GBase-LR
- 10 Km (Singlemode Fiber)
10GBase-ER
- 40 Km (Singlemode Fiber)

Common questions

Powered by AI

Ethernet has seen significant advancements from its original 10 Mbps standard to 10 Gbps, driven by improvements in media access protocols, encoding techniques, and physical media types. Initially, Ethernet employed CSMA/CD for access control, accommodating 10 Mbps data rates using thick coaxial cables . To improve speed, Fast Ethernet (100 Mbps) adopted similar packet formats but leveraged Category 5 UTP cables and included enhancements such as auto-negotiation for duplex and speed capabilities . As demands grew, Gigabit Ethernet (1 Gbps) investments extended the CSMA/CD protocol to more efficient media including Cat 6 and fiber optics, ensuring backward compatibility . This supported increased data volumes and smaller time slots for overcoming collision issues. Finally, 10 Gigabit Ethernet leveraged even more advanced physical media, such as single-mode fiber, to support long distances while completely bypassing CSMA/CD in full-duplex links, essential for eliminating collisions and enabling higher throughput . The advancements in encoding schemes, physical layers, and concurrent demand for higher performance in LAN environments have been critical to Ethernet’s scaling capability from its modest beginnings to today's ultra-fast networks.

Bit stuffing is a technique used in High-level Data Link Control (HDLC) to ensure data transparency and integrity during transmission. In HDLC, frames are delineated by a unique bit sequence flag ('01111110'). To prevent ambiguity when the payload contains the same sequence as the flag, HDLC applies bit stuffing by adding a '0' after five consecutive '1s' in the transmitted data . At the receiver, when five sequential '1s' are detected, the additional '0' is identified and removed, restoring the original data. This technique allows the flag sequence to remain unique within the frame boundaries, providing clear frame separation without affecting the actual data integrity .

Burst error poses significant challenges in data transmission by affecting multiple bits at once, increasing the difficulty of error detection and correction compared to single-bit errors. A burst error occurs due to prolonged noise interference across several bits, rather than just a single bit, as is often the case with transient noise . This type of error is more common in serial data transmissions due to the continuous flow of bits. Burst errors are particularly challenging because standard error detection methods, like parity checks, are less effective where multiple bits are affected. To address burst errors, more robust error detection and correction methods are required, such as using cyclic redundancy checks (CRC) or implementing advanced forward error-correction techniques that segment data into smaller units, thereby localizing errors and enabling correction without necessitating retransmissions .

In data communication, different signal encoding schemes are employed to maintain synchronization and reduce errors. Non-Return to Zero (NRZ) encoding transmits data without returning to a baseline signal level, which can lead to issues like baseline wander and clock synchronization problems when there are extended sequences of 0s or 1s . NRZ Inverted (NRZI) helps resolve the issue of consecutive 1s by representing 1s with a change in signal level, while 0s maintain the current state . Manchester encoding tackles synchronization by using XOR with the clock, thereby ensuring that transitions occur at a regular interval, which also aids in clock recovery; however, it is inefficient as it doubles the transitions on the link, effectively halving the bitrate . The 4B/5B encoding addresses inefficiencies and synchronization by mapping 4-bit symbols into 5-bit codes, ensuring no long sequences of 0s, and using NRZI for transmission, combining multiple techniques to solve signal synchronization and error issues .

Point-to-point links and multiple access networks present different sets of advantages and disadvantages suitable for varied network demands. Point-to-point links provide a dedicated connection between two network nodes, offering higher reliability and constant bandwidth since each link is not shared among multiple nodes . They are secure and offer simpler error detection and correction schemes due to their isolated nature. However, they are costly to scale because a separate link is required for each pair of communicating nodes, leading to inefficiencies in larger networks . Multiple access networks, on the other hand, allow multiple nodes to share the same physical medium simultaneously, making them cost-effective and easier to deploy in environments where network expansion is necessary . However, these networks are prone to collisions and require protocols like CSMA/CD to mange network access and efficiency. The shared medium can also lead to reduced performance and security challenges as bandwidth is split among users, potentially degrading service quality . Overall, the choice depends on the specific networking requirements regarding scalability, security, and cost-effectiveness.

The Binary Exponential Backoff algorithm in Ethernet is a key component of the CSMA/CD protocol used to manage retransmissions after a collision. After detecting a collision, the node will wait for an exponentially increasing time interval before attempting to retransmit. Initially, after the first collision, a node chooses randomly between waiting for 0 or 1 time slots; if a second collision occurs, the node then chooses between 0, 1, 2, or 3 time slots, and the possibilities continue to double with subsequent collisions . After 10 collisions, the maximum interval is capped at 1023 slots. If a node experiences 16 collisions, it stops attempting retransmission altogether, deeming the network unreliable. This algorithm allows Ethernet to dynamically adapt the waiting period based on network conditions, minimizing collision frequency, and optimizing for channel availability .

CSMA/CD is suitable for Ethernet because it minimizes collision while utilizing the shared transmission medium efficiently. In CSMA/CD, each node listens to the channel before starting a transmission to ensure it is not already in use (carrier sensing) and continues to listen to detect collisions during transmission (collision detection). This protocol reduces the chances of data packet collisions and the consequent need for retransmissions. Additionally, when a collision is detected, the algorithm implements a Binary Exponential Backoff to decide random waiting times before retrying, reducing further collision chances . This adaptability makes Ethernet networks robust in handling data packet traffic, contributing to its widespread use in network configurations .

The Preamble in Ethernet frames serves as a synchronization tool for aligning the receiver's clock with that of the sender. It consists of seven bytes with the pattern '10101010' followed by a single byte with '10101011' . This repetitive sequence creates a template for receiving devices to lock onto the timing of incoming frame bits, ensuring that data can be properly interpreted. The transition patterns allow for clock recovery and synchronization by standardizing the timing at the start of each frame. This preparatory step is crucial for accurate and efficient data transmission, particularly over longer distances where timing discrepancies can occur .

The 4B/5B encoding method improves transmission efficiency over Manchester encoding by reducing the number of transitions needed for signal transmission. While Manchester encoding represents each bit as a combination of two levels (resulting in 50% efficiency since it doubles the baud rate relative to the bitrate), 4B/5B encodes a 4-bit data symbol into a 5-bit code, achieving 80% efficiency . Unlike Manchester encoding, which inherently requires two clock cycles per bit, 4B/5B maintains synchronization and minimizes redundancy by adding only one extra bit for every four bits of data, effectively reducing overhead and enhancing the capacity utilization of the available bandwidth . Also, 4B/5B reduces long sequences of zeros, optimizing transition stability without sacrificing synchronization and allowing compatible use with NRZI for further efficiency .

In Ethernet frames, the Cyclic Redundancy Check (CRC) is used as an error-detection mechanism to verify data integrity. Each Ethernet frame includes a CRC field, created by applying the CRC-32 algorithm on the data within the frame, generating a 4-byte checksum . When the frame is received, the CRC is recalculated, and if it matches the CRC value included with the frame, the data is assumed to be error-free. If there is a mismatch, indicating that one or more bits are corrupted, the frame is discarded . This process ensures data integrity by detecting errors that might have occurred during transmission, thereby allowing error localization without determining the precise corrupted bits .

You might also like