Why do I have redundant routing in Windows 7?

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.

Mark

Posted 2012-12-17T22:33:18.307

Reputation: 131

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

Answers

2

This is pretty much a standard Windows routing table that Windows itself builds when it initializes its own routing table. Microsoft probably knows what they're doing when they create it. Here's what the lines mean

Default route to your internet gateway for nets not defined below

1. 0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.151 25

Route to loopback network

2. 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306

Your machine's loopback address

3. 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306

Your loopback network broadcast address

4. 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306

Route to your local network

5. 192.168.1.0 255.255.255.0 On-link 192.168.1.151 281

Your machine's local address

6. 192.168.1.151 255.255.255.255 On-link 192.168.1.151 281

Your local network broadcast address

7. 192.168.1.255 255.255.255.255 On-link 192.168.1.151 281

Route to Multicast

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

Route to Global Broadcast (all networks)

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

Why the extra lines? They define exactly where to find things.

192.168.1.255 is reachable through 192.168.1.151 and is where you send broadcasts for all computers on your local network. Netmask 255.255.255.255 locks all communications through broadcast to that address.

192.168.1.0 is your local network reachable through 192.168.1.151 where all other computers in 192.168.1 land as defined by netmask 255.255.255.0 will be found.

192.168.1.151 reachable by itself netmasked 255.255.255.255 is your assigned local network address.

It may not make sense having the extra lines, but if you can get your hands on a firewall/router like an ASA-5505 and start playing around with ACLs, you start realizing very quickly why you become explicitly specific on your addressing.

Fiasco Labs

Posted 2012-12-17T22:33:18.307

Reputation: 6 368

2What do you mean "they define exactly where to find things"? To a human reading the routing table, or do they have some effect at the network level? What I got out of your answer is that it can avoid problems in more complicated networks, but I'd be interested in hearing a practical example. – Mark – 2012-12-18T01:50:45.317