Routes and Personal Blacklists (Part 1)
Routing (or Static Routing) comes from the networking and router field of study/terminology. While it is highly useful to know how to configure static routes in the case of routers and networks, I will mostly be talking about uses on a personal computer basis and what the applications are in that capacity.
First, a little background:
Static routes are designed to allow user to manually (as apposed to dynamically) configure the path that their computer network traffic will take based on certain criteria. Routing usually only needs to be manually changed if there is a lack of communication between two routers, or the router and the computer.
Say, for example, a computer has two network ports connected to two different networks; the computer will have two different IP addresses and two different gateways; therefore that computer has two different paths for accessing the Internet (assuming both networks are Internet-connected) which path will the computer take? With static routing all this traffic can be forced to take one path or another. All that is being configured is the next hop in a series of hops for a particular interface.
Replace "computer" in the example with "router" and you can see why static routing can be important in the grand scheme of things.
Chances are, in reality not that many people are going to have their personal computers attached to two different internet-enabled networks, but that doesn't mean static routes are unimportant.
Just last week my personal router was having troubles overheating and had all sorts of erratic problems. After several days of investigation, I found the issue.
For a little topology lesson: I have a router that distributes its signal to three computers and a number of other Internet-connected devices like Smartphones. One computer, known as Joker, is connected via Ethernet, everything else is attached with WiFi. Joker is the only desktop so it made the most sense to tether him to one place with a cord. After I would wake him up from sleep his network connection wouldn't fully connect until I would physically reset the router. Restarting the router every time I wanted to use the internet on Joker became old really fast.
Begin the investigation:
Screenshot of his "Local Area Connection" network connection details in Windows 7 while having these problems.
Everything looks totally legit here. Nothing out of the ordinary.
I was taught to look from the inside out, especially with network problems. Pinging localhost is the fastest way to check if a network adapter is working properly.
That is all good. Even pinging my local IP address seemed to work just fine as well. After putting up with resetting the router for a few days, it dawned on me.. Why don't I look at my routes? Here is a copy/paste from running the "route print" command in Windows 7 at the time of the problem (note that the two top entries were switched occasionally).
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 On-link 172.16.0.46 20
0.0.0.0 0.0.0.0 172.16.0.1 172.16.0.46 20
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
169.254.0.0 255.255.0.0 On-link 172.16.0.46 30
169.254.255.255 255.255.255.255 On-link 172.16.0.46 276
172.16.0.0 255.255.255.0 On-link 172.16.0.46 276
172.16.0.50 255.255.255.255 On-link 172.16.0.46 276
172.16.0.255 255.255.255.255 On-link 172.16.0.46 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 172.16.0.46 276
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 172.16.0.46 276
===========================================================================
Persistent Routes:
None
Reading this is table pretty straightforward, the Network Destination is the criteria (0.0.0.0 being a catchall), the Netmask is the mask for the criteria (0.0.0.0 ditto), the Gateway is where that criteria-filtered traffic is going to head where On-link is 127.0.0.1, the Interface is telling us which interface the rule applies to, and the Metric is sort of like the priority.
I find it somewhat funny, that exactly at the time I am researching routes... is the very time I needed it to solve a strange problem involving my routes. The problem in the table above is that I have two "all traffic" rules, the top two entries. Sometimes the two entries would be switched and other times they would look just like this. The problem is that the routes table was telling Joker that the all Internet traffic could be found by going to 127.0.0.1, which is totally false. I don't believe I am hosting the entirety of the Internet on my computer.
I blame this on the fact that the two rules have the same metric, and therefore the same priority. When I would release/renew my IP address, the same problem would come up, but only on the Wired connection, which made it even more odd.
After a while the Vista/7 "you're connected to the internet" diagram would show a successful connection in Network and Sharing Center, seen below.

Internet Connected
The only way I could fix the routes was resetting the router and waiting for a new IP address. Until I discovered this, the real problem, the routes were messed up.
The way I fixed this problem on a temporary basis is by running the route add/change command which goes something like this (format from route /?):
> route ADD 0.0.0.0 MASK 0.0.0.0 172.16.0.1 METRIC 20 IF 11
destination^ ^mask ^gateway metric^ ^
Interface^
or
> route CHANGE 0.0.0.0 MASK 0.0.0.0 172.16.0.1 METRIC 20 IF 11
This command will either add a new entry with an "all traffic" as the criteria, and point it to the correct gateway, or it would change the current 0.0.0.0 entry to the correct gateway (I would use both, since sometimes the first one would throw an error). Note that I didn't want to use the -p flag (persistent), which would make the route static, even when the system was rebooted, because I did not want to have to come back and delete it when I figured what the real problem was. Yeah, I'm lazy. I imagine the router was assigning two routes, and only the one that was supposed to work (172.16.0.1) was listed in the Network Connection Details as the correct gateway, as seen in the first picture.
Problem solved discovered. A firmware update and getting it out of the overheating situation lead to: Problem solved.
Blacklisting
next time...
I decided this post was too long, so I've broken it up in to two parts. Look for the rest of it, soon.

