To effectively troubleshoot routing issues, it is helpful to review how routing works and the related information tables.
- Receive a packet to send to a destination IP address.
- Check the routing table and determine the IP address of the next hop.
- Determine which of your network interfaces can reach it.
- Get a MAC address of that next hop (via ARP).
- Build an L2 frame.
- Send the frame out the interface.
So to do routing, you need:
- An interface table (with interface IP addresses and netmasks)
- A routing table
- An ARP table