Consider the network shown in the figure a) Give the network addresses of Subnet
ID: 3732933 • Letter: C
Question
Consider the network shown in the figure
a) Give the network addresses of Subnets A, B, and C in the form of a.b.c.d/x, such that: Subnet A
supports 8 interfaces, Subnet B supports 16 interfaces, Subnet C supports 32 interfaces.
b) Using answer to a), provide the forwarding tables (each row containing “prefix match” and
“outgoing interface” fields) for each of the three routers. Suppose that no packet will have a
router interface as the final destination. For the outgoing interface, you only need to specify
which subnet the packet needs to be forwarded to (e.g., Router 1 can forward to Subnet A,
Subnet D, Subnet F).
223.1.1.2 SubnetA 223.1.1 223.1.1.4 2231.1.3 Router 1 223.1.9.27 Subnet F Subnet D 223.1.9.1 223.1.7.1 223.1.8.1 223.1.8.0 Subnet E |223.1.22 223.1.3.1 Router 2 Router 3 223.1.2.6 223,1.3.27 223.1.2.1 1223.1.32 Subnet B Subnet CExplanation / Answer
In the first part, we have asked network addresses of Subnets A, B and C. First we will understand what a subnet is.
A subnet can be defined as the division of a single network into multiple networks. We are all familier with the classes of IP addresses like Class A, B etc. These classes have specific bits/octets reserved for the network address and host address like below.
So, from the above table we can say that, total of 8 bits are reserved for Network in Class A and same for others. Now if we are given an IP address, how to get the subnet address of that? It is quite simple first check the class for that address, then using that we know how many bits are reserved for the network address. e.g. The IP address 10.2.3.4 belongs to class A. So, total 8 bits/ first octet is reserved for the network address. Hence to get the network address, we can take logical ANDing of given IP address with the 255.0.0.0 (in binary 11111111.00000000.00000000.00000000) called as subnet mask. This will give us the network address of the given IP address i.e. 10.0.0.0. The given IP address can also be written as 10.2.3.4/8, the "/8" denotes how many bits are reserved for the network and as we saw this can be calculated by checking the class of IP address. Do note that this backslash format of network is also known as Classless Interdomain Routing(CIDR) notation. Here, network prefix 10.0.0.0/8 is CIDR notation.
Now, as we have defined a subnetting as division of single network into multiple networks, we can borrow some bits from host bits for this. Consider, we are given class A address, means total 8 bits are reserved for network(A.B.C.D/8) and other 24 for host part. So, consider if we want a nework to divide into total 2 parts, we need to borrow 1 bit from the host part as 1 bit can represent two values 0 and 1 i.e. 2^1. In this case the network address will get one extra bit, so total of 9 bits for network and remaining 23 for host part. Continuing the same, if we want total 8 sub-networks, then we need log28 = 3 bits from host part. Hence, total 11 bits for network and 21 for host part. Accordingly our subnet mask would be 11111111.11100000.00000000.00000000(255.224.0.0).
Now, we are clear with the subnet, subnet mask and bits to reserve as per the subnet mask. In the first part we need subnet A to support 8 interfaces, subnet B to support 16 interfaces and subnet C to support 32 interfaces.
Bits Required
(log2Req.Int.)
b> Here, we have asked a forwarding table for each of three routers.
So, for router 1
For Router 2
For Router 3
Note: Do keep one fact in mind, in case of matching ip addresses to multiple address in routing/forwarding table, forwarding table always selects the longest prefix matching address and forward that packet to that interface.
Classes Network Bits Host Bits Class A 8 24 Class B 16 16 Class C 24 8Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.