Assignment 2 Network Basic Final
Assignment 2 Network Basic Final
Answer 1: Advantages:
Easy to manage and reliable: Tiered systems make maintenance and upgra
des easier. As long as the interface between the processes still exists, change
s or improvements can be implemented in a process without affecting the pe
rformance of other processes. This change also makes it easier to introduce
new technologies or processes without needing to overhaul the entire system
.
Disadvantages:
Load: Layered systems may introduce additional overhead due to data enca
psulation at each layer. Each layer adds its own header, trailer, and control d
ata to the original data, increasing the overall size of the transmitted packet.
This overhead can impact network performance, especially in bandwidth-
limited or resource-constrained environments.
Question 2: Discuss your understanding of access control facilitated by data link layer
in detail.
Answer 2:
Access control via the data link layer often involves controlling access to ph
ysical media, such as shared networks or wireless
channels across multiple network access points. This system provides a mec
hanism to manage access to shared media from multiple devices, preventing
conflicts and ensuring efficient and fair use of network resources. The two
main access control methods used by the data link layer are argument-based
access and control access.
Content-based access:
The transport protocol is the fourth layer of the OSI (Open Systems Intercon
nect) model and the TCP/IP (Communications Control Protocol/Internet Pro
tocol) protocol family. It plays an important role in facilitating efficient and
effective communication between processes carried out between different ne
twork member The main functions of the transport layer include:
Segmentation and reassembly: The transport layer breaks data received fro
m the upper layer (such as the application layer) into smaller pieces called s
egments or data packets. Segmentation allows large blocks of data to be tran
smitted efficiently over the network. When the end is received, the transport
layer converts this piece of data into the original data and passes it to the up
per layer.
Link creation, maintenance, and termination: The transport system provi
des a mechanism for establishing, maintaining, and terminating communicat
ion links. This is especially important for connection-oriented protocols suc
h as TCP (Transmission Control Protocol) that enable reliable, deterministic
and undetectable data transfers. Networking involves a three-way collaborati
on where customers exchange changes and advice to create a better connecti
on.
Flow control: The transport process controls the flow of data between the se
nder and the receiver to protect the receiver from data that is outside the rece
iver's processing or storage. The flow control mechanism controls the data tr
ansfer rate and confirms the receipt of data. TCP uses a sliding window to a
djust the data transfer rate depending on network conditions and receiver ca
pacity.
Error detection and correction: The upload process detects errors in the su
bmitted data and provides error recovery and correction procedures. this is tr
ue. TCP uses connection codes and checksums to detect errors in transmissi
on segments. If an error is detected, TCP retransmits the damaged segment t
o ensure successful transmission.
Question 4:
Discuss the following application layer protocols in detail. 10 Marks DHCP
SNMP
SMTP
Telnet
NFS
Answer 4:
SMTP is a standard protocol for sending and receiving e-mail. It defines the
rules and recommendations for sending e-mail via post.
SMTP works on the client model where the email user (Mail User Agent -
MUA) sends mail to the SMTP server (Mail Transfer Agent - MTA) for deli
very. The SMTP server forwards the message to the recipient or sends it thr
ough an intermediate server until it reaches the end.
SMTP uses text-based command/response for communication between clien
t and server. The client initiates the session by connecting to the SMTP serv
er on port 25 and sending commands such as HELO, MAIL FROM, RCPT
TO and DATA to specify the sender, recipient and email details.
SMTP ensures the quality of email delivery through a combination of error
detection and notification mechanisms. However, it is generally associated
with messaging and generally does not work like forwarding or receiving by
other protocols such as POP3 (Post Office Protocol) or IMAP (Internet Mess
age Access Protocol).
Telnet:
Telnet is a network protocol used for remote terminal access and command l
ine interface (CLI) interaction with network devices. It allows users to remot
ely log in and execute commands as if they were directly connected to the d
evice's console.
Telnet operates on port 23 and uses a client-server architecture. The Telnet c
lient contacts the Telnet server running on the remote to provide the user wit
h a virtual conference. Once connected, users can interact with remote contr
ol commands, run applications, and manage files as if they were physically a
t the console.
Telnet sessions send information, including keystrokes and output, in plainte
xt, making them vulnerable to interception and eavesdropping. As a result, T
elnet is considered insecure when using untrusted networks and its use has b
een replaced by more secure methods such as SSH (Secure Shell).
Network File System (NFS):
NFS is a file sharing protocol that allows users to access files and directories
stored on a network. remote servers as on the client. Transactions, person. It
encourages collaboration and sharing among users by supporting transparent
data sharing and remote data access across networks.
NFS operates in a client-server model where the NFS client uses the NFS pr
otocol to mount remote files from the NFS server. When mounted, remote fi
les and directories appear as part of the user's local file system hierarchy, all
owing users and applications to interact with them seamlessly.
NFS supports reading and writing operations on remote files and provides p
ermissions based on the content of the file server. It provides data locking, c
aching, and asynchronous writes to improve performance and data consisten
cy.
NFS is widely used in Unix and Linux environments to share files and direct
ories on mounted systems. It facilitates centralized management and improv
es data accessibility and integration in distributed computing environments.
Question 5.
Differential between the adaptive and non-adaptive routing algorithms
Answer 5:
Easy to use: Non-adaptive routing algorithms are easy to use and manage b
ecause they do not need to constantly monitor or update routing decisions. R
outing tables are set and managed manually by network administrators.
Let's use a simple example with four routers (A, B, C, D) connected to a net
work:
Each router starts with its direct neighbors and their associated costs own ro
uting table listing For example:
Router A:
Destination | Next Hop | Cost
B |B |2
C |C |1
D |D |3
Initially, the router only knows its value to direct neighbors. The value repre
sents the hop count or some other metric representing the distance to a neigh
bor.
Exchanging routing information:
Routers regularly exchange routing information with their neighbors. They s
hare a conference table, and each router updates its own instructions based o
n the information it receives.
For example,
when Router A receives an update table from Router B, it checks if there is
a better route from Router B to the destination. If so, it updates the routing t
able accordingly.
Routing table update:
After receiving routing information from its neighbors, each router updates i
ts routing table according to the Bellman-Ford equation:
D(v, w) = min { c(v, x) + D(x, w) } for all neighbors x of v
WhereD(v, w) Where: Destination from router v The value of the shortest p
ath to w.
c(v,x) is the link value between router v and its neighbor x.
D(x, w) is the value of x's neighbor to digit w.
The router repeatedly uses this offset to update its conference until it conver
ges, meaning there are no further changes.
Routing table update example:
Convergence
the process continues until all routers are joined in the conference, meaning
no further changes are made. Meanwhile, the router has determined the best
route for each part of the network.
Distance vector routing algorithms, such as the Bellman-Ford algorithm, are
easy to use and suitable for small and Medium
sized networks. But in large networks or networks with dynamic conditions,
they will suffer from slow connections and connections.
Header Length:
IPv4: The header length in IPv4 is different, for example 20 - 60 bit tuple. It
includes version, header length, type of service (ToS), total length, ID, flag,
fragment offset, time to live (TTL), protocol, header checksum, IP address a
nd address, our IP address and other fields.
IPv6: Header length in IPv6 is 40 bytes. IPv6 headers are simpler and more
useful than IPv4 because they eliminate many of the optional features found
in IPv4.
Addressing:
IPv4: IPv4 addresses are 32 bits (4 bytes) long and are expressed as decimal
numbers (for example, 192.0.2.1). IPv4 addresses are divided into network a
nd host locations, and subnetting is used to extend the address range and dist
ribute addresses efficiently.
IPv6: The IPv6 address length is 128 bits (16 bytes), expressed as a hexadec
imal number (for example, 2001:0db8:85a3:0000:0000:8a2e:0370:7334). IP
v6 addresses are organized into various hierarchies, including network prefi
xes and interface identifiers, providing a larger address space than IPv4.
Fragmentation:
IPv4: IPv4 does not include support for IPsec (Internet Protocol Security), a
protocol for secure communication in an IP network. IPsec can be used as a
n extension on IPv4 networks.
IPv6: IPv6 includes native support for IPsec, which provides authentication,
integrity, confidentiality, and key services over the IP layer. IPsec is part of t
he IPv6 protocol suite and is often used to protect IPv6 communications.
Header Options:
IPv4: The IPv4 header contains optional fields such as options, padding, and
variable-length data fields. These options may include time logs, log files, a
nd security options.
IPv6: The IPv6 header does not include options as part of the main header. I
nstead, IPv6 specifies an extension to be placed after the main header. Exten
sion headers provide additional functionality such as segmentation, routing,
authentication, and encapsulation.
In summary, although IPv4 and IPv6 have the same basic purpose of transfe
rring packets between network devices, their header structure refers to the st
rategy, fragmentation process, security features, and header selection suppor
t. IPv6 solves many of the limitations of IPv4, including address fatigue, sec
urity, and complexity, making it the best choice for modern networking.
Question 8: Subnet the Class C IP Address 195.1.1.0 So that you have at least 2
subnets each subnet must have room for 48 hosts.
Answer 8:
To split the class C IP address 195.1.1.0 into two subnets with at least 48 ho
sts each, we need to borrow enough resources from the address's host to acc
ommodate the hosts required in each subnet amount.
Class C networks allow 8 bits for the network portion of the address and 24
bits for the host. To create a subnet with at least 48 hosts, we need to allocat
e enough resources to each member to support host addresses of at least 6 bi
ts (2^6 - 2 = 62 hosts, minus the network and broadcast address 2), because
48 is smaller than 62 'more than. This means we need to borrow 6 bits from
the host to create the subnet.
After borrowing 6 bits, the new subnet mask will store 26 bits for the net par
t and 6 bits for the net. Items reserved for the homeowner.
The subnet distribution is as follows:
The first 26 bits are reserved for the network part, the remaining 6 bits are re
served for the host.
Subnet function:
Subnet 1:
When an HTTP request is received, the web server processes the request bas
ed on the request data and other things not included in the request headers.
The server can perform many tasks such as collecting requested data from th
e file system or database, executing server-side script (such as PHP, Python,
Ruby), creating good content, and using security controls.
HTTP response:
After processing the request, the server generates an HTTP response contain
ing the request information and additional metadata such as response status,
content type, and content length.
The server sends the HTTP response back to the browser over the establishe
d TCP connection.
Data distribution:
The browser receives the HTTP response from the server and starts downloa
ding resources (such as HTML pages, images) from the TCP connection.
The browser parses HTML content and may make additional HTTP requests
to retrieve resources such as images, links, JavaScript files, and other links.
Rendering the web page:
Once all the resources have been downloaded, the browser renders the web
page by interpreting the HTML, using CSS styles, and executing the JavaSc
ript code.
The browser allows the user to interact by displaying web pages provided to
the user
Decision:
After fully completing the connection process, the browser will keep the TC
P connection open for future requests (HTTP persistent) depending on the se
rver's response headers and browser settings depending on) or close the con
nection.
If the connection remains open, the browser can reuse the same connection f
or repeated requests to the same server, reducing latency and overhead.
Question 10:
Write short notes on the following
RFC
Socket Address
Gateway
Link State Routing Protocol
Three-Way Handshaking Protocol
Answer 10:
RFCs are documents published by the Internet Engineering Task Force (IET
F) and other organizations that document specifications, standards, procedur
es, and best practices related to the Internet and computers.
RFC is the legal document for many Internet applications, including HTTP,
TCP/IP, SMTP, and other protocols.
The RFC process allows engineers, researchers, and practitioners from arou
nd the world to collaborate, review, and develop proposals for new protocol
s or modifications to existing systems.
RFCs are assigned unique numbers and are free for public use and reference
.
Socket Address:
Socket address is an IP address and port number that indicates the end of the
network connection.
In a TCP/IP network environment, sockets are used for communication betw
een processes running on different hosts. Each socket is associated with a sp
ecific protocol (such as TCP or UDP) and is identified by both its IP address
and port number.
Socket addresses allow processes to establish connections, send and receive
data, and communicate over the network.
In IPv4, the address is represented by the combination of the 32-bit IP addre
ss and the 16-bit port number. In IPv6 the address size is 128 bits and the po
rt number is still 16 bits.
Gateway:
Classful address:
Classful address is based on the original address scheme defined in IPv4, wh
ich converts IP location into three categories: A, B and C .
Each category has a fixed position. Part of it is for the network address and t
he rest is for the host address.
Allocation of addresses results in less effective addresses and less address us
age.
Classless Addressing:
Classless addressing, also known as Classless Inter-Domain Routing (CIDR)
, is a more flexible protocol designed to solve the non-bounded addressing p
roblem.
CIDR allows IP addresses to be divided into blocks (prefixes) of different le
ngths and does not adhere to strict restrictions on the address of the unit.
CIDR enables better use of IP addresses and provides greater scalability and
flexibility in network design.
Physical address:
Also called MAC address and provided by the manufacturer for the network
interface identifier.
The physical address is used at the data link layer (layer 2) to identify device
s in the local segment.
They are represented as 48-bit (12 hexadecimal) addresses.
Destination Addresses:
Destination addresses (such as IP addresses) are assigned to devices at the n
etwork layer (Layer 3) of the OSI model. It refers to the hierarchical structur
e that allows different devices in the network to communicate with each oth
er. communicate with each other.
Destination addresses are used to route and identify devices on the Internet.
Port:
Framing:
Framing is the process of encapsulating data packets with header and fragme
nt data to create a frame.
At the data link layer (layer 2), it contains a frame synchronization object, a
frame header (contains the MAC address), and a frame fragment (contains e
rror/correction information data).
Fragmentation:
Fragmentation It is the process of dividing data packets into smaller pieces f
or transmission in the network.
At the transport layer (Layer 4), segmentation is done to break large packets
into smaller pieces that can be transmitted efficiently across the network.
Sharding is required when the data size exceeds the maximum transmission
unit (MTU) of the central network.
Connection-oriented services:
HTTP is used to transfer hypermedia files, such as web pages, over the Inter
net.
It works on TCP (Transmission Control Protocol) and usually uses port 80 f
or communication.
HTTP is plain text; This means that data sent via HTTP is not encrypted and
can be intercepted or modified by an attacker.
HTTPS (Hypertext Transfer Protocol Secure):
HTTPS is a secure version of HTTP that uses encryption to protect the secur
ity of information transmitted between the client (browser) and the person u
sing the products.
It works via the SSL/TLS (Secure Terminal Layer/Transport Layer Security)
protocol and ensures data confidentiality, integrity and authentication.
HTTPS uses port 443 for communication and is mainly used for secure com
munication on the Web, online banking, e-commerce and other sensitive tra
nsactions.