In this lab, we will implement application layer packet routing that can be used to build infrastructure services such as overlay networks. It is a short, 1-week lab where coding is minimal. Most of the effort entails performing benchmark experiments. Problem 1.2 is a bonus problem.
We will re-use the VPN client/server from lab5 to set up a multi-hop network
that is configured to perform load balancing of ingress traffic over two engress
links. The following describes our specific test topology:
src (amber09) -> hop1 (amber01) -> hop2 (amber02) -> hop4 (amber04)
-> dst (amber10)
-> hop3 (amber03) ->
where hop1 may forward traffic arriving from src on two outgoing links
to hop2 and hop3. hop2 and hop3 forward traffic coming in from hop1 to
hop4.
The source host, src, will run the UDP ping client from Problem 3, lab2,
and destination host, dst, will run the corresponding UDP ping server. The
specific names of the amber lab machines is arbitrary but for needing
to be distinct. The above serves as an example.
The forwarding actions at hop1, hop2, hop3, hop4 are configured by running the tunneling server, tvpns, from Problem 2, lab4, on the four machines. The tunneling client, tvpnc, may be executed at src or any other lab machine but for hop1, hop2, hop3, hop4. After running tvpns on hop4, tvpnc is executed at host src so that it forwards traffic arriving on the child's UDP ingress port from hop2 or hop3 to dst where the UDP ping server runs. After running tvpns on hop2, a second instance of tvpnc is executed on src which configures hop2's forwarding table so that UDP traffic arriving at its child's UDP ingress port is forwarded to hop4's UDP ingress port. Analogously for hop3. In the final step, after running tvpns on hop1, a fourth instance of tvpnc is executed at src which configures hop1 to forward UDP packets arriving at its child's ingress port to hop2. A fifth instance of tvpns is executed at src which configures hop1 to forward UDP packets arriving at its ingress UDP port to hop3. Thus hop1 will have two entries in its table for UDP packets arriving on its ingress UDP port, one entry that specifies hop2 as the next hop, another that denotes hop3.
Copy relevant source code from lab4 and lab2 to new directory v1/ under lab6/. Modify the tunneling server, tvpns, so that if the source IPv4 address communicated by tvpnc is already present in the forwarding table, the previously spawned child's forwarding table is updated with a new entry. Do not fork another child. Hardcore the constant 10 using #define in tvpns so that up to 10 consecutive UDP packets arriving on the UDP ingress port from the same source are forwarded hop2. The next 10 UDP packets arriving on the UDP ingress port are forwarded to hop3. This load balancing action that alternates forwarding on two egress links every 10 packets continues until a session is terminated. When performing forwarding actions, tvpns counts how many packets were forwarded per entry in its routing table which are output to stdout when a session is terminated.
Use the UDP ping app to send out 60 packets at src. If all goes well and there are no packet losses, output at hop1 should show an event split 30/30 of forwarded egress traffic. hop2 and hop3 should show 30 packets each, hop4 should output 60. Compare the observed RTT values to a run where src transmits 60 UDP ping packets directly to dst without application layer routing affecting multi-path forwarding. Discuss your finding in lab6.pdf.
Re-use the benchmark set-up of 1.1 but with the UDP-based file transport app from Problem 2, lab3, in place of the UDP ping app. Perform the same benchmark experiments as in lab3 but under the forwarding actions of application layer routing. Compare the results to those from lab3. Discuss your findings in lab6.pdf.
Electronic turn-in instructions:
i) For problems that require answering/explaining questions, submit a write-up as a pdf file called lab6.pdf. Place lab6.pdf in your directory lab6/. You can use your favorite editor subject to that it is able to export pdf files which several freeware editors do. Files submitted in any other format will not be graded.
ii) We will use turnin to manage lab assignment submissions. Please check that relevant source code including Makefile are included in the relevant subdirectories of lab6. In the parent directory of lab6, run the command
turnin -c cs536 -p lab6 lab6
You can check/list the submitted files using
turnin -c cs536 -p lab6 -v