0% found this document useful (0 votes)
17 views18 pages

CN

Uploaded by

Jabir Bakar
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)
17 views18 pages

CN

Uploaded by

Jabir Bakar
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/ 18

a.

Email Transmission from Juma to Anna Using Web-Based Email


and POP3
i. How the message gets from Juma's host to Anna's host:
1. Juma sends an email:
o Juma uses a web-based email service (like Gmail or Hotmail)
to compose and send a message to Anna. The message is first
sent to Juma's email service provider’s outgoing mail server
using SMTP (Simple Mail Transfer Protocol).
2. SMTP Transfers the Message:
o The mail server sends the email using SMTP to the mail
server responsible for Anna’s domain (e.g., mail.anna.com).
This happens over the internet, and the message may traverse
multiple servers before arriving at the destination.
3. Anna's Mail Server Receives the Message:
o Once the message arrives at Anna’s mail server, it is stored in
a mailbox until Anna retrieves it.
4. Anna Accesses the Message Using POP3:
o Anna opens her email client and uses Post Office Protocol
Version 3 (POP3) to retrieve the message from her mail
server. POP3 allows Anna to download the message onto her
local machine for offline viewing.

ii. Series of application-layer protocols used to move the message:


1. HTTP/HTTPS – When Juma uses the web-based email client
(such as Gmail or Hotmail), his browser communicates with the
email server using HTTP/HTTPS to send the message.
2. SMTP (Simple Mail Transfer Protocol) – Once the message is
sent, SMTP is used to transfer the email from Juma’s mail server to
Anna’s mail server.
3. POP3 (Post Office Protocol Version 3) – Anna uses POP3 to
retrieve and download the email from her mail server to her local
machine.
4. DNS (Domain Name System) – DNS is used to resolve the mail
server’s IP addresses for both sending and receiving messages.

b. HTTP Client Retrieving a Web Document at an Unknown IP


Address
When an HTTP client (e.g., a web browser) wants to retrieve a web
document from an HTTP server whose IP address is initially unknown,
the following transport and application-layer protocols are used:
1. DNS (Domain Name System) – First, the client uses DNS to
resolve the domain name (e.g., www.example.com) to its
corresponding IP address. This is done using UDP or TCP on port
53.
2. TCP (Transmission Control Protocol) – After the IP address of
the web server is known, the client establishes a connection using
TCP. The three-way handshake occurs (SYN, SYN-ACK, ACK) to
create a reliable connection between the client and server.
3. HTTP (Hypertext Transfer Protocol) – Once the connection is
established, the client sends an HTTP GET request over TCP to
retrieve the desired web document.

c. Analyzing the Captured ASCII Characters of an HTTP Response


i. What operating system is running on the server?
• The operating system running on the server is Fedora, as indicated
by the server header:
Server: Apache/2.0.52 (Fedora)
ii. When was the document last modified?
• The document was last modified on Sat, 10 Dec 2005 18:27:46
GMT, as shown by the header:
Last-Modified: Sat, 10 Dec 2005 18:27:46 GMT
iii. What web server software is running on the server?
• The web server software is Apache, as indicated by the header:
Server: Apache/2.0.52 (Fedora)
iv. What is the version of the web server software?
• The version of the web server is 2.0.52.
Server: Apache/2.0.52 (Fedora)
v. Was the server able to successfully find the document or not?
Justify your answer.
• Yes, the server successfully found the document. This is evident
from the HTTP status code 200 OK, which means the request was
successful.
HTTP/1.1 200 OK
vi. What time was the document reply provided?
• The document reply was provided on Tue, 07 Mar 2008 12:39:45
GMT, as shown by the header:
Date: Tue, 07 Mar 2008 12:39:45 GMT
vii. How many bytes are there in the document being returned?
• The document being returned contains 3874 bytes, as indicated by
the header:
Content-Length: 3874
This process outlines the flow of data and protocols involved in email
transmission and HTTP communication, as well as the details retrieved
from an HTTP response message captured by Wireshark.
4o

To subnet the network using the provided address space of


172.30.4.0/22, we need to divide it into subnets for each department
(LAN 1, LAN 2, LAN 3, LAN 4) based on the required number of hosts.
Here's a summary of how we'll proceed:
1. Subnet Allocation Requirements:
• LAN 1: 60 hosts
• LAN 2: 10 hosts
• LAN 3: 250 hosts
• LAN 4: 100 hosts
2. Subnetting Approach:
We will allocate subnet masks according to the number of hosts
required. We need to reserve enough IP addresses in each subnet to meet
the host requirements while accounting for the network and broadcast
addresses. The formula for determining the number of addresses per
subnet is:
Addresses required=2⌈log⁡2(number of hosts+2)⌉\text{Addresses
required} = 2^{\lceil \log_2(\text{number of hosts} + 2)
\rceil}Addresses required=2⌈log2(number of hosts+2)⌉
Each subnet needs a power-of-2 block of IP addresses to accommodate
the number of hosts.
Calculation of Subnets
• LAN 1 (60 hosts): Requires 62 addresses (60 hosts + 2). A /26
subnet (64 addresses) is sufficient.
• LAN 2 (10 hosts): Requires 12 addresses (10 hosts + 2). A /28
subnet (16 addresses) is sufficient.
• LAN 3 (250 hosts): Requires 252 addresses (250 hosts + 2). A /24
subnet (256 addresses) is sufficient.
• LAN 4 (100 hosts): Requires 102 addresses (100 hosts + 2). A /25
subnet (128 addresses) is sufficient.
3. Subnet Allocation Plan:
Total
LA CID Network Broadcast Valid Host
Subnet Subnet Mask Host
N R ID ID Range
s

172.30.4.1
LA 255.255.255.19
172.30.4.0/26 /26 172.30.4.0 172.30.4.63 – 64
N1 2
172.30.4.62

172.30.4.65
LA 255.255.255.24
172.30.4.64/28 /28 172.30.4.64 172.30.4.79 – 16
N2 0
172.30.4.78

172.30.5.1
LA 172.30.5.25 –
172.30.5.0/24 255.255.255.0 /24 172.30.5.0 256
N3 5 172.30.5.25
4

172.30.4.12
LA 172.30.4.128/2 255.255.255.12 172.30.4.12 172.30.4.25 9 –
/25 128
N4 5 8 8 5 172.30.4.25
4
Detailed Subnetting Table:
Hosts CIDR Total
LA Network Broadcast Valid Host
Neede Subnet Mask Notatio Addresse
N Address Address Range
d n s

172.30.4.1
LA 255.255.255.19
60 172.30.4.0 /26 172.30.4.63 – 64
N1 2 (/26)
172.30.4.62

172.30.4.65
LA 255.255.255.24
10 172.30.4.64 /28 172.30.4.79 – 16
N2 0 (/28)
172.30.4.78

172.30.5.1
LA 255.255.255.0 172.30.5.25 –
250 172.30.5.0 /24 256
N3 (/24) 5 172.30.5.25
4

172.30.4.12
LA 172.30.4.12 255.255.255.12 172.30.4.25 9 –
100 /25 128
N4 8 8 (/25) 5 172.30.4.25
4

Reserved Address Space:


• The remaining space can be used for future expansion, or for router
links (e.g., point-to-point links).
• 172.30.6.0/22 can be reserved for future use, as it remains
unallocated.

Explanation:
• LAN 1 (60 Hosts): A /26 subnet (64 IP addresses) is assigned, with
a valid host range of 172.30.4.1 to 172.30.4.62.
• LAN 2 (10 Hosts): A /28 subnet (16 IP addresses) is assigned, with
a valid host range of 172.30.4.65 to 172.30.4.78.
• LAN 3 (250 Hosts): A /24 subnet (256 IP addresses) is assigned,
with a valid host range of 172.30.5.1 to 172.30.5.254.
• LAN 4 (100 Hosts): A /25 subnet (128 IP addresses) is assigned,
with a valid host range of 172.30.4.129 to 172.30.4.254.
This plan ensures that each department gets sufficient IP addresses with
room for future growth if needed.
To assign IP addresses for the Metropolitan Area Network (MAN) with 8
different buildings, each containing 255 workstations, we will subnet the
provided 172.31.0.0 network using Class B private IP addresses.
We aim to create 8 subnets, each capable of supporting at least 255 hosts
(or workstations).
Steps:
1. Determine the subnet mask that allows at least 255 hosts per
subnet.
2. Calculate the network addresses, broadcast addresses, and
valid host ranges for each subnet.
3. Reserve some subnets for serial interfaces and other potential
needs.
Since we need to accommodate 255 workstations per building, we need
subnets that support at least 256 addresses (including network and
broadcast addresses).
Calculation:
• Class B default subnet mask: 255.255.0.0 (or /16 in CIDR
notation).
• We will need subnets with at least 256 IP addresses. A /24 subnet
(255.255.255.0) supports 254 hosts (2^8 = 256 addresses, minus
network and broadcast addresses).
• Each building can be assigned a /24 subnet (256 total IP addresses,
including network and broadcast).
Let’s assign 8 different subnets from the 172.31.0.0 network:

i. Subnet Mask:
Since we are using /24 subnets, the subnet mask for each subnet is:
• 255.255.255.0 or /24

ii. Network Addresses for Each Subnet:


We will divide the 172.31.0.0/16 network into 8 subnets, with each
subnet being a /24.
Subnet Network Address
1 172.31.0.0/24
2 172.31.1.0/24
3 172.31.2.0/24
4 172.31.3.0/24
5 172.31.4.0/24
6 172.31.5.0/24
7 172.31.6.0/24
8 172.31.7.0/24

iii. Broadcast Addresses for Each Subnet:


The broadcast address is the last address in each subnet.
Subnet Broadcast Address
1 172.31.0.255
2 172.31.1.255
3 172.31.2.255
4 172.31.3.255
5 172.31.4.255
6 172.31.5.255
7 172.31.6.255
8 172.31.7.255

iv. Valid Host Ranges for Each Subnet:


The valid host range excludes the network address and the broadcast
address.
Subnet Valid Host Range
1 172.31.0.1 – 172.31.0.254
2 172.31.1.1 – 172.31.1.254
3 172.31.2.1 – 172.31.2.254
4 172.31.3.1 – 172.31.3.254
5 172.31.4.1 – 172.31.4.254
6 172.31.5.1 – 172.31.5.254
7 172.31.6.1 – 172.31.6.254
Subnet Valid Host Range
8 172.31.7.1 – 172.31.7.254

v. Reserved Subnets and Addresses:


The following subnets and addresses should be reserved:
1. Reserved for Serial Interfaces:
o Your supervisor will assign specific subnets or /30 subnets (4
addresses per subnet) for serial interfaces. Commonly, these
are small point-to-point links, so a /30 subnet is ideal,
providing 2 usable addresses per link.
Example of reserved subnets for serial interfaces could be:
o 172.31.8.0/30, 172.31.8.4/30, etc.
2. Reserved Addresses:
o 172.31.255.255: The last address in the 172.31.0.0/16 block
is reserved as the broadcast address for the entire network.
o 172.31.0.0/16 Network Address: The first address in the
block is reserved as the overall network address.
These reserved addresses should not be used for building workstations.

Summary:
• Subnet Mask: 255.255.255.0 (/24)
• 8 Network Addresses: 172.31.0.0/24 to 172.31.7.0/24
• Broadcast Addresses: 172.31.0.255 to 172.31.7.255
• Valid Host Ranges: 172.31.0.1 to 172.31.7.254
• Reserved Subnets: Small subnets like /30 can be used for serial
interfaces; avoid using the 172.31.255.255 broadcast address and
172.31.0.0 network address.
This setup ensures that each building gets its own network with
sufficient IP addresses for all 255 workstations, while leaving room for
serial interfaces and other future needs.
Three Primary Differences Between TCP and UDP:
1. Reliability:
o TCP: Provides reliable, ordered, and error-checked delivery
of data through features like acknowledgment (ACKs),
retransmission, and sequence numbers.
o UDP: Does not guarantee reliability, order, or error checking.
It simply sends packets (datagrams) without ensuring
delivery or sequence.
2. Connection:
o TCP: Is a connection-oriented protocol. It establishes a
connection using a three-way handshake before data
transmission and terminates it afterward.
o UDP: Is connectionless. Data is sent without the need to
establish or terminate a connection.
3. Overhead:
o TCP: Has more overhead due to error checking, flow
control, and congestion control mechanisms, which add
headers and processes to ensure reliable communication.
o UDP: Has minimal overhead with a smaller header, making
it faster but less reliable. Suitable for real-time applications
like video streaming.
b. TCP Sequence Number and Congestion Window Size:
i. Importance of Sequence Number and Congestion Window Size in
TCP:
• Sequence Number:
This value is crucial for ensuring the ordered delivery of packets
and for identifying missing or out-of-sequence packets. TCP
assigns a unique sequence number to each byte of data sent, so the
receiver knows the correct order of received data and can request
retransmission if any packets are lost.
• Congestion Window Size (CWND):
The congestion window is used to control the flow of data into the
network to avoid overwhelming it. By dynamically adjusting the
size of the window, TCP ensures that the sender doesn't transmit
too much data too quickly, preventing network congestion and
packet loss.
ii. How Each Value is Computed and Used:
• Sequence Number:
TCP assigns an initial sequence number (ISN) during the
connection setup (three-way handshake). For each packet sent, the
sequence number is incremented by the number of bytes
transmitted. The receiver acknowledges the receipt of data by
sending an acknowledgment (ACK) with the next expected
sequence number.
o Use: It ensures that the receiver gets packets in the correct
order and can request retransmission if any packets are
missing or arrive out of order.
• Congestion Window (CWND):
The CWND size is initialized to a small value and grows
dynamically based on network conditions (e.g., using slow start,
congestion avoidance, and fast recovery algorithms). The window
size increases as long as no congestion is detected, but it decreases
when packet loss or congestion is detected.
o Use: CWND limits the amount of unacknowledged data a
sender can transmit, controlling traffic flow based on the
network’s capacity and preventing congestion by throttling
data transmission when necessary.

c. The Need for UDP and Why IP Alone Isn't Sufficient:


UDP is needed because while IP (Internet Protocol) provides the basic
functionality of delivering packets between hosts, it lacks key features
required by many applications:
1. Multiplexing:
IP cannot distinguish between multiple processes on the same host.
UDP provides port numbers to allow different processes to send
and receive data simultaneously on the same machine.
2. Error Detection:
UDP includes a checksum to detect corruption in transmitted data.
IP does not guarantee integrity or offer error detection at the
transport layer.
3. Application-Specific Needs:
Many applications, such as real-time services (e.g., video
streaming, gaming), prioritize speed over reliability. IP alone does
not provide the means to send data quickly without waiting for
acknowledgments or retransmissions, which UDP allows.
Without UDP (or another transport protocol), developers would have to
implement their own mechanisms for multiplexing and error-checking,
making networking more complex and less efficient.
d. What Happens When Two Applications (One Using TCP, the
Other Using UDP) Compete for Bandwidth:
When a TCP-based application and a UDP-based application compete
for bandwidth:
1. TCP:
TCP will attempt to use as much bandwidth as possible, but it is
sensitive to congestion. TCP monitors network conditions and
reduces its sending rate if it detects congestion (e.g., through lost
packets or high latency). It increases its sending rate again slowly
when the network is stable. This means TCP will back off if there
is congestion.
2. UDP:
UDP, on the other hand, does not perform congestion control. It
sends data at a constant rate regardless of network conditions or
congestion, as it does not react to packet loss or delays in the same
way TCP does.
Result:
The UDP application will continue sending data at a constant rate,
potentially taking up more bandwidth. Since UDP does not reduce its
transmission in response to congestion, the TCP-based application will
likely have to reduce its sending rate to accommodate the congestion
caused by the UDP traffic. This can result in UDP dominating the
bandwidth and causing TCP applications to experience reduced
performance, packet loss, and higher delays.
a. Techniques to deal with the scarcity of IPv4:
1. Network Address Translation (NAT):
NAT allows multiple devices on a private network to share a single
public IP address for accessing the internet. This reduces the
number of public IP addresses required.
2. Classless Inter-Domain Routing (CIDR):
CIDR replaces traditional IP address classes with a more flexible
method of IP address allocation, allowing for more efficient use of
available address space by enabling subnetting of arbitrary sizes.
3. IPv6 Adoption:
IPv6 was developed to replace IPv4. It uses 128-bit addresses,
providing a virtually limitless number of IP addresses, compared to
IPv4’s 32-bit addressing system.
4. IP Address Exhaustion Management Policies:
Internet registries (such as ARIN, RIPE, and APNIC) manage IP
address allocations carefully, ensuring more efficient and fair
distribution of IPv4 addresses.
5. Reclaiming and Reallocating Unused IPv4 Addresses:
Unused or dormant IPv4 address blocks are being reclaimed and
reassigned to reduce wastage.

b. Difference Between OSI and TCP/IP Model:


Feature OSI Model TCP/IP Model
Has 7 layers (Physical,
Has 4 layers (Network
Data Link, Network,
Layers Interface, Internet,
Transport, Session,
Transport, Application)
Presentation, Application)
Protocols were developed
Protocol Developed as a first by DARPA, and the
Development theoretical model by ISO model came later to
before the actual describe the suite
Feature OSI Model TCP/IP Model
protocols were
implemented
OSI is a generic,
TCP/IP is based on
Standardization protocol-independent
standard internet protocols
standard model
Provides both connection-
Supports only connection-
oriented (TCP) and
Transport Layer oriented services (TCP) in
connectionless (UDP)
the transport layer
services
Ensures reliable Relies on TCP for reliable
transmission through transmission and UDP for
Reliability
protocols like TCP at the connectionless, faster
transport layer communication
Mostly used as a teaching The practical and widely
Usage tool and theoretical adopted model for Internet
framework communication

c. Difference Between IPv4, MAC, and Port Addressing:


Address
Description Purpose Format
Type
A 32-bit logical
address assigned Identifies devices 4 octets, dotted-
IPv4 to devices in a across networks decimal format (e.g.,
Address network. It is
globally 192.168.0.1)
used to uniquely
identify a device
Address
Description Purpose Format
Type
on the Internet or
a local network.
A 48-bit physical Uniquely identifies
address burned a device at the 6 pairs of hexadecimal
MAC
into the network hardware level on a digits (e.g.,
Address
interface card local network 00:1A:2B:3C:4D:5E)
(NIC) of a device. (Layer 2).
Differentiates
A 16-bit number services or
used to identify applications on the Numeric value (e.g.,
Port
specific processes same device in port 80 for HTTP, port
Address
or services on a communication 443 for HTTPS)
device. (used in transport
layer).

Subnet mask is a 32-bit number used to divide an IP address into


network and host portions and determine the network's size.
IPv6 is the 128-bit addressing scheme, developed to handle
expansion and scalability of modern networks.
TCP and UDP are both network communication protocols. TCP
ensures reliable, ordered, and error-checked delivery of packets, while
UDP is faster but does not guarantee delivery or order.
DNS is a decentralized naming system for computers, services, or
any resource connected to the internet or a private network, which
translates domain names into IP addresses.
Ping is the command that is used to test network connectivity
between devices, but it can also be used to determine how many routers
are in between a source and a destination.
Special condition in a network where more data packets are coming
to network devices than they handle is called network congestion.
All computers connected to the internet and wanting to use it for
sending/receiving data must follow a common set of rules or guidelines
for communication called protocols.

You might also like