Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Assignment 4 Sol

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Question 1: An organization is granted a block with one of the IP addresses as 150.100.80.0/22.

The
administrator wants to create 4 subnets with the following requirements:1st subnet needs at least 300
IP addresses, 2nd subnet needs at least 200 IP addresses, 3rdsubnet needs at least 100 IP addresses
while 4th subnet needs at least 120 IP addresses. The following are required from you:
a) Write the subnet mask for each subnet.
255.255.254.0
255.255.255.0
255.255.255.128
255.255.255.128

b) Write the first and last IP address in each subnet (Network and Broadcast addresses).
150.100.80.0 150.100.81.255
150.100.82.0 150.100.82.255
150.100.83.0 150.100.83.127
150.100.83.128 150.100.83.255

c) Write the number of addresses in each subnet.


510
254
126
126
d) Write the range of valid host addresses in each subnet.

150.100.80.0 150.100.81.255
150.100.82.0 150.100.82.255
150.100.83.0 150.100.83.127
150.100.83.128 150.100.83.255

[2+2+2+2 = 8 Marks]

Question 2: Differentiate between forwarding and routing. Write 3 points for each. Also states brief
packet transfer scenario where these come into play.

Forwarding
1. Path Execution: Forwarding refers to the process of moving packets from an incoming link to an outgoing
link within a single router. It is a local, hardware-based activity.
2. Speed and Efficiency: Forwarding is performed at the data link layer and is optimized for speed. It
involves looking up the outgoing link in a forwarding table that is typically implemented in the router's
hardware for high-speed processing.
3. Decision Making: The decisions in forwarding are made based on pre-established routing tables
(determined by routing protocols). It does not involve recalculating routes; it simply uses existing
information to transfer packets efficiently.

Routing
1. Path Determination: Routing is the process of choosing the best path through the network from the
source to the destination. It is a network-wide process.
2. Complex Algorithms: Routing uses sophisticated algorithms and protocols to determine the optimal path
for data to travel across different networks. It considers multiple network variables like bandwidth,
network policies, and congestion.
3. Dynamic and Adaptive: Routing can dynamically adjust to changes in the network topology or traffic
conditions. Routers communicate with each other using routing protocols to update their tables and make
informed path choices.

Packet Transfer Scenario

Consider a scenario where an email needs to be sent from a user in New York to a user in Tokyo. When the
user in New York sends the email, it is broken down into packets, each of which needs to be routed to
Tokyo.

Routing: Initially, the router at the user’s ISP in New York determines the best path for the packets to reach
Tokyo. This decision is based on the routing protocols it uses, which consider various network paths, traffic
load, and possibly even the type of service as email might be prioritized differently from video streaming
traffic.

Forwarding: Once the path is determined, each packet enters the network. At each intermediate router
along the chosen path, the router performs forwarding. The router quickly looks up its forwarding table to
see which link the packet should be sent out on to continue along the correct path towards Tokyo. This
process is repeated at each router until the packets reach the recipient’s ISP in Tokyo.

Thus, while routing determines the path the packets should take, forwarding is the action of moving those
packets along the path from one router to the next until they reach their destination.

[5 Marks]

Question 3: Draw labelled IPv4 datagram. Also describe each of the following in 3 to 4 lines:

a) What is TTL and how it is determined.


In IPv4, TTL (Time to Live) is a field in the packet header indicating the maximum number of router
hops a packet can take before being discarded. It's decremented by one at each hop, ensuring packets
don't circulate indefinitely. The initial TTL value is typically set by the sender's operating system but
can be adjusted as needed for network optimization and security.

b) What is the significance of Header checksum and how it is calculated.


The header checksum in IPv4 validates the integrity of the packet header during transmission. It's
computed by summing all 16-bit words in the header, with the checksum field temporarily set to 0.
The one's complement of this sum is then placed in the checksum field. If the checksum at the
receiving end doesn't match the computed value, it indicates header corruption, prompting packet
rejection.

c) What is Fragment Offset?


The Fragment Offset is a field in the IP header used for reassembling fragmented IP packets. It
indicates the position of a fragment within the original unfragmented packet, measured in units of
eight-byte blocks. This allows the receiving end to correctly reorder and reconstruct the original
packet from its fragments.
d) What is the significance of the Upper-layer-Protocols portion of the IPv4 header? Why
was it eliminated from the IPv6 header?
The "Upper-layer-Protocols" portion in the IPv4 header identifies the protocol used in the
data portion of the packet, aiding in routing decisions. In IPv6, this was moved to the
"Next Header" field within extension headers to streamline the main header, improve
efficiency, and allow for easier protocol extension without altering the core header
structure.
[6+4 = 10 Marks]

Question 4: Apply
Link State and
Distance Vector
algorithms on the
following graph. Do
not omit steps from
the solution. Assume
node A as the
source node.

[5+5 = 10 Marks]
Question 5: Write whether you agree or disagree with the following prompts. Give
reason for your choice in in 2 to 3 lines as well:
a) IPv4 to IPv6 transition is possible by tunneling. Draw a diagram to show how if you agree.

b) DHCP is a plug and play protocol.


DHCP (Dynamic Host Configuration Protocol) facilitates a "plug and play" experience by automatically
assigning IP addresses and network configuration settings to devices when they connect to a network.
This automation eliminates the need for manual configuration, allowing devices to seamlessly join the
network without requiring user intervention, which is a hallmark of the "plug and play" concept.
c) Dynamic routing is more advantageous than static routing. Also write 2 pros of the one
you think is more advantageous.
Dynamic routing provides fault tolerance by automatically rerouting traffic in case of
network failures, ensuring continuous connectivity. Additionally, it facilitates load
balancing by distributing traffic across multiple paths, optimizing network utilization and
preventing congestion on heavily used links.
d) NAT is not a use case of gateway routers.
Yes, that statement is generally true. While many gateway routers do include NAT functionality, it's
not a defining or exclusive use case for them. NAT can be implemented in various network devices
such as firewalls, dedicated NAT devices, or even servers, depending on the network's specific
requirements and architecture.
[1+1+2+2 = 6 Marks]

Question 6: For the following scenario where Routers R1 and R2 with interfaces 0, 1, 2, 3, 4,and 5, 6
respectively, constitute the network. Use IP Address Aggregation (Route Summarization) and fill the
entries in the following table. (Default entries are pre-filled)
[2.5+2.5 = 5 Marks]

Routing Table for R1 Routing Table for R2

IP Address Range with Interface IP Address Range with Interface


Prefix Prefix

0.0.0.0/0 4 0.0.0.0/0 6
142.25.7.0/26 0 142.25.7.0/24 5

142.25.7.64/26 1

142.25.7.128/26 2

142.25.7.192/26 3

+
Question 7: A datagram of 4,000 bytes arrives at a router and must be forwarded to a link with an
MTU of 1,5XX bytes (where XX are the last 2 digits of your roll number) . The datagram stamped with the
identification number XXX (where XXX are the last 3 digits of your roll number). Explicitly state into how
many fragments the datagram is divided. Fill the following table with the relevant characteristics of the
fragments:
[6 Marks]

Fragment Serial Size in Bytes ID Offset (Also Value of the


Number give reasoning Flag (1 or 0)
for your value)

1 1573 273 0 1

2 1573 273 194(1553/8) 1


Bytes in data
field/8
3 914 273 388 0

Question 8: Consider the OpenFlow network shown in the following figure. Suppose that the desired
forwarding behavior for datagrams arriving from host h3 or h4 at s2 is as follows:
- any datagrams arriving from host h3 and destined for h1, h2, h5 or h6 should be
forwarded in an anti-clockwise direction in the network
- any datagrams arriving from host h4 and destined for h1, h2, h5 or h6 should be
forwarded in a clockwise direction in the network

Specify the flow table entries in s2 that implement this forwarding behaviour.

Match Action

IP Src = 10.2.0.3 Forward(1)


IP Dst = 10.1.*.*

IP Src = 10.2.0.3 Forward(1)


IP Dst = 10.3.*.*

IP Src = 10.2.0.4 Forward(2)


IP Dst = 10.1.*.*

IP Src = 10.2.0.4 Forward(2)


IP Dst = 10.3.*.*

[5 Marks]

You might also like