0% found this document useful (0 votes)
24 views30 pages

Unit 1 Networking-1

The document provides an overview of computer networks, defining them as interconnected devices that share resources and communicate through various technologies. It details the components of networks, including NICs, hubs, switches, routers, and modems, as well as the different types of networks: LAN, MAN, and WAN, along with their characteristics. Additionally, it introduces the OSI model, outlining its seven layers and their respective functions in data transmission and network communication.

Uploaded by

Arbaz Yousuf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views30 pages

Unit 1 Networking-1

The document provides an overview of computer networks, defining them as interconnected devices that share resources and communicate through various technologies. It details the components of networks, including NICs, hubs, switches, routers, and modems, as well as the different types of networks: LAN, MAN, and WAN, along with their characteristics. Additionally, it introduces the OSI model, outlining its seven layers and their respective functions in data transmission and network communication.

Uploaded by

Arbaz Yousuf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

1 CK

Unit 1:
What is a Computer Network?
o Computer Network is a group of computers connected with each other
through wires, optical fibres or optical links so that various devices can interact
with each other through a network.
o The aim of the computer network is the sharing of resources among various
devices.
o In the case of computer network technology, there are several types of networks
that vary from simple to complex level .

Components Of Computer Network:

Major components of a computer network are:


NIC(National interface card)
NIC is a device that helps the computer to communicate with another device. The network interface
card contains the hardware addresses, the data-link layer protocol use this address to identify the
system on the network so that it transfers the data to the correct destination.

There are two types of NIC: wireless NIC and wired NIC.

o Wireless NIC: All the modern laptops use the wireless NIC. In Wireless NIC, a connection is
made using the antenna that employs the radio wave technology.
o Wired NIC: Cables use the wired NIC to transfer the data over the medium.
2 CK

Hub
Hub is a central device that splits the network connection into multiple devices. When computer
requests for information from a computer, it sends the request to the Hub. Hub distributes this
request to all the interconnected computers.

Switches
Switch is a networking device that groups all the devices over the network to transfer the data to
another device. A switch is better than Hub as it does not broadcast the message over the network,
i.e., it sends the message to the device for which it belongs to. Therefore, we can say that switch
sends the message directly from source to the destination.

Cables and connectors


Cable is a transmission media that transmits the communication signals. There are three types of
cables:

o Twisted pair cable: It is a high-speed cable that transmits the data over 1Gbps or more.
o Coaxial cable: Coaxial cable resembles like a TV installation cable. Coaxial cable is more
expensive than twisted pair cable, but it provides the high data transmission speed.
o Fibre optic cable: Fibre optic cable is a high-speed cable that transmits the data using light
beams. It provides high data transmission speed as compared to other cables. It is more
expensive as compared to other cables, so it is installed at the government level.

Router
Router is a device that connects the LAN to the internet. The router is mainly used to connect the
distinct networks or connect the internet to multiple computers.

Modem
Modem connects the computer to the internet over the existing telephone line. A modem is not
integrated with the computer motherboard. A modem is a separate part on the PC slot found on the
motherboard.
3 CK

Computer network :Definitions:


• Computer Network is a group of computers connected with each other through wires,
optical fibres or optical links so that various devices can interact with each other through
a network.
The aim of the computer network is the sharing of resources among various devices.

• Computer networking refers to interconnected computing devices that can exchange data
and share resources with each other. These networked devices use a system of rules,
called communications protocols, to transmit information over physical or wireless
technologies.

• A computer network is a collection of computers or devices connected to share resources.


Any device which can share or receive the data is called a Node.

Goals Of Computer Network


Resource sharing: Resource sharing is the sharing of resources such as programs, printers,
and data among the users on the network without the requirement of the physical location
of the resource and user.

High Reliability – If there are alternate sources of supply, all files could be replicated on
two or more machines. If one of them is not available, due to hardware failure, the other
copies could be used.

Inter-process Communication – Network users, located geographically apart, may


converse in an interactive session through the network. In order to permit this, the network
must provide almost error-free communications.

Flexible access – Files can be accessed from any computer in the network. The project can
be begun on one computer and finished on another.

Security– Computer networks must be secure to protect against unauthorized access, data
breaches, and other security threats.

Performance– Computer networks must provide high performance and low latency to
ensure that applications and services are responsive and available when needed. This
requires optimizing network infrastructure, bandwidth utilization, and traffic management.
4 CK

Scalability- Computer networks must be designed to scale up or down as needed to


accommodate changes in the number of users, devices, and data traffic. This requires careful
planning and management to ensure the network can meet current and future needs.
• Other goals include Distribution of processing functions, Centralized management, and
allocation of network resources, Compatibility of dissimilar equipment and software,
Good network performance, Scalability, Saving money, Access to remote information,
Person to person communication, etc.

LAN, MAN & WAN architectures

LAN
LAN (Local Area Network) is defined as a computer network that is responsible for
connecting local areas like schools, residents, universities, etc. The main function of
the local area networks is to link the computers, thereby providing access to the
printers, photocopies, and other services. LAN has client-server architecture.

There are two types of LAN,


i.e., peer-to-peer LAN and client/ service LAN.

• All these networks are connected to one central security database.


• It is interesting to note that LAN has wired networks, and all the computers and
printers are connected through these wires.
• A LAN is used as an exclusive network for organizations, schools, universities, etc.
One of the major examples of LAN is the computers in school.
• All the computers are connected through wires with one central database.

MAN
• A MAN, also called the Metropolitan Area Network, is defined as the computer
network that joins the metropolitan areas. MAN works either through wires/ cables
or modem.
5 CK

• Telephone company network is a common example of MAN as they provide high-


speed DSL line to the consumers.
• The main characteristic of MAN is that it is the interconnection between several
links/ networks in a metropolitan area.
• Point-to-point connections are used in MAN.
• The network size of MAN ranges from 5-50 Kms.
• The regional sources are often shared in MAN.
• It is interesting to note that MAN is either owned by a group or by a network
provider.
• Therefore, the metropolitan area network is not that expensive. The setup is quite
easy, and the internet speed is relatively high. Thus, the implementation cost is
saved in MAN.

WAN
A WAN, also called the Wide Area Network, is defined as a telecommunications
network that extends over a large area. The primary purpose of WAN is computer
networking. The networks are linked to communicate with one another.

• WAN is not associated with a particular location. It helps in communication and


sharing the required information among the connections.
• WAN is the largest network as compared to MAN and LAN.
• A WAN may cover a country, continent, etc. Examples of WAN include broadband
services, 3G or 4G connections, etc.
• Some of the advantages of WAN are that it covers a larger geographical area, the
software, resources, and other information is shared, has a high bandwidth, the
travel charges are reduced, etc.

Now, there are certain contrasting points between LAN, MAN, and WAN. So,
let us have a look at them.

S.NO. LAN MAN WAN

1. LAN is defined as a On the other hand, On the other hand, WAN is


computer network MAN is defined as a defined as the
that links the local computer network telecommunications
areas like schools, that links the network that covers a large
universities, metropolitan areas. geographical area.
organizations, etc.
6 CK

2. The full form of the The full form of The full form of WAN is a
LAN is Local Area MAN is Wide Area Network.
Network. Metropolitan Area
Network.

3. LAN is a wired The connections in The network of WAN is


network, i.e., all the MAN are connected connected through
computers and through modem or broadband services, 3G or
printers are connected cables/ wires. 4G internet services, etc.
through wires.

4. The ownership of LAN The ownership of The ownership of WAN


is private. MAN might be might be private or public.
public or private.

5. The internet speed of The sped of MAN is The speed of WAN is


LAN is very high, i.e., moderate, i.e., 44- relatively less than MAN
1000 Mbps. 155 Mbps. and LAN, i.e., 150 Mbps.

6. The maintenance cost The maintenance The maintenance cost of


of LAN is easy. cost of MAN is WAN is difficult.
difficult.

7. The bandwidth of LAN The bandwidth of The bandwidth of WAN is


is high. MAN is less. relatively low.

8. Examples: Examples: Examples:


o College o City o Broadband and
o School o Building internet throughout
o University the country or
continent.
o Hospital

Characteristics of LAN
1. It is a network owned by a private owner.
2. Personal computers, printers, etc., are connected through LAN.
3. LANs are very easy to design and troubleshoot.
4. A central database is used to connect the LAN networks.
7 CK

5. The data transfer rate of LAN is 10 Gbits/s.


6. LANs are limited to local areas.

Characteristics of MAN
1. MAN is a larger network than LAN.
2. The geographical area covered is larger than LAN.
3. MAN generally covers a city. The television network is the prime example of
MAN.
4. Two or more computers are connected through this network.

Characteristics of WAN
1. The largest area, like a country, is covered by WAN.
2. Different metropolitan countries are linked through the telecommunications
network.
3. WAN may be interconnected in and around the world.
4. The connection between the networks is established through telephone lines or
satellites.

OSI Model
o OSI stands for Open System Interconnection is a reference model that describes how
information from a software application in one computer moves through a physical medium
to the software application in another computer.
o OSI consists of seven layers, and each layer performs a particular network function.
o OSI model was developed by the International Organization for Standardization (ISO) in 1984,
and it is now considered as an architectural model for the inter-computer communications.
o OSI model divides the whole task into seven smaller and manageable tasks. Each layer is
assigned a particular task.
o Each layer is self-contained, so that task assigned to each layer can be performed
independently.
8 CK

Characteristics of OSI Model:

o The OSI model is divided into two layers: upper layers and lower layers.
o The upper layer of the OSI model mainly deals with the application related issues, and they
are implemented only in the software. The application layer is closest to the end user. Both
the end user and the application layer interact with the software applications. An upper layer
refers to the layer just above another layer.
o The lower layer of the OSI model deals with the data transport issues. The data link layer and
the physical layer are implemented in hardware and software. The physical layer is the lowest
layer of the OSI model and is closest to the physical medium. The physical layer is mainly
responsible for placing the information on the physical medium.

7 Layers of OSI Model


There are the seven OSI layers. Each layer has different functions. A list of seven layers are given
below:

1. Physical Layer
2. Data-Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
9 CK

1) Physical layer

o The main functionality of the physical layer is to transmit the individual bits from one node
to another node.
o It is the lowest layer of the OSI model.
o It establishes, maintains and deactivates the physical connection.
o It specifies the mechanical, electrical and procedural network interface specifications.

Functions of a Physical layer:

o Line Configuration: It defines the way how two or more devices can be connected physically.
o Data Transmission: It defines the transmission mode whether it is simplex, half-duplex or
full-duplex mode between the two devices on the network.
o Topology: It defines the way how network devices are arranged.
o Signals: It determines the type of the signal used for transmitting the information.

2) Data-Link Layer
10 CK

o This layer is responsible for the error-free transfer of data frames.


o It defines the format of the data on the network.
o It provides a reliable and efficient communication between two or more devices.
o It is mainly responsible for the unique identification of each device that resides on a local
network.
o It contains two sub-layers:
o Logical Link Control Layer
o It is responsible for transferring the packets to the Network layer of the receiver
that is receiving.
o It identifies the address of the network layer protocol from the header.
o It also provides flow control.
o Media Access Control Layer
o A Media access control layer is a link between the Logical Link Control layer and
the network's physical layer.
o It is used for transferring the packets over the network.

Functions of the Data-link layer

o Framing: The data link layer translates the physical's raw bit stream into packets known as
Frames. The Data link layer adds the header and trailer to the frame. The header which is
added to the frame contains the hardware destination and source address.

o Physical Addressing: The Data link layer adds a header to the frame that contains a
destination address. The frame is transmitted to the destination address mentioned in the
header.
o Flow Control: Flow control is the main functionality of the Data-link layer. It is the technique
through which the constant data rate is maintained on both the sides so that no data get
corrupted. It ensures that the transmitting station such as a server with higher processing
speed does not exceed the receiving station, with lower processing speed.
o Error Control: Error control is achieved by adding a calculated value CRC (Cyclic Redundancy
Check) that is placed to the Data link layer's trailer which is added to the message frame
before it is sent to the physical layer. If any error seems to occurr, then the receiver sends the
acknowledgment for the retransmission of the corrupted frames.
o Access Control: When two or more devices are connected to the same communication
channel, then the data link layer protocols are used to determine which device has control
over the link at a given time.
11 CK

3) Network Layer

o It is a layer 3 that manages device addressing, tracks the location of devices on the network.
o It determines the best path to move data from source to the destination based on the network
conditions, the priority of service, and other factors.
o The Data link layer is responsible for routing and forwarding the packets.
o Routers are the layer 3 devices, they are specified in this layer and used to provide the routing
services within an internetwork.
o The protocols used to route the network traffic are known as Network layer protocols.
Examples of protocols are IP and Ipv6.

Functions of Network Layer:

o Internetworking: An internetworking is the main responsibility of the network layer. It


provides a logical connection between different devices.
o Addressing: A Network layer adds the source and destination address to the header of the
frame. Addressing is used to identify the device on the internet.
o Routing: Routing is the major component of the network layer, and it determines the best
optimal path out of the multiple paths from source to the destination.
o Packetizing: A Network Layer receives the packets from the upper layer and converts them
into packets. This process is known as Packetizing. It is achieved by internet protocol (IP).

4) Transport Layer
12 CK

o The Transport layer is a Layer 4 ensures that messages are transmitted in the order in which
they are sent and there is no duplication of data.
o The main responsibility of the transport layer is to transfer the data completely.
o It receives the data from the upper layer and converts them into smaller units known as
segments.
o This layer can be termed as an end-to-end layer as it provides a point-to-point connection
between source and destination to deliver the data reliably.

The two protocols used in this layer are:

o Transmission Control Protocol


o It is a standard protocol that allows the systems to communicate over the internet.
o It establishes and maintains a connection between hosts.
o When data is sent over the TCP connection, then the TCP protocol divides the data
into smaller units known as segments. Each segment travels over the internet using
multiple routes, and they arrive in different orders at the destination. The transmission
control protocol reorders the packets in the correct order at the receiving end.
o User Datagram Protocol
o User Datagram Protocol is a transport layer protocol.
o It is an unreliable transport protocol as in this case receiver does not send any
acknowledgment when the packet is received, the sender does not wait for any
acknowledgment. Therefore, this makes a protocol unreliable.

Functions of Transport Layer:

o Service-point addressing: Computers run several programs simultaneously due to this


reason, the transmission of data from source to the destination not only from one computer
to another computer but also from one process to another process. The transport layer adds
the header that contains the address known as a service-point address or port address. The
responsibility of the network layer is to transmit the data from one computer to another
computer and the responsibility of the transport layer is to transmit the message to the
correct process.
o Segmentation and reassembly: When the transport layer receives the message from the
upper layer, it divides the message into multiple segments, and each segment is assigned
with a sequence number that uniquely identifies each segment. When the message has
arrived at the destination, then the transport layer reassembles the message based on their
sequence numbers.
o Connection control: Transport layer provides two services Connection-oriented service and
connectionless service. A connectionless service treats each segment as an individual packet,
13 CK

and they all travel in different routes to reach the destination. A connection-oriented service
makes a connection with the transport layer at the destination machine before delivering the
packets. In connection-oriented service, all the packets travel in the single route.
o Flow control: The transport layer also responsible for flow control but it is performed end-
to-end rather than across a single link.
o Error control: The transport layer is also responsible for Error control. Error control is
performed end-to-end rather than across the single link. The sender transport layer ensures
that message reach at the destination without any error.

5) Session Layer

o It is a layer 3 in the OSI model.


o The Session layer is used to establish, maintain and synchronizes the interaction between
communicating devices.

Functions of Session layer:

o Dialog control: Session layer acts as a dialog controller that creates a dialog between two
processes or we can say that it allows the communication between two processes which can
be either half-duplex or full-duplex.
o Synchronization: Session layer adds some checkpoints when transmitting the data in a
sequence. If some error occurs in the middle of the transmission of data, then the transmission
will take place again from the checkpoint. This process is known as Synchronization and
recovery.

6) Presentation Layer
14 CK

o A Presentation layer is mainly concerned with the syntax and semantics of the information
exchanged between the two systems.
o It acts as a data translator for a network.
o This layer is a part of the operating system that converts the data from one presentation
format to another format.
o The Presentation layer is also known as the syntax layer.

Functions of Presentation layer:

o Translation: The processes in two systems exchange the information in the form of character
strings, numbers and so on. Different computers use different encoding methods, the
presentation layer handles the interoperability between the different encoding methods. It
converts the data from sender-dependent format into a common format and changes the
common format into receiver-dependent format at the receiving end.
o Encryption: Encryption is needed to maintain privacy. Encryption is a process of converting
the sender-transmitted information into another form and sends the resulting message over
the network.
o Compression: Data compression is a process of compressing the data, i.e., it reduces the
number of bits to be transmitted. Data compression is very important in multimedia such as
text, audio, video.

7) Application Layer

o An application layer serves as a window for users and application processes to access network
service.
o It handles issues such as network transparency, resource allocation, etc.
o An application layer is not an application, but it performs the application layer functions.
o This layer provides the network services to the end-users.
15 CK

Functions of Application layer:

o File transfer, access, and management (FTAM): An application layer allows a user to access
the files in a remote computer, to retrieve the files from a computer and to manage the files
in a remote computer.
o Mail services: An application layer provides the facility for email forwarding and storage.
o Directory services: An application provides the distributed database sources and is used to
provide that global information about various objects.

TCP/IP model
o The TCP/IP model was developed prior to the OSI model.
o The TCP/IP model is not exactly similar to the OSI model.
o The TCP/IP model consists of five layers: the application layer, transport layer, network layer,
data link layer and physical layer.
o The first four layers provide physical standards, network interface, internetworking, and
transport functions that correspond to the first four layers of the OSI model and these four
layers are represented in TCP/IP model by a single layer called the application layer.
o TCP/IP is a hierarchical protocol made up of interactive modules, and each of them provides
specific functionality.

Here, hierarchical means that each upper-layer protocol is supported by two or more lower-level
protocols.

Functions of TCP/IP layers:


16 CK

Network Access Layer

o A network layer is the lowest layer of the TCP/IP model.


o A network layer is the combination of the Physical layer and Data Link layer defined in the
OSI reference model.
o It defines how the data should be sent physically through the network.
o This layer is mainly responsible for the transmission of the data between two devices on the
same network.
o The functions carried out by this layer are encapsulating the IP datagram into frames
transmitted by the network and mapping of IP addresses into physical addresses.
o The protocols used by this layer are ethernet, token ring, FDDI, X.25, frame relay.

Internet Layer

o An internet layer is the second layer of the TCP/IP model.


o An internet layer is also known as the network layer.
o The main responsibility of the internet layer is to send the packets from any network, and
they arrive at the destination irrespective of the route they take.

Following are the protocols used in this layer are:

IP Protocol: IP protocol is used in this layer, and it is the most significant part of the entire TCP/IP
suite.

Following are the responsibilities of this protocol:

o IP Addressing: This protocol implements logical host addresses known as IP addresses. The
IP addresses are used by the internet and higher layers to identify the device and to provide
internetwork routing.
o Host-to-host communication: It determines the path through which the data is to be
transmitted.
o Data Encapsulation and Formatting: An IP protocol accepts the data from the transport
layer protocol. An IP protocol ensures that the data is sent and received securely, it
encapsulates the data into message known as IP datagram.
o Fragmentation and Reassembly: The limit imposed on the size of the IP datagram by data
link layer protocol is known as Maximum Transmission unit (MTU). If the size of IP datagram
is greater than the MTU unit, then the IP protocol splits the datagram into smaller units so
that they can travel over the local network. Fragmentation can be done by the sender or
intermediate router. At the receiver side, all the fragments are reassembled to form an original
message.
17 CK

o Routing: When IP datagram is sent over the same local network such as LAN, MAN, WAN, it
is known as direct delivery. When source and destination are on the distant network, then the
IP datagram is sent indirectly. This can be accomplished by routing the IP datagram through
various devices such as routers.

ARP Protocol

o ARP stands for Address Resolution Protocol.


o ARP is a network layer protocol which is used to find the physical address from the IP address.
o The two terms are mainly associated with the ARP Protocol:
o ARP request: When a sender wants to know the physical address of the device, it
broadcasts the ARP request to the network.
o ARP reply: Every device attached to the network will accept the ARP request and
process the request, but only recipient recognize the IP address and sends back its
physical address in the form of ARP reply. The recipient adds the physical address both
to its cache memory and to the datagram header

ICMP Protocol

o ICMP stands for Internet Control Message Protocol.


o It is a mechanism used by the hosts or routers to send notifications regarding datagram
problems back to the sender.
o A datagram travels from router-to-router until it reaches its destination. If a router is unable
to route the data because of some unusual conditions such as disabled links, a device is on
fire or network congestion, then the ICMP protocol is used to inform the sender that the
datagram is undeliverable.
o An ICMP protocol mainly uses two terms:
o ICMP Test: ICMP Test is used to test whether the destination is reachable or not.
o ICMP Reply: ICMP Reply is used to check whether the destination device is responding
or not.
o The core responsibility of the ICMP protocol is to report the problems, not correct them. The
responsibility of the correction lies with the sender.
o ICMP can send the messages only to the source, but not to the intermediate routers because
the IP datagram carries the addresses of the source and destination but not of the router that
it is passed to.
18 CK

Transport Layer
The transport layer is responsible for the reliability, flow control, and correction of data which is
being sent over the network.

The two protocols used in the transport layer are User Datagram protocol and Transmission
control protocol.

o User Datagram Protocol (UDP)


o It provides connectionless service and end-to-end delivery of transmission.
o It is an unreliable protocol as it discovers the errors but not specify the error.
o User Datagram Protocol discovers the error, and ICMP protocol reports the error to
the sender that user datagram has been damaged.
o UDP consists of the following fields:
Source port address: The source port address is the address of the application
program that has created the message.
Destination port address: The destination port address is the address of the
application program that receives the message.
Total length: It defines the total number of bytes of the user datagram in bytes.
Checksum: The checksum is a 16-bit field used in error detection.
o UDP does not specify which packet is lost. UDP contains only checksum; it does not
contain any ID of a data segment.

o Transmission Control Protocol (TCP)


o It provides a full transport layer services to applications.
o It creates a virtual circuit between the sender and receiver, and it is active for the
duration of the transmission.
o TCP is a reliable protocol as it detects the error and retransmits the damaged frames.
Therefore, it ensures all the segments must be received and acknowledged before the
transmission is considered to be completed and a virtual circuit is discarded.
19 CK

o At the sending end, TCP divides the whole message into smaller units known as
segment, and each segment contains a sequence number which is required for
reordering the frames to form an original message.
o At the receiving end, TCP collects all the segments and reorders them based on
sequence numbers.

Application Layer

o An application layer is the topmost layer in the TCP/IP model.


o It is responsible for handling high-level protocols, issues of representation.
o This layer allows the user to interact with the application.
o When one application layer protocol wants to communicate with another application layer, it
forwards its data to the transport layer.
o There is an ambiguity occurs in the application layer. Every application cannot be placed
inside the application layer except those who interact with the communication system. For
example: text editor cannot be considered in application layer while web browser
using HTTP protocol to interact with the network where HTTP protocol is an application
layer protocol.

Following are the main protocols used in the application layer:

o HTTP: HTTP stands for Hypertext transfer protocol. This protocol allows us to access the data
over the world wide web. It transfers the data in the form of plain text, audio, video. It is
known as a Hypertext transfer protocol as it has the efficiency to use in a hypertext
environment where there are rapid jumps from one document to another.
o SNMP: SNMP stands for Simple Network Management Protocol. It is a framework used for
managing the devices on the internet by using the TCP/IP protocol suite.
o SMTP: SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that supports the
e-mail is known as a Simple mail transfer protocol. This protocol is used to send the data to
another e-mail address.
o DNS: DNS stands for Domain Name System. An IP address is used to identify the connection
of a host to the internet uniquely. But, people prefer to use the names instead of addresses.
Therefore, the system that maps the name to the address is known as Domain Name System.
o TELNET: It is an abbreviation for Terminal Network. It establishes the connection between
the local computer and remote computer in such a way that the local terminal appears to be
a terminal at the remote system.
o FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for
transmitting the files from one computer to another computer.
20 CK

Comparison between TCP/IP and OSI model


OSI TCP
• It is reference Model It is implemented from OSI model
• It has seven layers It has four layers
• Considered to be reference tool Considered to be more reliable
• Has separate session and presentation layer Has Combined session and Presentation layer
• Support only connectionless and connection Support only connectionless communication
oriented communication in the network layer in the network layer
• Vertical Approach Horizontal approach
• Model was developed before the development Protocol was developed first then the model
of protocols was developed
• Protocol depend standard Protocol independent

The diagrammatic comparison of the TCP/IP and OSI model is as follows:

Difference between TCP/IP and OSI Model


TCP/IP OSI

TCP refers to Transmission Control Protocol. OSI refers to Open Systems Interconnection.

TCP/IP uses both the session and presentation layer OSI uses different session and presentation
in the application layer itself. layers.

TCP/IP follows connectionless a horizontal approach. OSI follows a vertical approach.


21 CK

TCP/IP OSI

The Transport layer in TCP/IP does not provide In the OSI model, the transport layer provides
assurance delivery of packets. assurance delivery of packets.

While in the OSI model, Protocols are better


Protocols cannot be replaced easily in TCP/IP model. covered and are easy to replace with the
technology change.

TCP/IP model network layer only provides Connectionless and connection-oriented services
connectionless (IP) services. The transport layer are provided by the network layer in the OSI
(TCP) provides connections. model.

Protocol layers and service models.


In networking, the concept of protocol layers refers to the organization of network protocols
into a hierarchical structure, where each layer provides specific services to the layer above it
and utilizes services from the layer below it. The most commonly referenced model for
understanding protocol layers is the OSI (Open Systems Interconnection) model, which
consists of seven layers:

Physical Layer: Deals with the physical connection between devices. It defines hardware
aspects such as cables, connectors, and signalling.
Data Link Layer: Responsible for the reliable transmission of data frames between directly
connected nodes. It handles issues like framing, addressing, and error detection.
Network Layer: Manages routing and forwarding of data packets between devices on
different networks. It deals with logical addressing and packet switching.
Transport Layer: Ensures end-to-end communication by providing error recovery, flow
control, and segmentation of data into smaller units. Examples include TCP (Transmission
Control Protocol) and UDP (User Datagram Protocol).
Session Layer: Manages sessions or connections between applications, establishing,
maintaining, and terminating connections.
Presentation Layer: Deals with data format translation, encryption, and compression to
ensure that data can be properly interpreted by the application layer.
Application Layer: Provides network services directly to end-users or applications. It includes
protocols for tasks like email, file transfer, and remote login.
22 CK

Service Models:

Service models describe how communication services are provided in a network. Two
commonly discussed service models are:

Connection-Oriented Service:

Characteristics: Establishes a connection before transferring data, ensuring a reliable and


ordered delivery of packets.
Example Protocol: TCP (Transmission Control Protocol).

Connectionless Service:

Characteristics: Does not establish a dedicated connection before data transfer, and each
packet is treated independently.
Example Protocol: UDP (User Datagram Protocol).

▶ OSI and Internet protocols


The OSI (Open Systems Interconnection) model and the Internet Protocol Suite (commonly
referred to as TCP/IP) are two conceptual frameworks that define how network protocols
should be organized and implemented. Here's an overview of both:

OSI Model:
Physical Layer (Layer 1): Deals with the physical connection and transmission of raw binary
data over a physical medium. It includes specifications for cables, connectors, and physical
interfaces.
Data Link Layer (Layer 2): Responsible for reliable data transfer between directly connected
nodes. It handles framing, addressing, and error detection.
Network Layer (Layer 3): Manages logical addressing, routing, and packet switching to
enable communication between devices on different networks.
23 CK

Transport Layer (Layer 4): Ensures end-to-end communication, providing error recovery,
flow control, and segmentation of data. It includes protocols like TCP (connection-oriented)
and UDP (connectionless).
Session Layer (Layer 5): Manages sessions or connections between applications, establishing,
maintaining, and terminating connections.
Presentation Layer (Layer 6): Deals with data format translation, encryption, and
compression to ensure that data can be properly interpreted by the application layer.
Application Layer (Layer 7): Provides network services directly to end-users or applications.
It includes protocols for tasks like email, file transfer, and remote login.

Internet Protocol Suite (TCP/IP):


Link Layer (equivalent to OSI Layers 1 and 2): Combines functionalities of the OSI physical
and data link layers. Includes protocols like Ethernet.
Internet Layer (equivalent to OSI Layer 3): Manages logical addressing, routing, and packet
switching. The primary protocol is IP (Internet Protocol).
Transport Layer (equivalent to OSI Layer 4): Provides end-to-end communication. Includes
TCP (Transmission Control Protocol) for reliable communication and UDP (User Datagram
Protocol) for connectionless communication.
Application Layer (combines OSI Layers 5, 6, and 7): Provides network services directly to
end-users or applications. Includes protocols like HTTP (Hypertext Transfer Protocol) and FTP
(File Transfer Protocol).
24 CK

QUESTIONS:
Q: What is the difference between host and route?
The HOSTS file lets you map a specific host name such as www.google.com to a specific IP
address. The route command lets you specify which gateway to use when trying to reach a
certain IP address (or more accurately, a certain network).

Router: A router is a machine that forwards packets from one network to another.

Q: What is ICANN?
The Internet Corporation for Assigned Names and Numbers

Q: what is the minimum and maximum length of data in Ethernet frame?


Ethernet has a minimum frame size of 64 bytes, comprising an 18-byte header and a payload
of 46 bytes.
It also has a maximum frame size of 1518 bytes, in which case the payload is 1500 bytes.

Q:What is ATM?
An automated teller machine (ATM) is an electronic banking outlet that allows customers to
complete basic transactions without the aid of a branch representative or teller.
Q: what is count to infinity?
Count to infinity problemThe core of the count-to-infinity problem is that if A tells B that it
has a path somewhere, there is no way for B to know if the path has B as a part of it.

Q: What is SYN flooding attack?


A SYN flood, also known as a TCP SYN flood, is a type of denial-of-service (DoS) or distributed
denial-of-service (DDoS) attack that sends massive numbers of SYN requests to a server to
overwhelm it with open connections.

Q: List main elements of error control in TCP?


Error detection and correction in TCP is achieved through the use of three simple
tools: checksum, acknowledgment, and time-out.
25 CK

Q: which class of ip address provides a maximum of only 254 host addresses per
network id
Class C network numbers
Class C network numbers are appropriate for networks with few hosts--the maximum being
254.

Q: What is a subnet mask


A subnet mask is a number that distinguishes the network address and the host address
within an IP address.
A subnet is a smaller network within a network that requires a subnet mask.

Q: which protocol uses both UDP and TCP? What is the purpose of that
protocol?
DNS Domain Name Server

Q: To test the IP stack on your local host, which IP address will you ping?
Therefore, to test the IP stack on your local host, you need to ping the loopback address
which is represented by the IP address 127.0. 0.1 or localhost.

Q: Name any key exchange Algorithm?


The two most popular key exchange algorithms are RSA and Diffie-Hellman (now known as
Diffie-Helmlman-Merkle).

Q: what is an autonomous system


An autonomous system (AS) is a very large network or group of networks with a single routing
policy.
Each AS is assigned a unique ASN, which is a number that identifies the AS. Network types.
Network layer.

Q: Give two drawbacks of using firewalls?


1. Sometimes they can slow down the network performance.
2. They may require regular updates to stay effective.
26 CK

Q: What is a Protocol?
In networking, a protocol is a set of rules for formatting and processing data.

Q: What is a datagram?
A datagram refers to a self-contained, independent unit of data that is transmitted over a
network.
Datagrams are used to send data between different nodes on a network, such as computers
or servers. A datagram typically consists of a header and a payload.

Q: what do you mean by MTU? what is MTU for Ethernet?


MTU stands for maximum transmission unit.
It's a measurement (typically in bytes) of the largest data packet a device can accept via an
internet connection.
The standard size MTU for Ethernet is 1,500 bytes.

Q: how is a socket different from port?


A socket uniquely identifies the endpoint of a communication link between two application
ports.
A port represents an application process on a TCP/IP host, but the port number itself does
not indicate the protocol being used: TCP, UDP, or IP.

Q: what is Caesar Cipher


The Caesar cipher is a simple encryption technique that was used by Julius Caesar to send
secret messages to his allies. It works by shifting the letters in the plaintext message by a
certain number of positions, known as the “shift” or “key”.

Q: Discuss the various types of address used in the different layers of TCP/IP
model?
Four levels of addresses are used in the TCP/IP protocol: physical address, logical address,
port address, and application-specific address as shown in Figure.
27 CK

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

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

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

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

Q: Describe three way handshaking in TCP/IP?

A three-way handshake is primarily used to create a


TCP socket connection to reliably transmit data
between devices. For example, it supports communication between a web browser on the client side and a
server every time a user navigates the Internet.

As soon as a client requests a communication session with the server, a three-way handshake process
initiates TCP traffic by following three steps.

The Three Steps of a Three-Way Handshake


Step 1: A connection between server and client is established

First, a connection between server and client is established, so the target server must have open ports that
can accept and initiate new connections. The client node sends a SYN (Synchronize Sequence Number) data
packet over an IP network to a server on the same or an external network.

This SYN packet is a random sequence number that the client wants to use for the communication (for
example, X). The objective of this packet is to ask/infer if the server is open for new connections.

Step 2: The server receives the SYN packet from the client node

When the server receives the SYN packet from the client node, it responds and returns a confirmation
receipt – the ACK (Acknowledgement Sequence Number) packet or SYN/ACK packet. This packet includes
two sequence numbers.

The first one is ACK one, which is set by the server to one more than the sequence number it received from
the client (e.g. X+1).
29 CK

The second one is the SYN sent by the server, which is another random sequence number (for example, Y).

This sequence indicates that the server correctly acknowledged the client’s packet, and that is sending its
own to be acknowledged as well.

Step 3: Client node receives the SYN/ACK from the server and responds
with an ACK packet

The client node receives the SYN/ACK from the server and responds with an ACK packet. Once again, each
side must acknowledge the sequence number received by incrementing it by one.

So now it’s the turn of the client to acknowledge the server’s packet by adding one to the sequence number
(in this case, Y+1), and resend it to the server.

Upon completion of this process, the connection is created and the host and server can communicate.

All these steps are necessary to verify the serial numbers originated by both sides, guaranteeing the stability
of the connection.

Since both hosts must acknowledge the connection parameters of the other side, a missing or out-of-order
segment can be quickly detected before the actual data transfer process is initiated.

Q: Differenciate between symmetric and asymmetric key encryption?


Symmetric Key Encryption: Encryption is a process to change the form of any message in
order to protect it from reading by anyone. In Symmetric-key encryption the message is
encrypted by using a key and the same key is used to decrypt the message which makes it
easy to use but less secure. It also requires a safe method to transfer the key from one party
to another.
Asymmetric Key Encryption: Asymmetric Key Encryption is based on public and private key
encryption techniques. It uses two different key to encrypt and decrypt the message. It is
more secure than the symmetric key encryption technique but is much slower.

Symmetric Key Encryption Asymmetric Key Encryption

It only requires a single key for both encryption It requires two keys, a public key and a private
and decryption. key, one to encrypt and the other one to decrypt.

The size of cipher text is the same or smaller than The size of cipher text is the same or larger than
the original plain text. the original plain text.

The encryption process is very fast. The encryption process is slow.


30 CK

Symmetric Key Encryption Asymmetric Key Encryption

It is used when a large amount of data is required


It is used to transfer small amounts of data.
to transfer.

It provides confidentiality, authenticity, and


It only provides confidentiality.
non-repudiation.

The length of key used is 128 or 256 bits The length of key used is 2048 or higher

In symmetric key encryption, resource utilization


In asymmetric key encryption, resource
is low as compared to asymmetric key
utilization is high.
encryption.

It is efficient as it is used for handling large It is comparatively less efficient as it can handle
amount of data. a small amount of data.

Security is less as only one key is used for both It is more secure as two keys are used here- one
encryption and decryption purpose. for encryption and the other for decryption.

The Mathematical Representation is as follows-


The Mathematical Representation is as follows-
P = D(Kd, E (Ke,P))
P = D (K, E(K, P))
where Ke –> encryption key
where K –> encryption and decryption key
Kd –> decryption key
P –> plain text
D –> Decryption
D –> Decryption
E(Ke, P) –> Encryption of plain text using
E(K, P) –> Encryption of plain text using K
encryption key Ke. P –> plain text

Examples: Diffie-Hellman, ECC, El Gamal,


Examples: 3DES, AES, DES and RC4
DSA and RSA

You might also like