I believe this piece does a good job with forwarding, but would be improved by a discussion of termination.
Routing is only triggered when the packet is L2 terminated: the destination MAC of the packet is one of the router's own MACs.
If the packet's destination MAC does not belong to the router, it doesn't matter what is in its IP header, it will be switched in the LAN it came in on.
This design also generalizes nicely to the case when the destination IP of a routed packet is one of the router's IPs.
Good point. Incorporating that would require more brain that I have right now (bad timezone :D), but you're right, I completely left that out. May I update the article with a link to this comment?
Routing is only triggered when the packet is L2 terminated: the destination MAC of the packet is one of the router's own MACs.
If the packet's destination MAC does not belong to the router, it doesn't matter what is in its IP header, it will be switched in the LAN it came in on.
This design also generalizes nicely to the case when the destination IP of a routed packet is one of the router's IPs.