CS3591 Computer Networks Unit-01 Notes
CS3591 Computer Networks Unit-01 Notes
CS3591 Computer Networks Unit-01 Notes
CS3591
COMPUTER NETWORKS
UNIT-01
INTRODUCTION AND APPLICATION LAYER
Data Communication
• Data communication refers to the transfer or exchange of
digital data between two or more devices through a
communication channel or transmission medium such as a
cable, satellite, or wireless link.
1. Sender
2. Receiver
3. Communication medium
4. Message
5. Protocol
Methods of data transmission system
• Local Area Networks (LANs): A LAN connects computers over a relatively short
distance, allowing them to share data, files, and resources. For example, a LAN
may connect all the computers in an office building, school, or hospital. Typically,
LANs are privately owned and managed.
• Wireless Local Area Networks (WLANs): These networks use wireless technology,
such as Wi-Fi, to connect devices in a small geographic area.
Network Types
• Wireless Wide Area Networks (WWANs): These networks use wireless technology
to connect devices in a larger geographic area, such as a city or country.
• Cloud computing network: These networks use cloud infrastructure to provide on-
demand access to a shared pool of configurable computing resources.
Types of network topology
The arrangement of a network which comprises of nodes and connecting lines
via sender and receiver is referred as network topology. The various network
topologies are :
a) Mesh Topology
In mesh topology, every device is connected to another device via
particular channel.
(c)Bus Topology :
Bus topology is a network type in which every computer and network device is
connected to single cable. It transmits the data from one end to another in single
direction. No bi-directional feature is in bus topology.
A bus topology with shared backbone cable. The nodes are connected to the
channel via drop lines.
Advantages of this topology :
If the common cable fails, then the whole system will crash down.
If the network traffic is heavy, it increases collisions in the network.
(e)Tree Topology :
This topology is the variation of Star topology. This topology have
hierarchical flow of data
Star Topology: In this topology, all devices are connected to a central hub or switch. Data is
transmitted between devices through the hub or switch.
Ring Topology: In this topology, devices are connected in a circular pattern, with each device
connected to two other devices. Data is transmitted in one direction around the ring.
Mesh Topology: In this topology, every device is connected to every other device. This
provides redundancy and multiple paths for data to travel.
Tree Topology: In this topology, devices are arranged in a hierarchical structure, with parent
nodes and child nodes. Data is transmitted from parent nodes to child nodes and vice versa.
Hybrid Topology: This is a combination of two or more topologies. For example, a network
may use a combination of star and mesh topologies.
Types of network topology
Mesh topology
Star topology
High level of redundancy and fault Expensive and complex to set up and
Mesh
tolerance, good for large networks maintain
=>OSI model
=>TCP/IP protocol suite
OSI (Open Systems Interconnection) model
OSI (Open Systems Interconnection) model
Established in 1947, the International Standards Organization (ISO) is a
multinational body dedicated to worldwide agreement on international
standards. An ISO standard that covers all aspects of network
communications is the Open Systems Interconnection (OSI) model.
Seven
layers of
OSI model
OSI (Open Systems Interconnection) model
Each layer in the OSI model has a specific function, and communication
between layers is done through a set of protocols.
This allows for modularity and flexibility in the design of networks, as well
as ease of troubleshooting and updating.
• Network Layer: This layer provides routing and addressing of data packets.
It is responsible for the delivery of packets to their intended destinations.
OSI (Open Systems Interconnection) model
• Transport Layer: This layer ensures the reliable delivery of data
packets between devices. It provides flow control, error checking,
and congestion control.
• Application Layer: This layer is the highest layer in the OSI model. It
provides the interface between the application software and the network.
OSI (Open Systems Interconnection) model
• The OSI (Open Systems Interconnection) layers can be thought of as a series of
building blocks, each with a specific function, that work together to enable
communication between devices on a network.
• For example, you can think of the layers as the different parts of a skyscraper:
• The foundation (Physical Layer) provides the basic infrastructure, such as cables and
connectors, that supports the building.
• The first few floors (Data Link and Network Layers) are responsible for ensuring that
the right data gets to the right place within the building.
• The middle floors (Transport and Session Layers) manage the flow of people and
information between different parts of the building.
• The upper floors (Presentation and Application Layers) provide the services and
amenities that the occupants of the building use, such as elevators, security, and
The physical layer is responsible for movements of
individual bits from one hop (node) to the next.
The data link layer is responsible for moving
frames from one hop (node) to the next.
The network layer is responsible for the
delivery of individual packets from
the source host to the destination host.
The transport layer is responsible for the delivery
of a message from one process to another.
The session layer is responsible for dialog
control and synchronization.
The presentation layer is responsible for translation,
compression, and encryption.
The application layer is responsible for
providing services to the user. 2.25
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
OSI model
TCP/IP(Transfer Control Protocol/Internet
Protocol) Protocol suite
• The layers in the TCP/IP protocol suite do not exactly match
those in the OSI model. The original TCP/IP protocol suite was
defined as having four layers: host-to-network, internet,
transport, and application. However, when TCP/IP is
compared to OSI, we can say that the TCP/IP protocol suite is
made of five layers:
i. physical,
ii. data link,
iii. network,
iv. transport,
v. application.
TCP/IP Protocol suite
TCP/IP Protocol suite
TCP/IP Protocol suite
TCP/IP Protocol suite
TCP/IP Protocol suite
Difference between TCP/IP and OSI
TCP/IP and OSI model
WWW and its architecture
• The WWW today is a distributed client/server service, in which a client
using a browser can access a service using a server. However, the service
provided is distributed over many locations called sites.
Architecture of www
URL-Uniform Resource
Locator
Browser
Web Documents
• The documents in the WWW can be grouped into three broad
categories: static, dynamic, and active. The category is based
on the time at which the contents of the document are
determined.
Active document
Web Documents
Dynamic documents are sometimes referred to
as server-site dynamic documents.
The computer with physical address 10 is the sender, and the computer with physical
address 87 is the receiver.
Most local-area networks use a 48-bit (6-byte) physical address written as 12
hexadecimal digits; every byte (2 hexadecimal digits) is separated by a colon, as
shown below:
07:01:02:01:2C:4B
A 6-byte (12 hexadecimal digits) physical address.
IP Address
Although physical addresses change from hop to hop, logical and port addresses
remain the same from the source to destination.
HTTP
The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data
on the World Wide Web. HTTP functions as a combination of FTP and SMTP.
HTTP Transaction
HTTP
Request and response messages
27.62
HTTP
Request and status lines
27.63
Methods HTTP
Status codes
27.64
HTTP
Table 27.2 Status codes (continued)
27.65
HTTP
Figure 27.15 Header format
27.66
HTTP
27.67
HTTP
Table 27.4 Request headers
27.68
HTTP
27.69
HTTP
27.70
Email Protocols
Simple Mail Transfer Protocol (SMTP): SMTP is the most widely used email
protocol. It is used for sending email messages from one mail server to
another over the internet.
Post Office Protocol (POP): POP is used for retrieving email messages from a
remote server. POP3 is the most commonly used version of POP.
1. Email sending process: When an email is sent using SMTP, the message is first submitted to the sender's
email server. The server then uses SMTP to send the message to the recipient's email server. If the
recipient is not on the same server, the message may be relayed through multiple servers before it reaches
its final destination.
2. Port number: SMTP uses port number 25 by default, but many ISPs and email service providers now
require the use of alternate ports, such as 587, to prevent spam and other email-related issues.
3. Security: SMTP does not provide any inherent security measures and messages can be intercepted and
read by third parties. To address this issue, SMTP can be combined with encryption protocols such as
Transport Layer Security (TLS) to secure the communication between email servers.
4. SMTP commands: SMTP uses a set of commands to communicate between email servers. Examples of
SMTP commands include HELO (used to initiate the SMTP connection), MAIL FROM (used to specify the
sender's email address), and RCPT TO (used to specify the recipient's email address).
5. SMTP errors: SMTP uses a series of error codes to indicate if a message was successfully delivered or if
an error occurred during transmission. Examples of SMTP error codes include 550 (indicates that the email
address is not valid), 421 (indicates that the server is busy or unavailable), and 250 (indicates that the
message was successfully delivered).
Overall, SMTP plays a critical role in the email communication process and has been instrumental in enabling
the rapid transmission of email messages over the internet.
POP3 (Post Office Protocol version 3) is a protocol used for retrieving email messages from a
remote server. Here are some key insights into POP3:
1. Email retrieval process: When an email client uses POP3 to retrieve email messages, it
establishes a connection with the email server and downloads all of the messages that are
stored on the server.
2. Port number: POP3 uses port number 110 by default, but many email service providers now
require the use of alternate ports, such as 995, to prevent spam and other email-related
issues.POP3 can also be used with Secure Sockets Layer (SSL) encryption, which uses port
number 995.
3. Security: POP3 does not provide any inherent security measures and messages can be
intercepted and read by third parties. To address this issue, POP3 can be combined with
encryption protocols such as SSL or Transport Layer Security (TLS) to secure the
communication between email clients and servers.
4. POP3 commands: POP3 uses a set of commands to communicate between email clients and
servers. Examples of POP3 commands include USER (used to specify the user's email
address), PASS (used to specify the user's password), and LIST (used to list the email
messages stored on the server).
5. Email retention: POP3 allows email messages to be retained on the server after they are
downloaded. This can be useful for accessing email messages from multiple devices, but it
can also lead to storage capacity issues on the email server.
IMAP (Internet Message Access Protocol) is a protocol used for retrieving email messages from a
remote server. Here are some key insights into IMAP:
1. Email retrieval process: When an email client uses IMAP to retrieve email messages, it establishes a
connection with the email server and displays a list of the messages that are stored on the server. The
messages remain on the server until the user explicitly deletes them.
2. Port number: IMAP uses port number 143 by default, but many email service providers now require the
use of alternate ports, such as 993, to prevent spam and other email-related issues. IMAP can also be
used with Secure Sockets Layer (SSL) encryption, which uses port number 993.
3. Security: IMAP provides inherent security measures, including authentication mechanisms to ensure
that only authorized users can access email messages. It can also be combined with encryption protocols
such as SSL or Transport Layer Security (TLS) to secure the communication between email clients and
servers.
4. IMAP commands: IMAP uses a set of commands to communicate between email clients and servers.
Examples of IMAP commands include SELECT (used to select a specific email folder), FETCH (used to
retrieve a specific email message), and STORE (used to modify the flags associated with an email
message).
5. Email synchronization: IMAP allows email messages to be synchronized between the email client and
the server. This means that if a message is deleted from the email client, it will also be deleted from the
server. Likewise, if a message is marked as read on the email client, it will also be marked as read on the
server.
MIME (Multipurpose Internet Mail Extensions) is a protocol used for encoding and transmitting
email messages that contain multimedia content such as images, audio, and video. Here are
some key insights into MIME:
1. Content types: MIME allows email messages to contain multiple types of content, including
plain text, HTML, images, audio, and video. Each content type is identified by a unique
content type identifier, such as "text/plain" for plain text or "image/jpeg" for JPEG images.
2. Message structure: MIME uses a hierarchical structure to organize email messages, with a
main message body that can contain multiple sub-parts. Each sub-part can have its own
content type, content encoding, and other metadata.
3. Content encoding: MIME allows email messages to be encoded using a variety of encoding
methods, including base64, quoted-printable, and 8-bit. These encoding methods are used
to ensure that the email message can be transmitted over the internet without being
corrupted or altered.
5. Compatibility: MIME is widely supported by email clients and servers, making it a preferred
method for transmitting multimedia content over email. However, some older email clients
may not be able to handle certain MIME content types, and some email service providers
may impose size limits on email messages that contain large attachments.
DNS (Domain Name System) is a system used to translate human-readable domain names, such as
www.example.com, into IP addresses that computers can use to locate and communicate with servers on the
internet. Here are some key insights into DNS:
1. Hierarchical structure: DNS uses a hierarchical structure to organize domain names, with the root domain at
the top, followed by top-level domains (TLDs) such as .com, .org, and .net. Each domain can have subdomains,
such as www.example.com or mail.example.com.
2. Name servers: DNS uses name servers to store and manage information about domain names and their
associated IP addresses. There are two types of name servers: authoritative name servers, which store the
official records for a domain name, and recursive name servers, which perform lookups on behalf of clients and
cache the results for faster access.
3. DNS resolution process: When a user types a domain name into a web browser or other application, the
application sends a request to a recursive name server, which begins the process of resolving the domain
name. The recursive name server queries the authoritative name server for the domain name, and if the
information is not already cached, it continues querying other name servers until it obtains the IP address for
the domain name.
4. DNS records: DNS uses various types of records to store information about domain names and their associated
IP addresses, including A records, which map domain names to IPv4 addresses, and AAAA records, which map
domain names to IPv6 addresses. Other types of records include MX records, which specify the email server for
a domain, and TXT records, which can be used for various purposes such as domain verification or SPF (Sender
Policy Framework) authentication.
5. Security: DNS is vulnerable to various types of attacks, such as DNS spoofing or DNS hijacking, which can result
in users being directed to malicious websites or email servers. To address these issues, DNS security protocols
such as DNSSEC (DNS Security Extensions) and DNS-over-HTTPS (DoH) have been developed to provide
encryption and authentication for DNS queries.
SNMP (Simple Network Management Protocol) is a protocol used to manage and monitor network devices
such as routers, switches, and servers. Here are some key insights into SNMP:
1. Agent and manager: SNMP is based on a client-server model, with network devices running an SNMP
agent that provides information about their status and performance, and a central management station
running an SNMP manager that collects and analyzes this information.
2. Management information base (MIB): SNMP uses a hierarchical structure to organize information about
network devices, known as the MIB. The MIB contains a set of objects, each of which is identified by an
Object Identifier (OID) and provides information about a specific aspect of the device's operation, such
as CPU usage or network traffic.
3. Get, set, and trap: SNMP uses three types of messages to communicate between the agent and
manager. Get requests are used by the manager to retrieve information from the agent, set requests are
used to modify configuration settings on the agent, and trap messages are used by the agent to notify
the manager of specific events or alarms.
4. Versions: SNMP has undergone several revisions, with the most widely used versions being SNMPv1,
SNMPv2c, and SNMPv3. SNMPv1 and SNMPv2c use community strings for authentication and are
vulnerable to security attacks such as eavesdropping and spoofing. SNMPv3 introduces stronger security
features such as message encryption and user authentication.
5. Applications: SNMP is used in a variety of applications, such as network monitoring and troubleshooting,
performance analysis, and capacity planning. SNMP can be integrated with other network management
systems such as syslog, which is used for collecting and analyzing log data from network devices.
Simple Mail Transfer Protocol Internet Message Access Protocol
• While a router sends information between networks, a switch sends information between
nodes in a single network.
• When discussing computer networks, ‘switching’ refers to how data is transferred between
devices in a network.
Types of switching:
ii. Packet switching involves breaking down data into independent components called packets
which, because of their small size, make fewer demands on the network. The packets travel
through the network to their end destination.
iii. Message switching sends a message in its entirety from the source node, traveling from
switch to switch until it reaches its destination node.
Important terms and concepts
5. Ports: A port identifies a specific connection between
network devices. Each port is identified by a number.
2. HTTP: Hypertext Transfer Protocol, a protocol for transmitting web pages and other
information over the Internet.
3. FTP: File Transfer Protocol, a protocol for transferring files between computers over a network.
4. SMTP: Simple Mail Transfer Protocol, a protocol for sending and receiving email messages over
the Internet.
6. DNS: Domain Name System, a protocol for converting domain names into IP addresses.
7. VPN: Virtual Private Network, a secure network that uses a public network (the Internet) to
connect remote sites or users.
Suggested Analogy
1. Postal system analogy: Compare a computer network to a postal system, with packets of data
as letters and routers as post offices.
2. Highway analogy: Compare the flow of data on a network to cars on a highway, with routers as
traffic lights.
3. City map analogy: Compare the structure of a network to a city map, with devices as buildings
and connections as roads.
4. Party invitations: Use the analogy of sending party invitations to explain how data is
transmitted over a network, with IP addresses as addresses on the invitation.
5. Film production analogy: Compare the process of transmitting data over a network to the
process of producing a film, with devices as crew members and data as the film.
2. Physical layer: transmission media, signal encoding, error detection and correction, and
multiplexing techniques.
3. Data link layer: framing, error detection and correction, flow control, and access control.
6. Application layer: client-server architecture, DNS, HTTP, FTP, SMTP, and other network
applications.