View Single Post
Old 05-08-2013, 06:44 AM   #7
MeBe
Obliviot
 
Join Date: May 2013
Posts: 6
Default

No problem on the slow approval.

Here is the section that matters for your problem:
0.0.0.0 0.0.0.0 192.168.2.1 192.168.2.20 25
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.101 10

Both of those are default routes. A default route is used to send packets to IPs that you don't have an explicit route to (which on home PCs, home networks, and small corporate networks is usually any subnets outside of the one you are directly connected to).

Lower metric wins whenever two identical routes (and by identical I mean the two left values match in both lines, 0.0.0.0 0.0.0.0) are in the table. Only one default route can be used at a time. For this particular moment in time, that happens to be your 192.168.1.0/24 subnet and the metric of 10 wins and that route entry for 0.0.0.0 becomes the default route.

Now your PC thinks every time I want to send packets to an IP that I don't have an entry for, I'll send it to 192.168.1.1 to handle it for me. 192.168.1.1 is like "dude, I got nothing. But if you want to send me something destined for 192.168.1.100 I can totally do that for you with my eth switch and forwarding your L2 frame" [ lol sorry, I had this Louis C.K. video in my head when I wrote that. I didn't care for his other comedy or language, but this part was funny http://www.youtube.com/watch?v=L5TzwBhV2Bo&t=0m30s ]

Since your NAS and PC share the same subnet, they always know how to reach each other. The problem is for the times your PC thinks that same subnet is also the way it should send everything to the internet.

I think the command you want is:
route -p add 0.0.0.0 0.0.0.0 192.168.2.1 9 if 18
- or maybe -
route -p add 0.0.0.0 0.0.0.0 192.168.2.1 9 if 0x18
- or maybe -
route -p add 0.0.0.0 0.0.0.0 192.168.2.1 9 if 192.168.2.20

Sorry, I'm used to working on Cisco routers all day so I have the concept, just not the exact MS command.

Once you get your own internet, don't forget to remove this persistent route so that it doesn't pop up in the future and cause some hair pulling the next time you use that wireless dongle interface.

Now, for why you could sometimes get it to work, but it was slow, I'm scratching my head on that.

http://technet.microsoft.com/en-us/l.../bb490991.aspx
-p : When used with the add command, the specified route is added to the registry and is used to initialize the IP routing table whenever the TCP/IP protocol is started. By default, added routes are not preserved when the TCP/IP protocol is started. When used with the print command, the list of persistent routes is displayed. This parameter is ignored for all other commands. Persistent routes are stored in the registry location HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Tcpip\Parameters\PersistentRoutes.
MeBe is offline   Reply With Quote