CN Unit 1 Notes for B.Tech Students
CN Unit 1 Notes for B.Tech Students
of Data Science
B.Tech III Yr I Sem
Computer Networks
Unit I Notes
UNIT - I:
Network Models: Layered Tasks, OSI model, Layers in the OSI model, TCP/IP protocol Suite,
Addressing.
Data Link Control: Error detection and Correction- Introduction, Hamming Distance, CRC, Checksum.
1. Bus Topology
2. Star Topology
3. Ring Topology
4. Tree Topology
5. Mesh Topology
6. Hybrid Topology
1. Bus Topology:
Also known as backbone network topology, this configuration connects all devices to a main cable
via drop lines.
In this topology, all computers connect through a single continuous coaxial cable. This cable is
known as the backbone cable.
Both ends of the backbone cable are terminated through the terminators. To connect a computer
to the backbone cable, a drop cable is used.
To connect the drop cable to the computer and backbone cable, the BNC plug and BNC T
connector are used respectively.
When a computer transmits data in this topology, all computers see that data over the wire, but
only that computer accepts the data to which it is addressed.
It is just like an announcement that is heard by all but answered only by the person to whom the
announcement is made.
For example, if in the above network, PC-A sends data to the PC-C then all computers of the
network receive this data but only the PC-C accepts it. The following image shows this process.
If PC-C replies, only the PC-A accepts the return data. The following image shows this process.
Advantages of Bus topology :
If N devices are connected to each other in bus topology, then the number of cables required to
connect them is 1, which is known as backbone cable and N drop lines are required.
Bus topologies are a good, cost-effective choice for smaller networks because the layout is simple,
allowing all devices to be connected via a single cable.
If needed, more nodes can be easily added to the network by joining additional cables.
Disadvantages of Bus Topology :
If the common cable fails, then the whole system will crash down, which can be time – consuming
and expensive .
However, because bus topologies use a single cable to transmit data, they’re somewhat vulnerable.
If the cable experiences a failure, the whole network goes down, which can be time-consuming and
expensive to restore, which can be less of an issue with smaller networks.
every additional node will slow transmission speeds.
Furthermore, data is “half-duplex,” which means it can’t be sent in two opposite directions at the
same time, so this layout is not the ideal choice for networks with huge amounts of traffic.
Note: This topology is no longer used. But there was a time when this topology used to be the first choice
among the network administrators.
2. Star Topology:
In this topology, all computers connect to a centralized networking device.
Usually, a networking switch or a Hub (in earlier days) is used as the centralized device. Each
computer in the network uses its own separate twisted pair cable to connect to the switch. Twisted
pair cable uses RJ-45 connectors on both ends.
3. Ring Topology:
In this topology, all computers connect in a circle.
Each computer directly connects to two other computers in the network.
Data moves down a one-way path from one computer to another.
When data signals pass from one computer to the next, each computer regenerates the signals.
Since the signals are regenerated on each passing computer, the quality of the signals remains
constant throughout the ring.
Transmission Modes:
Transmission mode refers to the mechanism of transferring of data between two devices
connected over a network.
It is also called Communication Mode.
These modes direct the direction of flow of information. There are three types of transmission
modes. They are:
1. Simplex Mode
2. Half duplex Mode
3. Full duplex Mode
Examples of Simplex
Example of half-duplex is Walkie- Example of the Full-duplex mode is a
mode are radio, keyboard,
Talkies. telephone network.
and monitor.
We can use different types of topologies through LAN, these are Star, Ring, Bus, Tree etc.
LAN can be a simple network like connecting two computers, to share files and network among
each other while it can also be as complex as interconnecting an entire building.
LAN networks are also widely used to share resources like printers, shared hard-drive etc.
Characteristics of LAN:
It is a private network, so an outside regulatory body never controls it.
LAN operates at a relatively higher speed compared to other WAN systems.
There are various kinds of media access control methods like token ring and ethernet.
Advantages of LAN:
Here are pros/benefits of using LAN:
Computer resources like hard-disks, DVD-ROM, and printers can share local area networks. This
significantly reduces the cost of hardware purchases.
You can use the same software over the network instead of purchasing the licensed software for
each client in the network.
Data of all network users can be stored on a single hard disk of the server computer.
You can easily transfer data and messages over networked computers.
It will be easy to manage data at only one place, which makes data more secure.
Local Area Network offers the facility to share a single internet connection among all the LAN
users.
Disadvantages of LAN:
Here are the important cons/ drawbacks of LAN:
LAN will indeed save cost because of shared computer resources, but the initial cost of installing
Local Area Networks is quite high.
The LAN admin can check personal data files of every LAN user, so it does not offer good
privacy.
Unauthorized users can access critical data of an organization in case LAN admin is not able to
secure centralized data repository.
Local Area Network requires a constant LAN administration as there are issues related to
software setup and hardware failures
2. Metropolitan Area Network (MAN):
It was developed in 1980s.
It is basically a bigger version of LAN.
It is also called MAN and uses the similar technology as LAN.
It is designed to extend over the entire city.
It can be means to connecting a number of LANs into a larger network or it can be a single cable.
It is mainly hold and operated by single private company or a public company.
Characteristics of MAN:
It mostly covers towns and cities in a maximum 50 km range
Mostly used medium is optical fibers, cables
Data rates adequate for distributed computing applications.
Advantages of MAN:
It offers fast communication using high-speed carriers, like fiber optic cables.
It provides excellent support for an extensive size network and greater access to WANs.
The dual bus in MAN network provides support to transmit data in both directions concurrently.
A MAN network mostly includes some areas of a city or an entire city.
Disadvantages of MAN
You need more cable to establish MAN connection from one place to another.
In MAN network it is tough to make the system secure from hackers.
Uses Of Metropolitan Area Network:
MAN is used in communication between the banks in a city.
It can be used in an Airline Reservation.
It can be used in a college within a city.
It can also be used for communication in the military.
3. Wide Area Network (WAN):
A Wide Area Network is a network that extends over a large geographical area such as states or
countries.
A Wide Area Network is quite bigger network than the LAN.
A Wide Area Network is not limited to a single location, but it spans over a large geographical
area through a telephone line, fibre optic cable or satellite links.
The internet is one of the biggest WAN in the world.
A Wide Area Network is widely used in the field of Business, government, and education.
Characteristics of WAN:
The software files will be shared among all the users; therefore, all can access to the latest files.
Any organization can form its global integrated network using WAN.
Advantages of WAN:
WAN helps you to cover a larger geographical area. Therefore business offices situated at longer
distances can easily communicate.
Contains devices like mobile phones, laptop, tablet, computers, gaming consoles, etc.
WLAN connections work using radio transmitters and receivers built into client devices.
Disadvantage of WAN:
The initial setup cost of investment is very high.
It is difficult to maintain the WAN network. You need skilled technicians and network
administrators.
There are more errors and issues because of the wide coverage and the use of different
technologies.
It requires more time to resolve issues because of the involvement of multiple wired and wireless
technologies.
Need a good firewall to restrict outsiders from entering and disrupting the network.
Setting up a network can be an expensive, slow and complicated. The bigger the network the more
expensive it is.
Once set up, maintaining a network is a full-time job which requires network supervisors and
technicians to be employed.
Security is a real issue when many different people have the ability to use information from other
computers. Protection against hackers and viruses adds more complexity and expense.
Transmission Media:
The transmission media is nothing but the physical media over which communication takes place
in computer networks.
Transmission media are the physical paths between a transmitter and a receiver.
It is a pathway or link that is used for transmitting data from the sender to the receiver.
These pathways are called Communication Channels.
There are two types of Transmission Media
Guided Media/ Wired Media/Bounded Media
Unguided Media/ Wireless Media/Unbounded Media
Guided Media:
Guided Media refers to those channels that allow the transmission of data through a physical
media.
Physical Media is Tangible Media
Tangible Media is media where wires can be touched and through these wires we can transfer
data between two computers or two devices.
So in guided media, we use wires and we transmit data.
Guided media is also known as Bounded Media because where all the wire passes, data also has to
pass through the wire. i.e., data is dependent on wire.
1. Twisted Pair Cable:
These cables are used in local telephone communication and short distance digital transmission.
It is made up of copper.
The pairs of wires are together to reduce the interference by adjacent wires.
Each pair is twisted to reduce the magnetic interference and Attenuation Noise and also prevents
the loss of data.
Out of these two wires, only one carries actual signal and another is used for ground reference.
The number of twists per unit length determines the quality of the cable.
2. Shielded Twisted Pair Cable:
2. Coaxial Cables:
Coaxial Cables consists of single copper wire surrounded by insulated material.
These cables are normally used at home to connect TVs and 72 channels travel at a time through
this cable.
These cables also transfer audio and video signals at the same time.
The data transmission rate of coaxial cables is higher than the twisted pair cables.
In Twisted pair cables only voice signals are sent, whereas in coaxial cables both audio and video
signals for over 100 channels are allowed to transfer.
It consists of a central copper wire surrounded by a PVC insulation material over which a sleeve
of copper mesh is placed. The metal sleeve is again shielded by an outer shield of thick PVC
material.
Advantages:
It can be used for long distances telephone lines for voice transmission at a very high frequency.
These cables coaxial cables carry signals to long distances and will not allow the signal's to
become weak.
So data gets transferred without any loss.
These cables are also used in LAN
The bandwidth of coaxial cables is 80 times more than twisted pair cables.
i.e., 80*9600bps=7680000bps.
3. Optical Fiber Cables:
In this type of transmission medium, data transfers in the form of light.
This is the fastest medium used to transfer data.
Data travels very fast in the form of light
Fiber optic cables consists of tubes of glass through which data is transmitted.
On the sending side there is a transmitter which converts the electric signals into light form and
travels across the cables and on the receiving side there are devices which will convert light form
into electric signals.
A normal fiber optic cable is a fiber of glass called the core (about the size of a human hair).
The core is surrounded by concentric layers of glass called cladding.
The transmission capacity using fiber optic cables is 26000 times faster than twisted pair cable.
Data transmission rate is 35 Tbps( Tera bits per sec). (36000000000000 bits per sec)
These cables are not affected by any interference. It has high level of security, error rate is very
low and high quality of data transmission.
In the diagram, the sending height is same as receiving height called the line of sight.
Microwave transmission depends highly upon the weather conditions and the frequency it is
using.
Satellite Communication:
The main problem with Microwave communication is that the curvature of earth, mountains and
other structures often block the line of sight.
Instead of antennas, satellites can be used to transmit microwave messages from one location to
another.
Here we are using microwaves, but we still not use towers. Instead we use a satellite to transfer
data from one place to another.
Earth stations either send or receive signals to or from the satellites.
The signals go from the earth station to the satellite and the satellite retransmits the data to
different earth stations.
In this way we can send data from any place to any other place.
Satellites rotates approximately 23300 miles above the earth in precise location.
Satellite Transmission stations that can both send and receive messages are known as earth
stations.
The transmission from earth station to satellite is known as Uplink and transmission from the
satellite to the earth station is known as Downlink.
Moon was used as a satellite in the early years of satellite transmission.
The time taken by a signal to reach the moon and back was about 2 seconds.
This time is called satellite delay and is still present in our satellite communication. Now it takes
only milliseconds.
The time taken for a message to travel from earth station to satellite and from satellite to earth
station is 500 milliseconds.
Advantages of Satellite Communication:
A large volume of data can be transmitted at a very high speed.
Transmission and reception costs are independent of the distance between two points
i.e., when data is sent to a building in your locality or to any other part of the world, the time and
cost is the same.
Different communication satellites are used to carry different kinds of information.
Some satellites are used for Television,
some satellites are used for Telephone
Some are used to transfer internet data etc.
Telephone calls, TV Channels, Internet, Military communications', Weather and radio stations
use these satellites for broadcasting.
Disadvantages of Satellite Communication:
The bad weather can severely affect the quality of transmission.
Because signals are in the form of waves and waves are in open air, bad weather will always effect
the quality, speed and data is received with noise.
Satellite transmission causes security problems because it is very easy to intercept the
transmission travelling through the air.
Its cost of transmission is very high
Satellite delay is still present in satellite communication.
Mobile communication:
It is radio based network that transmits data to and from the mobile computers.
Mobile computers are devices which you can use while you are in movement.
Here we use radio waves.
Radio waves pass through any obstacle. Suppose you are sitting in room and receiving call on
mobile, then you are receiving message in radio waves.
Surroundings like walls, buildings, Trees – data will pass through all of these.
OSI Reference Model: (******* long answer)
The OSI Reference Model was developed by the International Standards Organization (ISO) for
connecting open systems.
OSI stands for Open Systems Interconnection Reference Model. It was introduced in 1970’s.
An open system is a set of protocols that allows any two different systems to communicate
regardless of their underlying architecture.
The purpose of OSI model is to facilitate communication between different systems without
requiring changes to the logic of the underlying software and hardware
This model consists of seven separate but related layers namely, Physical Layer, Datalink Layer,
Network Layer, Transport Layer, Session Layer, Presentation Layer and the Application Layer.
Layering means decomposing the problem of building a network into more manageable
components (layers)
Advantage of layering is more modular design and easy to trouble shoot
every layer uses the services of the previous layer and provides the services for the next layer.
For eg. Layer 4 on the sending side uses the services of layer 3 (network layer) and provides the
services for layer 5 (session layer) and communicate with layer 4 (Transport layer) of the
receiving device.
Each layer in the sending machine adds additional (its own) information to the message it receives
from the layer just above it and passes the whole packet to the layer just below it, this information
is added either as headers or trailers (control data appended either at the beginning or at the end
of a data parcel).
generally headers are added to the message at layers 6, 5, 4, 3 and 2 whereas trailers are added at
layer 2
Functions of Layers:
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.
Ex: Application – Browsers, Skype Messenger etc.
**Application Layer is also called as Desktop Layer.
The functions of the Application layer are :
1. Network Virtual Terminal
2. FTAM-File transfer access and management
3. Mail Services
4. Directory Services
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 the header by the network layer.
The functions of the Network layer are :
1. Routing: The network layer protocols determine which route is suitable from source to
destination. This function of network layer is known as routing.
2. 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.
When we type a URL in web address and hit enter key, HTTP protocol finds that address and
delivers the requested contents or display error message if the requested contents are not
available.
Application layer does not define the application itself. It only defines the standards, services and
protocols that an application needs to connect with remote computer. The most common protocols
that work in this layer are HTTP, HTTPS, SNMP, NTP, SSH, FTP, TFTP, Telnet, DHCP and
DNS.
Transport layer:
This layer is also known as host-to-host layer. It provides logical connection between two hosts. Main
functions of this layer are following: -
• Segmentation
• Reliability
• Flow control
• Connection multiplexing
Segmentation
The process of breaking up large data file into smaller and identifiable pieces is known as
Segmentation and each piece produced in segmentation process is known as a segment.
For example, a host wants to send a 100Mb file over a 1Mbps connection.
Since a 100Mb file cannot be transferred over a 1Mbps connection, so it breaks the file in 100 or
more pieces.
Since a piece is less or equal in size of the connection, it can travel across the connection easily.
Destination host, upon receiving all the pieces, reassembles them back in original file. In this
example, the process of breaking file is the segmentation and each piece is a segment.
Segmentation enables a host to send and receive any size of data file over the any size of
connection.
Reliability
A connection is considered as reliable connection when it provides following services: -
• Recognize and resend the lost segments.
• Recognize the segment order and arrange segments in correct order.
• Detect the duplicate segments and drop the extra segments.
• TCP protocol provides all above services.
• It numbers and sequences each segment so that the remote host can put all segments back into
the original order.
• After transmitting the segments, it waits for an acknowledgement from remote host.
• If it doesn’t receive acknowledgement of any segments, it retransmits those segments.
• Some applications such as DHCP and DNS do not require reliability.
• If an application doesn’t require reliability, it usually uses UDP protocol to transmit the data.
• Since UDP doesn’t use the reliable connection, it doesn’t insert the information in each segment
header that is required in reliable connection.
• Without this information, header becomes much lighter than the header with this information.
• A segment with a lightweight header moves faster in the network than a heavier segment.
Flow control:
Flow control ensures that the remote host does not become overwhelmed by the source sending
too much segments at once.
There are two types of flow control; ready /not-ready signals and windowing.
Ready/not-ready signals
In this method, the destination sends ready and not-ready signals to the source. Based on these
signals, source controls the flow.
Destination sends a not-ready signal when its buffer fills up.
Upon receiving the not-ready signal, source stops sending more segments and waits for a ready
signal.
Once destination is ready to receive more segments, it sends a ready signal to the source.
Upon receiving the ready signal, source resumes data sending.
Windowing
In this method, source and destination first define a window size.
A window size is the number of segments that the source can send before receiving an
acknowledgement from the destination.
Once acknowledgement is received, source can send next batch of segments.
Internet or Network Layer
In original TCP/IP model, this layer is defined as Internet layer.
In updated version, it is renamed to the Network layer.
Main functions of this layer are addressing and routing.
For these functions, it uses IP protocol.
Addressing
In order to communicate with other hosts, every host in a network needs a unique address.
A unique address is the combination of two types of addresses; software address and hardware
address.
This layer provides software address. Software address is also known as IP address.
Routing
Just like postal service delivers packages in real world, routing service delivers data packets in
network.
It takes data packet from source, reads its destination address, finds destination in network and
delivers the packet to the destination host.
Routers are used for routing.
Just like post office filters and reroutes the package based on destination address, router checks
destination address in data packet and routes it through the best and the shortest path.
Link Layer (Data Link and Physical Layer)
This layer defines standards and protocols for data transmission and physical connectivity.
It also provides hardware addressing that is used to locate a device in local network.
Switching and connecting devices are the two main functions of this layer.
Switching
Broadly, switching is just like routing but it works with hardware address instead of the software
address.
Switches are used for switching. Besides switching, it also defines standards and protocols which
are used for physical connectivity.
In original TCP/IP model both functions are defined in a single layer; Link layer.
In updated version, both functions are defined separately. Functions and standards which are
directly related with physical transmission are defined in Physical layer while the functions and
standards which are indirectly related with physical transmission are defined in Data link layer.
In updated version, switching is defined in Data link layer while standards and protocols related
with physical transmission are defined in physical layer.
3.In OSI, the Transport layer guarantees the In TCP/IP, transport layer does not guarantee
delivery of packets delivery of packets. Still this model is more
reliable.
4.OSI model provides a clear distinction between TCP/IP doesn't have any clear distinguishing
interfaces, services, and protocols. points between services, interfaces, and protocols.
9.In the OSI model, the data link layer and In TCP, physical and data link are both combined
physical are separate layers. as a single host-to-network layer.
10.Presentation and Session Layers are available No such layers in this model
11. OSI uses the network layer to define routing TCP/IP uses only the Internet layer.
standards and protocols.
End of Unit 1