CN Unit 2
CN Unit 2
layer
Framing is function of Data Link Layer that is used to separate message from
source or sender to destination or receiver or simply from all other messages to
all other destinations just by adding sender address and destination address.
The destination or receiver address is simply used to represent where message
or packet is to go and sender or source address is simply used to help recipient
to acknowledge receipt.
Frames are generally data unit of data link layer that is transmitted or
transferred among various network points. It includes complete and full
addressing, protocols that are essential, and information under control. Physical
layers only just accept and transfer stream of bits without any regard to
meaning or structure. Therefore it is up to data link layer to simply develop and
recognize frame boundaries.
This can be achieved by attaching special types of bit patterns to start and end
of the frame. If all of these bit patterns might accidentally occur in data, special
care is needed to be taken to simply make sure that these bit patterns are not
interpreted incorrectly or wrong as frame delimiters.
Framing is simply point-to-point connection among two computers or devices
that consists or includes wire in which data is transferred as stream of bits.
However, all of these bits should be framed into discernible blocks of
information.
Methods of Framing :
There are basically four methods of framing as given below –
1. Character Count
2. Flag Byte with Character Stuffing
3. Starting and Ending Flags, with Bit Stuffing
4. Encoding Violations
These are explained as following below.
1. Character Count :
This method is rarely used and is generally required to count total number of
characters that are present in frame. This is be done by using field in
header. Character count method ensures data link layer at the receiver or
destination about total number of characters that follow, and about where the
frame ends.
There is disadvantage also of using this method i.e., if anyhow character
count is disturbed or distorted by an error occurring during transmission,
then destination or receiver might lose synchronization. The destination or
receiver might also be not able to locate or identify beginning of next frame.
2. Character Stuffing :
Character stuffing is also known as byte stuffing or character-oriented framing
and is same as that of bit stuffing but byte stuffing actually operates on bytes
whereas bit stuffing operates on bits. In byte stuffing, special byte that is
basically known as ESC (Escape Character) that has predefined pattern is
generally added to data section of the data stream or frame when there is
message or character that has same pattern as that of flag byte.
But receiver removes this ESC and keeps data part that causes some problems
or issues. In simple words, we can say that character stuffing is addition of 1
additional byte if there is presence of ESC or flag in text.
3. Bit Stuffing :
Bit stuffing is also known as bit-oriented framing or bit-oriented approach.
In bit stuffing, extra bits are being added by network protocol designers to
data streams. It is generally insertion or addition of extra bits into
transmission unit or message to be transmitted as simple way to provide
and give signaling information and data to receiver and to avoid or ignore
appearance of unintended or unnecessary control sequences.
It is type of protocol management simply performed to break up bit pattern
that results in transmission to go out of synchronization. Bit stuffing is very
essential part of transmission process in network and communication
protocol. It is also required in USB.
4. Physical Layer Coding Violations :
Encoding violation is method that is used only for network in which encoding
on physical medium includes some sort of redundancy i.e., use of more than
one graphical or visual structure to simply encode or represent one variable
of data.
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 bit may change to 0.
Basic approach used for error detection is the use of redundancy bits, where
additional bits are added 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, where a 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.
The allocation depends upon the traffic. If the traffic increases, more
channels are allocated, otherwise fewer channels are allocated to the
users.
First, a fixed set of channels is used when the user makes a call. If all
fixed sets are busy, then dynamic sets are used. When there is heavy
traffic in a network, then h ybrid channel allocation is used.
In this technique, a fixed number of channels are In this technique, channels are not permanently allocated to
allocated to the cells. the cells.
Mobile station centre has fewer responsibilities. The mobile station centre has more responsibilities.
The allocation is not dependent on traffic. The allocation depends on the traffic.
Fixed channel allocation is cheaper than dynamic Dynamic channel allocation is costly as compared to fixed
Fixed Channel allocation Dynamic Channel allocation
PAN (Personal Area Network)
SAN (Storage Area Network)
EPN (Enterprise Private Network)
VPN (Virtual Private Network)
Local Area Network (LAN) –
LAN or Local Area Network connects network devices in such a way that
personal computers and workstations can share data, tools, and programs. The
group of computers and devices are connected together by a switch, or stack of
switches, using a private addressing scheme as defined by the TCP/IP protocol.
Private addresses are unique in relation to other computers on the local
network. Routers are found at the boundary of a LAN, connecting them to the
larger WAN.
Data transmits at a very fast rate as the number of computers linked is limited.
By definition, the connections must be high speed and relatively inexpensive
hardware (Such as hubs, network adapters, and Ethernet cables). LANs cover a
smaller geographical area (Size is limited to a few kilometers) and are privately
owned. One can use it for an office building, home, hospital, schools, etc. LAN
is easy to design and maintain. A Communication medium used for LAN has
twisted-pair cables and coaxial cables. It covers a short distance, and so the
error and noise are minimized.
Early LANs had data rates in the 4 to 16 Mbps range. Today, speeds are
normally 100 or 1000 Mbps. Propagation delay is very short in a LAN. The
smallest LAN may only use two computers, while larger LANs can
accommodate thousands of computers. A LAN typically relies mostly on wired
connections for increased speed and security, but wireless connections can
also be part of a LAN. The fault tolerance of a LAN is more and there is less
congestion in this network. For example A bunch of students playing Counter-
Strike in the same room (without internet).
Metropolitan Area Network (MAN) –
MAN or Metropolitan area Network covers a larger area than that of a LAN and
smaller area as compared to WAN. It connects two or more computers that are
apart but reside in the same or different cities. It covers a large geographical
area and may serve as an ISP (Internet Service Provider). MAN is designed for
customers who need high-speed connectivity. Speeds of MAN range in terms of
Mbps. It’s hard to design and maintain a Metropolitan Area Network.
The fault tolerance of a MAN is less and also there is more congestion in the
network. It is costly and may or may not be owned by a single organization. The
data transfer rate and the propagation delay of MAN are moderate. Devices
used for transmission of data through MAN are Modem and Wire/Cable.
Examples of a MAN are the part of the telephone company network that can
provide a high-speed DSL line to the customer or the cable TV network in a city.
Wide Area Network (WAN) –
WAN or Wide Area Network is a computer network that extends over a large
geographical area, although it might be confined within the bounds of a state or
country. A WAN could be a connection of LAN connecting to other LANs via
telephone lines and radio waves and may be limited to an enterprise (a
corporation or an organization) or accessible to the public. The technology is
high speed and relatively expensive.
There are two types of WAN: Switched WAN and Point-to-Point WAN. WAN is
difficult to design and maintain. Similar to a MAN, the fault tolerance of a WAN
is less and there is more congestion in the network. A Communication medium
used for WAN is PSTN or Satellite Link. Due to long-distance transmission, the
noise and error tend to be more in WAN.
WAN’s data rate is slow about a 10th LAN’s speed since it involves increased
distance and increased number of servers and terminals etc. Speeds of WAN
ranges from a few kilobits per second (Kbps) to megabits per second (Mbps).
Propagation delay is one of the biggest problems faced here. Devices used for
the transmission of data through WAN are Optic wires, Microwaves, and
Satellites. An example of a Switched WAN is the asynchronous transfer mode
(ATM) network and Point-to-Point WAN is a dial-up line that connects a home
computer to the Internet.
Conclusion –
There are many advantages of LAN over MAN and WAN, such as LAN’s
provide excellent reliability, high data transmission rate, they can easily be
managed and shares peripheral devices too. Local Area Network cannot cover
cities or towns and for that Metropolitan Area Network is needed, which can
connect a city or a group of cities together. Further, for connecting a Country or
a group of Countries one requires a Wide Area Network.
Star Topology
Bus Topology
Ring Topology
Mesh Topology
Hybrid Topology
Tree Topology
Ethernet:-
Ethernet is the most widely used LAN technology, which is defined under IEEE
standards 802.3. The reason behind its wide usability is Ethernet is easy to
understand, implement, maintain, and allows low-cost network implementation.
Also, Ethernet offers flexibility in terms of topologies that are allowed. Ethernet
generally uses Bus Topology. Ethernet operates in two layers of the OSI model,
Physical Layer, and Data Link Layer. For Ethernet, the protocol data unit is
Frame since we mainly deal with DLL. In order to handle collision, the Access
control mechanism used in Ethernet is CSMA/CD.
Manchester Encoding Technique is used in Ethernet.
Since we are talking about IEEE 802.3 standard Ethernet, therefore, 0 is
expressed by a high-to-low transition, a 1 by the low-to-high transition. In both
Manchester Encoding and Differential Manchester, the Encoding Baud rate is
double of bit rate.
Advantages of Ethernet:
Speed: When compared to a wireless connection, Ethernet provides
significantly more speed. Because Ethernet is a one-to-one connection, this is
the case. As a result, speeds of up to 10 Gigabits per second (Gbps) or even
100 Gigabits per second (Gbps) are possible.
Efficiency: An Ethernet cable, such as Cat6, consumes less electricity, even
less than a wifi connection. As a result, these ethernet cables are thought to be
the most energy-efficient.
Good data transfer quality: Because it is resistant to noise, the information
transferred is of high quality.
Vulnerable Time = 2 * Tt
The efficiency of Pure ALOHA:
Spure= G * e^-2G
where G is number of stations wants to transmit in Tt slot.
Maximum Efficiency:
Maximum Efficiency will be obtained when G=1/2
Which means, in Pure ALOHA, only about 18.4% of the time is used for
successful transmissions.
2. Slotted Aloha
This is quite similar to Pure Aloha, differing only in the way transmissions take
place. Instead of transmitting right at demand time, the sender waits for some
time. In slotted ALOHA, the time of the shared channel is divided into discrete
intervals called Slots. The stations are eligible to send a frame only at the
beginning of the slot and only one frame per slot is sent. If any station is not
able to place the frame onto the channel at the beginning of the slot, it has to
wait until the beginning of the next time slot. There is still a possibility of
collision if two stations try to send at the beginning of the same time slot. But
still, the number of collisions that can possibly take place is reduced by a large
margin and the performance becomes much well compared to Pure Aloha.
Sslotted = G * e^-G
Maximum Efficiency:
(Sslotted)max = 1 * e^-1
= 1/e = 0.368
Maximum Efficiency, in Slotted ALOHA, is 36.8%.
Bridges
A data link layer bridge connects multiple LANs (local area networks) together to form a
larger LAN. This process of aggregating networks is called network bridging. A bridge
connects the different components so that they appear as parts of a single network.
The following diagram shows connection by a bridge −
Switching by Bridges
When a data frame arrives at a particular port of a bridge, the bridge examines the
frame’s data link address, or more specifically, the MAC address. If the destination
address as well as the required switching is valid, the bridge sends the frame to the
destined port. Otherwise, the frame is discarded.
The bridge is not responsible for end to end data transfer. It is concerned with
transmitting the data frame from one hop to the next. Hence, they do not examine the
payload field of the frame. Due to this, they can help in switching any kind of packets
from the network layer above.
Bridges also connect virtual LANs (VLANs) to make a larger VLAN.
If any segment of the bridged network is wireless, a wireless bridge is used to perform
the switching.
There are three main ways for bridging −
simple bridging
multi-port bridging
learning or transparent bridging