1.Transmission Control Protocol
1.Transmission Control Protocol
Computer Network Architecture is defined as the physical and logical design of the software,
hardware, protocols, and media of the transmission of data. Simply we can say that how
computers are organized and how tasks are allocated to the computer.
The two types of network architectures are used:
o Peer-To-Peer network
o Client/Server network
Peer-To-Peer network
o Peer-To-Peer network is a network in which all the computers are linked together
with equal privilege and responsibilities for processing the data.
o Peer-To-Peer network is useful for small environments, usually up to 10 computers.
o Peer-To-Peer network has no dedicated server.
o Special permissions are assigned to each computer for sharing the resources, but this
can lead to a problem if the computer with the resource is down.
1
Disadvantages Of Peer-To-Peer Network:
o In the case of Peer-To-Peer network, it does not contain the centralized system .
Therefore, it cannot back up the data as the data is different in different locations.
o It has a security issue as the device is managed itself.
Client/Server Network
o Client/Server network is a network model designed for the end users called clients, to
access the resources such as songs, video, etc. from a central computer known as
Server.
o The central controller is known as a server while all other computers in the network
are called clients.
o A server performs all the major operations such as security and network management.
o A server is responsible for managing all the resources such as files, directories,
printer, etc.
o All the clients communicate with each other through a server. For example, if client1
wants to send some data to client 2, then it first sends the request to the server for the
permission. The server sends the response to the client 1 to initiate its communication
with the client 2.
2
o A Client/Server network has a dedicated server that improves the overall performance
of the whole system.
o Security is better in Client/Server network as a single server administers the shared
resources.
o It also increases the speed of the sharing resources.
Computer network components are the major parts which are needed to install the software.
Some important network components are NIC, switch, cable, hub, router, and modem.
Depending on the type of network that we need to install, some network components can also
be removed. For example, the wireless network does not require a cable.
NIC
Hub
A Hub is a hardware device that divides the network connection among multiple devices.
When computer requests for some information from a network, it first sends the request to the
3
Hub through cable. Hub will broadcast this request to the entire network. All the devices will
check whether the request belongs to them or not. If not, the request will be dropped.
The process used by the Hub consumes more bandwidth and limits the amount of
communication. Nowadays, the use of hub is obsolete, and it is replaced by more advanced
computer network components such as Switches, Routers.
Switch
Router
Advantages Of Router:
o Security: The information which is transmitted to the network will traverse the entire
cable, but the only specified device which has been addressed can read the data.
o Reliability: If the server has stopped functioning, the network goes down, but no
other networks are affected that are served by the router.
o Performance: Router enhances the overall performance of the network. Suppose
there are 24 workstations in a network generates a same amount of traffic. This
increases the traffic load on the network. Router splits the single network into two
networks of 12 workstations each, reduces the traffic load by half.
o Network range
4
Modem
o A modem is a hardware device that allows the computer to connect to the internet
over the existing telephone line.
o A modem is not integrated with the motherboard rather than it is installed on the PCI
slot found on the motherboard.
o It stands for Modulator/Demodulator. It converts the digital data into an analog signal
over the telephone lines.
Based on the differences in speed and transmission rate, a modem can be classified in the
following categories:
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.
5
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.
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
6. Presentation Layer
7. Application Layer
1) Physical layer
o he 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.
o Line Configuration: It defines the way how two or more devices can be connected
physically.
7
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
8
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.
3) Network Layer
9
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.
4) Transport Layer
10
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.
11
Functions of Transport Layer:
5) Session Layer
12
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.
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
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.
13
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.
14
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.
15
Network Access Layer
Internet Layer
16
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.
17
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.
Application Layer
18
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.
19
lassful Addressing
o Class A
o Class B
o Class C
o Class D
o Class E
20
o Network ID: It represents the number of networks.
o Host ID: It represents the number of hosts.
In Class A, the first bit in higher order bits of the first octet is always set to 0 and the
remaining 7 bits determine the network ID. The 24 bits determine the host ID in any network.
Class B
In Class B, an IP address is assigned to those networks that range from small-sized to large-
sized networks.
In Class B, the higher order bits of the first octet is always set to 10, and the remaining14 bits
determine the network ID. The other 16 bits determine the Host ID.
21
Class C
In Class C, the higher order bits of the first octet is always set to 110, and the remaining 21
bits determine the network ID. The 8 bits of the host ID determine the host in a network.
Class D
In Class D, an IP address is reserved for multicast addresses. It does not possess subnetting.
The higher order bits of the first octet is always set to 1110, and the remaining bits
determines the host ID in any network.
Class E
In Class E, an IP address is used for the future use or for the research and development
purposes. It does not possess any subnetting. The higher order bits of the first octet is always
set to 1111, and the remaining bits determines the host ID in any network.
22
Clas Higher NET ID HOST ID No.of No.of hosts per Range
s bits bits bits networks network
A 0 8 24 27 224 0.0.0.0 to
127.255.255.255
What is IP?
Here, IP stands for internet protocol. It is a protocol defined in the TCP/IP model used for
sending the packets from source to destination. The main task of IP is to deliver the packets
from source to the destination based on the IP addresses available in the packet headers. IP
defines the packet structure that hides the data which is to be delivered as well as the
addressing method that labels the datagram with a source and destination information.
23
o Source IP address: The source is the one who is sending the data.
o Destination IP address: The destination is a host that receives the data from the
sender.
o Header length
o Packet length
o TTL (Time to Live): The number of hops occurs before the packet gets discarded.
o Transport protocol: The transport protocol used by the internet protocol, either it can
be TCP or UDP.
In order to make it reliable, it must be paired with reliable protocol such as TCP at the
transport layer.
Internet protocol transmits the data in form of a datagram as shown in the following diagram:
24
User Datagram Protocol (UDP)
Like IP, UDP is connectionless and unreliable protocol. It doesn’t require making a
connection with the host to exchange data. Since UDP is unreliable protocol, there is no
mechanism for ensuring that data sent is received.
UDP transmits the data in form of a datagram. The UDP datagram consists of five parts as
shown in the following diagram:
FTP is used to copy files from one host to another. FTP offers the mechanism for the same in
following manner:
FTP creates two processes such as Control Process and Data Transfer Process at both
ends i.e. at client as well as at server.
FTP establishes two different connections: one is for data transfer and other is for
control information.
25
Control connection is made between control processes while Data Connection is
made between<="" b="" style="box-sizing: border-box; margin: 0px; padding: 0px;
font: inherit;">
FTP uses port 21 for the control connection and Port 20 for the data connection.
SUBNET MASK
Every computer device has two pieces of IP address: the host or client address and
the network or server address. Either the IP addresses are configured manually, which is the
static IP address, or by a DHCP server. The IP addresses are split into the network address
and the host by the subnet mask. It depends on which part of the IP address belongs to the
device and which part belongs to the network.
Gateway or default gateway creates a connection between the local device to the
other network. According to that, when a local device wants to send information to the device
with an IP address on other networks, then it will first send the packets to the gateway, and
after that, it forwards the data to the destination, which is located outside the local network.
A subnet mask is a 32-bit number created by setting the host bits to all 0s and setting network
bits to all 1s. In this way, the subnet mask is separated the IP address into the host
address and network address. The broadcast address is always assigned to
the "255" address, and a network address is always assigned to the "0" address. Since the
subnet mask is reserved for a special purpose, it cannot be assigned to the host.
An underlying structure is comprised of the subnet mask, IP address, and gateway or router.
When a system needs additional subnetting, then the host element of the IP address to divided
by subnetting, and it further divides into the subnet. The subnetting process is the main goal
of the subnet mask.
26
The subnet mask and IP address:
A single device of an IP network is identified by a 32-bit IP address. The binary bits of that
32-bit IP address are divided into a network section and a host by the subnet mask. They are
also broken into four 8-bit octets.
Since the binary is challenging, we convert each update which is expressed in dot decimal.
Since all sides of networks can be accommodated on the internet, then based on how the octet
in an IP address is broken down, an addressing scheme for a range of networks exists. We
can calculate it upon the three high-order or leftmost weights of any described IP address.
This IP address should have different classes of the network, a to e, the addresses in it.
From the above five different classes of the network, the d class network is reserved for
multicasting; on the other hand, the class network is not used on the internet. It is because
the internet engineering task force (IETF) they are out for research.
The network portion in the first octet is reflected by the class a subnet mask, and it leaves
opted, three and four for the network manager for the purpose of dividing the hosts and
subnets as required. 65,536 hosts are included in the class a network.
The class b subnet mask makes sure the first two actors further network without the
remaining part of the address, and the 16-bit after it is four and three for the host and subnet
part. A number from 256 to 65,534 hosts for the class b network.
On the other hand, in the class c subnet mask, there are three updates with a combination of
hosts and the southerners in the last octet 4 8 bits. Lower than 254 hosts in class c, there are a
smaller number of networks.
Rather than there are natural masks or default subnet masks of class a, b &c.
Class a: 255.0.0.0
Class b: 255.255.0.0
Class c: 255.255.255.0
27
Class a: network part is 8-bit -
11111111.00000000.00000000.00000000
11111111.11111111.00000000.00000000
11111111.11111111.11111111.00000000
To calculate the subnet mask, convert an IP address to binary, perform the calculation and
then convert back to the IPv4 decimal number representation known as a dotted quad. The
same subnetting procedure works for IPv6 addresses.
A subnet mask tells the computer what part of the IP address is the network
portion of the address and what part identifies the host address range, which are
addresses that are assigned to host computers on that network. A longer subnet
mask -- meaning more 1 bits in the mask -- creates more IP subnets that have a
smaller host address block size.
Subnetting breaks a large network into smaller networks by extending the length
of the subnet mask. This increases the number of subnetworks, while reducing the
number of hosts per subnet. Organizations will typically use several different
subnet masks for different sizes of networks. For example, a point-to-point link
with only two devices would use a 31-bit mask. An office LAN or data center
LAN, however, would use a shorter subnet mask that allows more hosts.
28