2
I'm trying to better understand my routing tables. My routing table is:
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
1. 0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.151 25
2. 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
3. 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
4. 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
5. 192.168.1.0 255.255.255.0 On-link 192.168.1.151 281
6. 192.168.1.151 255.255.255.255 On-link 192.168.1.151 281
7. 192.168.1.255 255.255.255.255 On-link 192.168.1.151 281
8. 224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
9. 224.0.0.0 240.0.0.0 On-link 192.168.1.151 281
10. 255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
11. 255.255.255.255 255.255.255.255 On-link 192.168.1.151 281
===========================================================================
Most of those entries make sense to me, but a few confuse me:
- 2 and 3 seem redundant, as do 2 and 4. Why not just 2?
- 5 and 6 seem redundant, as do 5 and 7. Why not just 5?
I'm trying to grok routing tables and this bit is still confusing me.
Edit: As a test I deleted line 3. Even though 2 seems to accomplish the same thing, I was lost the ability to visit websites.
2The metric values for the routes also interesting as well. – mdpc – 2012-12-17T22:46:08.297
Technically the entries for your host IP and the broadcast address in their current form are redundant and the network will probably still work without them. However, by having them, a "rougue" route for the network address with lower metric cannot affect the packets send to the local address or to the broadcast. This does not seem to be a good reason to add these routes though. Another possibility is the stack handle the routes specially and deliveres the packets back directly on the IP layer as opposed to going down to the MAC layer. – billc.cn – 2012-12-17T23:20:19.353