You are on page 1of 194

Department of Electronics and communication Engineering

Course Code/Name: 18EC3109 Data Networks and Protocols L-T-P-S:3-0-2-0

Session-1: Detailed Explanation on Handout (13 Weeks plan -total 39 Hrs )


 Syllabus
 Text & Reference Books
 Massive Open Online Courses (MOOCs)
• Significant of Coursera
• Registration_ The Bits and Bytes of Computer Networking
• Course Methodology & Completion

 Evaluation Plan :
• In Semester Formative Evaluation : 20%
• In Semester Summative Evaluation : 40%
• End Semester Summative Evaluation : 40%
 Introductory to Data Networks and Protocols (CO1_COI_1)
Syllabus 18EC3109-Data Networks and Protocols

Syllabus
CO1: Introduction to Computer networks and Data Link Layer: (10Hours)
Introduction to Computer networks
Data Link Layer
CO2: Network layer and Internetworking: (10Hours)
Internetworking Devices:
 Internetworking Technologies:
 Networking Protocols:
C03: Transport Layer: (10Hours)
Presentation Layer:
Application Layer:
CO4: Advanced Topics: (09Hours)
Cryptography:
Advancements in Application layer:
Wireless LANs:
Network Security:

18EC3109-Data Networks and Protocols 2


Syllabus 18EC3109-Data Networks and Protocols

CO1: Introduction to Computer networks and Data Link Layer: (10Hours)


Introduction to Computer networks Use of Computer Networks, Network Hardware, Network software, Reference models: OSI and
TCP/IP, Example Networks, Physical Layer: The theoretical basis for Data Communication, Guided and Unguided Transmission
Media, Switching, Modems, ADSL, Trunks and Multiplexing.
Data Link Layer: DLL design issues. Error Detection and Correction, Elementary data link protocols, sliding window protocols.
Medium Access Control Sub layer: Channel allocation problem, multiple access protocols, Ethernet.

CO2: Network layer and Internetworking: (10Hours)


Internetworking Devices: Preamble to Network Layer, Distinguishing of Networking Devices and Internetworking Devices, Analysis
of Router Processing: Access, core and distribution. VLANS, Ethernet
Internetworking Technologies: Wired Router, Wireless Router, Gateway, CSU/DSU; Addressing: IP addressing (IPV4 & IPV6),
subnetting; Types of Routing: static, default and dynamic.
Networking Protocols: RIP, OSPF, BGP; Access Control list for IPV4, IPV6, Other Protocols: NAT, ARP, Port Address Translation
(PAT), IP Tunneling; DHCP.

C03: Transport Layer: (10Hours)Process to Process Delivery; UDP; TCP; FCP Fibre Channel Protocol; Stream Control
Transmission Protocol (SCTP); Congestion Control: Open Loop, Closed Loop Choke Packets; Quality of Service: Techniques to
Improve QoS: Leaky bucket algorithm, Token bucket algorithm.
Session Layer: ISNS Internet Storage Name Service.
Presentation Layer: SSL, preface of Socket , Secure Socket Layer
Application Layer: Telnet, TFTP, POP3, DNS, SMTP, SNMP, FTP, NTP, SSDP.

CO4: Advanced Topics: (09Hours)


Cryptography: Public and Private Key based) Digital Signature, Firewalls
Advancements in Application layer: ISDN services & ATM, DSL technology, wired and wireless Modem: Architecture & Operation
in brief.
Wireless LANs: IEEE 802.11; Multi-Band Routers (Tri Band Wireless Routers);
Network Security: Essential Steps for Configuring a New Server and firewalls, Different types of network layer attacks and IP
security.

18EC3109-Data Networks and Protocols 3


18EC3109-Data Networks and Protocols
 Text & Reference Books

Text Books
1) B. A. Frouzan – “Data Communications and Networking (3rd Ed.) “– TMH
2) A. S. Tanenbaum – “Computer Networks (4th Ed.)” – Pearson Education/PHI
3) W. Stallings – “Data and Computer Communications (5th Ed.)” – PHI/ Pearson Education
4) Zheng & Akhtar, Network for Computer Scientists & Engineers, OUP
5) Black, Data & Computer Communication, PHI
6) Miller, data Communication & Network, Vikas
7) Miller, Digital & Data Communication, Jaico
8) Shay, Understanding Data Communication & Network, Vikas
Reference Books
1) Kurose and Rose – “Computer Networking -A top down approach featuring the internet” Pearson Education
2) Leon, Garica, Widjaja – “Communication Networks” – TMH
3) Walrand – “Communication Networks” – TMH.
4) Comer – “Internetworking with TCP/IP, vol. 1, 2, 3(4th Ed.)” – Pearson Education/PHI

18EC3109-Data Networks and Protocols 4


MOOCs 18EC3109-Data Networks and Protocols

Coursera : Data Networks and Protocols

Registration_ The Bits and Bytes of Computer Networking


1) The Bits and Bytes of Computer Networking (Coursera) Nov 11th 2019. Google
https://www.coursera.org/learn/computer-networking
2) Network Protocols and Architecture https://www.coursera.org/learn/network-protocols-
architecture?=
3) An Introduction to Computer Networking for Teachers (FutureLearn) Oct 7th 2019.
Raspberry Pi Foundation
4) Introduction to Computer Networking (Stanford Online) Self-Paced.
5) CompTIA A+ (Cybrary) Self Paced
6) Operating Systems (saylor.org) Self Paced
7) Network Protocols and Architecture
8) Network Protocols and Architecture
 Registration_ The Bits and Bytes of Computer Networking: Enroll 18-12-2019
 Course Methodology & Completion: 12-03-2019 with all competency

18EC3109-Data Networks and Protocols 5


What is a Network
• Network: A connected system of objects or people
• A network is two device which connected to each other
with a Physical medium, such as wires or radio signals.
• Connection allows those device to exchange data.
• Can share hardware, software, and data, and electronically
communicate.
• Networks range from small private networks to the
Internet (largest network in the world)

18EC3109-Data Networks and Protocols 6


What is the purpose of networks?

• Sharing the resources and data between computer


systems.

• Shared data storage, printers and other devices.

• Sharing of a feature such as a DVD player.

• Network protocols enables the exchange

• Network infrastructure also includes terminal servers,


hubs, switches, routers, bridges and gateways.

18EC3109-Data Networks and Protocols 7


Effectiveness of Data communications.
Steps to communicate data
1. Signal structure ---- Physical layer
2. Data Structure (Error and Flow) ---- Data link layer
3. Finding the Address to which the data sent
(IP address) --- Network layer
4. Transportation of data(making it continent
to transmit) --- Transport Layer
5.Where to collect the data (Application) --- Application Layer

Effectiveness of the data communications depends on


1. Delivery : The system must deliver the data to the correct destination.
2. Accuracy: The system must deliver the data accurately.
3. Timelines: The system must deliver the data in the timely manner

18EC3109-Data Networks and Protocols 8


Components of computer networks
• Rules : A set of rules that governs data communication.
Without these rules we can’t communicate between
devices.

• Medium: Transmission medium between Sender and


receiver. They can be wired and wireless.

• Messages: Information to be sent.

• Devices: Devices used to establish the connection.

18EC3109-Data Networks and Protocols 9


Data Representation
1.Text: It is represented as a set of bits called code and the process
representing the symbols is called coding.
2. ASCI: American National Standard Institute developed a code called the
ASCII(American Standard Code for Information Interchange). This uses
7 bits for each symbol i.e 2^7 = 128 different symbols can be defined
by this code.
3.Extended ASCII: To make each bit pattern 1byte (8 bits) the ASCII bit
patterns are augmented by an extra ‘0’ at the left. In other words first
pattern 00000000 and the last one is 01111111.
4.Unicode: It is developed by a coagulation of software and hardware
manufactures have designed a code called Unicode that uses 16 bits
and can represent 65,536 (2^16) symbols.
5. ISO : International Standard Organization has designed a code using 32
bits pattern. The code represent 32-bit pattern. It represents
4,294,967,296 different symbols 2^32.

18EC3109-Data Networks and Protocols 10


Cont..
6.Numbers: These are also represented in bits. These are simply converted
into binary numbers.

7.Images: The images are read by using pixels. These pixels are converted
to binary bit pattern.

8.Auido: These are converted to electrical signals and are then converted
to binary numbers.

9.Video: These are converted to electrical signals and are then converted
to binary numbers.

18EC3109-Data Networks and Protocols 11


Data Representations Forms

• 1. Text and Number


– Text Represented as a bit pattern

– Numbers Represented by binary equivalent


Data Representations Forms
Cont..
2. Images
– Bit patterns representing pixels

3. Audio and Video


– Sampling the amplitude of sound wave at regular intervals
Direction of Data flow
Simplex:
1. Data flow only in one direction from the sending device
2. Does not require a response from the receiving device.
3. Security systems and fire alarms that contain a sensor use simplex
transmission

Ex: Key boards, Monitors etc.

Half Duplex:
1. In half-duplex transmission, data can flow in either direction -- from the
sending device to the receiving device, and back -- but only in one
direction at a time.
2. Many fax machines, credit card verification systems, and automatic
teller machines use half-duplex transmission.

Example: Walkie Talkie

18EC3109-Data Networks and Protocols 15


Cont..
Full Duplex:
1. In full-duplex transmission, data can flow in both directions at the same
time.
2. A regular telephone line supports full-duplex transmission so that both
parties can talk at the same time.
Example: Telephone

18EC3109-Data Networks and Protocols 16


Types of Connections
1.Point to Point Connection or Unicast communication:
• Provides a dedicated link between two devices.
• The entire capacity of the link is reserved for transmission between
those two devices.
• This is also represented as p2p connection.
– Eg: Webserver to computer
– Download file from FTP server

18EC3109-Data Networks and Protocols 17


Types of Connections
2. Multipoint connection or Multicasting:
• This is connection in which more than two specific devices share a single
link.
• The capacity of the channel is shared either spatially or temporally.

18EC3109-Data Networks and Protocols 18


Types of Connections
3. Broadcasting
• Broadcast is a type of communication where data is sent from one
computer once and a copy of that data will be forwarded to all the
devices.
• In Broadcast, there is only one sender and the data is sent only once. But
the Broadcast data is delivered to all connected devices.

18EC3109-Data Networks and Protocols 19


Cont..

• OSI:
OSI stands for Open Systems Interconnection.
It specifies standards for communications protocols and
also the functionalities of each layer.

• Protocol:
A protocol is the set of rules or algorithms which define the
way how two entities can communicate across the network

Few of such protocols are TCP, IP, UDP, ARP, DHCP, FTP and
so on.

18EC3109-Data Networks and Protocols 20


Cont..
• MAC Address
– 48 bit address
– Works at OSI layer-2 (Link Layer)
– Physical Address
– Fixed, Assigned by manufacturer
• IP Address
– 32 bit address
– Works at OSI layer-3 (Network Layer)
– Logical Address
– Can change depending on the network environment

18EC3109-Data Networks and Protocols 21


Use of Computer Networks

1. Information and Resource Sharing:


• PC can be accessed by other PC linked to the network.
• Also allows sharing of hardware equipment

18EC3109-Data Networks and Protocols 22


Cont..

2. Retrieving Remote Information:


• Access through information systems like the World Wide
Web.

18EC3109-Data Networks and Protocols 23


Cont..
3. Speedy Interpersonal Communication:
• Electronic Mail (email)

4. E-Commerce:
• Variety of business and commercial transactions online.
– Eg: Buy or sell items, pay bills, manage bank accounts, pay
taxes, transfer funds and handle investments electronically.

5. Highly Reliable Systems:


• Data is stored in multiple sources.
• If a failure occurs, system will still continue without data
loss

18EC3109-Data Networks and Protocols 24


Cont..
6. Cost–Effective Systems:
• Networks have reduced the cost of establishment of
computer systems in organizations.
• Previously, organization was set up expensive mainframes
for computation and storage.
• Now it is sufficient to set up interconnected personal
computers (PCs) for the same purpose.

18EC3109-Data Networks and Protocols 25


Cont..

7. VoIP:
• Through this, telephone calls are made digitally using
Internet Protocols.

18EC3109-Data Networks and Protocols 26


CO1_COI_1_Introduction to Computer networks

18EC3109-Data Networks and Protocols 27


CO1_COI_1_Introduction to Computer networks

18EC3109-Data Networks and Protocols 28


Types of Network

• Connects two or more computer


• Used to exchange data and information to each other.
• Classified into three categories, that are
– LAN
– MAN
– WAN
Network Topology

• Topology refers to the layout of connected devices


on a network.
• Here, some logical layout of topology
– Mesh
– Star
– Bus
– Ring
– Hybrid
Mesh Topology

• Point to point link to every other device.


• A Mesh can have n(n-1)/2 physical channels to link n
devices.
• Two techniques to transmit data over the Mesh topology,
they are :
– Routing: Direct the data to reach the destination using the shortest
distance
– Flooding:
– No routing logic is required
– Leads to unwanted load over the network
Cont…
Advantages of Mesh Topology
• It allows to send data from different devices simultaneously.
• If one of the node fails does not affect the network.
• Extension and alteration can done without disturbing other node
Disadvantages of Mesh Topology
• Installation and configuration is difficult.
• Cabling cost is more.
• Bulk wiring is required
Applications:
• 1. Telephone Regional office. 2. WAN (Wide Area Network).
Star Topology

• All computers are connected to central hub or switch

• Communication take place via hub

• Data initiated by nodes pass through the hub

• Hub manages and control the network


Cont..
Advantages of Star Topology
• Fast performance with few nodes and low network traffic.
• Hub can be upgraded easily.
• Easy to troubleshoot.
• Easy to setup and modify.
• If any node fails, rest of the nodes can work smoothly.
Disadvantages of Star Topology
• Cost of installation is high.
• Expensive to use.
• If the hub fails then the whole network is stopped
• Performance is based on the hub that is it depends on its capacity
Applications:
• Star topology used in Local Area Networks(LANs).
• High speed LAN often used STAR
Bus Topology
• A bus topology is multipoint.

• Here one long cable act as a backbone to link all the


devices.

• Drop line- is the connection b/w the devices and the cable.

• Tap- is the splitter that cut the main link.

• This allows only one device to transmit at a time.


Cont..
Advantages of Bus Topology
• It is cost effective.
• Cable required is least compared to other network topology.
• Used in small networks.
• Easy to expand joining two cables together.

Disadvantages of Bus Topology


• Cables fails then whole network fails.
• If network traffic is heavy or nodes are more the performance of the
network decreases.
• Cable has a limited length.
• It is slower than the ring topology.

Applications: Most computer motherboard


Ring Topology

• Computer attached with each other in a close cable


• Each node has exactly two neighbor
• Computers connect each other and complete the network
• Data pass through all nodes until it reaches to destination.
• Any break in connection entire network fails
Cont..
Advantages
• No central device for controlling the network
• Easy to install
• Easy to reconfigure.
• Fault identification is easy
Disadvantages:
• Unidirectional traffic.
• Break in a single ring can break entire network.
Applications:
• Ring topologies are found in some office buildings or school campuses.
• Today high speed LANs made this topology less popular
Tree Topology
• It have a root node, and all other nodes are hierarchy.
• It integrates various star topologies together in a single
bus.
• So it is known as a Star Bus topology.
• It is similar to a bus and star topology
Cont..

Advantages:
• Failure of one node never affects the rest of the network.
• Node expansion is fast and easy.
• Detection of error is an easy process
• It is easy to manage and maintain
Disadvantages:
• It is heavily cabled topology
• If more nodes are added, then its maintenance is difficult
• If the hub or concentrator fails, attached nodes are also
disabled
Hybrid Topology

• It combines two or more topologies.


• Network does not exhibit one of the standard topologies.
Advantages:
• Offers the easiest method for error detecting and
troubleshooting
• Highly effective and flexible networking topology
• It is scalable so you can increase your network size
Disadvantages:
• The design of hybrid topology is complex
• It is one of the costliest processes
OSI Reference Model
• OSI stands for Open System Interconnection is a
reference model.
• Describes how information from a software application in
one computer moves through a physical medium.
• Software application in another computer.

18EC3109-Data Networks and Protocols 42


Cont..
Cont..
Cont..
Cont..
Cont..
Devices
Layer Description Popular Protocols Protocol Data Unit operate in
this layer

HTTP, FTP, TFTP, Telnet,


Application User interface Data
SNMP, DNS…

Video (WMV, AVI…)

Data representation, encryption Bitmap (JPG, BMP, PNG…)


Presentation Data
& decryption
Audio (WAV, MP3, WMA…)
….
Set up, monitor & terminate the SQL, RPC, NETBIOS
Session Data
connection session names…

Flow control (Buffering, TCP (Connection-Oriented,


Windowing, Congestion reliable)
Transport Avoidance) helps prevent the loss Segment
of segments on the network and
the need for retransmission
UDP (Connectionless,
unreliable)
Cont..

Devices
Layer Description Popular Protocols Protocol Data Unit operate in
this layer

Path determination IP
Source & Destination logical
Network IPX Packet/Datagram Router
addresses
AppleTalk
Physical addresses LAN
WAN (HDLC, PPP, Frame
Includes 2 layers:
Relay…)
Switch,
Data Link Upper layer: Logical Link Frame
Bridge
Control (LLC)

Lower layer: Media Access


Control (MAC)

Encodes and transmits data


bits Hub,
Physical FDDI, Ethernet Bit (0, 1)
+ Electric signals Repeater…
+ Radio signals
OSI Reference Model

18EC3109-Data Networks and Protocols 49


TCP/IP Reference Model

18EC3109-Data Networks and Protocols 51


Cont..
TCP/IP: The most widely used communications protocol
• Used with the Internet
• TCP responsible for delivery of data
• IP provides addresses and routing information
• Uses packet switching

52
Cont..

The original TCP/IP protocol suite was defined as having four layers: host-to-
network, internet, transport, and application.

However, when TCP/IP is compared to OSI, we can say that the TCP/IP protocol
suite is made of five layers: physical, data link, network, transport, and
application.
Cont..
ICMP-INTERNET CONTROL MESSAGE PROTOCOL
IGMP-INTERNET GROUP MESSAGE PROTOCOL
ARP-ADDRESS RESOLUTION PROTOCOL
RARP-REVERSE ADDRESS RESOLUTION PROTOCOL
TCP-TRANSMISSION CONTROL PROTOCOL
UDP-USER DATAGRAM PROTOCOL
SCTP-STREAM CONTROL TRANSMISSION PROTOCOL
SMTP-SIMPLE MAIL TRANSFER PROTOCOL
FTP-FILE TRANSFER PROTOCOL
HTTP-HYPER TEXT TRANSFER PROTOCOL
DNS-DOMAIN NETWORK SYSTEM
SNMP-SIMPLE NETWORK MANAGEMENT PROTOCOL
TELNET-TELECOMMUNICATIONS NETWORK
Cont..
ICMP (Internet Control Message Protocol)
• It is a mechanism used by the hosts or routers to send notifications
regarding datagram problems back to the sender.
• A datagram travels from router-to-router until it reaches its
destination.
• If a router is unable to route the data because of some unusual
conditions
– ICMP protocol is used to inform the sender that the datagram is undeliverable.
• An ICMP protocol mainly uses two terms:
– ICMP Test: ICMP Test is used to test whether the destination is reachable or not.
– ICMP Reply: ICMP Reply is used to check whether the destination device is
responding or not.
• The core responsibility of the ICMP protocol is to report the problems,
not correct them..
• ICMP can send the messages only to the source, but not to the
intermediate routers
Cont..
IGMP-INTERNET GROUP MESSAGE PROTOCOL
• Used for simultaneous transmission of a message to a group of
recipients
• Routers ask nodes if they need a particular multicast stream (IGMP
query).
• Nodes respond to the router if they are seeking a particular multicast
stream (IGMP reports).
ARP-ADDRESS RESOLUTION PROTOCOL
• ARP finds the physical address by using the IP address.
• In a network, each device is known as physical address usually
imprinted on Network interface card (NIC).
Cont..
REVERSE ADDRESS RESOLUTION PROTOCOL (RARP)
• RARP protocol helps to find the internet address of a device whose
physical address is known.
USER DATAGRAM PROTOCOL (UDP)
• UDP is a process to process protocol used for data transmission.
• It takes the data from upper layer of TCP/IP Model and adds following
information to the data:
a) Port Address – Source port address of 16 bits and destination port address of 16 bits
added to the data so that it reaches to correct destination
b) checksum error control – 16 bits of checksum data is added to the data received from
upper layer, this is used for error control.
c) length of data – Length defines the total bytes of data in datagram.
• Although this protocol finds the error in the transmission of data,
• Doesn’t specify the error which makes it hard to identify the actual
error in transmission.
Cont..
Transmission control protocol (TCP)
• Unlike UDP which is a connectionless protocol, the TCP is a connection
oriented protocol.
• A connection must be made between sender and receiver before the
transmission of data.
• TCP protocol divides the data in small units called segments.
– Makes it possible to rearrange the segments in correct order at the receiver side to
make the complete data.
• Also adds acknowledgement number to the segments
• Unlike UDP which is unable to specify the exact error in transmission.
Cont..
STREAM CONTROL TRANSMISSION PROTOCOL (SCTP)
• This protocol combines the best features of TCP and UDP protocols.
• It was discovered later to support newer applications such as voice
data transmission over the internet.
HYPERTEXT TRANSFER PROTOCOL(HTTP)
• Allows the user to interact with world wide web through the browser
application.
• HTTP can be used to transfer various types of data such as plain text,
audio, video etc.
FILE TRANSFER PROTOCOL (FTP)
• This protocol is used for transmitting files from one system to another
system.
Cont..
TELYTYPE NETWORK (TELNET)
• It is a client-server protocol.
• It is a type of protocol that enables one computer to connect to
local computer.
• This protocol is used on internet or on LAN to provide a bidirectional
communication
DOMAIN NAME SYSTEM (DNS)
• It provides a mapping between the name of a host on the network and
its numerical address
Simple Network Management Protocol (SNMP)
• It managers the devices connected to the internet using TCP/IP
protocol.
Simple mail transfer protocol(SMTP)
• Used for email services
• It is a set of communication guidelines that allow software to transmit
an electronic mail over the internet
TCP/IP ADDRESSING

Four levels of addresses are used in an internet employing


the TCP/IP protocols: physical, logical, port, and specific.

Topics discussed in this section:


Physical Addresses
Logical Addresses
Port Addresses
Specific Addresses
Figure 2.17 Addresses in TCP/IP
Figure 2.18 Relationship of layers and addresses in TCP/IP
TCP/IP Address

Physical Addresses
• The physical address, also known as the link address, is the address of
a node as defined by its LAN or WAN.
• The size and format of these addresses vary depending on the network.
For example, Ethernet uses a 6-byte (48-bit) physical address.
• Physical addresses can be either unicast (one single recipient),
multicast (a group of recipients), or broadcast (to be received by all
systems in the network.
• Example: Most local area networks use a 48-bit (6-byte) physical
address written as 12 hexadecimal digits; every byte (2 hexadecimal
digits) is separated by a colon, as shown below: A 6-byte (12
hexadecimal digits) physical address 07:01:02:01:2C:4B
Cont..

Logical Addresses
• To allow packets to be independent of the physical connection of the
network
• A logical address in the Internet is currently a 32-bit address that can
uniquely define a host connected to the Internet.
• An internet address in IPv4 in decimal numbers 132.24.75.9
• No two publicly addressed and visible hosts on the Internet can have
the same IP address.
• The physical addresses will change from hop to hop, but the logical
addresses remain the same.
• The logical addresses can be either unicast (one single recipient),
multicast (a group of recipients), or broadcast (all systems in the
network). There are limitations on broadcast addresses.
Cont..

Port Addresses
• There are many application running on the computer. Each application
run with a port no.(logically) on the computer.
• A port number is part of the addressing information used to identify
the senders and receivers of messages.
• Port numbers are most commonly used with TCP/IP connections.
• These port numbers allow different applications on the same computer
to share network resources simultaneously.
• The physical addresses change from hop to hop, but the logical and
port addresses usually remain the same.
• Example: a port address is a 16-bit address represented by one decimal
number 753
Cont..

Application-Specific Addresses
• Some applications have user-friendly addresses that are designed for
that specific application.
• Examples include the e-mail address (for
example, forouzan@fhda.edu) and the Universal Resource Locator
(URL) (for example, www.mhhe.com).
• The first defines the recipient of an e-mail; the second is used to find a
document on the World Wide Web.
Note

The physical addresses will change from hop to hop,


but the logical addresses usually remain the same.
Networks and network criteria

• A Network is a group of connected devices capable of communicating.


• The device can be a computer, printer, or scanner that either receives
or transmits data.
• The devices connected in the Network are called "Nodes," and the
means of connection can be wired or wireless.
• There are a lot of criteria that make a network better than others
1. Performance
2. Reliability
3. Security
Cont..

Performance
• It measures how well a network can support communication between
two nodes in the Network
• The two major tasks in a network are the Transmission and
reception of information.
• We need to focus on how fast a message is transmitted and how fast
a node can receive a request and find the needed information.
• To measure the performance of a network, here are the major factors
to be considered:

1. Transit time:
The total time a node takes to transmit a message from the beginning
until the last character of the message.
Cont..

2. Response time: The total time a node takes to process an inquiry or a


request from another node/ device and respond. It is the time
between the inquiry's end and the response's beginning.
3. Throughput: Throughput measures how much data is transferred
successfully from the sender node to the receiver node in a particular
time frame. It is measured in bits per second or data per second.
4. Bandwidth: The maximum possible throughput capacity of the
Network. We can measure it in bits, megabits, or gigabits per second.
It defines the highest limit.
5. Delay/ Latency: Throughput is the number of data packets
successfully delivered in a given time. Delay is the measure of time
taken to do the delivery.
Cont..

• Reliability: The Reliability of a network lies in how robust the


Network is amid sudden major catastrophic events/ failures.
• Security: It is how the Network protects all the important data and
information at times of data breach, unauthorized logins, damages, and
viruses.
Bit Rate, Baud Rate

Bit Rate
• The number of bit intervals per second is known as the bit rate.
• Time it takes to transport one single bit is referred to as the bit interval.
• In layman's terms, bit rate refers to the number of bits transferred
every second, which is commonly stated in bits per second (bps).
– For example, Kilobits per second (Kbps), Megabits per second (Mbps), Gigabits
per second (Gbps), etc.
Baud Rate
• The number of times a signal can change on a transmission line
• Baud rate equal to the number of bits per second that can be
transferred.
– For example, the 1500 baud rate indicates that the channel state can change up
to 1500 times per second.
Cont..
Bit Rate Baud Rate

The number of bits per second is known The number of signal units per second is
as the bit rate. known as the baud rate.

Bit rate determines the number of bits Baud Rate determines the number of times a
travelled per second. signal's status changes.

Bit rate= baud rate x the count of bits Baud rate= bit rate/ the number of bits per
per signal unit. signal unit.

On the other hand, data transmission over


The focus is on computer efficiency.
the channel is more concerned.

Bit Rate cannot determine the It can determine the amount of bandwidth
bandwidth. necessary to send the signal.
Cont..

What is propagation delay?


• Propagation delay is the amount of time required for a signal to be
received after it has been sent
• it is caused by the time it takes for the signal to travel through a
medium.
• The signals to travel from the point of transmission to the receiver. This
can also be called the transmission delay, flight time or time of flight for
the signal.
Transmission Medium
• Will exchange data in the form of
voice/message/video between the
source and destination point.

• Physical layer plays an important


role

• Depending upon the type of


network, cost & ease of installation,
environmental conditions, the need
of the business and the distances
between sender & receiver, we will
decide the transmission medium
Cont..
Wired Medium (Guided Medium)

Coaxial Cable
• Copper is mainly used in the central conductor
• Surrounded by a PVC installation
• Outer part is used as a shield against the noise
• The outermost part is a plastic cover which is used to
protect the overall cable
• It was used in the analog communication systems
• Cable TV network providers also widely use the Coaxial
cable in the entire TV network.
Cont..
Twisted Pair Cable:
Cont..
• It is cheap and is easier to install than coaxial cables.
• It consists of two conductors (commonly copper is used)
• One is grounded and the other is used to carry signals from
the sender to the receiver.
• Separate pairs are used for sending and receiving.
• Two types of twisted pair cables
– Unshielded twisted pair
– Shielded twisted pair

• It is used in LAN & telephone


Fiber Optic Cable
Fiber Optic Cable

• Core surrounded by a transparent cladding material with a


lesser index of reflection.
• It uses the properties of light for signals to travel between
them.
• Thus Light is kept in the core by using the method of total
internal reflection.
• It creates the fiber to act as a waveguide
Cont..
• Fibers that carry more than one mode are called multimode fibers.
• There are two types of multimode fibers.
– Step-index multimode fiber
– Graded-index multimode fiber.
• Fig shows the differences between these two types of multimode fibers
on refractive index profile and how they guide light.
Cont..
Cont..
STEP INDEX FIBER
• The refractive index of the core is uniform throughout and undergoes
on abrupt change at the core cladding boundary
• The diameter of the core is about 50-200μm in the case of multimode
fiber and 10μm in the case of single mode fiber
• The path of light propagation is zig- zag in manner
• Attenuation is more for multimode step index fiber but for single mode
it is very less.
– When a ray travels through the longer distances there will be some
difference in reflected angles. Hence high angle rays arrive later than low
angle rays causing dispersion resulting in distorted output.
• This fiber has lower bandwidth
• The light ray propagation is in the form of meridional rays and it passes
through the fiber axis.
Cont..
Step Index Graded Index

The refractive index of the core is The refractive index of the core is
uniform made to vary gradually such that it
is maximum at the center of the core

The diameter of the core is about The diameter of the core is about
50-200μm 50μm

The path of light propagation is zig- The path of light is helical in manner
zag in manner

Attenuation is more Attenuation is less

Fiber has lower bandwidth This fiber has higher bandwidth


Wireless Communication Media
Cont..
Cont..

• A switch transmits data from one device to another in form of frames


• A router transmits data from one network to another in form
of packets.
• A hub transmits data from one device to another in form of binary bits.
Switch
• It allows various connections of many devices in the same network and
the management of port and VLAN security settings.
• Learning - Process of collecting the MAC address of linked devices.
• Forwarding - This is the process of transferring network traffic from
one device connected to one port of a network switch to another device
connected to another port.
• It is commonly used in local area networks for connecting many nodes.
Cont..

Router
• To connect many types of networks at the same time using adaptive
(Dynamic) and non-adaptive routing.
• Connected to at least two networks and decides how to deliver each
data packet.
• If a packet is traveling to the LAN, the router bounces it back. The
packet will be toured depending on the routing table.
Cont..

Hub
• A hub is a simple and cheap
networking device
• When a hub receives a data packet
(an Ethernet frame) from a network
device at one of its ports, it
broadcasts (repeats) the packet to all
of its ports,i.e, to all other network
devices.
• A collision occurs when two network
devices on the same network try to
send packets at the same time.
SWITCH
• Technique of transferring the information from one computer network
to another network is known as switching.
• Switching in a computer network is achieved by using switches.
• A switch is a small hardware device which is used to join multiple
computers together with one local area network (LAN).
• Network switches operate at layer 2 (Data link layer) in the OSI model.
• Switching is transparent to the user and does not require any
configuration in the home network.
• Switches are used to forward the packets based on MAC addresses.
Cont..
• Transfer the data only to the device that has been addressed.
• It is operated in full duplex mode.
• Packet collision is minimum as it directly communicates between
source and destination.
• It does not broadcast the message as it works with limited bandwidth.
Why Switching Concept required?
• Switching concept is developed because of the following reasons:
• Bandwidth: It is defined as the maximum transfer rate of a cable.
• Collision: When more than one device transmits the message over the
same physical media, and they collide with each other.
– To overcome this problem, switching technology is implemented so that
packets do not collide with each other.
Cont..
• In large networks, there can be multiple paths from sender to receiver.
• The switching technique will decide the best route for data
transmission.
• Switching technique is used to connect the systems for making one-to-
one communication.
STRUCTURE OF A SWITCH
• Switched network: Series of interlinked nodes, called
switches.

• Switches: Devices capable of creating temporary


connections between two or more devices
• Some of these switches are connected to the end systems
(computers or telephones) .
Switching Modes
• The layer 2 switches are used for transmitting the data on the data link
layer
• Also performs error checking on transmitted and received frames.
• Forward the packets with the help of MAC address.
• Different modes are used for forwarding the packets known
as Switching modes.
• In switching mode, Different parts of a frame are recognized. Such as
preamble, destination MAC address, source MAC address, user's data,
FCS.
Switching Modes
Three types of switching modes:
1. Store-and-forward
2. Cut-through
3. Fragment-free

Store-and-forward
• Receives the data frame and then checks for errors before forwarding
the packets.
• It supports the efficient transmission of non-corrupted frames.
– Used in telecommunication networks.

• The switching device waits to receive the entire frame and then stores
the frame in the buffer memory.
• Then the frame is checked for errors by using CRC(Cyclic Redundancy
Check)
Cont..
Cont..
Cut-through Switching:
• Forwards the packets as soon as the destination address is available
without waiting for the rest of the data to arrive.
• It supports low latency and high-speed transmission and requires less
storage space.
• It is used in fiber channel transmission, SCSI traffic transmission, etc.
• Data transmission starts as soon as the destination address field
arrives at the switching device.
• Performs a lookup operation to check the address
• Validate and the linked transmitted packets to the destination
• It will not wait for the rest of the frame to arrive.
Cont..
Cont..
Sl.No Store-and-Forward Switching Cut-through Switching

Forwards the data packet as soon as the destination


Receive the entire frame before forwarding the
1 address is received and doesn’t wait for the entire
data packet.
frame to be received.

It supports error checking and collided/ bad


2 frames are discarded before forwarding the There is no error-checking technique.
packets.

It checks for errors based on FCS bits of the


3 It relies on higher-level protocols to detect the error.
data frame.

Frames are stored in the buffer memory of the


4 Frames are not stored in the switching device.
switching device.

Cut through switching is further classified as Rapid


5 It is not further classified into different types.
frame forwarding and Fragment free.

It has a high latency rate as the device waits for It has a low latency rate as the device does not wait for
6
the entire frame to be received the entire frame
Cont..

Fragment-free Switching
• It is an advanced technique of the Cut-through Switching.
• Reads at least 64 bytes of a frame before forwarding to the next node to
provide the error-free transmission.
• It combines the speed of Cut-through Switching with the error
checking functionality.
• A collision is detected within 64 bytes of the frame, the frames which
are collided will not be forwarded further.
Cont..
Cont..
CIRCUIT-SWITCHED NETWORKS

• A circuit switched network consists of a set of switches connected by


physical links.

• A connection between 2 stations is a dedicated path using one or more


links.

• Once the connection is established then the dedicated path will remain
to exist until the connection is terminated.

• Any user wants to send the data, voice, video, a request signal is sent to
the receiver then the receiver sends back the acknowledgment to ensure
the availability of the dedicated path.

• Each link is divided into n channels using FDM or TDM.


Cont..
Communication via circuit switching has three phases
(i) Circuit Establishment (Connection setup )
Creating dedicated channels between the switches.
(ii) Data Transfer Phase
Established the dedicated circuit (channels), the two parties can
transfer data.
(iii) Teardown Phase
When one of the parties needs to disconnect, a signal is sent to each
switch to release the resources.
Cont..
Cont..
Properties of Circuit Switching
1. Inefficiency
• Resources are allocated during the entire duration of the connection.
• If no data, entire resources gets wasted
2. Delay
Cont..
Drawbacks in Circuit Switching
• Designed for voice service

• Resources dedicated to particular call

• At the time of data transmission the connections are idle

• Data rate is fixed


Packet Switched Networks
• Messages need to be divided into packets.
• Size of the packet is determined by the network
• No resource reservation, but allocated on demand.
• The allocation is done first come, first served based
• When a switch receives a packets , the packet must wait if there are
other packets being processed
• This lack of reservation may create delay
• To deliver the packets to the destination it follows two approach.
1. Data Gram Approach 2. Virtual Circuit Approach
Cont..
Cont..
1. Data Gram Approach (Connection Less Switchng)
• Datagram Switching is done at the Network layer
• Each packet contains the information about the destination and switch
• The packets are reassembled at the receiving end in correct order.
• In Datagram Packet Switching technique, the path is not fixed.
• Intermediate nodes take the routing decisions to forward the packets.
• Datagram Packet Switching is also known as connectionless switching.

Routing table in a datagram network


Cont..
Virtual-Circuit Networks (connection-oriented switching)
• Implemented in Data link layer
• Three phases to transfer data (set up, data transfer and tear down)
• Data are packetized and each packet carries an address in the header
• Virtual Circuit Switching is also known as connection-oriented
switching.
• In the case of Virtual circuit switching, a preplanned route is
established before the messages are sent.

•Call request and call accept packets are


used to establish the connection
between sender and receiver.
•In this case, the path is fixed for the
duration of a logical connection.
Cont..
(i) Setup request
Cont..
(ii) Setup acknowledgement

(ii) Tear down Phase


• After sending all frames, a special frame called tear down request
• Destination B responds with a teardown confirmation frame.
Modem
• A modem is a box-type device that connects your home/office network
directly to the internet.
• The router is also a box-type device that enables multiple computer
systems (either wired or wireless) to simultaneously use the internet.
• Both the devices are integrated and usually provided by
the ISP(Internet Service Provider).
What is Modem?
• A modem is a device that modulates or demodulates the signal.
• It maintains a dedicated connection with the ISP to get the internet
connection for home or business.
• It acts as a bridge between the internet/telephone line and the
computer.
• The reason to use the modem for an internet connection is that both
the internet and the computer take two different signals.
– Internet sends the analog signal, but the computer system can only
understand the digital signal.
• So, we need a device that can convert an analog signal to a digital signal
and vice versa.
• It modulates the incoming analog signal from the internet to digital
signal and directs it to the computer, and vice versa.
• It also performs data compression, error correction and controls the
flow of information.
Cont..

Types of Modem
• External Modem
• Internal modem
• Wireless Modem
• Dial-up Modem
• Cable Modem
• DSL Modem
• Half duplex and full duplex Modems
• 2 wire modem
• Asynchronous & Synchronous Modems
Cont..
DSL Modem
• DSL stands for Digital Subscriber Line that allows the transmission of
data over the normal telephone line.
• It provides a high data transmission speed, hence widely used in
offices/homes.
• It can be used to connect to a computer or router to provide the
internet connection through the ethernet port or USB port.
• The DSL modems are of two types:
– ADSL (Asymmetric Digital Subscriber Line) Modem
– SDSL (Symmetric Digital Subscriber Line) Modem
Cont..
Cont..
1. Directional capacity: half duplex modem and full duplex modem.
2. Connection to the line: 2-wire modem and 4-wire modem.
3. Transmission mode: asynchronous modem and synchronous modem.
Half duplex
• A half duplex modem permits transmission in one direction at a time.
• If a carrier is detected on the line by the modem, It indicates the
incoming carrier to the DTE (Data Terminal Equipment) through a
control signal of its digital interface.
• Modem does not give permission to the DTE to transmit data.
Cont..
Full duplex
• A full duplex modem allows simultaneous transmission in both
directions.
• Two carriers on the line, one outgoing and the other incoming. Wire
and 4-wire Modems
• In a 4-wire connection, one pair of wires is used for the outgoing
carrier and the other pair is used for incoming carrier.
• Full duplex and half duplex modes of data transmission are possible on
a 4- wire connection.
• As the physical transmission path for each direction is separate, the
same carrier frequency can be used for both the directions.
Cont..
Cont..
Asynchronous Modem
• Asynchronous modems can handle data bytes with start and stop bits.
• There is no separate timing signal or clock between the modem and the
DTE.
• The internal timing pulses are synchronized repeatedly to the leading
edge of the start pulse
Cont..
Synchronous Modem
• Synchronous modems can handle a continuous stream of data bits but
requires a clock signal.
• The data bits are always synchronized to the clock signal.
• There are separate clocks for the data bits being transmitted and
received.
• For synchronous transmission of data bits, the DTE can use its internal
clock and supply the same to the modem
Trunks
• Trunks are a large-bandwidth communication channels connecting
switching centers.
• A trunk comprises of a cluster of broadcast frequencies that are
suitable for long haul communication of many voice and data signals
simultaneously.
The characteristic features of a trunk are
• Designed for both voice and data transmission.
• Carry millions of calls simultaneously over long distances.
• High bandwidth.
• Comprise of a cluster of fiber optic cables bundled together to
maximize bandwidth.
• Another method of achieving high bandwidth is to use a single high
capacity link that can carry many signals multiplexed together.
Multiplexing
What is Multiplexing?
• Used to combine and send the multiple data streams over a single
medium.
• The process of combining the data streams is known as multiplexing
– Hardware used for multiplexing is known as a multiplexer.

• Multiplexing follows many-to-one, i.e., n input lines and one output


line.
• Demultiplexing is achieved by using a device called Demultiplexer
(DEMUX) available at the receiving end.
• DEMUX separates a signal into its component signals (one input and n
outputs).
• Demultiplexing follows the one-to-many approach.
Cont..
Protocols in the Data Link Layer
Cont..
• Error detection and correction schemes
– Types of error (single or burst)
– Single bit priority
– Cyclic codes
– Hamming codes
Types of Data Link Protocols
• Data link protocols can be broadly divided into two
categories
– Depending on the transmission channel is noiseless or noisy
Cont..
Simplex Protocol

• No flow control and error control mechanism.


• Unidirectional protocol (from sender to receiver)
• The protocol consists of two distinct procedures :a sender and
receiver.
• The sender runs in the data link layer of the source machine.
• The receiver runs in the data link layer of the destination
machine.
Flow Control and Error Control

Approaches to Error Control Approaches to Flow Control

Techniques of Error Control Techniques of Flow Control



Error Detection and Correction in Data link
Layer
• Receiver’s information does not match with the sender’s information.

• During transmission, digital signals suffer from noise

• That means a 0 bit may change to 1 or a 1 bit may change to 0.

• Error Detecting Codes (Implemented either at Data link layer or


Transport Layer of OSI Model)

• 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.

• Help to detect if any error has occurred during transmission of the


message.
Cont..
Types of Errors
• Errors can be of three types, namely single bit errors, multiple bit
errors, and burst errors.
• Single bit error − In the received frame, only one bit has been
corrupted, i.e. either changed from 0 to 1 or from 1 to 0.

• Multiple bits error − In the received frame, more than one bits are
corrupted.
Cont..
• Burst error − In the received frame, more than one consecutive bits
are corrupted.

Error Control
• Error control can be done in two ways
• Error detection − Error detection involves checking whether any
error has occurred or not.
– The number of error bits and the type of error does not matter.
• Error correction − Error correction involves ascertain the exact
number of bits that has been corrupted and the location of the
corrupted bits.
Cont..
• 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.
Cont..
Cont..
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.
Cont..
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 the sum. 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.


Cont..
Cont..
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 appended to 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.
Cont..
Cont..
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
Techniques of Error Control
• 1. Stop-and-Wait ARQ : Stop-and-Wait ARQ is also known as
alternating bit protocol. It is one of the simplest flow and error control
techniques or mechanisms.
• This mechanism is generally required in telecommunications to
transmit data or information between two connected devices.
• Receiver simply indicates its readiness to receive data for each frame.
In these, sender sends information or data packets to receiver.
• Sender then stops and waits for ACK (Acknowledgment) from receiver.
Further, if ACK does not arrive within given time period i.e., time-out,
sender then again resends frame and waits for ACK.
• But, if sender receives ACK, then it will transmit the next data packet to
receiver and then again wait for ACK from receiver.
• This process to stop and wait continues until sender has no data frame
or packet to send.
Cont..
Characteristics
• Used in Connection-oriented communication.
• It offers error and flows control
• It is used in Data Link and Transport Layers
• Stop and Wait for ARQ mainly implements the Sliding Window Protocol
concept with Window Size 1

• Propagation Delay: Amount of time taken by a packet to make a


physical journey from one router to another router.
• Propagation Delay = (Distance between routers) / (Velocity of
propagation)
• Round Trip Time (RTT) = 2* Propagation Delay
• Time Out (TO) = 2* RTT
• Time To Live (TTL) = 2* Time Out. (Maximum TTL is 180 seconds)
Cont..
• The mentioned problems are
Problems : resolved by Stop and Wait for ARQ
Lost Data (Automatic Repeat Request) that
does both error control and flow
control.
Working of Stop and Wait for ARQ:
• Sender A sends a data frame or
Lost Acknowledgement: packet with sequence number 0.
• Receiver B, after receiving the data
frame, sends an acknowledgement
with sequence number 1 (the
sequence number of the next
expected data frame or packet)
• There is only a one-bit sequence
number that implies that both
sender and receiver have a buffer for
one frame or packet only.
Cont..
Cont..
• The Stop and Wait ARQ solves the problems but may cause big
performance issues as the sender always waits for acknowledgement
even if it has the next packet ready to send.
• Consider a situation where you have a high bandwidth connection and
propagation delay is also high (you are connected to some server in
some other country through a high-speed connection).
• To solve this problem, we can send more than one packet at a time with
a larger sequence number.
• Stop and Wait ARQ may work fine where propagation delay is very less
for example LAN connections but performs badly for distant
connections like satellite connections.
Cont..

2. Go – Back – N ARQ
• Sending multiple frames before receiving the ack for the first frame.
• It uses the concept of sliding window, and so is also called sliding
window protocol.
• The frames are sequentially numbered and a finite number of frames
are sent.
• Ack of a frame is not received within the time period, frame are
retransmitted.
Cont..
Cont..
Cont..
3. Selective Repeat ARQ
Flow Control in Data Link Layer
Flow Control is classified into two categories:

Feedback – based Flow Control

• In this control technique, sender simply transmits data or information


or frame to receiver.

• After it has received acknowledgements from user.

Rate – based Flow Control

• In this technique, usually when sender sends or transfer data at faster


speed to receiver

• Receiver is not being able to receive data at the speed

• Mechanism in protocol will just limit or restricts transmission by


sender without any feedback or acknowledgement from receiver.
Techniques of Flow Control
Stop-and-Wait Flow Control
• Message or data is broken down into various multiple frames
• Receiver indicates its readiness to receive frame of data.
• After ack received, then sender will send or transfer the next frame.
• Process is continued until sender transmits EOT (End of Transmission)
• In this method, only one frames can be in transmission at a time.
• It leads to inefficiency i.e. less productivity
Advantages
• Easiest and simple and each frames is checked and acknowledged well.
• This method is also very accurate.
Disadvantages
• This method is fairly slow.
• Only one packet or frame can be sent at a time.
• It is very inefficient and makes the transmission process very slow.
Cont..
Sliding Window Flow Control
• It is point to point protocol that assumes that none of the other entity
tries to communicate until current data or frame transfer gets
completed.
• Sender transmits various frames or packets before receiving any
acknowledgement.
• In this method, both the sender and receiver agree upon total number
of data frames after which acknowledgement.
• This increases and improves network throughput.
Advantages
• It performs much better than stop-and-wait flow control.
• This method increases efficiency.
• Multiples frames can be sent one after another.
Disadvantages
• The main issue is complexity at the sender and receiver due to the
transferring of multiple frames.
• The receiver might receive data frames or packets out the sequence.
Framing in Data Link Layer
• In the physical layer, data transmission involves synchronized
transmission of bits from the source to the destination.
• The data link layer packs these bits into frames.
• Data-link layer takes the packets from the Network Layer and
encapsulates them into frames.
• If the frame size becomes too large, then the packet may be divided
into small sized frames.
• Smaller sized frames makes flow control and error control more
efficient.
• At receiver’s end, data link layer picks up signals from hardware and
assembles them into frames.
Cont..
Parts of a Frame
• A frame has the following parts −
– Frame Header − It contains the source and the destination addresses of the frame.
– Payload field − It contains the message to be delivered.
– Trailer − It contains the error detection and error correction bits.
– Flag − It marks the beginning and end of the frame.
Cont..
Types of Framing
• Framing can be of two types, fixed sized framing and variable sized
framing.
Fixed-sized Framing
• Here the size of the frame is fixed and so the frame length acts as
delimiter of the frame. Consequently, it does not require additional
boundary bits to identify the start and end of the frame.
• Example − ATM cells.
Variable – Sized Framing
• Here, the size of each frame to be transmitted may be different. So
additional mechanisms are kept to mark the end of one frame and the
beginning of the next frame.
• It is used in local area networks.
Cont..
Two ways to define frame delimiters in variable sized framing are −

• Length Field − Here, a length field is used that determines the size of
the frame. It is used in Ethernet (IEEE 802.3).

• End Delimiter − Here, a pattern is used as a delimiter to determine the


size of frame. It is used in Token Rings. If the pattern occurs in the
message, then two approaches are used to avoid the situation −
– Byte – Stuffing − A byte is stuffed in the message to differentiate from the delimiter.
This is also called character-oriented framing.

– Bit – Stuffing − A pattern of bits of arbitrary length is stuffed in the message to


differentiate from the delimiter. This is also called bit – oriented framing.
Cont..
Byte Stuffing
• Byte stuffing is the process of adding 1 extra byte whenever there is a
flag or escape character in the text.
Cont..
Cont..
Bit Stuffing
• Bit stuffing is the process of adding one extra 0 whenever five
consecutive 1s follow a 0 in the data, so that the receiver does not
mistake the pattern 0111110 for a flag.
What does Media Access Control
(MAC) mean?
• Media access control (MAC) is a sublayer of the data link layer

• MAC is responsible for the transmission of data packets.

• Packets from and to the network-interface card.

• Also to and from another remotely shared channel

• Provide an addressing mechanism and channel access.

• Node can communicate with other nodes available on the same or


other networks
The role of Medium Access Control

• Controls when and how each node can transmit in the wireless channel

• Solves the contention and collision

Major Sources of Energy Wastes


• Control Packet Overhead
– E.g., RTS/CTS (Request to send/ Clear to Send)
• Collision
– Retransmission
• Overhearing
– The receiver of a packet is not the intended receiver of that packet
• Idle Listing
– Listening to possible traffic that is not sent
Classification of MAC Protocols
Classification of MAC Protocols
Random Access MAC Protocol (Random)

• Random Access MAC Protocol


– Aloha
• Pure Aloha
• Slotted Aloha
– CSMA
• Persistent CSMA
• Non-Persistent CSMA
• P-Persistent CSMA
• CSMA/CD
Cont..
Pure ALOHA

• Stations transmit frames whenever they have data to send.


• Collision will occur when two or more stations transmit
• After transmits a frame it expects ack from the receiver.
• If ack should received within specified time.
• If not, Station assumes that the frame has been destroyed.
• Station waits for a random amount of time and sends it again.
Cont..
• Waiting time must be random
• Otherwise same frames will collide again and again
• This randomness will help avoid more collisions
Cont…
Slotted Aloha protocol
• It involves dividing the time interval into discrete slots
• Each slot interval corresponds to the time period of one frame.
• This method requires synchronization
Protocol flow chart for ALOHA
CSMA MAC Protocols

Persistent CSMA

• Station continuously senses the channel.

• If it is busy, the station waits until it becomes idle.

• If it is idle, it immediately transmits the frame with probability 1.

• Hence it is called I-persistent CSMA.


Cont..

• This method has the highest chance of collision

• Bcz more stations may find channel to be idle.

• Same time, transmit their frames.


Cont..

Non-persistent CSMA

• If channel is busy then it will wait for fixed interval of time

• Again checks the status of the channel.

• If the channel is idle, it sends immediately

• If it is busy, it waits a random amount of time.


Cont..

• Here station does not continuously sense the channel.


• It detects the end of previous transmission.
Cont..

P-Persistent CSMA

• This method is used when channel has time slots

• Whenever a station is ready to send, it senses the channel.

• If channel is busy, station waits until next slot.

• If channel is idle, it transmits with a probability p.

• With the probability q=l-p, the station then waits for the
beginning of the next time slot.
Cont..
• If the next slot is also idle, it either transmits or waits again with
probabilities p and q.
• This process is repeated till either frame has been transmitted
Cont..
CSMA/CD
Fixed Assigned MAC Protocol
(Channelization)
• Schedule nodes onto different sub-channels

• Examples: TDMA, FDMA, CDMA

• Collision-Free

• Requires time synch and not robust to changes.

• Low throughput and high latency

• Low idle listening and overhearing overheads

• Wake up and listen only during its neighbor transmission


Cont..
Cont..
• Networks and network criteria
• Bit interval, Bit rate, Baud rate, Propagation speed, propagation time
• Error detection and correction schemes
– Types of error (single or burst)
– Single bit priroty
– Cyclic codes
– Hamming codes
• Data Link Layer Protocols
• Framing (Bit, Byte Character count, Physical layer coding violations)
• Flow and Error Control
• Transmission impairments
– Attenuation, Distortion, Noise
– Throughput , Latency, Bandwidth, delay
• Medium Access Protocols
Cont..
• Calculate the bandwidth*delay product for the following links. Use one-
way delay, measured from first bit sent to first bit received.
• a. 100Mbps Ethernet with a delay of 10μsec.
• b. 10MbpsEthernet with a single store-and-forward switch in the
path, and packet size of 5000 bits. Assume that each link introduces a
propagation delay of 10 μsec and each switch is retransmitting
immediately after it has finished receiving the packet.
• c. 2 Mbps T1 link, with a transcontinental on-way delay of 50ms.
• Ans. a. The bandwidth * Delay product is
100 * 10^6 bits/sec x 10 * 10^-6 secs = 1000 bits = 125 bytes
• b. The first-bit delay is 5200 microsecs through the store-and-forward
switch. The bandwidth x delay product is thus 10 Mbps x 5200
microsecs = 52000 bits (Alternatively, you can think of it as each link
can hold 100 bits and the switch can hold 50000 bits.)
• c. 2 x 10^6 bits/sec x 50 x 10-3 sec = 1,00,000 bits = 12500 bytes
Cont..
What is the total delay (Latency) for a frame of size 5 million bits
that is being on the sent on a link with 10 routers each having a
queuing time of 2 μsec and a processing time of 1μsec. The link
has a bandwidth of 5 Mbps. Assume The length of the link is 2000
Km. The speed of light inside the link is 2 x 10^8 m/s
Ans.
(i) Propagation time = Distance / Propagation speed
= 2000 Km / 2 x 10^8 m/s = 10 ms
(ii) Transmission Delay= Message size / Bandwidth
= 5 x 10^6 bits/ 5 Mbps = 1 s
(iii) Queuing time = 10 routers * 2 Micro sec = 20 Micro sec
(iv) Processing Delay = 10 routers * 1 Micro sec = 10 Micro sec
(v) Latency=Propagation time+Time time+Queuing time+Processing Delay
Total delay (latency) = 10 ms + 1 s + 20 us + 10 us
= 1010.03 ms = 1.01003 s
Cont..
Compute total time delay for transmitting a file of 5MB file on link
in 50Mbps line of length of 12000km where the signal travel with
a velocity of 2.4*10^8 m/sec.
Ans.
(i) Propagation time = Distance / Propagation speed
= 12000 x 1000/2.4x10^8 = 50ms

(ii) Transmission Delay= Message Size/ BandWidth


=5Mb/50Mbs=0.8sec
Cont..
An image of 1024*768 pixels with 3 bytes/pixel. Assume the
image is uncompressed. How long does it take to transmit it over a
56 kbps modem channel? Over a 1-Mbps cable modem? Over a 10
Mbps ethernet? over 100 Mbps ethernet

Ans.
Given Image is: 1024*768*3 Bytes
=2,359,296 Bytes 2,359,296*8=18,874,368 Bit.
(i) How long does it take to transmit it over a 56 kbps modem channel
Transmission Delay= Message Size/ BandWidth
=18,874,368/56Kbps=337.042 Sec
(ii) How long does it take to transmit it over a 1Mbps modem channel?
= 18,874,368/1 Mbps=18.87 Sec
Cont..
Consider a source computer S transmitting a file of size 106 bits to
a destination computer D over a network of two routers R1 and
R2 and three links L1, L2 and L3. L1 connects between S and R1;
L2 connects R1 and R2, and L3 connects R2 and D. Let length of
each link be 100Km and signal travels at a speed of 10^8m/sec. If
the file broken into 1000 packets each of size 1000bits. Find the
total sum of transmission and propagation delays in transmitting
the file form S to D. Assume the bandwidth of the channel is
1Mbps.

P-T-O
Cont..
(i) Propagation delay to travel from S to R1 (P) = (Distance) / (Link Speed)
=100Km/10^8 m/sec
= 10^5/10^8 = 1ms

Hence the total propagation delay from S to D is 3*1 ms= 3 ms

(ii) Transmission DelayT) = 3 * (Number of Bits) / Bandwidth


for 1 packet.
Bandwidth=No.of Bits * No.of Packets
= 1000 Bits * 1000 Packets=>10^6
= 3*(1000/10^6)
= 3ms.

Hence, the total time taken to transmit the first packet from source to
destination is Propagation delay(P)+Transmission Delay(T)= 3+3 ms=6ms
The first packet will take 6ms to reach D.
While first packet was reaching D, other packets must have been processing
in parallel. So, D will receive remaining packets 1 packet per 1 ms from R2.
So, remaining 999 packets will take 999 ms. And total time will be
999 + 6 = 1005 ms
Cont..
Calculate the latency (from first bit sent to last bit received) for
the following: (a) 10-Mbps Ethernet with a single store-and-
forward switch in the path, and a packet size of 5000 bits. Assume
that each link introduces a propagation delay of 10 μs and that the
switch begins retransmitting immediately after it has finished
receiving the packet. (b) Same as (a) but with three switches.
Ans.
Total Transmission delay (T) = (Number of Bits) / Bandwidth
Transmission time=5000/10*10^6= 500 Micro sec
Each link introduces a propagation delay of 10 μs
Hence time to reach the packet is 500 μs + 10 μs = 510 μs
then from switch to destination=510 μs
a) For one switch 2 link means
=500+500+10+10
So total latency =1020 μs
b) For 3 switches =510*4=2040 us (as packet must go over 4 links)
Cont..
Hosts A and B are each connected to a switch S via 10-Mbps links
as in shown in figure below. The propagation delay on each link is
20 μs. S is a store-and forward device; it begins retransmitting a
received packet 35 μs after it has finished receiving it. Calculate
the total time required to transmit 10,000 bits from A to B. (a) as a
single packet (b) as two 5000-bit packets sent one right after the
other b) Illustrate networking devices?

20 μs 20 μs
Cont..
Propagation Delay (P)= 20 microseconds
Total Transmission delay (T) = (Number of Bits) / Bandwidth
=10000/10*10^6 μs
= 1000 μs
Time to reach
the packet to = Total Transmission delay (T) + Propagation delay on each link
switch
= 1000 μs+ 20 μs
= 1020 μs
The Packet is retransmitted by after 35 Seconds by the switch
= 1020 μs + 35 μs
= 1055 μs

P-T-O
Cont..
Time to reach the packet to Node B = (Packet is retransmitted by after 35
Seconds by the switch + Total Transmission delay (T) + Propagation Delay
(P)

Time to reach the packet to Node B = 1055+1000+20=2075 μs

(ii) We compute T = 5000/10*10^6 = 500 micro sec. The rst packet reaches the
switch in 520 micro sec. After 35 micro sec. of switch delay, the switch
retransmits packet 1 which reaches B at 520 + 35 + 520 = 1075 micro sec.
Immediately after the transmission of the rst packet, A sends the second
packet which reaches the switch at 1020 micro sec. While A transmits
Packet 2 (and the switch is receiving on one end), the switch is
retransmitting Packet 1 on the other end. The switch retransmits the
second one after 35 micro sec. i.e., at 1055 micro sec, Packet 2 is ready to
leave the switch. Note that at 1055 micro sec., the last bit of the rst packet
has finished its transmission from the switch and is in the transmission
channel. Hence, after 1055 micro sec., the switch could retransmit the
second packet without any issues. Therefore, at 1055 + 520 = 1575 micro
sec., Packet 2 is received at B. The transmission is complete at 1575 micro
sec. P-T-O
Cont..

You might also like