Frustrating networking issues

Rob Williams

Editor-in-Chief
Staff member
Moderator
I'm dealing with a networking problem that's driving me the right amount of nuts to persuade me to make this post.

I moved at the start of the month, and my ISP is unable to install net here until the 14th (yes, that's ridiculous). So, I've been borrowing a neighbor's wireless connection, and so far that's served me well. Because I need to access my NAS box on occasion, I have a router hooked up which that, and my PC plugs into. Normally, there's no issue here.

For some reason, though, I cannot have both my NIC that's wired into this router and my wireless dongle active at the same time. If both are active, I can access the NAS, but not the Internet. If I have just one active, I can't access whatever the opposite connection is connected to (obviously). Essentially, I can't go online and use my NAS at the same time, and that's annoying.

I tried a number of Windows tweaks that did nothing to help. At first, I was happy to blame Windows for the issue, but I experience the exact same thing under Linux. I was running a remote backup script earlier, and whenever the NIC was enabled, the script would just halt. Once I disabled it again, it'd continue in its merry way. I'm at a loss here.

I also changed routers, and the issue persists across both. I also changed NICs... ditto.

Funny enough, if I am loading a webpage and it's going slow, and then I disable my wired NIC, the page gives me a "This webpage is not available" error immediately. It's clear that the OS is trying to get my Internet through my wired connection instead of the wireless.

Any ideas?
 

madmat

Soup Nazi
I know there's a way of tying your network connections to intranet or internet in windows but it's been so long since I've messed with networking that was notworking that I've forgotten exactly what was involved. Try setting up a work group and connecting to that via the wired NIC and using the wireless for internet. I wish I could be more in depth but it's literally been a decade or so since I've been elbows deep in that side of it.
 

Rob Williams

Editor-in-Chief
Staff member
Moderator
I'll test out that Workgroup theory later today.

Regarding the other idea, is this what you are talking about?

Windows Network Config.png

I've fiddled with that and so many other things, and am always left in the same situation. If my router was a switch or a bridge I wouldn't have this problem. I really wish more companies who make routers would allow you to configure them as either of those things... it'd solve my issue right there.
 

madmat

Soup Nazi
No, not in the device settings, in the networking interface in windows. Like I said, it was a long, long time ago and I was using XP Pro versus 8. IMO, XP is a bit more robust as far as user tweakability goes. While I haven't used 8 enough to delve too deep into the nuts and bolts of it, 7 is more hands off than XP was.
 

MeBe

Obliviot
Is the IP dished out by your router in the same subnet as the IP dished out by your neighbor's router?

Is the IP of your NAS in the same subnet as the IP your PC gets assigned?

Is the last NIC to be brought up enabled the one that seems to "win" connectivity?

Paste your route print -4 (or just route print if you don't have an IPv6 enabled system) from the cmd line and I can help you tshoot.
 

Rob Williams

Editor-in-Chief
Staff member
Moderator
Hi MeBe:

Apologies for it taking so long to approve your post; I didn't see it sitting there. I promoted your account so you won't have a delay like that again. I hate to have these measures in place but we get a LOT of spam posted here each day that no one ever sees as a result.

"Is the IP dished out by your router in the same subnet as the IP dished out by your neighbor's router?

Not so. The ISP router is 192.168.2.1, and the router here is 192.168.1.1. In the last place (and soon, here), this router plugged into the ISP router, with the same IP addresses used.

"Is the IP of your NAS in the same subnet as the IP your PC gets assigned?"

Yes. Router is 192.168.1.1 and NAS is 192.168.1.100.

"Is the last NIC to be brought up enabled the one that seems to "win" connectivity?"

That's a good question; I hadn't thought about it. I'll disable both in a moment and then enable the NIC first and then the wireless dongle. At times though, both have fared well; it's not until after a little while that the net becomes noticeably slow, at which point it becomes perfect again if I disable the wired NIC.

"Paste your route print -4 (or just route print if you don't have an IPv6 enabled system) from the cmd line and I can help you tshoot."

I -assume- you mean with all of the NICs enabled, so I enabled and am attaching a file here. Ironically, I lost net while I did that.

Thanks a ton for the detailed post, and again, apologies for the slow activation.
 

Attachments

  • route_print.txt
    4.5 KB · Views: 1,107

MeBe

Obliviot
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/library/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\Services\Tcpip\Parameters\PersistentRoutes.
 

Rob Williams

Editor-in-Chief
Staff member
Moderator
Lower metric wins whenever two identical routes

Whoa, I hadn't considered that. The reason I didn't experience that issue in the previous config is that even though the ISP router was 192.168.2.1, it didn't matter to my PC because it was connected to a router with 192.168.1.1. So it just worked.

"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"

ROFL. Big Louis CK fan here ;-)

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.

Here's a stupid n00b question; is the lone reason I can't connect the NAS directly to my PC due to the lack of a crossover cable? I haven't used one of those since the days my LAN parties consisted of two PCs, only one connected to the net.

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

Out of curiosity, what does "9 if 18" mean? Is it just the span of IP addresses, such as 192.168.1.2 - 192.168.1.20?

Instead of running those, I think what I'm going to attempt is changing the IP of the ISP router (I do have access to it; it's a family's member's network I'm borrowing that lives close), and then just change my internal router to 192.168.2.1... like it probably should have been since the beginning.

Thanks a ton for the help, I am confident this is exactly the issue. Will update soon!
 

MeBe

Obliviot
is the lone reason I can't connect the NAS directly to my PC due to the lack of a crossover cable? I haven't used one of those since the days my LAN parties consisted of two PCs, only one connected to the net.

I would recommend sticking with your router and not a crossover even though you only have two devices that need to talk to each other because it has a DHCP server for assigning the IP to your NAS and PC interface. With a crossover cable you'll probably have more trouble trying to make sure both sides have the IP they need to talk to each other.

what does "9 if 18" mean?
I missed the words mask & metric in there:
route -p add 0.0.0.0 mask 0.0.0.0 192.168.2.1 metric 9 if 18
route -p add 0.0.0.0 mask 0.0.0.0 192.168.2.1 metric 9 if 0x18
route -p add 0.0.0.0 mask 0.0.0.0 192.168.2.1 metric 9 if 192.168.2.20

Only one of these would get added, I just wasn't sure at the time I posted that of the syntax on how MS wants to see which interface (if). However, I just looked at help and it appears specifying the interface isn't needed and it should automatically know. So this command should do the trick without worrying about how to identify which interface.

route -p add 0.0.0.0 mask 0.0.0.0 192.168.2.1 metric 9
(of course that is if 192.168.2.1 is still the gateway to the internet. Sounds like you might have changed things up.)

From MS help for route -?:
> route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2
destination^ ^mask ^gateway metric^ ^
Interface^
If IF is not given, it tries to find the best interface for a given
gateway.


Instead of running those, I think what I'm going to attempt is changing the IP of the ISP router (I do have access to it; it's a family's member's network I'm borrowing that lives close), and then just change my internal router to 192.168.2.1... like it probably should have been since the beginning.

Are you saying that you are going to or already have changed the ISP router to 192.168.1.1 and your internal router (with the NAS attached to it) to 192.168.2.1 ?
That isn't going to buy you anything unless I'm missing something here. However, you reported that things are better, so IF it seems to have fixed it, then the order in which you brought up interfaces just happened to at that time set the metrics to what you needed by chance is my guess. I'd have to see your current ROUTE PRINT to know for sure.

The ISP router is 192.168.2.1, and the router here is 192.168.1.1. In the last place (and soon, here), this router plugged into the ISP router, with the same IP addresses used.

The difference at the last place is that your PC was only directly connected to one single network, and reached all other networks via that single net. That network was your LAN with your router(gateway) also on that LAN. That router then connected to the ISP router via the WAN interface on your internal router. When your PC sends packets it knows that anything destined for 192.168.1.0/24 goes out the interface with the IP in that subnet. Anything else goes out of the default route (0.0.0.0) interface, which was the same interface.

PC <<-- 192.168.1.0/24 subnet -->> LAN router&NAS <<-- 192.168.2.0/24 subnet -->> ISP router <<-- internet -->> global destination

You now have a situation where your PC is "dual-homed" and has two different networks it can send packets out to. 192.168.1.0/24 and 192.168.2.0/24
Since it has interfaces with IPs in both subnets, it automatically correctly knows which interface to place packets on when sending to either 192.168.2.X or 192.168.1.X
However, when it wants to send a packet to say a google server at 74.125.227.146 it doesn't have a specific route in the list, so it uses the default route. There are two default routes, so whichever default route happens to have the lower metric wins.

PC <<-- 192.168.1.0/24 subnet -->> LAN router&NAS
PC <<-- 192.168.2.0/24 subnet -->> ISP router <<-- internet -->> global destination

The good situation: If this happens to be the route that uses 192.168.2.1 (ISP router via wifi) as the gateway then 192.168.2.1 takes it from there and uses the default route it has stored in its own memory pointing to the public IP on the subnet the ISP router was assigned by the ISP. Your NAS is also reachable because your PC is on the same subnet as the NAS and therefore uses a DIFFERENT route entry that is more specific than the default route.

The bad situation: If this happens to be the route that uses 192.168.1.1 (LAN router via wired) as the gateway then 192.168.1.1 takes it from there but it doesn't have a path to the internet so it dies. Your NAS is still reachable though because your PC is on the same subnet as the NAS and once again has a specific route.

If things are working great for you ever since swapping IP addresses there isn't really a logical reason for why that would have made things better without seeing your route print table.

I think I'll be doing my first post soon and hopefully you'll be able to give some advise on that build. Trying to build out an ESXi box with servers for studying for the CCIE voice exam. I used to keep up with PCs from the 80s all the way up to about 10 years ago but now I find how much I don't feel confident on when making decisions since I've focused on Cisco networking and haven't kept up on the latest CPU/Motherboard/RAM options.

Wow, that got long quick! Sorry for the long post.
 

Rob Williams

Editor-in-Chief
Staff member
Moderator
First things first. Grats on the working account ;-) I hope you'll stick around, and feel compelled to rant about your own problems. Maybe I'll actually be able to return the favor at some point.

Second, I thought this fixed the issue, but I've been having the same one today, even though the IP addresses for each respective router and NIC have not changed. 192.168.1.1 for the ISP router (192.168.1.11 for the dongle) and 192.168.2.1 for the internal router and 192.168.2.20 for my wired NIC.

I spent 40 minutes on the phone with the ISP yesterday and they bumped up the install to tomorrow. I cannot wait... the net has been utterly painful since I moved :S

MeBe said:
With a crossover cable you'll probably have more trouble trying to make sure both sides have the IP they need to talk to each other.

Ahh, that makes sense. I do remember dealing with the crossover cables to be a pain in the ass... but it was needed for some mutliplayer action.

Rob Williams said:
what does "9 if 18" mean?

When I asked this, I didn't really mean the entire line, but rather that particular part. I just wasn't sure if it was a range or not. I'm a little swamped today, but if I can find time I might just revert everything and try these routes. Something tells me I should just play it cool until I actually get Internet tomorrow though, because I'll end up sinking so much more time into it. Have sunk so much already :S

MeBe said:
Are you saying that you are going to or already have changed the ISP router to 192.168.1.1 and your internal router (with the NAS attached to it) to 192.168.2.1 ?

Yes, as stated with my "Second" line up at the top of this post. Things were definitely better... it was the first time I could use both things all day. Usually it took under an hour to prove that I was having issues, but this lasted a while. Major fluke, potentially. The IP addresses I'm running now have been identical.

MeBe said:
The difference at the last place is that your PC was only directly connected to one single network, and reached all other networks via that single net.

Yes, I understand. Slightly poor wording on my part. What I meant was that my internal router was getting the net from the second one, so it wasn't like my PC was trying to grab from two connections at once (like I'm doing now).

That all said, I am definitely bookmarking this post for later reference. I'll understand it all better one of these days, I'll make sure of that. You'd get along with Brett on staff quite well. You can both understand complex networks when I struggle just to understand the basics. Had a good discussion about DMZ with him a few weeks ago and, as usual, couldn't understand most of it.

MeBe said:
think I'll be doing my first post soon and hopefully you'll be able to give some advise on that build. Trying to build out an ESXi box with servers for studying for the CCIE voice exam. I used to keep up with PCs from the 80s all the way up to about 10 years ago but now I find how much I don't feel confident on when making decisions since I've focused on Cisco networking and haven't kept up on the latest CPU/Motherboard/RAM options.

That sounds great, looking forward to it. Just a heads-up... if cutting-edge matters to you, Intel is likely to release its new microarchitecture in a month (Haswell).
 
Top