Professional Documents
Culture Documents
Homework Assignment 1
(Solutions due 19:00, Mon., 11 Sept. 2023)
(Review due 19:00, Wed., 13 Sept. 2023)
Consider the network above, a routed network in an organization’s enterprise network. The organization
built a core network (network F) connected to a central router (R1), which provides access to the rest of
the Internet. Router (R2) connects network F to the switched Ethernet network G. The access routers
(R3 to R7) are connected to a set of local offices (networks A to E). The host H1, connected to network
F, performs various traffic monitoring tasks. All networks use Ethernet on the link layer.
The organization wants to make an address allocation by assigning an address block to networks A to
G in the following way:
i. Network A requires 500 hosts, networks B and C require 200 hosts each, and networks D and
E require 100 hosts each. The lowest address should be assigned to network A.
ii. There are no unnumbered point-to-point links: all Ethernet networks are IP subnets and all
nodes (routers and hosts) have an IP address on all their network interfaces. All nodes need to
be reachable from any other host.
iii. The address allocation should be such that the subnets can be aggregated.
iv. Each subnet should not be larger than necessary in order to accommodate all nodes (host or
router interfaces) in the subnet.
a) Assume that the allocated address block is 152.68.208.0/22. Is it possible to have an address
allocation that satisfies the above requirements? Justify your answer. (4p)
b) Now, assume that the enterprise allocated prefix 152.68.208.0/21 for its internal addresses. Make an
address allocation as described in (i-iv). Based on your address allocation, provide the network addresses
of networks A to G, and the required entries of the forwarding table of router R1. Choose appropriate
IP addresses for the router interfaces that appear as next hop in the forwarding table. Give a sketch of
your reasoning to support your solution. (26p)
a) No, it is not possible because block 152.68.208.0/22 provides 232-22=1024 distinct addresses
while we need more than 500+200+200+100+100=1100 addresses.
b) Any solution should be accepted that is correct in the sense that packets destined to ANY of
the subnets and to any of the IP addresses assigned to actual nodes (host or router) can be
forwarded.
The solution does not necessarily have to give a detailed explanation, but a good explanation
is a merit, of course, and helps to provide partial points should the solution not be entirely
correct.
The following solution assumes that the router interfaces in networks A-F are not one of the
“hosts”. If the solution clearly states that the contrary was assumed, and the solution is
consistent with the assumption then it should be considered correct.
We assume that within the subnet allocated to network F, the first IP address is assigned to
R1, the second IP address is assigned to R2, the third address is assigned to R6, and the fourth
address is assigned to R7. Similarily, addresses in network G are assigned in increasing
order of the routers´ names (R2, R3, R4, R5).
R1’s forwarding table (not including the forwarding rules for the ‘rest of the network’):
Destination Next hop Flags Interface
1 152.68.213.8/29 - U North
2 152.68.208.0/22 152.68.213.10 UG North
3 152.68.213.0/29 152.68.213.10 UG North
4 152.68.212.0/25 152.68.213.11 UG North
5 152.68.212.128/25 152.68.213.12 UG North
3. IPv4 forwarding (20/100)
A router has the forwarding table shown below. Determine the next-hop address and the
outgoing interface for the packets arriving to the router with destination addresses as
given in points (a)-(e).
80.5.0.0/16 - U m2
129.40.160.0/20 - U m1
201.50.1.0/25 - U m0
91.0.0.96/27 80.5.0.100 UG m2
147.17.0.0/16 201.50.1.44 UG m0
129.40.128.0/17 201.50.1.2 UG m0
0.0.0.0/0 80.5.0.1 UG m2
a) 201.50.1.63 (4p)
201.50.1.63 on m0, direct delivery
b) 91.0.0.140 (4p)
80.5.0.1 on m2, default route
c) 129.40.255.48 (4p)
201.50.1.2 on m0, indirect delivery
d) 201.40.195.2 (4p)
80.5.0.1 on m2, default route
e) 147.17.224.224 (4p)
201.50.1.44 on m0, indirect delivery
a. What is the purpose of TTL in the IPv4 header and in the IPv6 header? Please explain what
could happen if the TTL field did not exist. (5p)
It represents the maximum number of hops (routers) a datagram can traverse before being
dropped. Without the TTL field the lifespan of a datagram would be unlimited, hence a
datagram could potentially loop in the network infinitely, leading to congestion.
Error checking is done through the checksum field in the IPv4 header. This involves calculating
the checksum value based on the contents of the packet header. Error checking is done to detect
bit errors occurring during transmission, error checking cannot detect compromise due to
software bugs in routers, for example.
c. In the IPv4 header, the 'Flags' field consists of 3 bits, of which the 'DF' (Don't Fragment)
and 'MF' (More Fragments) flags are used. Explain a scenario where these flags would be
relevant, how they are set, and the implications for packet fragmentation and reassembly.
(5p)
The 'DF' (Don't Fragment) flag is used to indicate that the datagram should not be fragmented
while traversing the network.
The 'MF' (More Fragments) flag is set in every datagram that is not the last fragment of a
datagram.
Consider that a source host sends a datagram to a destination host whose size exceeds the MTU
of a link on the path between the source and the destination. The datagram thus needs to be
fragmented for data to fit in a link layer frame.
If the DF flag is set then the datagram will be dropped.
If the DF flag is not then all fragments except the last will have the MF flag set.
The receiver, upon receiving a datagram with the MF flag set or a datagram with the MF flag
not set but a nonzero offset, will put the datagram in a buffer for reassembly.