Pseudo code for the routing algorithm implemented in the EAC router model
Check the subnet destination of the incoming packet.
If the packet is addressed to the local subnet, then
Get address ID from the packet header,
Send the packet to the port that matches the address ID.
Else (packet is not addressed to the local subnet)
If the packet is from a local host, then
Route it to the default port.
Else (the packet is from the default port, i.e., from another subnet)
Route it to the user-specified outgoing port
(User specifies outgoing port via the model interface before starting the simulation.)
Slide 13
Slide 12