You are on page 1of 106

Data Communication and Computer Network

In
Library Service [Theory]
LISC: 557

COURSE COVER NOTE


(Second Semester)

Prepared by
Mahendra Prasad Adhikari

CENTRAL DEPARTMENT
Master's Level of Library & Information Science
TRIBHUVAN UNIVERSITY
Kathmandu
2076
1
Data Computer and networking
LISc. 557: Data Communication and Computer Network in Library Service [Theory]
Full Marks: 60
Lecture Hrs.: 48
Credit Hrs.: 3

Course Objectives

The objectives of the course is to develop skills in library science students in designing
analyzing troubleshooting and general knowledge and maintained knowledge of use of
computer network in the network of library and library network.

The objectives of this course are:


- to enable the students about the computer networks and how it works .
- to familiarize with the latest computer networking terminologies and how it works.
- to make confidence in operational aspects of computer networks in libraries.
- to make understand use of computer networks in the library and information centers.

Unit/Course Content Teaching Hrs.

1. Introduction to Computer Networks: 8


Classification: LAN, MAN, WAN: Internet, Intra-net, Extra-net
Network Topologies: Bus, Ring, Star, Mesh
Numbering Systems: Binary, Decimal, Octal, Hexadecimal and transformation
2. Networking Models: OSI, TCP/IP reference Model 4
3. Switching Techniques and Network Devices:
Switching Techniques: Circuit Switching, Packet Switching 3
Network Devices: NIC, Modem, Amplifier, Repeater, Hub, Bridge, Switches, Router, Wi-Fi
devices
4. Network Connectivity: Dial-up, Leased Line, ISDN, RF, ADSL etc. 3
5. Network Addressing : MAC address, port address, Domain Address, IP address 3
6. Protocols and Services: IP, TCP, DNS, SMTP, PoP, FTP, Telnet, HTTP, Search engine,
Proxy, Firewall, Web server 3
7. Transmission media : Guided: Twisted-Pair, Coaxial, Optical Fiber
Unguided: Wireless, Microwave 4
8. Network Security : Authentication, Digital signatures, Firewalls, 5
9. Network Models -Application Layer: Client-server paradigm, addressing, email-3
IO. Network Models-Transport Layer: Duties, UDP, TCP 3
11. Network Models - Network Layer: Addressing, Routing, Packetizing, Fragmenting -3
12. Network Models - Data link Layer: Duties, packet zing, addressing 3

2
Data Computer and networking
13. Network Models - Physical Layer: Digital, Analog, Transmission modes, Line
configurational, Duplexity 3
Suggested Readings:
Boss, Kausik: Information Networks in India: Problems and Prospects, New Delhi;
ESS ESS Publications, 1994.

Foruzan , B.A. : Data Communication and Networking, New


Delhi: Tata McGraw-Hill, 2000.

Keshav, S.: An Engineering Approach to Computer


Networking. Longman: Addisen Wesely,
1997.
Krishna Kumar: Library Organization, New Delhi, Vikas
Publishing, 1993.

Lerner, D. E. : Intemetworking with TCP/IP. Vol. 1. 3rd ed. PHI, 1995.


Ramaiah, L. S. et al.: Information and Society, New Delhi, ESS ESS Publications,
1997.
Rao, I. K. Ravichandra: Library Automation. New Delhi; New Age
International (P) Ltd. Pub. 1996.

Rauganathan, S. R.: The Five Laws of Library Science, Banglore: Sarada


Rauganathan Endowment for Library Science, 1988.

Sehgal, R. L.: An Introduction to Library Network, New


Delhi; ESS ESS Publication, 1996. •

Shanna, Pandey S. K.: Library computerization: Theory and


Practice, New Delhi; ESS ESS Publications,
1993.

Stalling W. Stevens, W.R. : Data and Computer Communications. 5th ed. PHI, 1997. TCP/IP
Illustrated, Vol. 1, Vol. 2, Vol. 3. Addisen Wesely.
Tanebaum, A.S.: Computer Networks. 3rd ed., PHI, 1996.

3
Data Computer and networking
Contents

Types (Classification) of computer network .................................................................... 7


WHAT IS NETWORK TOPOLOGY? .......................................................................... 9
WHAT IS PHYSICAL TOPOLOGY? ....................................................................... 9
TYPES OF PHYSICAL TOPOLOGY ....................................................................... 9
RING Topology ................................................................................................... 10
MESH Topology .................................................................................................. 12
MESH Topology: Routing ..................................................................................... 12
MESH Topology: Flooding .................................................................................... 12
Components of Local Area Network (LAN) A LAN is made up of three basic elements: .................... 13
NUMBER SYSTEMS: .............................................................................................. 16
Binary, Decimal, Octal, Hexadecimal and transformation ......................................................... 16
2. Binary Number Conversion....................................................................................... 17
BINARY TO OCTAL ............................................................................................ 17
BINARY TO HEXADECIMAL ................................................................................. 18
BINARY TO DECIMAL ......................................................................................... 18
3. Decimal Number Conversion ..................................................................................... 19
DECIMAL TO BINARY ......................................................................................... 19
DECIMAL TO HEXADECIMAL ............................................................................... 20
4. OCTAL NUMBER CONVERSION ............................................................................. 21
OCTAL TO BINARY ............................................................................................ 21
5. HEXADECIMAL NUMBER CONVERSION .................................................................. 22
HEXADECIMAL TO BINARY ................................................................................. 22
HEXADECIMAL TO OCTAL ................................................................................... 23
HEXADECIMAL TO DECIMAL ............................................................................... 23
How to Calculate Hexadecimal to Decimal ................................................................... 24
Hexa System ...................................................................................................... 24
Decimal System................................................................................................... 24
The 7 Layers of the OSI .......................................................................................... 26
Layer ............................................................................................................... 27
Name of Layer ..................................................................................................... 27
Summary of OSI Layer ........................................................................................... 27
4
Data Computer and networking
Name of Layer ..................................................................................................... 27
Purpose of Layer .................................................................................................. 27
LAYERS OF OSI MODEL ........................................................................................ 28
TCP/IP Reference Model ....................................................................................... 35
Unit-3 ................................................................................................................. 43
Switching Techniques and Network Devices: ......................... Error! Bookmark not defined.
Difference between Circuit Switching and Packet Switching ................................................. 47
Network Devices (Hub, Repeater, Bridge, Switch, Router, Gateways and Brouter) ....................... 49
NIC ................................................................................................................. 49
HUB................................................................................................................ 50
Unit-4 ................................................................................................................. 56
Types of Internet Connections .................................................................................... 56
(Dial-up, Leased line, Wireless and RF, DSL, ADSL, Fiber, Cable, ISDN)...................................... 56
1. DIAL-UP INTERNET CONNECTION .................................................................... 56
What is a Leased Line? 57

What is a Leased Line Used For? .............................................................................. 57


Leased Lines are Symmetric .................................................................................... 57
Leased Line ≠ Internet Connection (unless you want it to) ................................................. 57
Advantages of a Dedicated Connection (compared to ADSL) .............................................. 58
Disadvantages of a Dedicated Connection (compared to ADSL) ........................................... 58
3. ISDN (Integrated Service Digital Network): ..................................................... 58
4. Wireless and RF connection ................................................................................ 59
5. DSL: (ADSL, SDSL, VDSL, CABLE Connection) ....................................................... 60
7. Satellite ....................................................................................................... 61
8. Cellular ....................................................................................................... 62
9. Hotspot ....................................................................................................... 63
10. Broadband .................................................................................................. 63
Unit 12 Data Link Layer: Duties, Data link layer............................................................... 85
• Hop-to-hop delivery. It provides services to network layer. ................................................. 85
ARP Operation ...................................................................................................... 86
Unit-13 ............................................................................................................... 95
Physical layer: Digital, Analog, Transmission modes, Line configurationally, Duplicity ................. 95
5
Data Computer and networking
Digital and analog .................................................................................................. 95
Digital signal and analog signal ................................................................................... 96
Bit interval and bit rate ............................................................................................ 96
Units of bits rate .................................................................................................... 96
Analog signal ........................................................................................................ 96
• Simple signal ................................................................................................... 96
• Composite signal ............................................................................................... 96
Difference between Analog and Digital Signal .................................................................. 96
Definition of Analog Signal.................................................................................... 96
Definition of Digital Signal .................................................................................... 97
Comparison Chart .............................................................................................. 97
Difference between Synchronous and Asynchronous Transmission .... Error! Bookmark not defined.
Definition of Synchronous Transmission ........................... Error! Bookmark not defined.
Definition of Asynchronous Transmission .......................... Error! Bookmark not defined.
Data Transmission – Parallel vs Serial .................................... Error! Bookmark not defined.
What is data transmission? ........................................................................................ 98
How does data transmission work between digital devices? .......... Error! Bookmark not defined.
What is serial transmission? ...................................................................................... 98
What is parallel transmission? .................................................................................. 101
Advantages and Disadvantages of Using Parallel Data Transmission ........................................ 102
Types of Transmission mode ................................................................................... 104
Simplex .......................................................................................................... 104
Half Duplex ...................................................................................................... 104
Full Duplex ...................................................................................................... 104
Comparison Chart ............................................................................................ 105
Line Configuration .............................................................................................. 105
Point-to-Point .................................................................................................... 105
Multipoint Configuration ....................................................................................... 106

6
Data Computer and networking
Unit-1
Introduction to computer networks:
What is a computer network?
A computer network is a group of two or more computers connected with each other for sharing
resources and information. A simple computer network can be built only from two computers
while a complex computer network can be built from several thousand computers. A computer
network can be categorized based on geographical location and characteristic. Based on
geographical location, computer networks are outlined below.
Types (Classification) of computer network
a. LAN (Local Area Network)
b. Man (Metropolitan area networks)
c. Wan (Wide Area Network)

a. LAN: Local area network usually is confined to one building or campus. A LAN is a
computers network which spans over a small geographical area such as home, a building,
office, etc. In LAN, computers are placed relatively close. Since computers are located within
small distance, they do not need special devices and cables to connect with each other.
A LAN (Local Area Network), also known as an intranet, is a collection of computers on an
enclosed network.
In other words A Local Area Network (LAN) is a group of computers and associated devices
that share a common communications line or wireless link. Typically, connected devices share
the resources of a single processor or server within a small geographic area. A LAN is useful
for sharing resources like files, printers, games or other applications. A LAN in turn often
connects to other LAN‘s, and to the Internet or other WAN.

b. MAN (Metropolitan area networks)


A MAN is a computer network which connects two or more LAN networks within same city. A
city-wide network is known as a MAN (Metropolitan Area Network). It is larger than LAN but

7
Data communication and Computer networking
smaller than WAN.
Some technologies used for this purpose are ATM, mobile banking, Fiber Data Distributed
Interface (FDDI), and Switched Multimegabit Data Service (SMDS).
c. WAN (Wide Area Network) = Wide area network, usually is over VPN's (Virtual
private networks) or point to point networks over a larger area.
WAN is a computer network which spans over a large geographical area such as state, region,
country etc. WANs are typically used to connect two or more LANs or MANs which are
located relatively very far from each other.

For example, if one computer is located in Delhi and other computer is located in Mumbai,
connecting these two computers is the example of WAN networking.
Internet
This is the largest computer network ever created by mankind. It interconnects thousands of
millions of computing devices including PCs, Laptops, Workstations, Server, Smartphones,
tablets, TVs, Webcams, Environmental devices, Automobiles, Security cameras and many
mores.
internet
The internet sounds similar to Internet but it is different. The word Internet starts with capital I,
while the word internet begins with small i. Any group of network which is connected with
external network through a gateway such as broader gateway protocol(BGP) is considered
as internet. Usually this type of network is setup to provide the connectivity between two
companies.
Intranet= is usually a Private network of web pages over a LAN or a WAN
Intranet is a computer network which is controlled and administered by a single entity such as
company or organization. In Intranet, external users are not allowed to connect. Usually in this
network, proper authorization is required to access any resources. Further each access is
monitored and logged to ensure that only authorized users get access.
Extranet
An Extranet is an extended Intranet where external users are allowed to access a small portion
of network. Normally this access is filtered and secured by several security implementations on
both hardware and software levels.

8
Data communication and Computer networking
A network based on Web technologies that links selected resources of the intranet of a company
with its customers, suppliers, or other business partners.
WHAT IS NETWORK TOPOLOGY?
• The Network topology is the arrangement of the nodes and various networking elements
like network links, computers, switches, nodes, Wi-Fi access points, laptops and other
network devices in a computer network. Topology the way in which constituent parts are
interrelated or arranged. Topology defines how data flows from one device to another.
• A network is possible by physical and logical connection with different devices.
• Logical Topology: Logical Topology describes how the data flows from one device to
another. A logical network topology is a conceptual representation of how devices
operate at particular layers of abstraction.
• Physical topology: It details how devices are physically connected. Logical and physical
topologies can both be represented as visual diagrams. Physical Topology describes how
devices are physically connected to together (wired). Physical relationship between
devices in a LAN

WHAT IS PHYSICAL TOPOLOGY?


Physical topology refers to the physically connected computer network or physical design of the
network. The physical topology of a network refers to the configuration of cables, computers,
and other peripherals

TYPES OF PHYSICAL TOPOLOGY


There are many kinds of basic network of physical Topology:
1. Bus Topology, 3. Star Topology,
2. Ring Topology, 4. Mesh Topology

Here we are studying only Bus, Ring, Star, and Mesh Topology
Topology Description
In the bus network topology, every node is connected in series along a
Bus topology
linear path.
In the star network topology, a central node has a direct connection to all
Star topology
other nodes.
In the ring network topology, the nodes are connected in a closed loop
Ring topology
configuration.
Mesh topology This topology is a point-to-point connection to all other nodes or devices.
Linear Bus Topology:
In the linear bus topology, all the nodes are connected to the single backbone or bus
with some medium such as twisted pair, coaxial cable etc.

9
Data communication and Computer networking
When a node wants to communicate with the other nodes in the network, it simply sends a
message to the common bus. All the nodes in the network then receive the message but the
node for which it was actually sent only processes it. The other nodes discard the message.
1. All devices are connected to a single cable.
2. It transmits data only in one direction.
3. The signal travel through the bus to both ends.
4. Terminator is used at the end of the bus to kill the signal.
5. Terminator prevent the signals from reflecting back
6. Any medium failure cause whole network defunct.
Advantages of Bus Topology
 The linear bus topology usually requires less cabling.
 The linear bus topology is relatively simple to configure and install.
 In the linear bus topology, the failure of one computer does not affect the other
computers in the network.
Disadvantages of Bus Topology
1. Cables fails then whole network fails.
2. If network traffic is heavy or nodes are more the performance of the network
decreases.
3. Cable has a limited length.
4. It is slower than the ring topology.
5. The bus topology is difficult to reconstruct in case of faults.

RING Topology
It is called ring topology because it forms a ring as each computer is connected to another
computer, with the last one connected to the first. Exactly two neighbours for each device.
10
Data communication and Computer networking
In the ring topology, the nodes are connected in the form of a ring with the help of twisted
pair cable.
Each node is connected directly to the other two nodes in the network. The node, which
wants to send a message, first passes the message to its consecutive node in the network.
Data is transmitted in the clockwise direction from one node to another. Each node
incorporates a repeater, which passes the message to next node when the message is
intended for another node.

Advantages of Ring Topology


1. Transmitting network is not affected by high traffic or by adding more nodes, as only
the nodes having tokens can transmit data.
2. Cheap to install and expand
Disadvantages of Ring Topology
1. Troubleshooting is difficult in ring topology.
2. Adding or deleting the computers disturbs the network activity.
3. Failure of one computer disturbs the whole network.
4. It is relatively expensive to construct the ring topology.

Star Topology:
In this type of topology all the computers are connected to a single hub through a cable. This
hub is the central node and all others nodes are connected to the central node.
1. Every node has its own dedicated connection to the hub.
2. Hub acts as a repeater for data flow.
3. Can be used with twisted pair, Optical Fibre or coaxial cable.
4. This topology allows easy error detection and correction.
5. In the star topology, the failure of one computer does not affect the other computers in
the network.
6. Star topology is easy to install.

11
Data communication and Computer networking

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.
• Only that node is affected which has failed, rest of the nodes can work smoothly.
Disadvantages of star Topology
• Cost of installation is high.
• It is expensive due to the cost of the hub.
 Expensive to use for requires more amount of cable for connecting the nodes.
• If the hub fails then the whole network is stopped because all the nodes depend on the
hub.
• Performance is based on the hub that is it depends on its capacity
MESH Topology
It is a point-to-point connection to other nodes or devices. All the network nodes are
connected to each other. Mesh has n(n-1)/2 physical channels to link n devices. A message
can take several possible paths to reach a destination.
There are two techniques to transmit data over the Mesh topology, they are:
1. Routing
2. Flooding
MESH Topology: Routing
In routing, the nodes have a routing logic, as per the network requirements. Like routing
logic to direct the data to reach the destination using the shortest distance. Or, routing logic
which has information about the broken links, and it avoids those nodes etc. We can even
have routing logic, to re-configure the failed nodes.
MESH Topology: Flooding
In flooding, the same data is transmitted to all the network nodes, hence no routing logic is
required. The network is robust, and the its very unlikely to lose the data. But it leads to
unwanted load over the network.

12
Data communication and Computer networking

Types of Mesh Topology


1. Partial Mesh Topology: In this topology some of the systems are connected in the
same fashion as mesh topology but some devices are only connected to two or three
devices.
2. Full Mesh Topology: Each and every nodes or devices are connected to each other.
Features of Mesh Topology
1. Fully connected. 3. Not flexible.
2. Robust.
Advantages of Mesh Topology
1. Each connection can carry its own data load.
2. It is robust.
3. Fault is diagnosed easily.
4. Provides security and privacy.
5. Message delivery is more reliable.
6. Network congestion is minimum due to large number of links.
Disadvantages of Mesh Topology
1. Installation and configuration is difficult.
2. Cabling cost is more.
3. Bulk wiring is required.
4. It is very expensive to implement.
5. It is very difficult to configure and install.
Components of Local Area Network (LAN) A LAN is made up of three basic elements:
A. The hardware which is connected to form the LAN.
B. The software (or programs) which are accessed through the LAN.
C. The users, who create, work with and manage the various files.
A. Hardware Components:
A LAN can be thought of as a system composed of a series of building blocks. These blocks
can be added and configured as needed. Some of basic hardware components of LAN‘s are:

1. Networking Interface Card (NICs):


A network interface card (NIC) is a circuit board or card that is installed in a computer so
that it can be connected to a network. Each networked device contains a Network Interface
13
Data communication and Computer networking
Card. The NIC may be a separate board installed into a computer‘s slot, or it may be built
into the motherboard.
2. Server:
A network server is a computer designed to process requests and deliver data to other
(client) computers over a local network or the Internet. A server may be three types:
 File Server: A file server is a computer that stores files, is attached to a network, and
provides shared access of those files to multiple workstation computers.
 Print Server: A print server is a device that connects printers to client computers over a
network. It accepts print request from the computers and sends the jobs to the appropriate
printers over the LAN.
 Communication Server: A communication server is a computer system designed to
handle a wide range of communications-based applications.
3. Station:
A station is a computer that is connected with a server computer over the LAN, and
communicates with other devices connected with it.
4. HUB:
A common connection point for devices in a network. Hubs are commonly used to connect
segments of a LAN. A hub contains multiple ports. When a packet arrives atone port, it is
copied to the other ports so that all segments of the LAN can see all-packets.
5. Switch:
A switch is like a hub in that it is a central point for connecting network cables; however, a
switch is able to receive a packet and transmit it to only the destination computer.
6. Router:
Routers make the connection to the Internet for LANs. They use a configuration table to
decide where packets should go.
7. Access point:
A hardware device or a computer‘s software that acts as a communication hub for users of a
wireless device to connect to a wired LAN.
8. Power Supply:
Both wired and wireless networks need a power supply. A wireless network uses the current
to generate radio waves. A cabled network sends data interpreted as an electronic pulse.
9. Connector:
A network connector refers to any device that used to connect many LAN connection with
the hardware of the computer.
10. Shared Peripheral Device:
A peripheral device is any device—such as a printer, hard disk drive, CD-ROM drive or
modem—that is connected to and controlled by a computer. Any or all of these devices can
be accessed by multiple users when connected to a LAN in the proper manner.
B. LAN Software:
14
Data communication and Computer networking
Once the physical building blocks of the LAN are put into place, the next step is to make
them functional. Software is needed for devices to function cooperatively and effectively on
the LAN. There are three categories of software found on a LAN:
 The operating system of each attached server: The server operating system is
considered to be the brains of the network:
 The operating system of each attached station: All PCs require an operating system to
function.
 Applications software accessed by LAN users: Applications software is those software,
which are used to perform a specific task. The most common business applications are
word processing, spreadsheet analysis and database management.
Groupware: A second type of application software has been introduced for the LAN
environment— groupware. Groupware refers to programs that help people work together
collectively while located remotely from each other.
Client/server computing: In client/ server computing, the applications software is created
and sold for use expressly on a LAN. Client/server software has two distinct parts—the
client part which runs on the user‘s station and the server part which is installed on the file
server.
C. The People:
Among the most important elements of a LAN are the people. The purpose of a LAN is to
allow the sharing of resources. This sharing is done by people-making them an integral part
of the structure.
With any LAN there are two groups of people involved—those who use the resources and
those who manage the resources.
 The users: A user is defined as a person who makes use of the network resources.
 Network Administrator: The network administrator is the individual responsible for
maintaining the LAN. It is essential that the administrator have a good understanding of
how the network is put together and how it functions.
A LAN consists of a group of computers and devices connected by switches and hubs. For
this LAN to gain access to the Internet it must contain a router. The speed of the network
greatly depends on the configuration of the switches and hubs.

15
Data communication and Computer networking
NUMBER SYSTEMS:
Binary, Decimal, Octal, Hexadecimal and transformation
There are infinite ways to represent a number. The four commonly associated with modern
computers and digital electronics are: decimal, binary, octal, and hexadecimal.
Decimal (base 10) is the way most human beings represent numbers. Decimal is sometimes
abbreviated as dec.
Decimal Digit = 4567
Position 4th 3rd 2nd 1st
weight 103 102 101 100
1000 100 10 1
Digit 4 5 6 7
value 4000 500 60 7
Result 4000+500+60+7=4567
Decimal counting goes:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, and so on.
Binary (base 2) is the natural way most digital circuits represent and manipulate numbers.
(Common misspellings are ―bianary‖, ―bienary‖, or ―binery‖.) Binary numbers are
sometimes represented by preceding the value with '0b', as in 0b1011. Binary is sometimes
abbreviated as bin. Binary counting goes:
0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 10000,
10001, and so on.
Position 5th 4th 3rd 2nd 1st
weight 24 23 22 21 20
16 8 4 2 1
Digit 1 0 1 0 1
16 8 4 2 1
value 16 0 4 0 1
Result 16+0+4+0+1= 21
Octal (base 8) was previously a popular choice for representing digital circuit numbers in a
form that is more compact than binary. Octal is sometimes abbreviated as octal.
Octal counting goes: 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, and so on.
Position 4th 3rd 2nd 1st
3
Weight 8 82 81 80
512 64 8 1
Digit 3 4 7 1
value 1536 256 56 1
Result 1536+256+56+1=1849

16
Data communication and Computer networking
Hexadecimal (base 16) is currently the most popular choice for representing digital circuit
numbers in a form that is more compact than binary. (Common misspellings are
―hexdecimal‖, ―hexidecimal‖, ―hexedecimal‖, or ―hexodecimal‖.) Hexadecimal numbers are
sometimes represented by preceding the value with '0x', as in 0x1B84. Hexadecimal is
sometimes abbreviated as hex.
Hexadecimal counting goes: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, and so on.

Position 5th 4th 3rd 2nd 1st


4 3
weight 16 16 162 161 160
65536 4096 256 16 1
Digit 3 4 7 1
value 12288 1024 112 1
Result 12288+1024+16+1=13425

Comparison of different number systems.


Decimal Binary Octal Hexadecimal
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
2. Binary Number Conversion
BINARY TO OCTAL
An easy way to convert from binary to octal is to group binary digits into sets of three,
starting with the least significant (rightmost) digits. To change a number from binary to octal
, we first group the binary digit from right to left by three.

17
Data communication and Computer networking

Binary: 11100101 = 011 100 101


011 100 101 Pad the most significant digits with zeros if
necessary to complete a group of three.
Then, look up each group in a table:
Binary: 000 001 010 011 100 101 110 111
Octal: 0 1 2 3 4 5 6 7
Binary = 011 100 101
Octal = 3 4 5 = 345
Binary= 001 001 110
Octal 1 1 6 =116

BINARY TO HEXADECIMAL
An equally easy way to convert from binary to hexadecimal is to group binary digits into
sets of four, starting with the least significant (rightmost) digits. Binary to Hexadecimal to
change a number we first group the binary digit from right to left by four.
Binary: 11100101 = 1110 0101

Then, look up each group in a table:


Binary: 0000 0001 0010 0011 0100 0101 0110 0111
Hexadecimal: 0 1 2 3 4 5 6 7
Binary: 1000 1001 1010 1011 1100 1101 1110 1111
Hexadecimal: 8 9 A B C D E F

Binary = 1110 0101


Hexadecimal = E 5 = E5 hex
Binary 0100 1110
Hexadecimal = 4 E
BINARY TO DECIMAL
They say there are only 10 people in this world: those that understand binary and those that
don‘t. Ha ha.
If you don‘t get that joke, you'll need a method to convert from binary to decimal. One
method involves addition and multiplication.
1. Start the decimal result at 0.
2. Remove the most significant binary digit (leftmost) and add it to the result.
3. If all binary digits have been removed, you‘re done. Stop.

18
Data communication and Computer networking
4. Otherwise, multiply the result by 2.
5. Go to step 2.
Here is an example of converting 11100000000 binary to decimal:
Binary Digits Operation Decimal Result Operation Decimal Result
11100000000 +1 1 ×2 2
1100000000 +1 3 ×2 6
100000000 +1 7 ×2 14
00000000 +0 14 ×2 28
0000000 +0 28 ×2 56
000000 +0 56 ×2 112
00000 +0 112 ×2 224
0000 +0 224 ×2 448
000 +0 448 ×2 896
00 +0 896 ×2 1792
0 +0 1792 done.
3. Decimal Number Conversion
A repeated division and remainder algorithm can convert decimal to binary, octal, or
hexadecimal.
1. Divide the decimal number by the desired target radix (2, 8, or 16).
2. Append the remainder as the next most significant digit.
3. Repeat until the decimal number has reached zero.

DECIMAL TO BINARY
Here is an example of using repeated division to convert 1792 decimal to binary:
Binary
Decimal Number Operation Quotient Remainder
Result
1792 ÷2= 896 0 0
896 ÷2= 448 0 00
448 ÷2= 224 0 000
224 ÷2= 112 0 0000
112 ÷2= 56 0 00000
56 ÷2= 28 0 000000
28 ÷2= 14 0 0000000
14 ÷2= 7 0 00000000

19
Data communication and Computer networking

7 ÷2= 3 1 100000000
3 ÷2= 1 1 1100000000
1 ÷2= 0 1 11100000000
0 done.
78 ÷2= 39 1 0
10
39 ÷2= 19 1

19 ÷2= 9 1 110
9 ÷2= 4 1 1110
4 ÷2= 2 0 01110
2 ÷2= 1 0 001110
1 = 1001110

DECIMAL TO OCTAL
Here is an example of using repeated division to convert 1792 decimal to octal:
Octal
Decimal Number Operation Quotient Remainder
Result
1792 ÷8= 224 0 0
224 ÷8= 28 0 00
28 ÷8= 3 4 400
3 ÷8= 0 3 3400
0 done.
78 ÷8= 9 6 6
9 ÷8= 1 1 16
1 ÷8= 1 116

DECIMAL TO HEXADECIMAL
Here is an example of using repeated division to convert 1792 decimal to hexadecimal:

Hexadecimal
Decimal Number Operation Quotient Remainder
Result
1792 ÷ 16 = 112 0 0
112 ÷ 16 = 7 0 00

20
Data communication and Computer networking

7 ÷ 16 = 0 7 700
0 done.
78 ÷ 16 = 4 14 14=E
4 ÷ 16 = 4 4E
The only addition to the algorithm when converting from decimal to hexadecimal is that a
table must be used to obtain the hexadecimal digit if the remainder is greater than decimal 9.
Decimal: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Hexadecimal: 0 1 2 3 4 5 6 7 8 9 A B C D E F

The addition of letters can make for funny hexadecimal values. For example, 48879 decimal
converted to hex is:
Hexadecimal
Decimal Number Operation Quotient Remainder
Result
48879 ÷ 16 = 3054 15 F
3054 ÷ 16 = 190 14 EF
190 ÷ 16 = 11 14 EEF
11 ÷ 16 = 0 11 BEEF
0 done.
Other fun hexadecimal numbers include: AD, BE, FAD, FADE, ADD, BED, BEE, BEAD,
DEAF, FEE, ODD, BOD, DEAD, DEED, BABE, CAFE, C0FFEE, FED, FEED, FACE,
BAD, F00D, and my initials DAC.
4. OCTAL NUMBER CONVERSION
OCTAL TO BINARY
Converting from octal to binary is as easy as converting from binary to octal. Simply look up
each octal digit to obtain the equivalent group of three binary digits.
Octal: 0 1 2 3 4 5 6 7
Binary: 000 001 010 011 100 101 110 111

Octal = 3 4 5 345
Binary = 011 100 101 = 011100101 binary

OCTAL TO HEXADECIMAL
When converting from octal to hexadecimal, it is often easier to first convert the octal
number into binary and then from binary into hexadecimal. For example, to convert 345
octal into hex:
21
Data communication and Computer networking

Octal = 3 4 5 345
Binary = 011 100 101 = 011100101 binary
Octal 1 1 6 116
Binary 001 001 110 1001110

Drop any leading zeros or pad with leading zeros to get groups of four binary digits (bits):
Binary 011100101 = 1110 0101
Then, look up the groups in a table to convert to hexadecimal digits.
Binary: 0000 0001 0010 0011 0100 0101 0110 0111
Hexadecimal: 0 1 2 3 4 5 6 7
Binary: 1000 1001 1010 1011 1100 1101 1110 1111
Hexadecimal: 8 9 A B C D E F

Binary = 1110 0101


Hexadecimal = E 5 = E5 hex
Therefore, through a two-step conversion process, octal 345 equals binary 011100101 equals
hexadecimal E5.

OCTAL TO DECIMAL
The conversion can also be performed in the conventional mathematical way, by showing
each digit place as an increasing power of 8.
345 octal = (3 * 82) + (4 * 81) + (5 * 80) = (3 * 64) + (4 * 8) + (5 * 1) = 229 decimal
5. HEXADECIMAL NUMBER CONVERSION
HEXADECIMAL TO BINARY
Converting from hexadecimal to binary is as easy as converting from binary to hexadecimal.
Simply look up each hexadecimal digit to obtain the equivalent group of four binary digits.
Hexadecimal: 0 1 2 3 4 5 6 7
Binary: 0000 0001 0010 0011 0100 0101 0110 0111
Hexadecimal: 8 9 A B C D E F
Binary: 1000 1001 1010 1011 1100 1101 1110 1111

Hexadecimal = A 2 D E
Binary = 1010 0010 1101 1110 = 1010001011011110 binary

22
Data communication and Computer networking
HEXADECIMAL TO OCTAL
When converting from hexadecimal to octal, it is often easier to first convert the
hexadecimal number into binary and then from binary into octal. For example, to convert
A2DE hex into octal:
(from the previous example)
Hexadecimal = A 2 D E
Binary = 1010 0010 1101 1110 = 1010001011011110 binary
Add leading zeros or remove leading zeros to group into sets of three binary digits.
Binary: 1010001011011110 = 001 010 001 011 011 110
Then, look up each group in a table:
Binary: 000 001 010 011 100 101 110 111
Octal: 0 1 2 3 4 5 6 7

Binary = 001 010 001 011 011 110


Octal = 1 2 1 3 3 6 = 121336 octal
Therefore, through a two-step conversion process, hexadecimal A2DE equals binary
1010001011011110 equals octal 121336.
HEXADECIMAL TO DECIMAL
Converting hexadecimal to decimal can be performed in the conventional mathematical way,
by showing each digit place as an increasing power of 16. Of course, hexadecimal letter
values need to be converted to decimal values before performing the math.
Hexadecimal: 0 1 2 3 4 5 6 7
Decimal: 0 1 2 3 4 5 6 7
Hexadecimal: 8 9 A B C D E F
Decimal: 8 9 10 11 12 13 14 15

A2DE hexadecimal:
= (A) * 163) + (2 * 162) + ((D) * 161) + (E) * 160)

= (10 * 163) + (2 * 162) + (13 * 161) + (14 * 160)

= (10 * 4096) + (2 * 256) + (13 * 16) + (14 * 1)

= 40960 + 512 + 208 + 14

= 41694 decimal

23
Data communication and Computer networking
How to Calculate Hexadecimal to Decimal
Hexa is a base 16 number and decimal is a base 10 number. We need to know the decimal
equivalent of every hexa number digit. See below of the page to check the hexa to decimal
chart.
Here are the steps to convert hexa to decimal:
 Get the decimal equivalent of hexa from table.
 Multiply every digit with 16 power of digit location.
(zero based, 7DE: E location is 0, D location is 1 and the 7 location is 2)
 Sum all the multipliers.
Here is an example:

7DE is a hex number


7DE = (7 * 162) + (13 * 161) + (14 * 160)
7DE = (7 * 256) + (13 * 16) + (14 * 1)
7DE = 1792 + 208 + 14
7DE = 2014 (in decimal number)
Hexa System
Hex, or hexadecimal, is a number system of base 16. This number system is especially
interesting because in our casually used decimal system we have only 10 digits to represent
numbers. As hex system has 16 digits, the extra needed 6 digits are represented by the first 6
letters of English alphabet. Hence, hex digits are 0,1,2,3,4,5,6,7,8 and 9 A, B, C, D, E, F.
This number system is the most commonly used in mathematics and information
technologies. I.e. in html programming colors can be represented by a 6-digit hexadecimal
number: FFFFFF represents white, 000000 represents black, and so on.
Decimal System
The decimal numeral system is the most commonly used and the standard system in daily
life. It uses the number 10 as its base (radix). Therefore, it has 10 symbols: The numbers
from 0 to 9; namely 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.
As one of the oldest known numeral systems, the decimal numeral system has been used by
many ancient civilizations. The difficulty of representing very large numbers in the decimal
system was overcome by the Hindu–Arabic numeral system. The Hindu-Arabic numeral
system gives positions to the digits in a number and this method works by using powers of
the base 10; digits are raised to the nth power, in accordance with their position.
For instance, take the number 2345.67 in the decimal system:
 The digit 5 is in the position of ones (100, which equals 1),
 4 is in the position of tens (101)
 3 is in the position of hundreds (102)
 2 is in the position of thousands (103)

24
Data communication and Computer networking
 Meanwhile, the digit 6 after the decimal point is in the tenths (1/10, which is 10 -1) and 7 is
in the hundredths (1/100, which is 10-2) position
 Thus, the number 2345.67 can also be represented as follows: (2 * 103) + (3 * 102) + (4 *
101) (5*100)+ (6 * 10-1) + (7 * 10-2)

Hex to decimal conversion examples


Hexa 4E
= 4*161+14*160
=64+14=78 Decimal
Hexa to Decimal Conversion Chart
Hexadecimal Decimal 8 8
0 0 9 9
1 1 A 10
2 2 B 11
3 3 C 12
4 4 D 13
5 5 E 14
6 6 F 15
7 7

25
Data communication and Computer networking
Unit-2
NETWORKING MODELS:
(OSI, TCP/IP reference Model)

OPEN SYSTEMS INTERCONNECTION (OSI) MODEL


 OSI model is based on the proposal developed by the International Standards
Organization (ISO).
 International Standard Organization ISO established in 1947
 An ISO standard that covers all aspects of network communications is the Open
Systems Interconnection (OSI) model.
 OSI = Open Systems Interconnection: deals with open systems, i.e. systems open for
communications with other systems.
 OSI model was devised in 1970
 OSI model is better for understanding tasks and its boundaries
 Internet model has some vague boundaries between tasks but it has never been
implemented and running.
 This model is called ISO OSI (Open Systems Interconnection) Reference model
because it deals with connecting open systems (systems that are open for
communication with other systems)
Principles on which OSI model was designed:
 A layer should be created where different level of abstraction is needed.
 Each layer should perform a well-defined function.
 The function of each layer should be chosen according to the internationally
standardized protocols.
 The number of layers should be large enough that distinct functions should not be put
in the same layer and small enough that the architecture does not become very
complex.
The 7 Layers of the OSI
In the OSI model, control is passed from one layer to the next, starting at the application
layer (Layer 7) in one station, and proceeding to the bottom layer, over the channel to the
next station and back up the hierarchy. The OSI model takes the task of inter-networking and
divides that up into what is referred to as a vertical stack that consists of the following 7
layers.

26
Data communication and Computer networking

Summary of OSI Layer


Layer Name of Layer Summary of OSI Layer
Layer 7 Application To allow access to network resources
Layer 6 Presentation To translate, encrypt, and compress data
Layer 5 Session To establish, manage, and terminate sessions
Layer 4 Transport To provide reliable process to process message delivery and
error recovery
Layer 3 Network To move packets from source to destination; to provide
internetworking
Layer 2 Data Link To organize bits into frames; to provide hop to hop delivery
Layer 1 Physical To transmit bits over a medium; to provide mechanical and
electrical specifications

Layer Name of Layer Purpose of Layer


Layer 7 Application Specifies how a particular application uses a network
Layer 6 Presentation Specifies how to represent data
Layer 5 Session Specifies how to establish communication with a remote
system
Layer 4 Transport Specifies how reliably handle data transfer
Layer 3 Network Specifies addressing assignments and how packets are
forwarded
Layer 2 Data Link Specifies the organization of data into frames and how to
send frames over a network
Layer 1 Physical Specifies the basic network hardware

27
Data communication and Computer networking
LAYERS OF OSI MODEL
Prerequisite: Basics of Computer Networking
OSI stands for Open Systems Interconnection. It has been developed by ISO –
‗International Organization of Standardization‗, in the year 1984. It is a7 layer
architecture with each layer having specific functionality to perform. All these 7 layers work
collaboratively to transmit the data from one person to another across the globe.

1. PHYSICAL LAYER (LAYER 1):


This layer is accountable for activating, preserving as well as disengaging the physical
connection. In this step, the conversion of digital bits to an electrical signal is done. This
layer also determines whether the link setup is simplex, half-duplex or full-duplex.
The lowest layer of the OSI reference model is the physical layer. It is responsible for the
actual physical connection between the devices. The physical layer contains information in
the form of bits. It is responsible for transmitting individual bits from one node to the next.
When receiving data, this layer will get the signal received and convert it into 0s and 1s and
send them to the Data Link layer, which will put the frame back together.

Physical layer: Media, Signal & Binary transmission. Bit stream: physical medium, method
of representing bits. Send data on to the physical wire. Generation / convert of electrical
signal and send. Signal levels, connections, wires, fiber, wireless. Example: Ethernet,USB,
DSL, 8 02.11 ,WIFI, Bluetooth,IEEE, 802.11, Hubs, NICS, Cable, physical structure, coax,
Fiber, Wireless, Hubbs, Repeaters.

28
Data communication and Computer networking

The functions of the physical layer are:

a. Bit synchronization: The physical layer provides the synchronization of the bits by
providing a clock. This clock controls both sender and receiver thus providing
synchronization at bit level.
b. Bit rate control: The Physical layer also defines the transmission rate i.e. the number
of bits sent per second.
c. Physical topologies: Physical layer specifies the way in which the different,
devices/nodes are arranged in a network i.e. bus, star or mesh topolgy.
d. Representation of Bits: Data in this layer consists of stream of bits. The bits must be
encoded into signals for transmission. It defines the type of encoding i.e. how 0's and
1's are changed to signal.
e. Interface: The physical layer defines the transmission interface between devices and
transmission medium.
f. Line Configuration: This layer connects devices with the medium: Point to Point
configuration and Multipoint configuration.
g. Topologies: Devices must be connected using the following topologies: Mesh, Star,
Ring and Bus.
h. Transmission Modes: Physical Layer defines the direction of transmission between
two devices: Simplex, Half Duplex, Full Duplex.
i. Deals with baseband and broadband transmission.

 Hub, Repeater, Modem, Cables are Physical Layer devices.


 Network Layer, Data Link Layer and Physical Layer are also known as Lower
Layers or Hardware Layers.

2. DATA LINK LAYER (DLL) (LAYER 2):


At OSI Model, Layer 2, data packets are encoded and decoded into bits. It
furnishes transmission protocol knowledge and management and handles errors in the
physical layer, flow control and frame synchronization. The data link layer is divided into
two sub layers: The Media Access Control (MAC) layer and the Logical Link Control (LLC)
layer. The MAC sub layer controls how a computer on the network gains access to the data
and permission to transmit it. The LLC layer controls frame synchronization, flow control
and error checking.
The data link layer is responsible for the node to node delivery of the message. The main
function of this layer is to make sure data transfer is error-free from one node to another,
over the physical layer. When a packet arrives in a network, it is the responsibility of DLL to
transmit it to the Host using its MAC address.
Data Link Layer is divided into two sub layers:
a. Logical Link Control (LLC)
b. Media Access Control (MAC)

29
Data communication and Computer networking
The packet received from Network layer is further divided into frames depending on the
frame size of NIC(Network Interface Card). DLL also encapsulates Sender and Receiver‘s
MAC address in the header.

The Receiver‘s MAC address is obtained by placing an ARP(Address Resolution Protocol)


request onto the wire asking ―Who has that IP address?‖ and the destination host will reply
with its MAC address.

 Packages raw bits from the Physical layer into frames (logical, structured packets for
data).
 Provides reliable transmission of frames
o It waits for an acknowledgment from the receiving computer.
o Retransmits frames for which acknowledgement not received

The functions of the data Link layer are:

a. Framing: Framing is a function of the data link layer. It provides a way for a sender
to transmit a set of bits that are meaningful to the receiver. This can be accomplished
by attaching special bit patterns to the beginning and end of the frame.
b. Physical addressing: After creating frames, Data link layer adds physical addresses
(MAC address) of sender and/or receiver in the header of each frame.
c. Error control: Data link layer provides the mechanism of error control in which it
detects and retransmits damaged or lost frames.
d. Flow Control: The data rate must be constant on both sides else the data may get
corrupted thus , flow control coordinates that amount of data that can be sent before
receiving acknowledgement.
e. Access control: When a single communication channel is shared by multiple devices,
MAC sub-layer of data link layer helps to determine which device has control over the
channel at a given time.
 Packet in Data Link layer is referred as Frame.
 Data Link layer is handled by the NIC (Network Interface Card) and device drivers
of host machines.
 Switch & Bridge are Data Link Layer devices.
Examples PPP, FDDI, ATM, IEEE 802.5/ 802.2, IEEE 802.3/802.2, HDLC, and Frame Relay.
Ethernet, ARP, CDD,FDDI,FRAM RELAY, HDLC, MPLS, STP, TOKENRING, switches,
Frames, Bridge

3. NETWORK LAYER (LAYER 3):


Network layer works for the transmission of data from one host to the other located in different
networks. It also takes care of packet routing i.e. selection of the shortest path to transmit the
packet, from the number of routes available. The sender & receiver‘s IP address are placed in
30
Data communication and Computer networking
the header by the network layer. This layer deals with routing and addressing of data so that it
can be sent to the right destination for outgoing and incoming transmissions at the packet level.
Examples: AppleTalk DDP, IP, IPX. ARP, ICMP, IPSec, IGMP, IPV4,IPV6, RIP, Routers,
Layer 3 switches, Packets.

The functions of the Network layer are:


1. Internetworking 4. Packetizing
2. Addressing 5. Fragmenting
3. Routing

a. Transport layer is high level manager responsible for delivery between two
applications. Application –to-application
b. Network layer is a low-level manager responsible for delivery between the two
computers. Source-to-destination
c. Manages addressing/routing of data within the subnet
o Addresses messages and translates logical addresses and names into physical
addresses.
o Determines the route from the source to the destination computer
o Manages traffic problems, such as switching, routing, and controlling the
congestion of data packets.
d. Routing can be:
o Based on static tables
o determined at start of each session
o Individually determined for each packet, reflecting the current network load.

Routing: The network layer protocols determine which route is suitable from source to
destination. This function of network layer is known as routing.
Logical Addressing: In order to identify each device on internetwork uniquely, network layer
defines an addressing scheme. The sender & receiver‘s IP address are placed in the header by
network layer. Such an address distinguishes each device uniquely and universally.
 Segment in Network layer is referred as Packet.
 Network layer is implemented by networking devices such as routers.

4. TRANSPORT LAYER (LAYER 4):


Transport layer provides services to application layer and takes services from network layer.
The data in the transport layer is referred to as Segments. It is responsible for the End to End
Delivery of the complete message. The transport layer also provides the acknowledgement of
the successful data transmission and re-transmits the data if an error is found.
• At sender’s side:
Transport layer receives the formatted data from the upper layers, performs Segmentation and
also implements Flow & Error control to ensure proper data transmission. It also adds Source
31
Data communication and Computer networking
and Destination port number in its header and forwards the segmented data to the Network
Layer.
Note: The sender need to know the port number associated with the receiver‘s application.
Generally, this destination port number is configured, either by default or manually. For
example, when a web application makes a request to a web server, it typically uses port number
80, because this is the default port assigned to web applications. Many applications have default
port assigned.
• At receiver’s side:
Transport Layer reads the port number from its header and forwards the Data which it has
received to the respective application. It also performs sequencing and reassembling of the
segmented data. In this layer, marketization of data is done and managed, and then the packets
are delivered along with checking for errors in data packets. Protocols that are used in this layer
are the TCP and UDP.

The functions of the transport layer are:


a. Segmentation and Reassembly: This layer accepts the message from the (session) layer,
breaks the message into smaller units. Each of the segment produced has a header
associated with it. The transport layer at the destination station reassembles the message.
b. Repackages long messages when necessary into small packets for transmission
c. Adding labels to each packet e.g. address label of sender and receiver, packet sequence
number.
d. Transport layer is responsible for packetizing, address labeling, sequence labeling, and
error control.
e. Service Point Addressing: In order to deliver the message to correct process, transport
layer header includes a type of address called service point address or port address. Thus
by specifying this address, transport layer makes sure that the message is delivered to the
correct process.
f. Ensures the delivery of entire file / message. End to end error control. Responsible for the
transport protocol and error handling. Links between devices, segmenting,
troubleshooting. Breaks down message to send.
g. Connection Oriented Service: It is a three-phase process which include
– Connection Establishment
– Data Transfer
– Termination / disconnection
In this type of transmission, the receiving device sends an acknowledgement, back to the source
after a packet or group of packet is received. This type of transmission is reliable and secure.
a. Connection less service: It is a one-phase process and includes Data Transfer. In this type
of transmission, the receiver does not acknowledge receipt of a packet. This approach
allows for much faster communication between devices. Connection-oriented service is
more reliable than connectionless Service.
b. Handles error recognition and recovery.
 Data in the Transport Layer is called as Segments.

32
Data communication and Computer networking
 Transport layer is operated by the Operating System. It is a part of the OS and
communicates with the Application Layer by making system calls.
Transport Layer is called as Heart of OSI model.
Examples: SPX, TCP, UDP, UTP, End to end connections.
5. SESSION LAYER (LAYER 5):
This layer is responsible for establishment of connection, maintenance of sessions,
authentication and also ensures security.

The functions of the session layer are:


a. Session establishment, maintenance and termination: The layer allows the two
processes to establish, use and terminate a connection.
b. Synchronization: This layer allows a process to add checkpoints which are considered as
synchronization points into the data. These synchronization point help to identify the
error so that the data is re-synchronized properly, and ends of the messages are not cut
prematurely and data loss is avoided.
c. Dialog Controller: The session layer allows two systems to start communication with
each other in half-duplex or full-duplex.
d. Allows two applications on different computers to establish, use, and end a session.
o e.g. inserting bank card in ATM machine.
e. Establishes dialog control
o Regulates which side transmits, plus when and how long it transmits.
f. Performs token management and synchronization.
o e.g. sending multiple pages of documents and if stops in the middle. Then at the
time of restart it will synchronize
Examples NFS, NetBios names, RPC, SQL, NetBIOS,PPTP, PAP, SCP,ZIP, synch &
send to port API's, Sockets, Winsock

 All the below 3 layers (including Session Layer) are integrated as a single layer in the
TCP/IP model as ―Application Layer‖.
 Implementation of these 3 layers is done by the network application itself. These are also
known as Upper Layers or Software Layers.

33
Data communication and Computer networking
6. PRESENTATION LAYER (LAYER 6):
Presentation layer is also called the Translation layer. The data from the application layer is
extracted here and manipulated as per the required format to transmit over the network.
The functions of the presentation layer are:

a. Translation: For example, ASCII to EBCDIC.


b. Encryption/ Decryption: Data encryption translates the data into another form or code.
The encrypted data is known as the cipher text and the decrypted data is known as plain
text. A key value is used for encrypting as well as decrypting data.
c. Compression: Reduces the number of bits that need to be transmitted on the network.
 Related to representation of transmitted data
o Translates different data representations from the Application layer into uniform
standard format
 Providing services for secure efficient data transmission
o e.g. data encryption, and data compression
Example: Encryption, ASCII, EBCDIC, TIFF, GIF, PICT, MPEG, MIDI. SSL,TLS,JPEG,
MIDI, MPEG,HTTPS, Syntax layer

7. APPLICATION LAYER (LAYER 7):


At the very top of the OSI Reference Model stack of layers, we find Application layer which is
implemented by the network applications. These applications produce the data, which has to be
transferred over the network. This layer also serves as a window for the application services to
access the network and for displaying the received information to the user. Operations like sign-
in and password verification are done in this layer. Example: WWW browsers, NFS, SNMP,
Telnet, HTTP, FTP, DNS, ,DHCP, IMAP, LDAP, P3, RTP, RTSP, SSH, SIP, SMTP,TFTP,
Telnet, End user layer. Application – Browsers, Skype Messenger etc., **Application Layer is
also called as Desktop Layer.

The functions of the Application layer are:


a. Network Virtual Terminal
b. FTAM-File transfer access and management
c. Mail Services
d. Directory Services
OSI model acts as a reference model and is not implemented in the Internet because of its late
invention. Current model being used is the TCP/IP model.
Layers of OSI Model
Prerequisite: Basics of Computer Networking
OSI stands for Open Systems Interconnection. It has been developed by ISO – ‗International
Organization of Standardization‗, in the year 1984. It is a 7 layer architecture with each layer
having specific functionality to perform. All these 7 layers work collaboratively to transmit the
data from one person to another across the globe.

34
Data communication and Computer networking
TCP/IP Reference Model
TCP/IP means Transmission Control Protocol and Internet Protocol. It is the network model
used in the current Internet architecture as well. Protocols are set of rules which govern every
possible communication over a network. These protocols describe the movement of data
between the source and destination or the internet. They also offer simple naming and
addressing schemes.

Protocols and networks in the TCP/IP model:

Different Layers of TCP/IP Reference Model


Layer 1: Host-to-network Layer
1. Lowest layer of the all.
2. Protocol is used to connect to the host, so that the packets can be sent over it.
3. Varies from host to host and network to network.

Layer 2: Internet layer


1. Selection of a packet switching network which is based on a connectionless internetwork
layer is called an internet layer.
2. It is the layer which holds the whole architecture together.
3. It helps the packet to travel independently to the destination.
4. Order in which packets are received is different from the way they are sent.
5. IP (Internet Protocol) is used in this layer.
6. The various functions performed by the Internet Layer are:
 Delivering IP packets
 Performing routing
 Avoiding congestion
35
Data communication and Computer networking
Layer 3: Transport Layer
1. It decides if data transmission should be on parallel path or single path.
2. Functions such as multiplexing, segmenting or splitting on the data is done by transport
layer.
3. The applications can read and write to the transport layer.
4. Transport layer adds header information to the data.
5. Transport layer breaks the message (data) into small units so that they are handled more
efficiently by the network layer.
6. Transport layer also arrange the packets to be sent, in sequence.

Layer 4: Application Layer


The TCP/IP specifications described a lot of applications that were at the top of the protocol
stack. Some of them were TELNET, FTP, SMTP, DNS etc.
1. TELNET is a two-way communication protocol which allows connecting to a remote
machine and run applications on it.
2. FTP(File Transfer Protocol) is a protocol, that allows File transfer amongst computer
users connected over a network. It is reliable, simple and efficient.
3. SMTP(Simple Mail Transport Protocol) is a protocol, which is used to transport
electronic mail between a source and destination, directed via a route.
4. DNS(Domain Name Server) resolves an IP address into a textual address for Hosts
connected over a network.
5. It allows peer entities to carry conversation.
6. It defines two end-to-end protocols: TCP and UDP
 TCP(Transmission Control Protocol): It is a reliable connection-oriented protocol which
handles byte-stream from source to destination without error and flow control.
 UDP(User-Datagram Protocol): It is an unreliable connection-less protocol that do not
want TCPs, sequencing and flow control. Eg: One-shot request-reply kind of service.
Merits of TCP/IP model
1. It operated independently.
2. It is scalable.
3. Client/server architecture.
4. Supports a number of routing protocols.
5. Can be used to establish a connection between two computers.
Demerits of TCP/IP
1. In this, the transport layer does not guarantee delivery of packets.
2. The model cannot be used in any other application.
3. Replacing protocol is not easy.
4. It has not clearly separated its services, interfaces and protocols.

36
Data communication and Computer networking
TCP/IP REFERENCE MODEL (in details)
1. Application Layer: The application layer handles high-level protocols, representation,
encoding, and dialog control. The TCP/IP protocol suite combines all application related issues
into one layer. It ensures that the data is properly packaged before it is passed on to the next
layer. TCP/IP includes Internet and transport layer specifications such as IP and TCP as well as
specifications for common applications. TCP/IP has protocols to support file transfer, e-mail,
and remote login, in addition to the following:
• File Transfer Protocol (FTP) – FTP is a reliable, connection oriented service that uses TCP
to transfer files between systems that support FTP. It supports bi-directional binary file
and ASCII file transfers.
• Trivial File Transfer Protocol (TFTP) – TFTP is a connectionless service that uses the User
Datagram Protocol (UDP). TFTP is used on the router to transfer configuration files and
Cisco IOS images, and to transfer files between systems that support TFTP. It is useful in
some LANs because it operates faster than FTP in a stable environment.
• Network File System (NFS) – NFS is a distributed file system protocol suite developed by
Sun Microsystems that allows file access to a remote storage device such as a hard disk
across a network.
• Simple Mail Transfer Protocol (SMTP) – SMTP administers the transmission of e-mail
over computer networks. It does not provide support for transmission of data other than
plain text.
• Telnet – Telnet provides the capability to remotely access another computer. It enables a
user to log into an Internet host and execute commands. A Telnet client is referred to as a
local host. A Telnet server is referred to as a remote host.
• Simple Network Management Protocol (SNMP) – SNMP is a protocol that provides a way
to monitor and control network devices. SNMP is also used to manage configurations,
statistics, performance, and security.
• Domain Name System (DNS) – DNS is a system used on the Internet to translate domain
names and publicly advertised network nodes into IP addresses.
2. Transport Layer:
The transport layer provides a logical connection between a source host and a destination host.
Transport protocols segment and reassemble data sent by upper-layer applications into the same
data stream, or logical connection, between end points.
• Creates packet from bytes stream received from the application layer.
• Uses port number to create process to process communication.
• Uses a sliding window protocol to achieve flow control.
• Uses acknowledgement packet, timeout and retransmission to achieve error control.

37
Data communication and Computer networking
• The primary duty of the transport layer is to provide end-to-end control and reliability as
data travels through this cloud. This is accomplished through the use of sliding windows,
sequence numbers, and acknowledgments.
• The transport layer also defines end-to-end connectivity between host applications.
• Transport layer protocols include TCP and UDP.
• TCP is a connection-oriented transport layer protocol that provides reliable full-duplex data
transmission.
• TCP is part of the TCP/IP protocol stack.
• In a connection-oriented environment, a connection is established between both ends
before the transfer of information can begin.
• TCP breaks messages into segments, reassembles them at the destination, and resends
anything that is not received.
• TCP supplies a virtual circuit between end-user applications.

TCP Header Format: TCP uses only a single type of protocol data unit, called a TCP segment.
The header is shown in Figure . Because one header must serve to perform all protocol
mechanisms, it is rather large, with a minimum length of 20 octets.
Bit 0 Bit 15 Bit 16 = Bit 31 
Source port (16) Destination Port (16) 8 Bites
Sequence number (32) 
Acknowledge number (32)
Header Length(4) reserved(6)code Bits(6) Window(16)
Checksum(16) Urgent (16)
Option (0 or 32 if any)
Data (varies)
The following protocols use TCP Transport layer:

• FTP
• HTTP
• SMTP
• Telnet

The following are the definitions of the fields in the TCP segment:

• Source port – Number of the port that sends data


• Destination port – Number of the port that receives data
• Sequence number – Number used to ensure the data arrives in the correct order
• Acknowledgment number – Next expected TCP octet
• HLEN – Number of 32-bit words in the header
• Reserved – Set to zero
• Code bits – Control functions, such as setup and termination of a session
• Window – Number of octets that the sender will accept
38
Data communication and Computer networking
• Checksum – Calculated checksum of the header and data fields
• Urgent pointer – Indicates the end of the urgent data
• Option – One option currently defined, maximum TCP segment size
• Data – Upper-layer protocol data

Code Bits or Flags (6 bits).


• URG: Urgent pointer field significant.
• ACK: Acknowledgment field significant.
• PSH: Push function.
• RST: Reset the connection.
• SYN: Synchronize the sequence numbers.
• FIN: No more data from sender.
• UDP (User Datagram Protocol):
UDP is the connectionless transport protocol in the TCP/IP protocol stack. UDP is a simple
protocol that exchanges datagrams without guaranteed delivery. It relies on higher-layer
protocols to handle errors and retransmit data.

Bit 0 Bit 15 Bit 16 = Bit 31 


Source port (16) Destination Port (16) 8 Bites
Length (16) Checksum(16) 
Data (if any) Bit 15 Bit 16 = Bit 31

UDP does not use windows or ACKs. Reliability is provided by application layer protocols.
UDP is designed for applications that do not need to put sequences of segments together. The
following protocols use UDP:
 TFTP
 SNMP
 DHCP
 DNS
The following are the definitions of the fields in the UDP segment:
 Source port – Number of the port that sends data
 Destination port – Number of the port that receives data
 Length – Number of bytes in header and data
 Checksum – Calculated checksum of the header and data fields
 Data – Upper-layer protocol data

TCP vs UDP:
S.No TCP - Transmission Control Protocol UDP - User Datagram Protocol
1 connection-oriented, reliable (virtual connectionless, unreliable, does not
circuit) check message delivery
39
Data communication and Computer networking
2 Divides outgoing messages into segments sends ―datagrams‖

3 reassembles messages at the destination does not reassemble incoming messages


4 re-sends anything not received Does-not acknowledge.

3. Internet Layer:
The purpose of the Internet layer is to select the best path through the network for packets to
travel. The main protocol that functions at this layer is IP. Best path determination and packet
switching occur at this layer. The following protocols operate at the TCP/IP Internet layer:
 IP provides connectionless, best-effort delivery routing of packets. IP is not concerned
with the content of the packets but looks for a path to the destination.
 Internet Control Message Protocol (ICMP) provides control and messaging capabilities.
 Address Resolution Protocol (ARP) determines the data link layer address, or MAC
address, for known IP addresses.
 Reverse Address Resolution Protocol (RARP) determines the IP address for a known
MAC address.

IP performs the following operations:


 Defines a packet and an addressing scheme
 Transfers data between the Internet layer and network access layer
 Routes packets to remote hosts

4. Network Access Layer:


The network access layer allows an IP packet to make a physical link to the network media. It
includes the LAN and WAN technology details and all the details contained in the OSI physical
and data link layers.
Drivers for software applications, modem cards, and other devices operate at the network access
layer. The network access layer defines the procedures used to interface with the network
hardware and access the transmission medium. Modem protocol standards such as Serial Line
Internet Protocol (SLIP) and Point-to-Point Protocol (PPP) provide network access through a
modem connection. Many protocols are required to determine the hardware, software, and
transmission-medium specifications at this layer. This can lead to confusion for users. Most of
the recognizable protocols operate at the transport and Internet layers of the TCP/IP model.
Network access layer protocols also map IP addresses to physical hardware addresses and
encapsulate IP packets into frames. The network access layer defines the physical media
connection based on the hardware type and network interface.

40
Data communication and Computer networking
INTERNET MODELS

 Application layer: it takes the responsibility of 3 top most layer of OSI model (OSI‘s
Application, Presentation and Session)
 Transport layer: some of the duties of session layer go to Transport layer.
A. Application layer
• It has several protocols and programs to access the resources of remote system.
• These protocols serve the duties of presentation and session layers in OSI model.
B. Transport layer
• It contains two protocols
• TCP: Transmission control protocol
• UDP: User Datagram Protocol
TCP:
• It is a reliable protocol
• It makes possible to communicate between two applications
• Divides stream of bytes into manageable segments at source
• Creates a stream of bytes from a received segment for the use of the application layer at
destination.
• It takes duties of transport layer and also perform responsibility of session layer in OSI,
e.g. it creates a two-way connection (a dialog) between two applications

Layer Data unit Function Examples


7 Application Data High level APIs, including resource sharing, HTTP, FTP,
41
Data communication and Computer networking
remote file access, directory services and SMPT
virtual terminals
6Presentation Translation of data between a networking ASCII,
service and an application; including EBCDIC,
character encoding, data compression and JPEG
encryption/ encryption/ decryption
5 Session Managing communication sessions, ie RPC, PAP
continuous exchange of information in the
form of multiple back and forth transmissions
between two nodes
4 Transport Segments Reliable transmission of data segments TCP, UDP
between point on a network, including
segments, acknowledgement and multiplexing
3 Network Packet Structuring and managing a multi-node IPv4, IPv6,
/Datagram network, including addressing, routing and IPsec, Apple
traffic control Talk
2 Data Link Bit/ Frame Reliable transmission of data frames between IEEE
two nodes connected by a physical layer 802.3/802.2
1 Physical Bit Transmission and reception of raw bit streams Fiber, Copper
over a physical medium twisted wires

Protocols employed in transport layer


TCP: UDP
• It is a reliable protocol • It is unreliable
• It makes possible to communicate between two applications protocol used in
• Divides stream of bytes into manageable segments at source transport layer
• Creates a stream of bytes from a received segment for the use • It is used for fast
of the application layer at destination. delivery of single
• It takes duties of transport layer and also perform packets
responsibility of session layer in OSI, e.g. It creates a two-way • It ignores flow and
connection (a dialog) between two applications error control

C. Network layer/internetwork layer/internet layer


It contains few protocols and the main protocol is Internet Protocol (IP) Responsible for
creating network layer packets called IP datagrams Sends IP datagrams from source to
destination.
These IP datagrams travels from network to network (LAN to WAN)
D. Data Link layer and Physical layer
• It is basically concerned by LAN and WAN rather than the concern of Internet Model.
• LAN and WAN can use whatever standards or protocol they desire.
42
Data communication and Computer networking

Like same but use in different sense and meaning as following


In essence, the network layer is responsible for end to end (source to destination) packet
delivery, whereas the data link layer is responsible for node to node (hop to hop) frame
delivery.
End to end indicates a communication happening between two applications (maybe you and
your friend using Skype). It doesn't care what's in the middle, it just consider that the two ends
are taking with one another. It generally is a Layer 4 (or higher) communication
Point to point is a Layer 2 link with two devices only on it. That is, two devices with an IP
address have a cable going straight from a device into the other. A protocol used there is PPP,
and HDLC is a legacy one.
Hop to Hop or Hop by Hop indicates the flow the communication follows. Data pass through
multiple devices with an IP address, and each is genetically named ―hop‖. Hop by Hop
indicates analyzing the data flow at layer 3, checking all devices in the path
Moreover, hop-by-hop transport requires per-flow state information at intermediate nodes,
which limits its scalability.

Hub to Hub In the context of package delivery, a "hub" is like a post office. In fact it might be
a post office. It is a local center where packages are collected for dispatch to their destination.
So a courier or local agent will collect a package from the sender, send it on to its local hub for
sorting.

UNIT-3
SWITCHING TECHNIQUES AND NETWORIKING DEVICES
(Circuit switching, packet switching, message switching)

Switched communication networks are those in which data transformed from source to
destination is routed between various intermediate nodes. Eg. Star topology.

There are mainly three typical Switching Techniques available for digital traffic:
1. Circuit Switching
2. Message Switching
3. Packet Switching

43
Data communication and Computer networking

1) Circuit Switching
a. Circuit Switching is a technique that directly connects the sender and the receiver in an
unbroken path.
b. Example of Telephone: switching equipment establishes a path that connects the caller‘s
and receiver's voice traffic in addition to digital data by making a physical connection.
c. Routing decisions in circuit must be made when the circuit is first established, but there
are no decisions made after that time.
d. A complete end to end path must exist before communication can take place.
e. Once the connection has been initiated and completed, the destination device must
acknowledge that it is ready and able to carry on a transfer.
Advantages:
 The communication channel is end to end dedicated
Disadvantages:
a. More high speed bandwidth is required.
b. Connection establishment time is more.
c. More expensive than any other switching techniques because a dedicated path is required
for each connection.
d. Inefficient use of communication channel.

44
Data communication and Computer networking

2) Message Switching
a. In message switching there is no dedicated path required between two communicating
devices, because the message switching is the follow the connectionless data network.
b. With message switching there is no need to establish dedicated path between two stations
and use network layer
c. When a station sends a message, the destination address is appended to the message.
d. The message is then transmitted through the network in its entirety, from node to node.
e. Each node receives the entire message, stores it in its entirety on disk and then transmits
the message to the next node. This type of network is called a store and forward network.
Advantages:
a. Efficient traffic management.
b. Large storing capacity required.
Disadvantages:
a. Is not compatible with interactive applications.
b. Store and forward devices are example.

45
Data communication and Computer networking
3) Packet Switching
a. In packet switching message are broken up into packet.
b. Each packet is tagged with appropriate header with source and destination node address.
c. Individual packets take different routes to reach the destination through network layer.
Packet switching: Datagram
a. Datagram packet switching is a packet switching technology by which each packet is
treated as a separate entity and is called as datagram.
b. Packets have their own complete addressing information attached.
c. Each packet follows different routes to reach the destination.
d. So, the packets may arrive at different times, and may be in a disturbed order. In this case
reordering is done.
Packet switching: Virtual
a. In this type of switching a preplanned route is established before the packets are sent.
b. Sender sends a "call request packet" to establish a logical connection and receiver sends
back an acknowledgement packet "packet accepted".
c. It is a cross between circuit switching network and packet switching network.
Advantages:
a. Packet switching is cost effective.
b. Offers improved delay characteristics.
c. Packet can be rerouted if any problem occurs.
Disadvantages:
a. Packet switching protocols are typically more complex.
b. If packet gets lost sender needs to resend the data.

46
Data communication and Computer networking
Difference between Circuit Switching and Packet Switching
CIRCUIT SWITCHING PACKET SWITCHING

In circuit switching there are 3 phases


i) Connection Establishment.
ii) Data Transfer. In Packet switching directly data transfer
iii) Connection Released. takes place.

In circuit switching, each data unit know the In Packet switching, each data unit just
entire path address which is provided by the knows the final destination address
source intermediate path is decided by the routers.

In Circuit switching, data is processed at In Packet switching, data is processed at all


source system only intermediate node including source system.

Delay between data units in circuit switching Delay between data units in packet switching
is uniform. is not uniform.

Resource reservation is the feature of circuit


switching because path is fixed for data There is no resource reservation because
transmission. bandwidth is shared among users.

Circuit switching is more reliable. Packet switching is less reliable.

Wastage of resources are more in Circuit Less wastage of resources as compared to


Switching Circuit Switching

It is not a store and forward technique. It is a store and forward technique.

Transmission of the data is done not only by


Transmission of the data is done by the the source, but also by the intermediate
source routers

Congestion can occur during connection


establishment time, there might be a case Congestion can occur during data transfer
will requesting for channel the channel is phase, large number of packets comes in no
already occupied. time

47
Data communication and Computer networking
COMPARISON IN CHART
BASIS FOR
CIRCUIT SWITCHING PACKET SWITCHING
COMPARISON

Orientation Connection oriented. Connectionless.

Purpose Initially designed for Voice Initially designed for Data


communication. Transmission.

Flexibility Inflexible, because once a path is set Flexible, because a route is


all parts of a transmission follows the created for each packet to
same path. travel to the destination.

Order Message is received in the order, sent Packets of a message are


from the source. received out of order and
assembled at the destination.

Technology/Approach Circuit switching can be achieved Packet Switching has two


using two technologies, either Space approaches Datagram
Division Switching or Time-Division Approach and Virtual Circuit
Switching. Approach.

Layers Circuit Switching is implemented at Packet Switching is


Physical Layer. implemented at Network
Layer.

48
Data communication and Computer networking
NETWORK DEVICES
(Hub, Repeater, Bridge, Switch, Router, Gateways and Brouter)
Common Network Connectivity Devices:
1. WAN Devices
The connectivity devices are:
 The Network Interface card (NIC)  Transceivers
 The hub  Wireless access points
 The switch  The router
 The bridge  The gateway
Network Interface Card (NIC): The Network Interface Card (NIC) used connect the
computer to the external network. It will normally have a PCI connector (Edge connector) to
connect to one of the PC expansion slots, and an RJ-45 connector to connect to external
Ethernet. Note that the interface connectors may differ depending upon the expansion bus
being used (for example, PCI, ISA, EISA, USB etc.), and the networking media being used
(for example, 10Base2, 10Base5, 10BaseT, etc.). Each of these have their own interface
specifications. Almost all NICs have LED indicators showing the network connectivity.
 A commonly used Network Interface Card is shown in the figure below.

Network Interface Card Model


NIC
―Network interface card‖ it is responsible for physically connection of computer system and
another network device. It is also known as LAN card Ethernet card and ―Network interface
controller‖
1. Repeater – A repeater operates at the physical layer. Its job is to regenerate the signal over
the same network before the signal becomes too weak or corrupted so as to extend the length to
which the signal can be transmitted over the same network. An important point to be noted

49
Data communication and Computer networking
about repeaters is that they do not amplify the signal. When the signal becomes weak, they copy
the signal bit by bit and regenerate it at the original strength. It is a 2 port device.
Repeater is use to regenerate the signal. It works as an amplifier

In telecommunications, a repeater is an electronic device that receives a signal and re-transmits


it at a higher level or higher power, or onto the other side of an obstruction, so that the signal
can cover longer distances.

2. Hub – A hub is basically a multiport repeater. A hub connects multiple wires coming from
different branches, for example, the connector in star topology which connects different
stations. Hubs cannot filter data, so data packets are sent to all connected devices. In other
words, collision domain of all hosts connected through Hub remains one. Also, they do not
have intelligence to find out best path for data packets which leads to inefficiencies and
wastage.
HUB
 Hub is a central device. It is use to just connect the system in a network
 Hub is a broadcast device.
 It divide the bandwidth means if you have 100 mbps speed and 4 port in a hub then it divide
into 25+25+25+25.
 There are minimum 8 and maximum 24 ports in a hub.

Types of Hub
1. Active Hub:- These are the hubs which have their own power supply and can clean,
boost and relay the signal along with the network. It serves both as a repeater as well as
wiring center. These are used to extend the maximum distance between nodes.
2. Passive Hub: - These are the hubs which collect wiring from nodes and power supply
from active hub. These hubs relay signals onto the network without cleaning and boosting
them and can‘t be used to extend the distance between nodes. There are no external
power supplies. It have minimum 4 port there are uplink port.

50
Data communication and Computer networking

A 4-port Hub is shown in the figure.


3. Bridge – A bridge operates at data link layer. A bridge is a repeater, with add on the
functionality of filtering content by reading the MAC addresses of source and destination. It is
also used for interconnecting two LANs working on the same protocol. It has a single input and
single output port, thus making it a 2 port device.

In other words A Bridge functions very similar to a Switch. It segments a given network
according to the requirements. Segmentation using a Bridge enables keeping un-intended traffic
from entering different segments of a network. Both Bridge and Switch are OSI layer-2 devices.
Bridges filter traffic based on the destination address of the frame. If a frame's destination is a
node on the same segment where it originated, it is not forwarded. If it is destined for a node on
another LAN, it is connected to corresponding bridge port and forwarded to that port.
Types of Bridges
 Transparent Bridges: - These are the bridge in which the stations are completely unaware
of the
bridge‘s existence i.e. whether or not a bridge is added or deleted from the network,
reconfiguration of
the stations is unnecessary. These bridges make use of two processes i.e. bridge forwarding
and bridge learning.
 Source Routing Bridges: - In these bridges, routing operation is performed by source
station and the frame specifies which route to follow. The hot can discover frame by
sending a special frame called discovery frame, which spreads through the entire network
using all possible paths to destination.
 A bridge is a device that separates two or more network segments within one logical
network.
 It have minimum 4 and maximum 12 port
 It works on Mac address.
A bridge is usually placed between two separate groups of computers that talk with each other,
but not that much with the computers in the other group. A good example of this is to consider a
cluster of Macintosh‘s and a cluster of UNIX machines. Both of these groups of machines tend

51
Data communication and Computer networking
to be quite chatty amongst themselves, and the traffic they produce on the network causes
collisions for the other machines who are trying to speak to one another.
Transceivers: Transceivers are commonly used with co-axial media using 10Base2 or 10Base5
networking standards. It allows a Network Interface Card to connect to a coax, providing
necessary translation of signals.
Wireless Access Points (WAP): A wireless access point allows mobile users to connect to a
central network node without using any wires. Wireless connectivity is useful for mobile
workstations, since there is no wiring involved. The wireless access standards are broadly
divided into 802.11a, 802.11b, and 802.11g. 802.11g is most popular among these due to high
bandwidth that it provides, and the availability of hardware. A commercially available wireless
access point is shown in the figure below.

A WAP device Back-panel

o Switch – A switch is a multiport bridge with a buffer and a design that can boost its
efficiency (a large number of ports imply less traffic) and performance. A switch is a data
link layer device. The switch can perform error checking before forwarding data, that
makes it very efficient as it does not forward packets that have errors and forward good
packets selectively to correct port only. In other words, switch divides collision domain
of hosts, but broadcast domain remains same.
 Switch is a central device. It is use to connect the system in a network
 Switch is a multi-broadcast device.
 It doesn‘t divide the bandwidth

52
Data communication and Computer networking
 There are minimum 24 and maximum 48 ports in a hub
 We can configure a switch
A computer networking device that is used to connect devices together on a computer network.
A switch is considered more advanced than a hub because a switch will only send a message to
the device that needs or requests it, rather than broadcasting the same message out of each of its
ports.

48-port Switch
5. Routers – A router is a device like a switch that routes data packets based on their IP
addresses. Router is mainly a Network Layer device. Routers normally connect LANs and
WANs together and have a dynamically updating routing table based on which they make
decisions on routing the data packets. Router divide broadcast domains of hosts connected
through it.
A device which connect two or more different network and decide the best route that is router.
We have to configure a router. Means Assign Name, IP, Password and Route.
A router is a device that forwards data packets along networks. A router is connected to at least
two networks, commonly two LANs or WANs or a LAN and its ISP‘s and they
use protocols such as ICMP to communicate with each other and configure the best route
between any two networks. Routers are located at gateways, the places where two or more
networks connect.
Routers use headers and forwarding tables to determine the best path for forwarding the packets
hosts.

53
Data communication and Computer networking
Router

6. Gateway – A gateway, as the name suggests, is a passage to connect two networks together
that may work upon different networking models. They basically work as the messenger agents
that take data from one system, interpret it, and transfer it to another system. Gateways are also
called protocol converters and can operate at any network layer. Gateways are generally more
complex than switch or router.
In other words Gateways are the most complex devices with respect to the functionality. They
typically work at the upper most layers of OSI model. A gateway is used to connect two
different environments, such as a Frame-Relay network and an X.25 network.
7. Bridge (Brouter) – It is also known as bridging router is a device which combines features
of both bridge and router. It can work either at data link layer or at network layer. Working as
router, it is capable of routing packets across networks and working as bridge, it is capable of
filtering local area network traffic.
8. WiFi:
WiFi stands for Wireless Fidelity. WiFi uses Radio waves to provide wireless high-speed
internet and network connections. A WiFi connection is established using a wireless adapter to
create hotspots. WiFi antennas size small enough to be placed on a very small router. WiFi can
be used to connect with printer, computers, gaming consoles and many more.
9. WiMax:
WiMax stands for Wireless Inter-operability for Microwave Access. WiMax uses licensed or
unlicensed spectrum to deliver connection to network. WiMax handle a larger inter-operable
network. WiMax can be used to provide internet services such as mobile data and WiFi spots.

10. WAN devices:


Other network connectivity devices that may be not directly participating in moving network
data are:
 Modems
 ISDN terminal adapters
 CSU/DSU

54
Data communication and Computer networking
The Term Modem is the acronym of Modulator/DE Modulator. There are several types of
modems.
Modem: A modem is a hardware networking device that converts data to a signal so it can be
easily sent and received over a phone line, cable, or satellite connection. In the case of
transmission over an analog telephone line, which was once the most popular way to access the
internet, the modem converts data between analog and digital formats in real time for two-
way network communication. In the case of the high-speed digital modems popular today, the
signal is much simpler and doesn't require the analog-to-digital conversion.
These include:
1. Dial-up Analog Modem
2. Broadband Modem
Analog modems are widely used to connect to the Internet using normal telephone lines. These
modems use the same frequencies used for voice transmission. Therefore, you cannot make a
call or receive a call (voice call) when using this modem to connect to the Internet.
Broadband modems use a different technology to connect to the central office. They do not
use the voice frequencies to communicate over the telephone wire. As a result, you can make or
receive voice call when using broadband modem. Another advantage using broadband modem
is speed. Speeds of several megabits per second are typical using broadband modems, where as
it is limited to 56 kbps (or so) when using analog modems.
A broadband modem is shown in the figure below.

DSL Modem
ISDN terminal adapters: ISDN is short for Integrated Service Digital Network (ISDN). It
delivers digital services over conventional telephone wires. You can connect your phone to an
ISDN line using a terminal adapter (TA). An ISDN modem provides higher speeds compared to
analog modems, but far less speed when compared to broadband modems.
CSU/DSU: CSU/DSU stands for Channel Service Unit/Data Service Unit. These are commonly
used for leased lines from Telcos. The CSU terminates the line at the customer's side. The DSU
does the transmission of signal through the CSU.
55
Data communication and Computer networking
Unit-4
NETWORK CONNECTIVITY
(Types of Internet Connections)

(Dial-up, Leased line, Wireless and RF, DSL, ADSL, Fiber, Cable, ISDN)

Internet connections are of different types depending upon the cost, speed, availability, etc.

Different Types of Internet Connections


1. DIAL-UP INTERNET CONNECTION

In the past, the internet is connected by the dial-up lines.


The dial-up line uses PSTN (Public Switched Telephone Network).
PSTN may be of the telephone line, fiber optic, Microwave transmission or communications
satellite.
Dial-up internet connections are connected through a telephone line.
Here is the same line for internet and telephone, so at a time only one task can take place either
we can run internet or talk on the telephone. It is the main disadvantage of a Dial-up connection.
It is the most inexpensive form of the internet connection, apart from it, its speed is also very
slow from 28 Kbps to 56 Kbps.
It has a very high ping (Latency) speed so we cannot watch online movies and play online
games.

2. LEASED LINE INTERNET CONNECTION


Leased connection is also known as direct Internet access or Level three connection. It is the
secure, dedicated and most expensive, level of Internet connection. With leased connection, our
computer is dedicatedly and directly connected to the Internet using high speed transmission
lines. It is on-line twenty-four hours a day, seven days a week.

56
Data communication and Computer networking
What is a Leased Line?

A leased line is a dedicated, fixed-bandwidth, symmetric data connection. It is used to link two
locations together.
The first location is typically a corporate office. The second location is typically another
corporate office, a data center that‘s connected to the Internet or a data center that‘s connected
to the company‘s existing Wide Area Network.

A Leased Line Used For


a. connect to the Internet
b. link PCs and servers in different corporate offices
c. carry phone calls
d. enable staff to connect to their work PCs from home

Leased Lines are Symmetric


This means they can upload data at the same fast speed at which they can download data. This
can be useful if staff need to…
access their work PC‘s desktops from home
a. send large files
b. upload sizable files to your web sites
c. backup data using online services
d. host web sites on a server at your office
e. use VoIP telephony

Leased Line ≠ Internet Connection (unless you want it to)


It‘s common for companies to buy Internet access at the same time they buy a leased line.
However a leased line is not the same thing as an Internet connection. Just as a pipe could be
used to carry a number of different things (eg.water, gas, sewage), so a leased line can be used

57
Data communication and Computer networking
to carry a number of different types of data traffic (Internet traffic, phone calls, corporate VPN
traffic).There‘s no requirement to buy Internet access on a leased line.
If we do get Internet access, there‘s no requirement that you get enough to fill the leased line.
For example, we might choose to get 15Mbit/s of Internet access on a 20Mbit/s leased line,
which in turn could be provisioned over a 100Mbit/s circuit. We could use 5Mbit/s for WAN
traffic and VoIP calls, and there would be 80Mbit/s spare for future usage.
What is a Leased Line Likely to deliver, Speed-wise?
2Mbps, 10Mbps and 100Mbps are the most popular connection speeds, though connections of
10,000 Mbit/s (10 Gigabits per second) are possible if money is no object.
What is a leased line likely to cost you? As a rough rule of thumb, 10Mbps connections cost
twice as much as 2Mbps connections. And 100Mbps connections cost twice as much as
10Mbps connections.
Advantages of a Dedicated Connection (compared to ADSL)
a. Faster download speeds are usually c. Connections that don‘t slow down at
available peak times
b. Faster upload speeds d. Greater reliability
e. Better support
Disadvantages of a Dedicated Connection (compared to ADSL)
Cost – Leased line costs have fallen, but leased lines are still a LOT more expensive than
3. ISDN (Integrated Service Digital Network):

ISDN stands for Integrated Service Digital Network. This connection is nearly similar to the
DSL. ISDN is a set of international communication standards designed in 1980 and improved in
the 1990s.
It is a digital network to transmit voice, image, video, and text over the existing circuit-switched
PSTN telephone network.
Different types of devices, such as analog phone, a fax machine, or a computer, are connected
to an ISDN terminal adaptor, which converts different types of data into ISDN format so that
they can share the same digital PSTN network.

58
Data communication and Computer networking
There are two major types of ISDN:-
 BRI
 PRI
I) BRI – Basic Rate Interface (2B+D)
– Two 64 kbit/s bearer (B) channels (For data)
– One 16 kbit/s signaling (D) channels ( For call setup and breakdown)
II) PRI- Primary Rate Interface
23B Channel- 64 Kbits/s (Mainly uses in North America)
1D channel- 64 Kbits/s (signaling and setup)
This connection is commonly used as connectivity from PSTN to large phone systems (PBX).
Dial-up and ISDN are the old types of internet connections.
4. Wireless and RF connection

The wireless network is built with the help of several hardware components like wireless excess
point or router and user devices like mobile phone, tablets, laptop, etc. which are equipped with
the wifi adaptor.
On the other hand, a wireless router is connected to the internet via a physical connection i.e.
with the fiber cable or analog line which uses a telephone and modem, after that connected to
the router.
The wireless router is then connected to the devices via radio waves established an end to end
internet connection.
A router receives the data from the internet and translates it is to a radio signal and sends it to
the wireless network to the connected devices.
The identical process also happens in reverse.
RF Wireless Technology
A radio frequency (RF) signal refers to a wireless electromagnetic signal used as a form of
communication, if one is discussing wireless electronics. Radio waves are a form of

59
Data communication and Computer networking
electromagnetic radiation with identified radio frequencies that range from 3kHz to 300 GHz.
RF communication is used in many industries including television broadcasting, radar systems,
computer and mobile platform networks, remote control, remote metering/monitoring, and
many more.
While individual radio components such as mixers, filters, and power amplifiers can be
classified according to operating frequency range, they cannot be strictly categorized by
wireless standard (e.g. Wi-Fi, Bluetooth, etc.) because these devices only provide physical layer
(PHY) support. In contrast, RF modules, transceivers, and SoCs often include data link layer
support for one or more wireless communication protocols. These products are organized by
wireless technology and can be browsed under the "Solutions" tab.
 Bluetooth Solutions
 ZigBee Solutions
 Wi-Fi Solutions
 GPS Solutions
5. DSL: (ADSL, SDSL, VDSL, CABLE Connection)

DSL and (Digital Subscriber Line)


In a DSL internet connection, both voice and internet data can flow over the same telephone
line at the same time.
It has a DSL modem which filters the voice and data.
DSL represents a high-speed connection, much fast than the ancient dial-up connection, but it is
not as fast as a cable connection.
So due to DSL modem, you can go on the internet and talk on the phone at the same time
(Modem convert analog signal to digital signal).
Speed of DSL varies; depending upon the place where you live, but on an average, download
speed varies from 5Mbps to 100 Mbps.
Types of DSL internet:
1. ADSL (Asymmetric Digital Subscriber Line): In this internet connection downloading
speed is considerably faster than the uploading speed.
It is mostly used at home because at home we download more as compare to upload.
Moreover, it is the cheapest form of DSL.
60
Data communication and Computer networking
2. SDSL (Symmetric Digital Subscriber Line): In SDSL connection, Download and
upload speed are equal. It is typically used in businesses.
3. VDSL (Very high bit-rate Digital Subscriber Line): it is the fastest form of the
DSL. It is fast because, in its line, copper wire is used. Due to copper, it is only installed
for limited distances.
On an average VDSL is 3 times faster than the ADSL.
4. Cable Internet Connection
Broadband Cable is typically provided by the same provider that provides cable television to its
customers. Here we use cable modem/wifi router combo. Because of the connection of your
neighbors and you are on the same cable line so during the peak hours you have experienced
slow speed. The reason behind is that your neighbors are also using at the same time.

6. Fiber

A fiber internet connection provides the fastest internet speed today. It can provide download
and upload speed of up to 1000 Mbps. It uses light to transfer the data through the optical fiber
cable. In other forms of internet, connection data is transferred in electrical form, so signal get
weaker and weaker at large distances because singles in the copper cable can be affected by
electromagnetic interference. But in the fiber optic cable, signal transfers in the glass in the
form of light, it can travel to long distances without any losses. Fiber is more expensive than the
DSL and cable.
7. Satellite

Satellite internet is the internet which uses the path of the outer space. Satellite internet signal
travels more than 46,000 miles (From ISP to user through satellite).
In rural area satellite internet will be the best option for high speed, it is a faster option than
dial-up. Still, large-scale improvements are going on for making it more usable and reliable in
61
Data communication and Computer networking
the field of infrastructure and technology. At many places, its speed is less than the cable and
DSL connection. Satellites are orbiting directly over the equator, means it is a geostationary
satellite.
Working:
In this internet connection when you search about anything, on your internet devices, its signal
send to the satellite via a satellite dish and from satellite to NOC (Network Operation Center)
retrieves data on earth, and sends it back to the satellite, the whole process take place in reverse.
Distance from satellite ISP to satellite or from satellite to the user is more than 23000 miles. It
means data travels more than 46,000 miles. This process takes place in a fraction of seconds.
High Latency represents a bad signal in satellite internet connection. For browsing and
downloading, latency does not affect much but during gaming and streaming it affects lots.
8. Cellular

In this network, radio waves are used for transfer signal to and from the mobile phone.
In cellular technology geographic area is divided into hexagonal cells, with it each cell having
its tower and frequency slot.
Generally, these cellular towers are connected through a wire or more specifically optical fiber
cable. These optical fiber cables are laid under the ground or ocean for providing national or
international connectivity.
During the use of the internet; Smartphone transmits a signal in the form of electromagnetic
waves.
The electromagnetic wave produces by your phone are picked up by the tower and system on
the tower convert them high-frequency light pulses.
These light pulses are further transferred to the base transceiver for the further signal
transferring.
After that signal transferred to the destination server, for what you searched, after that reverse
process takes place.

62
Data communication and Computer networking
9. Hotspot

A hotspot is a technology which is relatively similar to the wifi. Hotspot provides internet
access to users via WLAN in the specific area to their location.
For illustration; router and modem are like hotspots which transfer the data in the form of a
radiofrequency wave in the surrounding of its centralized position.
Like Smartphone and mobile hotspots, here you can share your data with your friends.
You can say that by the help of a hotspot we can create wifi.
They are of two types: Passwords protected and free to uses.
But beware that free hotspots are most of the time on the target of the hackers.

10. Broadband

Broadband is also known as a wideband because during communication it uses and provides a
wide band of frequencies. The wider the bandwidth of a channel, the greater will be the
information-carrying capacity.
Here you can achieve speed up to 100 Mbps, it typically depends upon the cables we use like in
case of coaxial cable data transfer speed may vary but in optical fiber cables speed will be high.
Generally, its speed in Mbit/sec but it can be Gbit/sec. (Found during testing in optical fiber
cable)
ADSL broadband is used in homes and offices.
These are well-known types of internet connections, which generally people use.

63
Data communication and Computer networking
Unit- 5
NETWORK ADDRESSING

Medium Access Control (MAC):


• The data link layer addresses are called physical address or MAC address.
• MAC address are used to find the address of the next hop in hop-to-hop delivery.
• The physical address for most computers on local area networks is imprinted on the
network card. For eg. NIC card.

64
Data communication and Computer networking
Port address
• The transport layer assign temporary address to the client port and it has table that maps
to well-known port address.
• Client port address 46017
• Well known port address 80
• The address at the transport layer are called port number
• Client port number and server port number are involved when client communicates.
• The port number is between 0 to 65,535.
• This range is large enough to allow thousands of clients or servers to run at the same time
on a computer.
IP address
• Addresses used in the Internet are called IP address.
• An IP address is made of 4 bytes (32 bits)
• Each byte can have a value between 0 and 255.
• The notation is referred to as dotted-decimal notation.
Domain name and Address:
Domain names
• The internet uses an address to identify an entity.
• Each computer connected to the Internet needs to be uniquely identified.
• The full domain name is a sequence of labels separated by dots.
• Generic domain names and country domain name are two categories.
• https://www.tucl.org.np/
• https://www.ku.edu.np/
Domain address (name)
• gov - Government agencies
• edu - Educational institutions
• org - Organizations (nonprofit)
• mil - Military
• com - commercial business
• net - Network organizations
• biz – business and firms
• coop- cooperative organizations
• Info – information service provider
• ca - Canada
• th - Thailand

65
Data communication and Computer networking
Unit-6
NETWORK PROTOCOLS AND SERVICES
Protocol
• The rules of data communication among entities (bits of data).
• Entities are anything capable of sending and receiving information.
• The entities must agree on a protocol.
• A protocol is a set of rules that governs data communications.
• A protocol defines what is communicated, how it is communicated, and when it is
communicated.
Three elements of protocol
• Syntax: structure of data. Meaning the order in which they are presented. E.g. the first 8
bits of data is the address of the sender. The second 8 bits data is the address of the
receiver, and the rest of the stream to be the message itself.
• Semantics: the meaning of each section of bits. How the particular pattern to be
interpreted, and what action to be based on that interpretation?
• Timing: When data should be sent and how fast they can be sent? E.g. if a sender
transmits data at 100Mbps but the receiver receive data at only 1 Mbps, the transmission
will overload the receiver and data will be largely lost

Transmission Control Protocol (TCP)


• TCP is transport layer protocol.
• TCP is a connection-oriented, reliable transport protocol. It receives a message from the
application program, adds header to the message, and sends message
• It performs all four duties (packetizing, creating connection, addressing and providing
reliability) of transport layer.
Transmission Control Protocol (TCP)

66
Data communication and Computer networking
• It establishes a connection before data transfer and terminates the connection after data
transfer.
• It provides damage control, loss control, order control, and duplicate control
• Most of the application protocols, SMTP, HTTP, FTP, and TELNET, use the services of
TCP
Stream Control Transmission Protocol (SCTP)
• SCTP is new reliable message oriented transport layer protocol that combined the best
feature of UDP and TCP.
Internet protocol (IP)
• IP is the transmission mechanism
• IP is an unreliable and connectionless datagram protocol.
• IP provides no error checking or tracking.
• If reliability is important, IP must paired with a reliable protocol TCP
Application layer protocols
• Mail Access Protocols
• The stored mail remains in the mail server until it is retrieved by the recipient through the
access protocol
Post Office Protocol (PoP)
• The client PoP software is installed on the recipient computer; the server PoP software is
installed on the mail server.
• Mail access starts with the client when the user needs to download the received email
from the mailbox on the mail server.
• Does not allow the user to organize mail on their on the server
• The user can not have different folders on the server.
• It does not allow the user to check the contents of the mail before downloading.
Internet mail access protocol (IMAP)
• A user can check the email header prior to downloading
• A user can search the contents of the email prior to downloading
• A user can create a hierarchy of mailboxes in folder for email storage.
• The version of IMAP in use today is version 4

Simple Mail Transfer Protocol (SMTP)


• SMTP defines relationship between user agent and mail transfer agent.
• SMTP uses unique addressing system. It has two parts: a local part and a domain name,
separated by an @sign. localpart@Domain name
• Local part = Address of the mailbox on the local site. User mailbox, where all of the mail
received for a user is stored for retrieval by the user agent
• Domain name = The name of the destination. Name of mail server.
• The domain name, comes from a universal naming system called the domain name
system (DNS).
Multipurpose internet mail extension (MIME)
• MIME is a supplementary protocol that allows non-ASCII data to be sent through SMTP.
• MIME is extension of SMTP. It cannot replace SMTP
File Transfer
67
Data communication and Computer networking
• Two applications are available for transferring files over the Internet: File transfer
Protocol (FTP) and Trivial File Transfer Protocol (TFTP)
• FTP establishes two connections between hosts.
• One connection is used for data transfer,
• the other for control information (commands and responses)
• Separation of commands and data transfer makes FTP more efficient.
• Data needs to be transferred only after a line of response established.
FTP
• The client has three components:
• The user interface,
• the client control process and
• the client data transfer process.
• The server has two components:
• The server control process
• The server data transfer process
• The data connection is made between the data transfer processes. The data connection is
opened and then closed for each file transferred.
• The control connection remains open during the entire interactive FTP session
Closed and open FTP
• Closed FTP: allows only specific users to access files. The access is controlled by the
user account and password.
• Open FTP: anonymous FTP. Guest as password. Anonymous users.
Trivial File Transfer protocol (TFTP)
• TFTP does not apply control connection as FTP does. It makes one single connection and
transfers a small file quickly.
• This application is not universally available.
Terminal Network (TELNET)
• TELNET is a general-purpose client-server program that lets a user access any
application program on a remote computer; it allows the user to log onto a remote
computer.
• After logging on, a user can use the services available on the remote computer and
transfer the results back to the local computer.

68
Data communication and Computer networking
Unit -7
TRANSMISSION MEDIA:
Guided: Twisted-pair, Coaxial, Optical Fiber
Types of Transmission Media
In data communication terminology, a transmission medium is a physical path between the
transmitter and the receiver i.e it is the channel through which data is sent from one place to
another. Transmission Media is broadly classified into the following types:

1. GUIDED MEDIA:
• Guided media, which are those that provide a physically limited path for the signal,
include twisted-pair cable, coaxial cable, and fiber-optic cable
Features:
 High Speed
 Secure
 Used for comparatively shorter distances
There are 3 major types of Guided Media:

(A) Twisted Pair Cable –


• The simplest and most common type of guided media is twisted-pair cable.
• Made up of two insulated copper wires twisted together to reduce the effect of electrical
interference of other electrical devices and other nearby cables.
• Two types of twisted pairs
• Unshielded Twisted-Pair UTP
• Shielded Pair Cable STP

a. Unshielded Twisted Pair (UTP):


i. Most common type of telecommunication medium.
ii. Most familiar from its use in telephone systems.
iii. Suitable for transmitting both data and voice.

69
Data communication and Computer networking
iv. Consists of two conductors (usually copper), each with its own colored plastic insulation
for identification.
v. Colors are used both to identify the specific conductors in a cable and to indicate which
wires belong in pairs and how they relate to other pairs in a larger bundle.
vi. Twisting decrease the effect of noise on the signal being carried by the cable by creating
two equal effects that cancel each other out when they arrive at the destination
Advantages:
 Cheaper
 Ease to install
 Flexible
 High speed capacity
 Higher grades of UTP are used in many LAN technologies, including Ethernet and Token
Ring
Disadvantages:
 Susceptible to external interference
 Lower capacity and performance in comparison to STP
 Short distance transmission due to attenuation

b. Shielded Twisted Pair (STP):

i. It has a metal foil or braided-mesh covering that encases each pair of insulated
conductors.
ii. The metal casing prevents the penetration of electromagnetic noise. It also eliminate a
phenomenon called crosstalk.
iii. It is more costly than UTP, but less susceptible to noise.
Advantages:
 Better performance at a higher data rate in comparison to UTP
 Eliminates crosstalk
 Comparatively faster
Disadvantages:
70
Data communication and Computer networking
 Comparatively difficult to install and manufacture
 More expensive
 Bulky

(B) Coaxial Cable –


• Coaxial cable (or coax) carries signals of higher-frequency ranges than twisted-pair cable.
• It has central core conductor of solid copper wire enclosed in an insulating sheath.
• It is encased in an outer conductor of metal foil, braid, or a combination of the two (also
usually copper)
• The outer metallic wrapping serves both as a shield against noise.
• The outer conductor is also enclosed in an insulating cover, and the whole cable is
protected by plastic cover.

Advantages:
 High Bandwidth
 Better noise Immunity
 Easy to install and expand
 Inexpensive

Disadvantages:
 Single cable failure can disrupt the entire network

(C) Optical Fibre Cable –


It uses the concept of reflection of light through a core made up of glass or plastic. The core is
surrounded by a less dense glass or plastic covering called the cladding. It is used for
transmission of large volumes of data.
The cable made of glass or plastic and transmits signals in the form of light is called optical
fiber.

Advantages:
 Increased capacity and bandwidth
 Light weight
71
Data communication and Computer networking
 Less signal attenuation
 Immunity to electromagnetic interference
 Resistance to corrosive materials

Disadvantages:
 Difficult to install and maintain
 High cost
 Fragile
 Unidirectional, ie, will need another fiber, if we need bidirectional communication

2. UNGUIDED MEDIA:
It is also referred to as Wireless or Unbounded transmission media.No physical medium is
required for the transmission of electromagnetic signals.

Features:
 Signal is broadcasted through air
 Less Secure
 Used for larger distances
There are 3 major types of Unguided Media:

(i) Radiowaves –
These are easy to generate and can penetrate through buildings. The sending and receiving
antennas need not be aligned. Frequency Range:3KHz – 1GHz. AM and FM radios and cordless
phones use Radiowaves for transmission.
Further Categorized as (i) Terrestrial and (ii) Satellite.

(ii) Microwaves –
It is a line of sight transmission i.e. the sending and receiving antennas need to be properly
aligned with each other. The distance covered by the signal is directly proportional to the height
of the antenna. Frequency Range:1GHz – 300GHz. These are majorly used for mobile phone
communication and television distribution.

(iii) Infrared –
Infrared waves are used for very short distance communication. They cannot penetrate through
obstacles. This prevents interference between systems. Frequency Range:300GHz – 400THz. It
is used in TV remotes, wireless mouse, keyboard, printer, etc.

72
Data communication and Computer networking
Unit-8
NETWORK SECURITY:
Authentication, Digital signatures, Firewalls

Introduction
• User expects confidentiality and data integrity.
• Network security involves four aspects
• Privacy (confidentiality)
• Authentication
• Integrity
• Nonrepudiation
Privacy, Authentication, Integrity and Nonrepudiation
• Privacy: Receiver expect confidentiality. The transmitted message must make sense to
only the intended receiver
• Authentication: receiver is sure of the sender‘s identity
• Integrity: data must arrive at the receiver exactly as it was sent
• Nonrepudiation: It means that a receiver must be able to prove that a received message
came from a specific sender.
Privacy
• The message must be meaningless for unauthorized receiver.
• The data to be encrypted at the sender site is called plaintext.
• The encrypted data is called ciphertext and is decrypted at the receiver.
• There are two methods for encryption/decryption :
• Secret key method
• Public key method
Secret-key and public key encryption/decryption
• The same key is used by the sender (for encryption) and the receiver (for decryption).
The key is shared.
• The private key is kept by the receiver and public key is announced to the public
• The private key is used to decrypt the message.
Digital signature
• The idea is similar to the signing of a document. When we send a document
electronically.
• We can sign the entire document or we can sign a condensed version of the document
Signing the whole document
• Public-key encryption can be used to sign a document.
• The sender uses her private key to encrypt, the receiver use the public key of the sender
to decrypt.

73
Data communication and Computer networking
• Digital signature can provide integrity, authentication, and nonrepudiation
Firewalls
• One way an organization can protect itself from the outside world is through a firewall.
• A firewall is a router installed between the internal network of an organization and the
rest of the internet.
• It is designed to forward some packets and filter others.
• E.g. firewall may filter all incoming packets destined for a specific host or specific
server.

74
Data communication and Computer networking
Unit-9
NETWORK MODELS: (INTERNET)
Application Layer
• Client Server Paradigm
• Application layer program are based on the concept of clients and servers.
• Client: one to request a service. Application program runs at local site
• Server: one to provide a service. Application program runs at remote site
• Should the application program be able to request as well as provide services?
• Client application program request a service from another application program
called server. But requesting a service and providing a service are separate from
each other.
• They work in pair called client-server model
Client-server paradigm
• Should an application program provide service for only one specific program installed
elsewhere or should it provide service for any application program that requests this
service?
• The client-server relationship is many-to-one.
• When should an application program be running?
• Generally, a client program runs only when it is needed. Server program runs all
the time.
• Should there be just one universal application program that can provide any type of
service a user wants? Or should there be one application Program for each type of
service?
• There is both specific and general application program that can provide any type of
service. If the server is overloaded by user then server uses specific application program
to provide service.
Client and Server
Client server
• Client is a program running on the local • A server is a program running on the
machine remote machine providing service to the
• Client opens the communication channel, client.
sends its request, receives the response, • It opens the door for incoming requests
and closes the channel. from clients, but it never initiates a
• Multiple requests are allowed service until it is requested to do
Addressing
• A client and a server communicate with each other through addresses.
• Request must include address of destination and source

75
Data communication and Computer networking
• While responding request, server address becomes source address and client will be
destination address.
• Each application has its own address format.
• E.g. email address: lilanyaichyai@tucdlis.edu.np
• Web page: www.tucdlis.edu.np • Domain
• Local Part
Here edu.np is Domain and lilanyaiichyai is local part.
Email
• Email is a store-and-forward application. This means a message can be sent to someone
not currently connected to the Internet.
• Email supports:
• Sending a single message to one or more recipients
• Sending message and include text, voice, video or graphics
Components of Email
• User Agents (UAs)
• UA is software installed in user computer. Read, reply, forward, save and compose
message. E.g. Berkeley mail, Pine, and Elm were text based. Eudora, Microsoft‘s
outlook, and Netscape‘s messenger use a GUI (graphic user interface)
• Not responsible to sending and receiving mail
• Mail transfer agents (MTAs)
• Sent email. To send there must me a client MTA and a system must have a server MTA.
Client MTA is installed in users‘ computer. Mail server must have both client and server
MTA
• Simple Mail Transfer Protocol (SMTP)
Data Communication (Questions)
1. In the client server mode, what is the role of the program? What is the role of the server
program?
2. What application program allows connection to a remote system in such a way that the local
terminal appears to be a terminal appears at the remote system?
3. What is the function of SMTP?
4. Why is TELNET needed?
5. What is the difference between UA and MTA?
6. What is application to application delivery?
7. What are the phases in connection oriented delivery?
8. What is the term reliable service mean?
9. Which specific application use UDP?
10. Which specific application use ICT?
11. What is a three-way handshake and when it is used?

76
Data communication and Computer networking
Unit-10
NETWORK MODELS
Transport Layer
• Application-to-application delivery/ process-to-process delivery
• A transport layer protocol takes a message from an application program
• Deliver packets from client application program to server application program
Function / Duties of transport layer
• Packetizing
• Creating connection
• Addressing
• Providing reliability
Packetizing
• Dividing large messages
– A long message may be larger than the maximum size that can be handled by the
lower layer protocols
– Divided into sections with each section inserted (encapsulated) into a separate
packet
• Adding a header
– A header is added to allow the transport layer to perform its other functions
Creating connection
• Connection Establishment
– Connection request packet to the intended receiver
– Responding computer returns a confirmation packet
– Returns a packet acknowledging the confirmation
• Data Transfer
– Send data and forth
– Packets are numbered to preserve the ordered relationship between the packets
• Connection Termination
– Sends termination request packet to the other party
– Second party acknowledge the receipt of the termination
– Request to terminate the connection in the opposite direction
– The first party acknowledges the receipt of the termination request
Connectionless Delivery
• No session or no virtual connection between two application programs
• A connectionless transport-layer protocol is used when an application needs to send one
packet quickly without the overhead of connection establishment and termination
Internet Protocols
• Composition of TCP and UDP

77
Data communication and Computer networking
TCP and UDP
• User datagram protocol UDP
– Connectionless, unreliable transport protocol
– Adds a small header called checksum to the data received from application layer
• Checksum allow the receiver to detect errors. If error detected, it is simply
discarded with no notification of sender
– Packetizing
– Adding header
• Used for quick action
User Datagram
• UDP packets is called user datagram
• Consists header (64 bits)
Technical focus of datagram

Transmission Control Protocol TCP


• TCP packets are called segments
• Messages from application layer is divided into segments
• Header is added in segments
• Header contains 20-60 bytes
Segment

78
Data communication and Computer networking

Technical focus segment

79
Data communication and Computer networking
Unit 11
NETWORK MODELS
Network Layer:
(Addressing, routing, packetizing, fragmenting)
• Computer-to-computer or host-to-host delivery/ source computer to the destination
computer
• A network-layer protocol takes a message from a computer and delivers it to another
computer
Duties of network layer
• Internetworking • Packetizing
• Addressing • Fragmenting
• Routing
Addressing
• Uniquely identify each device on the Internet to allow global communication between all
devices.
• The network addresses must be unique.
• Network layer must uniquely and universally (addressing system must be accepted by
any host that that wants to be connected to the Internet) define the connection of a host
(computer) or a router to the Internet.
• If a device has two connections to the Internet, it has to addresses.
IP address
• Addresses used in the Internet are called IP addresses
• IP address is made of 4 bytes (4*8=32 bits)
• Each byte can have a value between 0 and 255 ( in decimal number)
• The bytes are separated by a dot (.) e.g. 10.34.234.8 (in decimal number)
• Convert 10.34.234.8 into binary digit?
• If Internet uses 32-bit addresses=232 (4,294,967,296) more than 4 billion addresses. More
than 4 billion devices could be connected.
Address hierarchy
• The Internet has two or three levels of hierarchy in addressing.
• Two –level address: Network and host
• In the case of single network, two levels of addressing is adequate.
• First part of address is the same for each host; the second part differs to define each host.
• The common part of the address is called the netid (or prefix); the variable part is called
the hosted (or suffix)
• The first address in a group is called the network address.
Three-level address: network (netid), sub-network (subnetid), and host (hostid)
• Usually there is the need of more than on network. There are smaller networks formed.

80
Data communication and Computer networking
• IP addresses is made up of 32bits = 4 bytes (value between 0 and 255)
• Three level address includes
• Network address: first 2 bytes is defined as network address, which is same for all
networks
• Sub-network address : 3rd byte can be defined a subnet address. It is same for all
computers connected to same subnet
• Host address: 4th byte is host address and it is unique for each computer.
Address resolution
Application layer address Transport layer address Network layer

www.fhda.edu 46017 client port 201.23.56.8 source IP address


80 server port 181.17.43.56 destination IP address
Hierarchy of three level IP address

81
Data communication and Computer networking

Routing

Which route to take?


• The router connecting the LAN and WAN makes decision to travel for the packet.
• Different types of application require different routing choices.
• Depends on types of service (TOS) required by the packet.
• Videoconferencing require minimum delay
• File transfer require reliability
How to route?
• The answer is routing table.
• Each router must have at least two table
• One table to route packets that need minimum delay
• Another table to route packets that needs reliability
Routing table network specific vs host specific
• To route the packets from source to destination
• Routing table can be based on next-hop routing
• It is network specific rather than host specific
• The router routes the packet to the final network; it is then broadcast to reach the final
destination
• Network-based routing reduces the size of routing tables.
Hierarchical routing: autonomous system
• Another way to reduce size of a routing table is to divide the internet into smaller sections
called autonomous systems.
• An autonomous system (AS) is a group of networks and routers under the authority of a
single administration.
• Routing inside an autonomous system is referred to as interior routing.
• Routing between autonomous systems is referred to as exterior routing.
82
Data communication and Computer networking
• Routing in the Internet is also called hierarchical routing.
Routing table: Static and dynamic routing
Static routing table contains information entered manually.
• The administrator enters the route for each destination into the table.
• No automatic update.
Dynamic routing table
• Updated periodically using a dynamic routing protocol
• Changes in Internet.
• Shutdown of a router
• Breaking of the link
Routing Protocols
• Are designed for dynamic routing table
• Routing Information Protocol (RIP) and Open Shortest Path First (OSPF)
• Both are two interior routing protocol
• Border Gateway Protocol (BGP)
Packetizing: IP Protocol
• Network layer adds a new header defined by IP Protocol.
• IP is an unreliable and connectionless datagram
• If reliability is important, IP must be paired with a reliable protocol such as TCP
• Datagram
• Packets in the IP layer is also called datagrams
• The header is 20-60 bytes in length and contains information essential to routing and
delivery
Fragmenting
• Each router de-capsulates the IP data gram from the received frame, processes it, and
then encapsulates it in another frame.
• The format and size of the received frame depend on the protocol used by the physical
network from which the frame has just arrived.
Maximum Transfer Unit (MTU)
• When a packet is passing through a network, the datagram must fit into the frame defined
by the network; if it is larger, it must be divided. This is called fragmentation
• Datagram is needed to fragment if it is over sized than permitted by MTU
Fragment
• A fragment has 3 fields
• Datagram has identification number
• Each datagram has flag (fragmented or not)
• Each datagram has unique number that shows the position (offset) with respect to
original datagram

83
Data communication and Computer networking

84
Data communication and Computer networking
Unit 12
NETWORK MODELS
Data Link Layer: (Duties, Data link layer)
• It is Hop-to-hop delivery. It provides services to network layer. Services are:
• Hop-to-hop delivery • Error control
• Packetizing • Flow control
• addressing • Medium access control
Hop-to-Hop Delivery
• A packet to reach its destination, it must pass through several LANs and WANs and the
router that connect them.
• Hop-to-hop delivery is the responsibility of data link layer
Packetizing
• Encapsulate in the appropriate packet at the data link layer
• Most LANs called such packet as frames
• For packetizing, it is called framing in data link layer of the underlying LANs and WANs
• Header and trailer are added in the packet
• Header: addressing information and information about upper-layer protocol
• Trailer: extra data added to detect error
Addressing
• Physical address is called MAC address. Media Access Control address. Hardware
identification number.
• A LAN address is 6 bytes(48 bites)
• A WAN address is usually longer than LAN
• The physical address for most computers on LAN is imprinted on the network card that is
installed in the computer.
• If the network card is changed, the physical address of the computer is also changed.

85
Data communication and Computer networking
How a router knows the address of next hop? Address resolution
• IP address (logical address) of next hop and the physical address of the next hop are
stored statically in a routing table.
• Physical address is corresponded with logical address.
• But statically performing such task is difficult so such address mapping can be done
dynamically.
• Address Resolution Protocol (ARP) is employed to solve this problem of identifying
physical address.
• Sender (router) sends ARP query packet to the destination
• Physical and IP addresses of the sender
• IP address of the receiver
ARP Operation

FUNCTIONS / DUTIES OF THE DATA LINK LAYER


Data link layer in the Internet model
• The data link layer lies under the network layer in the Internet model.
o It provides services to the network layer.
Data-link layer duties

86
Data communication and Computer networking
• These services include hop-to hop delivery, packetizing, addressing, error control,
flow control, and medium access control.
A. HOP-TO-HOP DELIVERY

• This hop-to-hop delivery is the responsibility of the data link layer.


• The two data link layers, installed at adjoining hops, control the transmission of data
through the LAN or the WAN.
B. PACKETIZING
• The data link layer is responsible for moving data from one hop to the next.
• To get to the next hop, the data must pass through a LAN or a WAN, each of which has
its own protocols.
• The packet coming from the IP layer must therefore be encapsulated in the appropriate
packet defined by the data link layer of the underlying LAN or WAN.
• Different protocols have different names for the packet at the data link layer.
• Most LANs refer to the packet as frames.
• Framing is the common terminology for packetizing at the data link layer.
• A header and a trailer are usually added to a packet received from the network layer.
C. ADDRESSING
Technical Focus: Addresses in Local Area Networks
• The physical address for most computers on local area networks is imprinted on the
network card that is installed in the computer.
• If the user or network manager changes the network card (because of a failure, for
example), the physical address of the computer is changed. In most cases, changing the
network card requires reconfiguration of the computer.
Address Resolution
• How does a computer or a router that has received a frame know the address of the next
hop?
• The association between logical and physical addresses can be statically stored in a table.
• The sender can look in this table and find the physical address corresponding to a logical
address. (not a good solution)

87
Data communication and Computer networking
– Every time a physical address is changed, the table must be updated.
– Updating tables on all machines at frequent intervals is a very demanding task.
• The mapping, however, can be done dynamically, which means that the sender asks the
receiver to announce its physical address when needed.
– The Address Resolution Protocol (ARP) is designed for this purpose.
ARP operation

 Anytime a host, or a router, needs to find the physical address of another host or router
on its network, it sends an ARP query packet.
 The packet includes the physical and IP addresses of the sender and the IP address of the
receiver.
 Because the sender does not know the physical address of the receiver, the query is
broadcast over the network.
D. ERROR CONTROL
Data can be corrupted during transmission. For reliable communication, errors must be
prevented, or detected and corrected.
• Source Of Errors
– White Noise
– Impulse Noise
– Crosstalk
– Echo
– Jitter
– Attenuation
– Distortion
• Types Of Errors
– Data are sent from one device to another in the form of binary data (0s and 1s).
– Two types of errors may happen:
• Single-bit errors
• Burst errors
• In a single-bit error, only 1 bit in the data unit has changed.
Single-bit error
88
Data communication and Computer networking

• Only 1 bit of a given data unit is changed from 1 to 0 or from 0 to 1.


• A burst error means that two or more bits in the data unit have changed.
Burst error of length five

• Burst error does not necessarily mean that the errors occur in consecutive bits.
• The length of the burst is measured from the first corrupted bit to the last corrupted
bit.
• Some bits in between may not have been corrupted.
Error detection
Error detection uses the concept of redundancy, which means adding extra bits for detecting
errors at the destination.
Redundancy

• The key to error detection is redundancy, a short group of bits appended to or inserted
to each unit of data.
• This technique is called redundancy because the extra bits are redundant to the
information.
• They are discarded as soon as the accuracy of the transmission has been determined.

89
Data communication and Computer networking
Detection methods

• Three types of redundancy checks are used in the data link layer:
o Vertical redundancy check (VRC)
o Longitudinal redundancy check (LRC)
o Cyclic redundancy check (CRC)
In vertical redundancy check (VRC), a parity bit is added to every data unit so that the
total number of 1s becomes even.
Even parity VRC concept

• The most common and least expensive mechanism for error detection.
• Often called a parity check.
• In this technique, a redundant bit, called a parity bit, is appended to every data unit so that
the total number of 1s in the unit(including the parity bit)becomes even.
LRC

• In Longitudinal redundancy check (LRC),a block of bits is organized in a table(rows


and columns).
• Then calculate the parity bit for each column and create a new row of 8 bits, which are
the parity bits for the whole block.
• First parity bit in the fifth row is calculated based on all first bits, and so on.
• Then attach the 8 parity bits to the original data and send them to the receiver.
In longitudinal redundancy check (LRC), a block of bits is divided into rows and a redundant
row of bits is added to the whole block.
90
Data communication and Computer networking
CRC

• The most powerful of the redundancy checking techniques is the cyclic redundancy
check (CRC).
• Unlike VRC and LRC, which are based on addition, CRC is based on binary division.
• Instead of adding bits together to achieve a desired parity, a sequence of redundant
bits, called the CRC or the CRC remainder, is appended to the end of a data unit so
that the resulting data unit becomes exactly divisible by a second, predetermined
binary number.
• A remainder indicates that the data unit has been damaged in transit and therefore
must be rejected.
Error Correction Using Retransmission
• Error correction using retransmission follows a very simple rule.
• If the sender has not received positive news in due time, the frame is retransmitted.
• Frames are retransmitted in three cases:
– The frame is damaged.
– The frame is lost.
– Acknowledgment is lost.
• There are two protocols for retransmission:
– Stop-and-wait automatic repeat request.
– Sliding-window automatic repeat request.
Stop and wait ARQ

91
Data communication and Computer networking
Stop-and-wait ARQ is very slow.
• The Sender stops sending until it hears about the fate of the one frame sent.
Technical Focus: Procedure for Stop-And-Wait ARQ
 The sending device keeps a copy of the last frame transmitted until it receives an
acknowledgment for that frame
 Both data frames and ACK frames are numbered 0 and 1 alternately. A data 0 frame is
acknowledged by an ACK 1 frame.
 If an error is discovered in a data frame, a negative acknowledgment (NAK) frame is
returned.
 If an expected acknowledgment is not received within an allotted time period, the
sender assumes that the last data frame was lost in transit and sends it again.
Sliding-window ARQ

• Sliding-window ARQ is better than Stop and wait ARQ.


• In this strategy, the sender can send several frames.

Technical Focus: Procedure for Sliding-Window ARQ


 The sending device keeps copies of all transmitted frames until they have been
acknowledged.
 In addition to ACK frames, a receiver can return a NAK frame if the data have been
received damaged. The NAK frame tells the sender to retransmit a damaged frame.
 Like stop-and-wait ARQ, the sending device in sliding-window ARQ is equipped with
a timer to enable it to handle lost acknowledgments.
E. FLOW CONTROL
Flow control refers to a set of procedures used to restrict the amount of data the sender can
send before waiting for acknowledgment.
 The two methods we discussed for error control can actually provide flow control at the
same time.
o Stop and wait ARQ provides flow control because the frames are sent one by one.

92
Data communication and Computer networking
o Sliding-window ARQ provides flow control because the size of the sending
window can be matched to the size of the receiver buffer.
F. MEDIUM ACCESS CONTROL
• When computers use a shared medium (cable or air), there must be a method to control
access to the medium at any moment.
• If there is no rule to specify which vehicle has the right-of-way, there may be a conflict or
even a collision.
• To prevent this conflict or collision on a network, there is a need for a medium access
control (MAC) method.
• The use of a regulated method ensures that there is no conflict among the station.
Medium access methods

 Several methods for access control have been devised in the past.
 They can be divided into two broad categories.
Select

Poll

The poll/select method is mostly used in time-sharing systems when a central computer is
used to control other computers.
93
Data communication and Computer networking
Token passing network

Random Access
• To avoid access conflict or to resolve it when it does happen, each station follow
certain steps to access the medium:
1. The station checks to make sure the medium is idle. This is called carrier sense.
This is analogous to the rules in an assembly. If a person wants to speak, he must first
listen to make sure no one else is talking.
2. If the medium is idle, the station can send data.
3. Even through steps 1and steps 2 are followed, there is still a potential for collision.
• For example: two stations may be checking the medium at the same time;
neither senses that the medium is in use and both send at the same time.
• To avoid collision the sending stations can make a reservation for use of the
medium.
• To detect collision (and send the data again), the station need to continue
monitoring the medium.
 CSMA/CD
 CSMA/CA
Token passing is used mostly by local area networks (LANs).
CSMA/CD is used in the Ethernet LAN.
CSMA/CA is used in the wireless LANs.
DATA LINK PROTOCOLS
A data link protocol is a set of specifications used to implement the data link layer.
In a character-oriented protocol, the frame is interpreted as a series of characters. In a
bit-oriented protocol, the frame or packet is interpreted as a series of bits.
All bit-oriented protocols are related to high-level data link control (HDLC), a bit-
oriented protocol.

94
Data communication and Computer networking
Unit-13
NETWORK MODELS
Physical layer: (Digital, Analog, Transmission modes, Line configurationally, Duplicity)

Physical layer:
• Physical layer positioned between data link layer and transmission medium
• Give service to data link layer
• Physical layer must also take care of transmission medium
• Transmission medium is a passive entity; it has no internal program or logic for control
like other layers
Physical layer positioned between data link layer and transmission medium. Give service to
data link layer.
Physical layer is the bottom-most layer of the Internet Model and is responsible for the
interaction with the transmission media i.e. the physical part of the network which connects the
components together. As a result of this the layer is responsible for carrying information from
one node to the other.

Of the many tasks that are performed by the physical layer, one is to provide service to the data
link layer. This layer consists of 0s and 1s which are organized into frames and need to be
transmitted across the transmission medium. Thus the physical layer has to convert these binary
values into signals so that it can be transmitted. This layer also needs to decide the total number
of logical channels required for transmitting the data. It is so because the transmission medium
in itself is passive and can't decide the flow direction on its own.

Digital and analog


• Digital (discrete ) entity : constituting a separate entity
• Analog ( continuous) entity
• Data we use in data communication can also be digital data and analog data
Digital data
• A unit is stored in a computer memory as a combination of series of 0 and 1
• The data is digital because it is stored in separate symbols 0 and 1. We can always counts
how many bits are stored in memory of a computer
• Audio and video information, both are analog entities, must be converted to digital
format (digitized) before being stored in the memory of a computer.
Analog data
• Analog data is information that is continuous
• Audio and video are two examples of analog data. Analog disk were used before the
popularity of compact disk.

95
Data communication and Computer networking
Digital signal and analog signal
• Data must be transformed to electromagnetic energy (signal) to be acceptable to the
transmission media
• Just like data, signal can be digital and analog.
• Eg. A 1can be encoded as a positive voltage and a 0 as zero level of energy.
Bit interval and bit rate
• Bit interval is the time required to send one single bit.
• Bit rate is the number of bit intervals per second.
• Bit rate is usually expressed in bits per second (bps)
Units of bits rate

Analog signal
• Simple signal
• Composite signal

Difference between Analog and Digital Signal

Analog and Digital are the different forms of signals. Signals are used to carry information from
one device to another. Analog signal is a continuous wave that keeps on changing over a time
period. Digital signal is discrete in nature. The fundamental difference between analog and
digital signal is that analog signal is represented by the sine waves whereas, the digital signal is
represented by square waves.
Definition of Analog Signal
Analog signal is a kind of continuous wave form that changes over time. A simple analog signal
is a sine wave that cannot be decomposed further. An analog signal is described using
amplitude, period or frequency and phase. Amplitude marks the maximum height of the signal.
Frequency marks the rate at which signal is changing. Phase marks the position of the wave
with respect to time zero.

The range of value in an analog signal is not fixed.


96
Data communication and Computer networking
Definition of Digital Signal
Digital signals also carry information like analog signals but is somewhat is different from
analog signals. Digital signal is noncontiguous, discrete time signal. Digital signal carries
information or data in the binary form i.e. a digital signal represent information in the form of
bits. Each simple wave has different amplitude, frequency and phase. Digital signal is described
with bit rate and bit interval. Bit interval describes the time require for sending a single bit.

Digital signals are easier to transmit and are more reliable when compared to analog signals.
Digital signal has a finite range of values. The digital signal consists 0s and 1s.
Comparison Chart
BASIS FOR
ANALOG SIGNAL DIGITAL SIGNAL
COMPARISON

A digital signal is a discrete


An analog signal is a continuous wave
Basic wave that carries information in
that changes over a time period.
binary form.

An analog signal is represented by a sine A digital signal is represented


Representation
wave. by square waves.

An analog signal is described by the


A digital signal is described by
Description amplitude, period or frequency, and
bit rate and bit intervals.
phase.

Digital signal has a finite


Range Analog signal has no fixed range.
numbers i.e. 0 and 1.

An analog signal is more prone to A digital signal is less prone to


Distortion
distortion. distortion.

An analog signal transmits data in the A digital signal carries data in


Transmit
form of a wave. the binary form i.e. 0 and 1.

Signals used for transmission in


The human voice is the best example of
Example a computer are the digital
an analog signal.
signal.

97
Data communication and Computer networking
DATA TRANSMISSION
Data transmission refers to the process of transferring data between two or more digital devices.
Data is transmitted from one device to another in analog or digital format. Basically, data
transmission enables devices or components within devices to speak to each other.

Data is transferred in the form of bits between two or more digital devices. There are two
methods used to transmit data between digital devices:
A. Serial transmission and
B. Parallel transmission
Serial data transmission sends data bits one after another over a single channel. Parallel data
transmission sends multiple data bits at the same time over multiple channels.
A. SERIAL TRANSMISSION
When data is sent or received using serial data transmission, the data bits are organized in a
specific order, since they can only be sent one after another. The order of the data bits is
important as it dictates how the transmission is organized when it is received. It is viewed as a
reliable data transmission method because a data bit is only sent if the previous data bit has
already been received.

Example of Serial Data Transmission


Serial transmission has two classifications:

1. Asynchronous and
2. Synchronous

Asynchronous Serial Transmission


Data bits can be sent at any point in time. Stop bits and start bits are used between data bytes to
synchronize the transmitter and receiver and to ensure that the data is transmitted correctly. The
time between sending and receiving data bits is not constant, so gaps are used to provide time
between transmissions.
The advantage of using the asynchronous method is that no synchronization is required between
the transmitter and receiver devices. It is also a more cost effective method. A disadvantage is
that data transmission can be slower, but this is not always the case.

98
Data communication and Computer networking
In Asynchronous Transmission data flows in a half-duplex mode, 1 byte or a character at a
time. It transmits the data in a continuous stream of bytes. In general, the size of a character sent
is 8 bits to which a parity bit is added, i.e. a start and a stop bit that gives the total of 10 bits. It
does not require a clock for synchronization; rather it uses the parity bits to tell the receiver how
to interpret the data. These parity bits are known as start and stop bits which control the transfer
of data.

It uses character-based synchronization so that the receiving terminal could synchronize itself
with the receipt of data on a character. It is simple, fast, and economical and does not require a
2-way communication. Letters, emails, forums, televisions and radios are some of the
examples of Asynchronous Transmission. The voice-band channels that are of a narrow type
and operate on a slower speed are utilized in the asynchronous transfer. Here, the transmitting
device works manually or intermittently.

Synchronous Serial Transmission


Data bits are transmitted as a continuous stream in time with a master clock. The data
transmitter and receiver both operate using a synchronized clock frequency; therefore, start bits,
stop bits, and gaps are not used. This means that data moves faster and timing errors are less
frequent because the transmitter and receiver time is synced. However, data accuracy is highly
dependent on timing being synced correctly between devices. In comparison with asynchronous
serial transmission, this method is usually more expensive.
In Synchronous Transmission, data flows in a full-duplex mode in the form of blocks or
frames. Synchronization between the sender and receiver is necessary so that the sender knows
where the new byte starts (since there is no gap between the data). Therefore, each block of
characters is labeled with the synchronization characters and the receiving device acquires the
data until a special ending character is identified.

99
Data communication and Computer networking
Synchronous Transmission is efficient, reliable and is used for transferring a large amount of
data. It provides real-time communication between connected devices. Chat Rooms, Video
Conferencing, telephonic conversations, as well as face to face interactions, are some of the
examples of Synchronous Transmission.
The voice-band and broad-band channels are usually used in the synchronous transmission
modes as it provides a faster speed up to 1200 bps and serves the purpose of high data transfer
speed.
Difference between synchronous and asynchronous
Serial Transmission data is sent bit by bit, in such a way that each bit follows another. It is of
two types namely, Synchronous and Asynchronous Transmission. One of the major
differences is that in Synchronous Transmission, the sender and receiver should have
synchronized clocks before data transmission. Whereas Asynchronous Transmission does not
require a clock, but it adds a parity bit to the data before transmission.
Furthermore, the synchronous transmission uses synchronization characters while asynchronous
method employs start/stop bits, in order to alert the modem when data are being sent and when
these transmissions are completed are known as message characters.
Key Differences between Synchronous and Asynchronous Transmission
1. In Synchronous Transmission, data is transferred in the form of frames. On the other hand, in
Asynchronous Transmission data is transmitted 1 byte at a time.
2. Synchronous Transmission requires a clock signal between the sender and receiver so as to
inform the receiver about the new byte. In contrast, in Asynchronous Transmission sender
and receiver does not require a clock signal as the data sent here has a parity bit attached to it
which indicates the start of the new byte.
3. Data transfer rate of Asynchronous Transmission is slower than that of Synchronous
Transmission.
4. Asynchronous Transmission is simple and economical, whereas Synchronous Transmission
is complicated and expensive.
5. Synchronous Transmission is efficient and has lower overhead as compared to the
Asynchronous Transmission.
6. In asynchronous data transfer, the line is kept at a stable value (logic 1) if no data is
transmitted through the line. As against, in synchronous transfer, the end of the data is
indicated by the sync character(s). Further than the sync characters, the line can be either
high or low.
Conclusion
Both Synchronous and Asynchronous Transmission have their advantages and disadvantages.
Asynchronous is simple, economical and used for transmitting a small amount of data.
Conversely, Synchronous Transmission is used for transferring the bulk of data as it is efficient
and has less overhead. Hence, we conclude that both Synchronous and Asynchronous
Transmission are necessary for data transmission.
100
Data communication and Computer networking
Comparison Chart
BASIS FOR SYNCHRONOUS ASYNCHRONOUS
COMPARISON TRANSMISSION TRANSMISSION

Transmission starts with the block It uses start bit and stop bit
Meaning header which holds a sequence of preceding and following a
bits. character respectively.

Sends data in the form of blocks or Sends 1 byte or character at a


Transmission manner
frames time

Synchronization Present with the same clock pulse. Absent

Transmission Speed Fast Slow

Gap between the data Does not exist Exist

Cost Expensive Economical

Time Interval Constant Random

Implemented by Hardware and software Hardware only

Chat Rooms, Video Conferencing,


Examples Letters, emails, forums, etcetera.
Telephonic Conversations, etcetera.
When is serial transmission used to send data?
Serial transmission is normally used for long-distance data transfer. It is also used in cases
where the amount of data being sent is relatively small. It ensures that data integrity is
maintained as it transmits the data bits in a specific order, one after another. In this way, data
bits are received in-sync with one another.

B. PARALLEL TRANSMISSION
When data is sent using parallel data transmission, multiple data bits are transmitted over
multiple channels at the same time. This means that data can be sent much faster than using
serial transmission methods.

101
Data communication and Computer networking
Example of Parallel Data Transmission
Given that multiple bits are sent over multiple channels at the same time, the order in which a
bit string is received can depend on various conditions, such as proximity to the data source,
user location, and bandwidth availability. Two examples of parallel interfaces can be seen
below. In the first parallel interface, the data is sent and received in the correct order. In the
second parallel interface, the data is sent in the correct order, but some bits were received faster
than others.

Example of Parallel Transmission – Data Received Correctly

Example of Parallel Transmission – Data Received Incorrectly


Advantages and Disadvantages of Using Parallel Data Transmission
The main advantages of parallel transmission over serial transmission are:
 It is easier to program;
 And data is sent faster.
Although parallel transmission can transfer data faster, it requires more transmission channels
than serial transmission. This means that data bits can be out of sync, depending on transfer
distance and how fast each bit loads. A simple of example of where this can be seen is with a
voice over IP (VOIP) call when distortion or interference is noticeable. It can also be seen when
there is skipping or interference on a video stream.

When is parallel transmission used to send data?


Parallel transmission is used when:
 A large amount of data is being sent;
 The data being sent is time-sensitive;
 And the data needs to be sent quickly.

102
Data communication and Computer networking
A scenario where parallel transmission is used to send data is video streaming. When a video is
streamed to a viewer, bits need to be received quickly to prevent a video pausing or buffering.
Video streaming also requires the transmission of large volumes of data. The data being sent is
also time-sensitive as slow data streams result in poor viewer experience.

Differences between Serial and Parallel Transmission

a) Serial transmission requires a single line to send data. Parallel transmission requires
multiple lines to send data.
b) There are fewer errors and less noise in serial transmission, since the transmission is done
one bit at a time. There are more errors and noise in parallel transmission, since the
transmission is done multiple bits at a time.
c) Serial transmission is slower since data flows through a single line; conversely, parallel
transmission is faster since data flows through multiple lines.
d) Serial transmission is ‗full duplex‘ since the sender can send and receive data at the same
time. Parallel transmission is ‗half duplex‘ since the data can be sent or received at any
given time.
e) The cables used in serial transmission are thinner, longer, and more economical
compared to the cables used in parallel transmission.
f) Serial transmission is reliable and straightforward. Parallel transmission is unreliable and
complicated.

103
Data communication and Computer networking
TRANSMISSION MODE
A given transmission on a communications channel between two machines can occur in several
different ways. The transmission is characterized by:
 the direction of the exchanges
 the transmission mode: the number of bits sent simultaneously
 synchronization between the transmitter and receiver
Types of Transmission mode
 Simplex
 Half Duplex
 Full Duplex
Simplex
A simplex connection is a connection in which the data flows in only one direction, from the
transmitter to the receiver. This type of connection is useful if the data do not need to flow in
both directions (for example, from your computer to the printer or from the mouse to your
computer...).
Half Duplex
A half-duplex connection (sometimes called an alternating connection or semi-duplex) is a
connection in which the data flows in one direction or the other, but not both at the same time.
With this type of connection, each end of the connection transmits in turn. This type of
connection makes it possible to have bidirectional communications using the full capacity of the
line.
Full Duplex
A full-duplex connection is a connection in which the data flow in both directions
simultaneously. Each end of the line can thus transmit and receive at the same time, which
means that the bandwidth is divided in two for each direction of data transmission if the same
transmission medium is used for both directions of transmission.

104
Data communication and Computer networking
Comparison Chart
Basis for
Simplex Half Duplex Full Duplex
Comparison

Direction of Two-directional, one Two-directional,


Unidirectional
Communication at a time simultaneously

Sender can send and Sender can send and


Sender can only send
Send / Receive receive data, but one a receive data
data
time simultaneously

Worst performing mode Best performing mode of


Performance Better than Simplex
of transmission transmission

Example Keyboard and monitor Walkie-talkie Telephone


Line Configuration
Line configuration refers to the way two or more communication devices attached to a link.
Line configuration is also referred to as connection. A Link is the physical communication
pathway that transfers data from one device to another. For communication to occur, two
devices must be connected in same way to the same link at the same time.
There are two possible line configurations.
1. Point-to-Point.
2. Multipoint.
Point-to-Point
A Point to Point Line Configuration Provide dedicated link between two devices use actual
length of wire or cable to connect the two end including microwave & satellite link. Infrared
remote control & tvs remote control.
The entire capacity of the channel is reserved for transmission between those two devices. Most
point-to-point line configurations use an actual length of wire or cable to connect the two ends,
but other options, such as microwave or satellite links, are also possible.
Point to point network topology is considered to be one of the easiest and most conventional
network topologies. It is also the simplest to establish and understand. To visualize, one can
consider point to point network topology as two phones connected end to end for a two way
communication

105
Data communication and Computer networking
Multipoint Configuration
Multipoint Configuration also known as Multi drop line configuration one or more than
two specific devices share a single link capacity of the channel is shared.
More than two devices share the Link that is the capacity of the channel is shared now. With
shared capacity, there can be two possibilities in a Multipoint Line Config:
 Spatial Sharing: If several devices can share the link simultaneously, its called Spatially
shared line configuration
 Temporal (Time) Sharing: If users must take turns using the link , then its called
Temporally shared or Time Shared Line Configuration

106

You might also like