Assignment 2 Solution
Assignment 2 Solution
Instructions:
• Partially or fully copied assignments will be marked as zero.
• Only handwritten solution on A4 page will be accepted.
• Use the title page provided with this assignment.
• Late submissions are not allowed.
Taxonomy
CLO No. CLO Statement Domain
Level
Demonstrate the network layer services including IPv4, IPv6,
3 Cognitive 3
routing algorithms, subnetting and supernetting.
Suppose the port numbers and VC numbers as shown in the figure above.
For A→R1→R2→B path
Forwarding table for R1 Forwarding table for R2
Incoming Incoming Outgoing Outgoing Incoming Incoming Outgoing Outgoing
Interface VC # Interface VC # Interface VC # Interface VC #
1 10 2 20 1 20 2 30
For A→R1→R3 → R4 → R2 →B path
Forwarding table for R1 Forwarding table for R2
Incoming Incoming Outgoing Outgoing Incoming Incoming Outgoing Outgoing
Interface VC # Interface VC # Interface VC # Interface VC #
1 10 3 40 3 50 2 30
Forwarding table for R3 Forwarding table for R4
Incoming Incoming Outgoing Outgoing Incoming Incoming Outgoing Outgoing
Interface VC # Interface VC # Interface VC # Interface VC #
1 40 3 60 2 60 1 50
i. MTU size is 800 bytes, but there is a 20 byte header so 780 bytes can be transferred at
once.
5000
𝑁𝑜. 𝑜𝑓 𝐹𝑟𝑎𝑔𝑚𝑒𝑛𝑡𝑠 = = 6.41
(800 − 20)
𝑵𝒐. 𝒐𝒇 𝑭𝒓𝒂𝒈𝒎𝒆𝒏𝒕𝒔 = 𝟕
ii. If we transfer 780 bytes at once, then offset value is not an integer, so we can transfer
776 bytes in one fragment. It means 4 bytes capacity is wasted due to incorrect MTU
size.
Subnet Mask = 1111 1111 1111 1111 1110 0000 0000 0000 = 255.255.224.0
It is a class B IP address. In class B IP address, the subnet mask is 255.255.0.0, so
Mask bits = 3
No. of subnets = 2Mask Bits = 23 = 8
No. of hosts in each subnet = 213 – 2 = 8192 – 2 = 8190
Subnet Number Subnet Address First Host Address Last Host Address Broadcast Address Default Gateway
1 128.25.0.0 128.25.0.1 128.25.31.254 128.25.31.255 128.25.0.1
2 128.25.32.0 128.25.32.1 128.25.63.254 128.25.63.255 128.25.32.1
3 128.25.64.0 128.25.64.1 128.25.65.254 128.25.95.255 128.25.64.1
4 128.25.96.0 128.25.96.1 128.25.127.254 128.25.127.255 128.25.96.1
5 128.25.128.0 128.25.128.1 128.25.159.254 128.25.159.255 128.25.128.1
6 128.25.160.0 128.25.160.1 128.25.191.254 128.25.191.255 128.25.160.1
7 128.25.192.0 128.25.192.1 128.25.223.254 128.25.223.255 128.25.192.1
8 128.25.224.0 128.25.224.1 128.25.255.254 128.25.255.255 128.25.224.1
Step N' D(v), p(v) D(w), p(w) D(x), p(x) D(y), p(y) D(z), p(z)
0 u 2, u 5, u 1, u
1 ux 2, u 4, x 2, x
2 uxy 2, u 4, x 5, y
3 vuxy 3, y 5, y
4 wvuxy 5, y
5 wvuxyz