Due: Wednesday, October 29th, 11:59pm CDT
Submit: Turn in your
entire kernel source code
using the
turnin
command on the
Systems Lab machines.
Please run "
make clean" in your
compile/ subdirectory before
submitting.
Work is to be completed in teams. Only one team member should turnin,
but it would be courteous to notify your teammate(s) when you do this.
Names of authors should be included in all work. You may submit
multiple times, but only the last turnin will be kept. The automatic
submission system will not accept work after the deadline.
Building upon your Embedded Xinu kernel from the previous
assignment, implement a basic routing table that allows your network
stack to forward IP datagrams to a gateway when they are not destined
for the local LAN.
Your new component should feature the following:
-
A shell command "route" that allows the user to view, add, or
delete routing table entries. Each routing table entry needs to
include at least a destination network, netmask, gateway, and
interface. See the command "/sbin/route" on
the Systems Lab Linux boxes as an
example.
- A lookup function "routeNextHop()" for your IP layer that
given a destination IP addresses uses the routing table to determine
the next hop.
- The network/route/ subdirectory will now have routeInit.c,
routeAdd.c, and routeNextHop.c, in addition to any
other helper functions you need.
When you have this working, configure two routes for testing:
192.168.6.0/24 should be delivered directly on the local network; all
other destinations should be forwarded to the default route, Xinugate
(192.168.6.50). Xinugate (aka Zardoz) will forward your packets using
Network Address Translation (NAT -- see Chapter 18) to the production
network.
The end result of all of this? Your Xinu backend should be able
to ping both machines on the local LAN (192.168.6.* addresses) and
the Internet. Good testcases for external ping include
the Systems Lab Linux boxes or
Balan.cs.purdue.edu (128.211.1.10).
Your DHCP daemon should automatically configure the two default routes
when it has received enough information from the server to bind to an IP
address.