Unit 4 DC 1
Unit 4 DC 1
DLC Services:
Some key functions of data link control services include:
Error detection mechanisms like CRC (Cyclic Redundancy Check) and checksums generate
codes based on transmitted data. At the receiving end, these codes are checked to detect any
errors that might have occurred during transmission. Some protocols incorporate error
correction techniques, allowing them to fix certain types of errors without retransmission.
➢ Flow Control:
Flow control manages the rate of data transmission between devices. It ensures that a sender
does not overwhelm a receiver by sending data too quickly. This can be achieved through
methods like buffering, where the receiving device temporarily stores incoming data until it's
ready to process more.
Data is divided into frames for transmission, and each frame includes addressing information,
such as source and destination addresses. This ensures that data reaches the intended recipient
within the network.
Synchronization ensures that the sender and receiver are operating at the same pace. This
involves timing mechanisms to coordinate when data is sent and received, preventing data loss
or corruption due to mismatched timing.
In shared network environments, MAC protocols determine how devices gain access to the
transmission medium. Protocols like CSMA/CD (Carrier Sense Multiple Access with Collision
Detection) are used in Ethernet networks to manage how devices contend for access to the
network.
Data Link Layer protocols are generally responsible to simply ensure and confirm that the
bits and bytes that are received are identical to the bits and bytes being transferred. It is
basically a set of specifications that are used for implementation of data link layer just above
the physical layer of the Open System Interconnections (OSI) Model.
It is also used to connect all of the remote devices to mainframe computers at central locations
may be in point-to-point (one-to-one) or point-to-multipoint (one-to-many) connections.
It is a data link layer protocol that resides in the layer 2 of the OSI model. It is used to
encapsulate the layer 3 protocols and all the information available in the payload in order to be
transmitted across the serial links. The PPP protocol can be used on synchronous link like ISDN
as well as asynchronous link like dial-up. It is mainly used for the communication between the
two devices.
It can be used over many types of physical networks such as serial cable, phone line, trunk
line, cellular telephone, fiber optic links such as SONET. As the data link layer protocol is used
to identify from where the transmission starts and ends, so ISP (Internet Service Provider) use the
PPP protocol to provide the dial-up access to the internet.
o It is widely used in broadband communications having heavy loads and high speed. For
example, an internet operates on heavy load and high speed.
o It is used to transmit the multiprotocol data between the two connected (point-to-point)
computers. It is mainly used in point-to-point devices, for example, routers are point-to-
o Flag: The flag field is used to indicate the start and end of the frame. The flag field is a 1-
byte field that appears at the beginning and the ending of the frame. The pattern of the flag
is similar to the bit pattern in HDLC, i.e., 01111110.
o Address: It is a 1-byte field that contains the constant value which is 11111111. These 8
ones represent a broadcast message.
o Control: It is a 1-byte field which is set through the constant value, i.e., 11000000. It is
not a required field as PPP does not support the flow control and a very limited error control
mechanism. The control field is a mandatory field where protocol supports flow and error
control mechanism.
o Protocol: It is a 1 or 2 bytes field that defines what is to be carried in the data field. The
data can be a user data or other information.
o Payload: The payload field carries either user data or other information. The maximum
length of the payload field is 1500 bytes.
o Checksum: It is a 16-bit field which is generally used for error detection.
o Dead: Dead is a transition phase which means that the link is not used or there is no active
carrier at the physical layer.
o Establish: If one of the nodes starts working then the phase goes to the establish phase. In
short, we can say that when the node starts communication or carrier is detected then it
moves from the dead to the establish phase.
o Authenticate: It is an optional phase which means that the communication can also moves
to the authenticate phase. The phase moves from the establish to the authenticate phase
only when both the communicating nodes agree to make the communication authenticated.
o Network: Once the authentication is successful, the network is established or phase is
network. In this phase, the negotiation of network layer protocols take place.
o Open: After the establishment of the network phase, it moves to the open phase. Here open
phase means that the exchange of data takes place. Or we can say that it reaches to the open
phase after the configuration of the network layer.
• Pure Aloha:
When a station sends data it waits for an acknowledgement. If the acknowledgment
doesn’t come within the allotted time, then the station waits for a random amount of
time called back-off time (Tb) and re-sends the data. Since different stations wait for
different amounts of time, the probability of further collision decreases.
• Slotted Aloha:
It is similar to pure aloha, except that we divide time into slots, and the sending of data
is allowed only at the beginning of these slots. If a station misses out on the allowed
time, it must wait for the next slot. This reduces the probability of collision.
b. CSMA – Carrier Sense Multiple Access ensures fewer collisions as the station is
required to first sense the medium (for idle or busy) before transmitting data. If it is idle
then it sends data, otherwise it waits till the channel becomes idle. However there is still
chance of collision in CSMA due to propagation delay. For example, if station A wants to
send data, it will first sense the medium.If it finds the channel idle, it will start sending
data. However, by the time the first bit of data is transmitted (delayed due to propagation
delay) from station A, if station B requests to send data and senses the medium it will also
find it idle and will also send data. This will result in collision of data from station A and
B.
c. CSMA/CD – Carrier sense multiple access with collision detection. Stations can
terminate transmission of data if collision is detected.
d. CSMA/CA – Carrier sense multiple access with collision avoidance. The process of
collisions detection involves sender receiving acknowledgement signals. If there is just one
signal(its own) then the data is successfully sent but if there are two signals(its own and the
one with which it has collided) then it means a collision has occurred. To distinguish
between these two cases, collision must have a lot of impact on received signal. However it
is not so in wired networks, so CSMA/CA is used in this case.
Controlled Access:
In this, the data is sent by that station which is approved by all other stations. For
further details refer – Controlled Access Protocols
a. Reservation:
• In the reservation method, a station needs to make a reservation before sending data.
• The timeline has two kinds of periods:
• Reservation interval of fixed time length
• Data transmission period of variable frames.
• If there are M stations, the reservation interval is divided into M slots, and each station
has one slot.
Prof. Manasi Talele 8
Data Communication
• Suppose if station 1 has a frame to send, it transmits 1 bit during the slot 1. No other
station is allowed to transmit during this slot.
b. Polling
• Polling process is similar to the roll-call performed in class. Just like the teacher, a
controller sends a message to each node in turn.
• In this, one acts as a primary station(controller) and the others are secondary stations.
All data exchanges must be made through the controller.
• The message sent by the controller contains the address of the node being selected for
granting access.
• Although all nodes receive the message the addressed one responds to it and sends data
if any. If there is no data, usually a “poll reject”(NAK) message is sent back.
• Problems include high overhead of the polling messages and high dependence on the
reliability of the controller.
c. Token passing:
• In token passing scheme, the stations are connected logically to each other in form of
ring and access to stations is governed by tokens.
• A token is a special bit pattern or a small message, which circulate from one station to
the next in some predefined order.
• In Token ring, token is passed from one station to another adjacent station in the ring
whereas incase of Token bus, each station uses the bus to send the token to the next
station in some predefined order.
• In both cases, token represents permission to send. If a station has a frame queued for
transmission when it receives the token, it can send that frame before it passes the token
to the next station. If it has no queued frame, it passes the token simply.
• After sending a frame, each station must wait for all N stations (including itself) to send
the token to their neighbours and the other N – 1 stations to send a frame, if they have
one.
• There exists problems like duplication of token or token is lost or insertion of new
station, removal of a station, which need be tackled for correct and reliable operation of
this scheme.
Advantages:
• Increase in efficiency
• High data rates
• Good for multimedia traffic
Disadvantages:
• Complex to implement
• High peak to power ratio
LINK-LAYER ADDRESSING:
A link-layer address is called a link address, called a physical address, and sometimes
a MAC address. Since a link is controlled at the data-link layer, the addresses need to belong to
the data-link layer. When a datagram passes from the network layer to the data-link layer,the
Prof. Manasi Talele 10
Data Communication
datagram will be encapsulated in a frame and two data-link addresses are added to the frame
header. These two addresses are changed every time the frame moves from one link to another.
Figure 1.7.1 shows, IP addresses and link-layer addresses in a small internet. This is easy to
understand.
Here we have three links and two routers. We have two hosts: Alice (source) and Bob
(destination). For each host, we have shown two addresses, the IP addresses (N) and the link-
layer addresses (L).
We have three frames, one in each link. Each frame carries the same datagram with the same
source and destination addresses (N1 and N8), but the link-layer addresses of the frame change
from link to link. In link 1, the link-layer addresses are L1 and L2. In link 2, they are L4 and L5.
In link 3, they are L7 and L8. Note that the IP addresses and the link-layer addresses are not in
the same order. For IP addresses, the source address comes before the destination address; for
link-layer addresses, the destination address comes before the source.
Unicast Address Each host or each interface of a router is assigned a unicast address. Unicasting
means one to-one communication. A frame with a unicast address destination is destined onlyf
or one entity in the link. Example The unicast link-layer addresses in the most common LAN,
Ethernet, are 48 bits (six bytes) that are presented as 12 hexadecimal digits separated by colons;
for example, the following is a link-layer address of a computer. A3:34:45:11:92:F1
Prof. Manasi Talele 11
Data Communication
Multicast Address Some link-layer protocols define multicast addresses. Multicasting means
one-to many communication. Example The multicast link-layer addresses in the most common
LAN,Ethernet, are 48 bits (six bytes) that are presented as 12 hexadecimal digits separated by
colons.The second digit, needs to be an even number in hexadecimal. The following shows a
multicast address: A2:34:45:11:92:F1 Broadcast Address Some link-layer protocols define a
broadcast address. Broadcasting means one-to-all communication. A frame with a destination
broadcast address is sent to all entities in the link. Example The broadcast link-layer addresses
in the most common LAN,Ethernet, are 48 bits, all 1s, that are presented as 12 hexadecimal
digits separated by colons. The following shows a broadcast address: FF:FF:FF:FF:FF:F
If a host or a router needs to find the link-layer address of another host or router in its network,
it sends an ARP request packet.The packet includes the link-layer and IP addresses of the
sender and the IP address of the receiver. Because the sender does not know the link-layer
address of the receiver, the query is broadcast over the link using the link-layer broadcast
address.
Every host or router on the network receives and processes the ARP request packet,
but only the intended recipient recognizes its IP address and sends back an ARP response
packet.
IP Addressing
Each device that uses a network receives an IP address, which is a special identifier
number. IP addresses are necessary for routing packets of data between devices and for enabling
Internet communication between devices. Dotted decimal notation, which depicts four sets of
dig The network, separated by periods, is the most common way to express IP addresses. The
address is 32 bits, and every number corresponds to a byte of the address.
There are two primary forms of IP addresses IPv4 and IPv6. Because of the 32-bit length and
the limited amount of unique IPv4 addresses, subnets and various methods for storing IP
addresses have been developed. There are many more unique addresses available for IPv6
addresses that are 128-bit.
Subnetting
A network is divided into smaller subnetworks, or subnetworks, through the process known as
a subnetwork. For this purpose, a network part of the IP address is created by taking bits from
the host part. The host party identifies the specific device on the subnetwork, while the network
party identifies the subnetwork as a whole.
Hexadecimal Notation
Classful Addressing
The 32-bit IP address is divided into five sub-classes. These are:
• Class A
• Class B
• Class C
• Class D
• Class E
Each of these classes has a valid range of IP addresses. Classes D and E are reserved for
multicast and experimental purposes respectively. The order of bits in the first octet determines
the classes of the IP address.
The IPv4 address is divided into two parts:
Prof. Manasi Talele 14
Data Communication
• Network ID
• Host ID
The class of IP address is used to determine the bits used for network ID and host ID and the
number of total networks and hosts possible in that particular class. Each ISP or network
administrator assigns an IP address to each device that is connected to its network.
Class A
IP addresses belonging to class A are assigned to the networks that contain a large number of
hosts.
• The network ID is 8 bits long.
• The host ID is 24 bits long.
The higher-order bit of the first octet in class A is always set to 0. The remaining 7 bits in the
first octet are used to determine network ID. The 24 bits of host ID are used to determine the
host in any network. The default subnet mask for Class A is 255.x.x.x. Therefore, class A has a
total of:
Prof. Manasi Talele 15
Data Communication
• 2^24 – 2 = 16,777,214 host ID
IP addresses belonging to class A ranges from 1.0.0.0 – 126.255.255.255.
Class B
IP address belonging to class B is assigned to networks that range from medium-sized to large-
sized networks.
• The network ID is 16 bits long.
• The host ID is 16 bits long.
The higher-order bits of the first octet of IP addresses of class B are always set to 10. The
remaining 14 bits are used to determine the network ID. The 16 bits of host ID are used to
determine the host in any network. The default subnet mask for class B is 255.255.x.x. Class B
has a total of:
• 2^14 = 16384 network address
• 2^16 – 2 = 65534 host address
IP addresses belonging to class B ranges from 128.0.0.0 – 191.255.255.255.
Class C
IP addresses belonging to class C are assigned to small-sized networks.
• The network ID is 24 bits long.
• The host ID is 8 bits long.
The higher-order bits of the first octet of IP addresses of class C is always set to 110. The
remaining 21 bits are used to determine the network ID. The 8 bits of host ID are used to
determine the host in any network. The default subnet mask for class C is 255.255.255.x. Class
C has a total of:
• 2^21 = 2097152 network address
• 2^8 – 2 = 254 host address
Class D
IP address belonging to class D is reserved for multi-casting. The higher-order bits of the first
octet of IP addresses belonging to class D is always set to 1110. The remaining bits are for the
address that interested hosts recognize.
Class D does not possess any subnet mask. IP addresses belonging to class D range from
224.0.0.0 – 239.255.255.255.
Class E
IP addresses belonging to class E are reserved for experimental and research purposes. IP
addresses of class E range from 240.0.0.0 – 255.255.255.254. This class doesn’t have any subnet
mask. The higher-order bits of the first octet of class E are always set to 1111.
Components of DHCP
The main components of DHCP include:
• DHCP Server: DHCP Server is basically a server that holds IP Addresses and other
information related to configuration.
• DHCP Client: It is basically a device that receives configuration information from the
server. It can be a mobile, laptop, computer, or any other electronic device that requires a
connection.
• DHCP Relay: DHCP relays basically work as a communication channel between DHCP
Client and Server.
• IP Address Pool: It is the pool or container of IP Addresses possessed by the DHCP
Server. It has a range of addresses that can be allocated to devices.
• Subnets: Subnets are smaller portions of the IP network partitioned to keep networks
under control.
• Lease: It is simply the time that how long the information received from the server is
valid, in case of expiration of the lease, the tenant must have to re-assign the lease.
• DNS Servers: DHCP servers can also provide DNS (Domain Name System) server
information to DHCP clients, allowing them to resolve domain names to IP addresses.
Advantages of DHCP
The advantages of using DHCP include:
• Centralized management of IP addresses.
• Centralized and automated TCP/IP configuration.
• Ease of adding new clients to a network.
• Reuse of IP addresses reduces the total number of IP addresses that are required.
• The efficient handling of IP address changes for clients that must be updated frequently, such
as those for portable devices that move to different locations on a wireless network.
• Simple reconfiguration of the IP address space on the DHCP server without needing to
reconfigure each client.
• The DHCP protocol gives the network administrator a method to configure the network from
a centralized area.
• With the help of DHCP, easy handling of new users and the reuse of IP addresses can be
achieved.
Disadvantages of DHCP
The disadvantage of using DHCP is:
• IP conflict can occur.
• The problem with DHCP is that clients accept any server. Accordingly, when another server
is in the vicinity, the client may connect with this server, and this server may possibly send
invalid data to the client.
• The client is not able to access the network in absence of a DHCP Server.
• The name of the machine will not be changed in a case when a new IP Address is assigned.
To access the Internet, one public IP address is needed, but we can use a private IP address
in our private network. The idea of NAT is to allow multiple devices to access the Internet
through a single public address. To achieve this, the translation of a private IP address to a
public IP address is required. Network Address Translation (NAT) is a process in which one
or more local IP address is translated into one or more Global IP address and vice versa in
order to provide Internet access to the local hosts. Also, it does the translation of port numbers
i.e. masks the port number of the host with another port number, in the packet that will be
routed to the destination. It then makes the corresponding entries of IP address and port
number in the NAT table.
• Inside local address – An IP address that is assigned to a host on the Inside (local)
network. The address is probably not an IP address assigned by the service provider i.e.,
these are private IP addresses. This is the inside host seen from the inside network.
• Inside global address – IP address that represents one or more inside local IP addresses
to the outside world. This is the inside host as seen from the outside network.
• Outside global address – This is the outside host as seen from the outside network. It
is the IP address of the outside destination host before translation.
Advantages of NAT –
• It provides privacy as the device’s IP address, sending and receiving the traffic, will be
hidden.
Disadvantage of NAT –
• Also, the router being a network layer device, should not tamper with port numbers
(transport layer) but it has to do so because of NAT.