0% found this document useful (0 votes)
95 views

Programming Assignment 4 Redacted

This document summarizes a programming assignment involving network designs. It discusses setting up a network with two hosts that can ping each other via a router, with the key steps being assigning the hosts to different subnets and enabling IP forwarding on the router. It also notes that intentionally changing subnet lengths, IP addresses, or default routes can cause the network to break by introducing issues like subnet overlap.

Uploaded by

api-446884357
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views

Programming Assignment 4 Redacted

This document summarizes a programming assignment involving network designs. It discusses setting up a network with two hosts that can ping each other via a router, with the key steps being assigning the hosts to different subnets and enabling IP forwarding on the router. It also notes that intentionally changing subnet lengths, IP addresses, or default routes can cause the network to break by introducing issues like subnet overlap.

Uploaded by

api-446884357
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

CST 311

Programming Assignment 4

1. Network Designs:
2. Full Code with Changes in comments:
3. Program Working

4. h1 ping h2

5. h2 ping h1
6. Questions:

a) What were any interesting things found and lessons learned?

Subnetting and networks are very sensitive to settings changes. This makes networks
incredibly robust and dynamic while offering different levels of security based on how
explicit the settings are vs using automated systems like DHCP.
b) Why didn’t the original program forward packets between the hosts?

The router requires different subnets through each of its interfaces. Without setting the
hosts to different subnets they would not be able to communicate. This could have worked
using a switch instead of a legacy router or if the router had switching integrated. Our
version was basic and did not have the necessary features for it to work out-of-the-box.
b) Is the line ‘ r1.cmd('sysctl -w net.ipv4.ip_forward=1') ’ required?

Yes, that line is required in order to ensure that h1 and h2 can have their pings properly routed. If this
line is removed then h1 and h2 cannot ping each other.

c) Intentionally break your working program, e.g.: change a subnet length, IP


address, or default route for a host. Explain why your change caused the
network to break.
By adjusting subnet length, we start running in to problems with subnet overlap which will
break the network and cause host unreachable errors.

You might also like