Professional Documents
Culture Documents
Lecture#33-42 Data Link Layer (Computer Networks Part-5)
Lecture#33-42 Data Link Layer (Computer Networks Part-5)
Lecture#33-42
• Flow Control:
– pacing between adjacent sending and receiving nodes
• Error Detection:
– errors caused by signal attenuation, noise, and receiver detects presence of errors:
• Error Correction:
– receiver identifies and corrects bit error(s) without resorting to retransmission
• Half-duplex and full-duplex
– with half duplex, nodes at both ends of link can transmit, but not at same time
0 0
When the receiver checks the parity bits, some of the bits do not follow
the even-parity rule and the whole block is discarded.
10100011 10001001 11011101 11100111 10101010
D.2r
R = remainder[ ]
G
x12 + x11 + x3 + x + 1
which has a degree of 12, will detect all burst errors
affecting an odd number of bits, will detect all burst
errors with a length less than or equal to 12, and will
detect, 99.97 percent of the time, burst errors with a
length of 12 or more.
Sender: Receiver:
• compute checksum of received
• treat segment contents as
segment
sequence of 16-bit integers
• check if computed checksum equals
• checksum: addition (1’s checksum field value:
complement sum) of segment – NO - error detected
contents – YES - no error detected. But
• sender puts checksum value maybe errors nonetheless? More
into UDP checksum field later ….
•All sections are added using one’s complement to get the sum.
•All sections are added using one’s complement to get the sum.
•If the result is zero, the data are accepted: otherwise, rejected.
Retransmission
4 3 7
5 4 9
6 4 10
7 4 11
• TDM (Time Division Multiplexing): channel divided into N time slots, one per user;
inefficient with low duty cycle users and at light load.
• FDM (Frequency Division Multiplexing): frequency subdivided.
time
frequency bands
• TDM (Time Division Multiplexing): channel divided into N time slots, one per user;
inefficient with low duty cycle users and at light load.
• FDM (Frequency Division Multiplexing): frequency subdivided.
Pros Cons
• single active node can • collisions, wasting slots
continuously transmit at • idle slots
full rate of channel • nodes may be able to
• highly decentralized: only detect collision in less
slots in nodes need to be than time to transmit
packet
in sync
• clock synchronization
• simple
02/13/24 Data Link Layer 5-50
Slotted Aloha efficiency
Efficiency is the long-run • For max efficiency with N
fraction of successful slots nodes, find p* that
when there are many nodes, maximizes
each with many frames to send Np(1-p)N-1
• For many nodes, take
• Suppose N nodes with many limit of Np*(1-p*)N-1 as N
frames to send, each transmits in
goes to infinity, gives 1/e
slot with probability p
• prob that node 1 has success in a
= .37
slot = p(1-p)N-1
• prob that any node has a success = At best: channel
Np(1-p)N-1 used for useful
transmissions 37%
of time!
Metcalfe’s Ethernet
sketch
Preamble:
• 7 bytes with pattern 10101010 followed by one byte with
pattern 10101011
• used to synchronize receiver, sender clock rates
1
efficiency
1 5t prop / ttrans
Repeater
A repeater receives a signal, regenerates it, and passes it on.
It can regenerate and retime network signals at the bit level
to allow them to travel a longer distance on the media.
It operates at Physical Layer of OSI
The Four Repeater Rule for 10-Mbps Ethernet should be
used as a standard when extending LAN segments.
This rule states that no more than four repeaters can be
used between hosts on a LAN.
This rule is used to limit latency added to frame travel by
each repeater.
Hub
Hubs are used to connect multiple
nodes to a single physical device,
which connects to the network.
Hubs are actually multiport
repeaters.
Using a hub changes the network
topology from a linear bus, to a
star.
With hubs, data arriving over the
cables to a hub port is electrically
repeated on all the other ports
connected to the same network
segment, except for the port on
which the data was sent.
02/13/24 Data Link Layer 78
Repeater, Hub, Bridge & Switch
Bridge
Bridges are used to logically separate network
segments within the same network.
They operate at the OSI data link layer (Layer
2) and are independent of higher-layer
protocols.
The function of the bridge is to make
intelligent decisions about whether or not to
pass signals on to the next segment of a
network.
When a bridge receives a frame on the
network, the destination MAC address is
looked up in the bridge table to determine
whether to filter, flood, or copy the frame
onto another segment
Broadcast Packets are forwarded
02/13/24 Data Link Layer 79
Repeater, Hub, Bridge & Switch
Switch
Switches are Multiport Bridges.
Switches provide a unique network segment on each port,
thereby separating collision domains.
Today, network designers are replacing hubs in their wiring
closets with switches to increase their network performance
and bandwidth while protecting their existing wiring
investments.
Like bridges, switches learn certain information about the data
packets that are received from various computers on the
network.
Switches use this information to build forwarding tables to
determine the destination of data being sent by one computer
to another computer on Data
02/13/24 theLinknetwork.
Layer 80
Repeater, Hub, Bridge & Switch
B’ A’