0% found this document useful (0 votes)
17 views23 pages

CN Unit Ii

The data link layer, the second layer in the OSI model, is responsible for maintaining communication between nodes and is divided into two sub-layers: Logical Link Control (LLC) and Media Access Control (MAC). It provides services such as framing, error control, and flow control, and can offer various types of service including unacknowledged and acknowledged connections. Error detection and correction mechanisms like CRC and parity checks are utilized to ensure data integrity during transmission.

Uploaded by

syambabuj
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)
17 views23 pages

CN Unit Ii

The data link layer, the second layer in the OSI model, is responsible for maintaining communication between nodes and is divided into two sub-layers: Logical Link Control (LLC) and Media Access Control (MAC). It provides services such as framing, error control, and flow control, and can offer various types of service including unacknowledged and acknowledged connections. Error detection and correction mechanisms like CRC and parity checks are utilized to ensure data integrity during transmission.

Uploaded by

syambabuj
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/ 23

B.Arun Kumar, Asst.

Prof Computer Networks UNIT-II

Data Link Layer


Data-link layer is the second layer after physical layer. The data link layer is responsible for maintaining the
data link between two hosts or nodes.
The data link layer is divided into two sub-layers:
1. Logical Link Control Sub-layer (LLC) :
It provides the logic for the data link,Thus it controls the synchronization, flow control, and error checking
functions of the data link layer.
Functions are:
 (i) Error Recovery.
 (ii) It performs the flow control operations.
 (iii) User addressing.
2. Media Access Control Sub-layer (MAC) :
It is the second sub-layer of data-link layer. It controls the flow and multiplexing for transmission medium.
Transmission of data packets is controlled by this layer. This layer is responsible for sending the data over
the network interface card.
Functions are:
 (i) To perform the control of access to media.
 (ii) It performs the unique addressing to stations directly connected to LAN.
 (iii) Detection of errors.
Design Issues of Data Link Layer:
The data link layer uses the services of the physical layer to send and receive bits
over communication channels. It has a number of functions, including:

1. Providing a well-defined service interface to the network layer.

2. Framing

3. Error Control

4. Flow Control

Services provided to the network layer:


The data link layer can be designed to offer various services. The actual services offered can vary from
system to system. Three reasonable possibilities that are commonly provided are

1. Unacknowledged connectionless service.


2. Acknowledged connectionless service.
3. Acknowledged connection-oriented service.

In Unacknowledged connectionless service, the source machine send independent frames to the destination
machine without having the destination machine acknowledge them. No logical connection is established
before communication or released after communication. If a frame is lost due to noise, no attempt is made to
detect the loss or recover from it in the data link layer. This class of service is appropriate when the error rate
is very low, so recovery is left to higher layers. This type of communication is best suited for voice
communication, where late data is worse than bad data.

Acknowledged connectionless services offer a better reliability service than Unacknowledged connectionless
service. When this service is offered, even though there is no logical connection, an acknowledgement frame
from the receiver to sender makes the sender to know whether the frame is received at sender or not. This
makes the sender to retransmit the missed frames. This service is useful over unreliable channels, such as
wireless systems eg. WiFi.
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

The most sophisticated services the data link layer can provide to the network layer is connection-oriented
services. With this service, the source and destination machines establish a connection before any data are
transferred. Each frame sent over the connection is numbered, and the data link layer guarantees that each
frame sent is indeed received.

Framing:

To provide service to the network layer, the data link layer must use the service provided to it
by the physical layer. What the physical layer does is to accept a raw bit stream and attempt to deliver
it to the destination. This bit stream is not guaranteed tobe error free. The number of bits received may
be less than, equal to, or more than the number of bits transmitted, and they may have different values.
It is up to the data linklayer to detect and, if necessary, correct errors.
The usual approach is for the data linklayer to break the bit stream up into discrete frames and
compute the checksum for each frame. When a frame arrives at the destination, the checksum is
recomputed. If the newly computed checksum is different from the one contained in the frame, the
data link layer knows that an error has occurred and takes steps to deal with it (e.g., discarding the bad
frame and possibly also sending back an error report).

Breaking the bit stream up into frames is more difficult than it at first appears. Oneway to achieve
this framing is to insert time gaps between frames, much like the spaces between words in ordinary text.
However, networks rarely make any guarantees about timing, so it is possible these gaps might be
squeezed out or other gaps might be inserted during transmission.
Since it is too risky to count on timing to mark the start and end of each frame, other methods
have been devised.

We will look at four methods:


1. Character count.
2. Flag bytes with byte stuffing.
3. Starting and ending flags, with bit stuffing.
4. Physical layer coding violations.

The first framing method, Character Count uses a field in the header to specify the number of
characters in the frame. When the data link layer at the destination sees the character count, it knows
how many characters follow and hence where the end of the frame is. This technique is shown in
below figure with four frames of sizes 5, 5, 8, and 8 characters respectively.
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

Figure. A character stream. (a) Without errors. (b) With one error.

The trouble with this algorithm is that the count can be garbled by a transmission error. For example, if the
character count of 5 in the second frame of Fig.(b) becomes a 7, the destination will get out of
synchronization and will be unable to locate the start of the next frame. Even if the checksum is incorrect so
the destination knows that the frame is bad, it still has no way of telling where the next frame starts.

Sending a frame back to the source asking for a retransmission does not help either, since the destination
does not know how many characters to skip over to get to the start of the retransmission. For this reason, the
character count method is rarely used anymore.

The second framing method gets around the problem of resynchronization after an error by having each
frame start and end with special bytes. In the past, the starting and ending bytes were different, but in recent
years most protocols have used the same byte, called a flag byte, as both the starting and ending delimiter, as
shown in Fig.(a) as FLAG. In this way, if the receiver ever loses synchronization, it can just search for the
flag byte to find the end of the current frame. Two consecutive flag bytes indicate the end of one frame and
start of the next one.

Figure . (a) A frame delimited by flag bytes. (b) Four examples of byte sequences before and after
byte stuffing.
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

A serious problem occurs with this method when binary data, such as object programs or
floating-point numbers, are being transmitted. It may easily happen that the flag byte's bit pattern
occurs in the data. This situation will usually interfere with the framing. One way to solve this
problem is to have the sender's data link layer insert a special escape byte (ESC) just before each
''accidental'' flag byte in the data. The data link layer on the receiving end removes the escape byte
before the data are given to the network layer. This technique is called byte stuffing or character
stuffing. Thus, a framing flag byte can be distinguished from one in the data by the absence or
presence of an escape byte before it.

Of course, the next question is: What happens if an escape byte occurs in the middle of the data?
The answer is that it, too, is stuffed with an escape byte. Thus, any single escape byte is part of an
escape sequence, whereas a doubled one indicates that a single escape occurred naturally in the data.
Some examples are shown in Fig(b). In all cases, the byte sequence delivered after destuffing is the
same as the original bytesequence.

A major disadvantage of using byte stuffing method is that it is closely tied to the use of 8-bit
characters. Not all character codes use 8-bit characters. For example, UNICODE uses 16-bit
characters, as networks developed, the disadvantages of embedding the character code length in
the framing mechanism became increasingly clear, so a new technique had to be developed to allow
arbitrary sized characters.

The new technique allows data frames to contain an arbitrary number of bits and allows
character codes with an arbitrary number of bits per character. It works like this. Each frame begins
and ends with a special bit pattern, 01111110 (in fact, a flag byte). Whenever the sender's data link
layer encounters five consecutive 1s in the data, it automatically stuffs a 0 bit into the outgoing bit
stream. This bit stuffing is analogous to byte stuffing, in which an escape byte is stuffed into the
outgoing character streambefore a flag byte in the data.

When the receiver sees five consecutive incoming 1 bits, followed by a 0 bit, it automatically de-
stuffs (i.e., deletes) the 0 bit. Just as byte stuffing is completely transparent to the network layer in
both computers, so is bit stuffing. If the user data contain the flag pattern, 01111110, this flag is
transmitted as 011111010 but stored inthe receiver's memory as 01111110.

Figure 3-6. Bit stuffing. (a) The original data. (b) The data as they appear on the line. (c) The data as
they are stored in the receiver's memory after destuffing.

With bit stuffing, the boundary between two frames can be unambiguously recognized by the flag
pattern. Thus, if the receiver loses track of where it is, all it should do is scan the input for flag
sequences, since they can only occur at frame boundaries and never within the data. The last method
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

of framing is only applicable to networks in which the encoding on the physical medium contains
some redundancy. For example, some LANs encode 1 bit of data by using 2 physical bits. Normally,
a 1 bit is a high-low pair and a 0 bit is a low-high pair. The scheme means that every data bit has a
transition in the middle, making it easy for the receiver to locate the bit boundaries. The
combinations high-high and low-low are not used for data but are used for delimiting frames in some
protocols.

As a final note on framing, many data link protocols use combination of a character
count with one of the other methods for extra safety. When a frame arrives,the count field is used to
locate the end of the frame. Only if the appropriate delimiter is present at that position and the
checksum is correct is the frame accepted as valid. Otherwise, the input stream is scanned for the next
delimiter.
Flow Control
The data link layer regulates flow control so that a fast sender does not drown a slow receiver. When the
sender sends frames at very high speeds, a slow receiver may not be able to handle it. There will be
frame losses even if the transmission is error-free. The two commonapproaches for flow control are

 Feedback based flow control


 Rate based flow control

Error Control
The data link layer ensures error free link for data transmission. The issues it caters to withrespect to
error control are

 Dealing with transmission errors


 Sending acknowledgement frames in reliable connections
 Retransmitting lost frames
 Identifying duplicate frames and deleting them
 Controlling access to shared channels in case of broadcasting

Error Detection and Correction-CRC:


There are many reasons such as noise, cross-talk etc., which may help data to get corrupted
during transmission. The upper layers work on some generalized view of network architecture
and are not aware of actual hardware data processing. Hence, the upper layers expect error- free
transmission between the systems. Most of the applications would not function expectedly if
they receive erroneous data. Applications such as voice and video may not be that affected and
with some errors they may still function well.
Data-link layer uses some error control mechanism to ensure that frames (data bit streams) are
transmitted with certain level of accuracy. But to understand how errors is controlled, it is
essential to know what types of errors may occur.
Types of Errors
There may be three types of errors:
 Single bit error
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

In a frame, there is only one bit, anywhere though, which is corrupt.


 Multiple bits error

Frame is received with more than one bits in corrupted state.


 Burst error

Frame contains more than1 consecutive bits corrupted.


Error control mechanism may involve two possible ways:
1. Error detection 2. Error correction
Error Detection
Errors in the received frames are detected by means of Parity Check and Cyclic Redundancy Check
(CRC). In both cases, few extra bits are sent along with actual data to confirm that bits received at other
end are same as they were sent. If the counter-check at receiver’ end fails, the bits are considered
corrupted.
Parity Check
One extra bit is sent along with the original bits to make number of 1s either even in case of even parity,
or odd in case of odd parity.
The sender while creating a frame counts the number of 1s in it. For example, if even parity is used and
number of 1s is even then one bit with value 0 is added. This way number of 1s remains even.If the
number of 1s is odd, to make it even a bit with value 1 is added.

The receiver simply counts the number of 1s in a frame. If the count of 1s is even and even parity is
used, the frame is considered to be not-corrupted and is accepted. If the count of 1s is odd and odd
parity is used, the frame is still not corrupted.
If a single bit flips in transit, the receiver can detect it by counting the number of 1s. But when more than
one bits are erro neous, then it is very hard for the receiver to detect the error.

Cyclic Redundancy Check (CRC)


CRC is a different approach to detect if the received frame contains valid data. This techniqueinvolves
binary division of the data bits being sent. The divisor is generated using polynomials. The sender
performs a division operation on the bits being sent and calculates the remainder. Before sending the
actual bits, the sender adds the remainder at the end of the actual bits. Actual data bits plus the
remainder is called a codeword. The sender transmits databits as codewords.
At the other end, the receiver performs division operation on codewords using the same CRCdivisor.
If the remainder contains all zeros the data bits are accepted, otherwise it is considered as there some
data corruption occurred in transit.
A bit stream 1101011011 is transmitted using the standard CRC method. The
generatorpolynomial is x4+x+1. What is the actual bit string transmitted?
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

Solution-
 The generator polynomial G(x) = x4 + x + 1 is encoded as 10011.
 Clearly, the generator polynomial consists of 5 bits.
 So, a string of 4 zeroes is appended to the bit stream to be transmitted.
 The resulting bit stream is 11010110110000.
Now, the binary division is performed as-
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

From here, CRC = 1110.


Now,
 The code word to be transmitted is obtained by replacing the last 4 zeroes of
11010110110000 with the CRC.
 Thus, the code word transmitted to the receiver = 11010110111110.
Error Detection in Computer Networks
Error: A condition when the receiver’s information does not match with the sender’s information.
During transmission, digital signals suffer from noise that can introduce errors in the binary bits travelling
from sender to receiver. That means a 0 bit may change to 1 or a 1 bitmay change to 0.

Error Detecting Codes (Implemented either at Data link or Transport Layer) Whenever a message
is transmitted, it may get scrambled by noise or data may get corrupted. To avoid this, we use error-
detecting codes which are additional data added to a given digital message to help us detect if any
error has occurred during transmission of the message.

Basic approach used for error detection is the use of redundancy bits, where additional bits areadded to
facilitate detection of errors.
Some popular techniques for error detection are:
1. Simple Parity check 2. Two-dimensional Parity check
3. Checksum 4. Cyclic redundancy check
1. Simple Parity check
Blocks of data from the source are subjected to a check bit or parity bit generator form, wherea parity of
:
 1 is added to the block if it contains odd number of 1’s, and
 0 is added if it contains even number of 1’s
This scheme makes the total number of 1’s even, that is why it is called even parity checking.

2. Two-dimensional Parity check


Parity check bits are calculated for each row, which is equivalent to a simple parity check bit. Parity
check bits are also calculated for all columns, then both are sent along with the data. At the receiving end
these are compared with the parity bits calculated on the received data.
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

1. Checksum

 In checksum error detection scheme, the data is divided into k segments each of m bits.
 In the sender’s end the segments are added using 1’s complement arithmetic to get thesum.
The sum is complemented to get the checksum.
 The checksum segment is sent along with the data segments.
 At the receiver’s end, all received segments are added using 1’s complement arithmetic to get the
sum. The sum is complemented.
 If the result is zero, the received data is accepted; otherwise discarded.
2. Cyclic redundancy check (CRC)
 Unlike checksum scheme, which is based on addition, CRC is based on binary division.
 In CRC, a sequence of redundant bits, called cyclic redundancy check bits, are appendedto the
end of data unit so that the resulting data unit becomes exactly divisible by a second,
predetermined binary number.
 At the destination, the incoming data unit is divided by the same number. If at this step there is
no remainder, the data unit is assumed to be correct and is therefore accepted.
 A remainder indicates that the data unit has been damaged in transit and therefore must be
rejected.
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

Example :

Error Correction

In the digital world, error correction can be done in two ways:


 Backward Error Correction: When the receiver detects an error in the data received, it
requests back the sender to retransmit the data unit.
 Forward Error Correction: When the receiver detects some error in the data received, it
executes error-correcting code, which helps it to auto-recover and to correct some kinds of
errors.
The first one, Backward Error Correction, is simple and can only be efficiently used where
retransmitting is not expensive. For example, fiber optics. But in case of wireless transmission
retransmitting may cost too much. In the latter case, Forward Error Correction is used.
To correct the error in data frame, the receiver must know exactly which bit in the frame is corrupted.
To locate the bit in error, redundant bits are used as parity bits for error detection.
For example, we take ASCII words (7 bits data), then there could be 8 kind of information we need: first
seven bits to tell us which bit is error and one more bit to tell that there is no error.
For m data bits, r redundant bits are used. r bits can provide 2r combinations of information. In m+r bit
codeword, there is possibility that the r bits themselves may get corrupted. So the number of r bits used
must inform about m+r bit locations plus no-error information, i.e. m+r+1.
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

Hamming Code

Hamming code is a block code that is capable of detecting up to two simultaneous bit errors and
correcting single-bit errors. It was developed by R.W. Hamming for error correction.
In this coding method, the source encodes the message by inserting redundant bits within the message.
These redundant bits are extra bits that are generated and inserted at specific positions in the message itself
to enable error detection and correction. When the destination receives this message, it performs
recalculations to detect errors and find the bit position that has error.

Encoding a message by Hamming Code


The procedure used by the sender to encode the message encompasses the following steps −
 Step 1 − Calculation of the number of redundant bits.
 Step 2 − Positioning the redundant bits.
 Step 3 − Calculating the values of each redundant bit.
Once the redundant bits are embedded within the message, this is sent to the user.
Step 1 − Calculation of the number of redundant bits.
If the message contains m𝑚number of data bits, r𝑟number of redundant bits are added to it so that m𝑟 is
able to indicate at least (m + r+ 1) different states. Here, (m + r) indicates location of an error in each of
(𝑚 + 𝑟) bit positions and one additional state indicates no error. Since, r𝑟 bits can indicate 2r𝑟 states, 2r𝑟
must be at least equal to (m + r + 1). Thus the following equationshould hold 2r ≥ m+r+1
Step 2 − Positioning the redundant bits.
The r redundant bits placed at bit positions of powers of 2, i.e. 1, 2, 4, 8, 16 etc. They are referred in the
rest of this text as r1 (at position 1), r2 (at position 2), r3 (at position 4), r4 (at position 8) and so on.
Step 3 − Calculating the values of each redundant bit.
The redundant bits are parity bits. A parity bit is an extra bit that makes the number of 1s either even or
odd. The two types of parity are −
 Even Parity − Here the total number of bits in the message is made even.
 Odd Parity − Here the total number of bits in the message is made odd.
Each redundant bit, ri, is calculated as the parity, generally even parity, based upon its bit position. It
covers all bit positions whose binary representation includes a 1 in the ith position except the position of
ri. Thus −
 r1 is the parity bit for all data bits in positions whose binary representation includes a 1in the
least significant position excluding 1 (3, 5, 7, 9, 11 and so on)
 r2 is the parity bit for all data bits in positions whose binary representation includes a 1in the
position 2 from right except 2 (3, 6, 7, 10, 11 and so on)
 r3 is the parity bit for all data bits in positions whose binary representation includes a 1in the
position 3 from right except 4 (5-7, 12-15, 20-23 and so on)

Decoding a message in Hamming Code


Once the receiver gets an incoming message, it performs recalculations to detect errors and correct them.
The steps for recalculation are −
 Step 1 − Calculation of the number of redundant bits.
 Step 2 − Positioning the redundant bits.
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

 Step 3 − Parity checking.


 Step 4 − Error detection and correction
Step 1 − Calculation of the number of redundant bits

Using the same formula as in encoding, the number of redundant bits are ascertained. 2r ≥ m + r
+ 1 where m is the number of data bits and r is the number of redundant bits.

Step 2 − Positioning the redundant bits

The r redundant bits placed at bit positions of powers of 2, i.e. 1, 2, 4, 8, 16 etc.


Step 3 − Parity checking
Parity bits are calculated based upon the data bits and the redundant bits using the same rule as during
generation of c1,c2 ,c3 ,c4 etc. Thus
c1 = parity(1, 3, 5, 7, 9, 11 and so on)
c2 = parity(2, 3, 6, 7, 10, 11 and so on) c3 =
parity(4-7, 12-15, 20-23 and so on)
Step 4 − Error detection and correction
The decimal equivalent of the parity bits binary values is calculated. If it is 0, there is no error. Otherwise,
the decimal value gives the bit position which has error. For example, if c1c2c3c4 = 1001, it implies that
the data bit at position 9, decimal equivalent of 1001, has error. The bit is flipped to get the correct
message.

Ex.1001101 2r>=m+r+1

2r>=7+r+1

r=1,2,3,4….

21>=7+1+1 false

22>=7+2+1 false

23>=7+3+1 false

24>= (12) 7+4+1 True

M=7, r=4 totally 4-Redundent bits

r1,r2, r3…..

r1=20 (1st Position)

r2=21(2nd Position)

r3=22(4th Position)
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

r4=23(8thPosition)
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

IEEE Standards
In 1985, the Computer Society of the IEEE started a project, called Project 802, to set standards to enable
intercommunication among equipment from a variety of manufacturers. The IEEE has subdivided the
data link layer into two sublayers: logical link control (LLC) and media access control (MAC). IEEE has
also created several physical layer standards for different LAN protocols.

Figure 2.46 IEEE Standard for LANs.

Logical Link Control (LLC)


The IEEE project 802 models take the structure of an HDLC frame and divide it into 2 sets of
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

functions. One set contains the end user portion of the HDLC frame – the logical address, control
information and data. These functions are handled by the IEEE 802.2 logical link control (LLC)
Protocol.
Protocol Data Unit (PDU)
Framing LLC defines a protocol data unit (PDU) that is somewhat similar to that of HDLC. The header
contains a control field like the one in HDLC; this field is used for flow and error control. The two other
header fields define the upper-layer protocol at the source and destination that uses LLC. These fields
are called the destination service access point (DSAP)and the source service access point (SSAP).

Figure 2.47 HDLC frame compared with LLC and MAC frames

Media access control (MAC)


MAC sublayer resolves the contention for the shared media. It contains synchronization, flag, flow and
error control specifications necessary to move information from one place to another, as well as the
physical address of the next station to receive and route a packet.
Standard Ethernet
The original Ethernet was created in 1976 at Xerox's Palo Alto Research Center (PARC).Since then,
it has gone through four generations:
a. Standard Ethernet (l0 Mbps), b. Fast Ethernet (100 Mbps),
c. Gigabit Ethernet (l Gbps) d. Ten-Gigabit Ethernet (l0 Gbps)

MAC Sublayer
In Standard Ethernet, the MAC sublayer governs the operation of the access method. It alsoframes
data received from the upper layer and passes them to the physical layer.

Figure 2.48 Ethernet evolution through four generations


Frame Format

The Ethernet frame contains seven fields: preamble, SFD, DA, SA, length or type of protocol data unit
(PDU), upper-layer data, and the CRC. Ethernet does not provide any mechanism for acknowledging
received frames, making it what is known as an unreliable medium. Acknowledgments must be
implemented at the higher layers.
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

Figure 2.49 802.3 MAC frame


Preamble: The first field of the 802.3 frame contains 7 bytes (56 bits) of alternating 0s and 1s that alerts
the receiving system to the coming frame and enables it to synchronize its input timing. The pattern
provides only an alert and a timing pulse.
Start frame delimiter (SFD). The second field (l byte: 10101011) signals the beginning of the frame.
The SFD warns the station or stations that this is the last chance for synchronization. The last 2 bits is 11
and alerts the receiver that the next field is the destination address.
Destination address (DA). The DA field is 6 bytes and contains the physical address of the destination
station or stations to receive the packet.
Source address (SA). The SA field is also 6 bytes and contains the physical address of the sender of the
packet.
Length or type. This field is defined as a type field or length field. The original Ethernet used this field
as the type field to define the upper-layer protocol using the MAC frame.
Data. This field carries data encapsulated from the upper-layer protocols. It is a minimum of 46 and a
maximum of 1500 bytes.
CRC. The last field contains error detection information, in this case a CRC-32.
Frame Length
Ethernet has imposed restrictions on both the minimum and maximum lengths of a frame.
An Ethernet frame needs to have a minimum length of 512 bits or 64 bytes. Part of this length is the
header and the trailer. If we count 18 bytes of header and trailer, then the minimum length of data from the
upper layer is 64 - 18 = 46 bytes. If the upper-layer packet is less than 46 bytes, padding is added to make
up the difference.
The standard defines the maximum length of a frame as 1518 bytes. If we subtract the 18 bytes of header
and trailer, the maximum length of the payload is 1500 bytes. The maximum length restriction has two
historical reasons.

Figure. Minimum and maximum lengths


B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

Figure 2.53 Categories of Standard Ethernet

Encoding and Decoding

All standard implementations use digital signaling (baseband) at 10 Mbps. At the sender, data are
converted to a digital signal using the Manchester scheme; at the receiver, the received signal is
interpreted as Manchester and decoded into data. Manchester encoding is self synchronous, providing a
transition at each bit interval. Figure 2.60 shows the encoding scheme for Standard Ethernet.

Figure 2.54 Encoding in a Standard Ethernet implementation


a.10Base5: Thick Ethernet

The first implementation is called 10Base5, thick Ethernet, or Thicknet. The nickname derives from the
size of the cable, which is roughly the size of a garden hose and too stiff to bend with your hands.
10Base5 was the first Ethernet specification to use a bus topology with an external transceiver
(transmitter/receiver) connected via a tap to a thick coaxial cable.

Figure 2.55 10Base5 implementation


b.10Base2: Thin Ethernet

The second implementation is called 10Base2, thin Ethernet, or Cheapernet. 10Base2 also uses a bus
topology, but the cable is much thinner and more flexible. The cable can be bent to pass very close to the
stations. In this case, the transceiver is normally part of the network interface card (NIC), which is
installed inside the station.
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

Figure 2.56 10Base2 Implementation


c.10Base-T: Twisted-Pair Ethernet

The third implementation is called 10Base-T or twisted-pair Ethernet. 10Base-T uses a physical star
topology. The stations are connected to a hub via two pairs of twisted cable.
Note that two pairs of twisted cable create two paths between the station and the hub.
Any collision here happens in the hub. Compared to 10Base5 or 10Base2, we can see that the hub
actually replaces the coaxial cable as far as a collision is concerned. The maximum length of the twisted
cable here is defined as 100 m, to minimize the effect of attenuation in the twistedcable.

Figure 2.57. 10Base-T implementation

d.10Base-F: Fiber Ethernet

Although there are several types of optical fiber 10-Mbps Ethernet, the most common is called10Base-F.
10Base-F uses a star topology to connect stations to a hub. The stations are connected to the hub using
two fiber-optic cables.

Figure 2.58. 10Base-F implementation


B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

IEEE 802.11

IEEE has defined the specifications for a wireless LAN, called IEEE 802.11, which covers the physical
and data link layers.
Architecture: The standard defines two kinds of services: the basic service set (BSS) and the extended
service set (ESS).
Basic Service Set
IEEE 802.11 defines the basic service set (BSS) as the building block of a wireless LAN.
A basic service set is made of stationary or mobile wireless stations and an optional central base station,
known as the access point (AP).
The BSS without an AP is a stand-alone network and cannot send data to other BSSs. It is called an ad
hoc architecture. In this architecture, stations can form a network without the need of an AP; they can
locate one another and agree to be part of a BSS. A BSS with an AP is sometimes referred to as an
infrastructure network.

Figure. Basic service sets (BSSs)

Extended Service Set


An extended service set (ESS) is made up of two or more BSSs with APs. In this case, the BSSs are
connected through a distribution system, which is usually a wired LAN. The distribution system connects
the APs in the BSSs. IEEE 802.11 does not restrict the distribution system; it can be any IEEE LAN such
as an Ethernet. Note that the extended service set uses two types of stations: mobile and stationary. The
mobile stations are normal stations inside a BSS.
The stationary stations are AP stations that are part of a wired LAN.

Figure 2.69 Extended Service Set


B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

MAC Sublayer

IEEE 802.11 defines two MAC sublayers: the distributed coordination function (DCF) and point
coordination function (PCF). The following figure shows the relationship between the two MAC
sublayers, the LLC sublayer, and the physical layer.

Figure 2.70 MAC layers in IEEE 802.11 standard


a. Distributed Coordination Function

One of the two protocols defined by IEEE at the MAC sublayer is called the distributedcoordination
function (DCF). DCF uses CSMAICA as the access method.
Wireless LANs cannot implement CSMA/CD for three reasons:
1. For collision detection a station must be able to send data and receive collision signals at thesame
time. This can mean costly stations and increased bandwidth requirements.
2. Collision may not be detected because of the hidden station problem.
3. The distance between stations can be great. Signal fading could prevent a station at one endfrom
hearing a collision at the other end.

b.Point Coordination Function (PCP)


The point coordination function (PCF) is an optional access method that can be implemented in an
infrastructure network (not in an ad hoc network). It is implemented on top of the DCF and is used
mostly for time-sensitive transmission. PCF has a centralized, contention-free polling access method.
The AP performs polling for stations that are capable of being polled. The stations are polled one after
another, sending any data they have to the AP.
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

Figure 2.71 CSMA/CA flowchart

Figure. CSMA/CA and NAV


B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

Frame Format
The MAC layer frame consists of nine fields.
Frame control (FC): The FC field is 2 bytes long and defines the type of frame andsome
control information.
D. In all frame types except one, this field defines the duration of the transmission that is used to set
the value of NAY. In one control frame, this field defines the ID of the frame.

Figure 2.73 Frame format


Addresses. There are four address fields, each 6 bytes long. The meaning of each address field
depends on the value of the To DS and From DS subfields.
Sequence control. This field defines the sequence number of the frame to be used in flow
control.
Frame body. This field, which can be between 0 and 2312 bytes, contains information based on the
type and the subtype defined in the FC field.
FCS. The FCS field is 4 bytes long and contains a CRC-32 error detection sequence.
Frame Types
A wireless LAN defined by IEEE 802.11 have three categories of frames: management frames,
control frames, and data frames.

Management Frames: Management frames are used for the initial communication between
stations and access points.

Control Frames Control frames are used for accessing the channel and acknowledging frames.

Data Frames: Data frames are used for carrying data and control information.
B.Arun Kumar, Asst.Prof Computer Networks UNIT-II

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy