Stumped: Network connection keeps going down

My wired network seems suddenly unstable and I’m not sure why. I’m hoping someone can help me figure out how to troubleshoot.

I have a small hub with three devices plugged into it: a PC, a Mac, and a little Dlink NAS for storage. Tonight the network connection on my PC suddenly died. Sometimes that happens–I let my PC run 24/7. Usually, I restart and it fixes itself. Tonight a restart didn’t fix it. So I start poking around. I see nothing odd, so I start pulling plugs out of the hub.

  • If I unplug the network cable to the Mac, the connection on the PC comes back.
  • If I plug in the network cable to the Mac, the network connection on the PC fails.

Why would it suddenly start doing this? It’s worked fine for many months, but tonight it’s flakey. I cycled the power on the computers and the hub, but none of that seems to work. The Mac is not mine, so I don’t know what might have changed on it, but frankly, I can’t think of anything that you could change to cause something like this. I haven’t installed or done anything interesting on the PC either.

Is it some sort of DHCP weirdness I can troubleshoot with static IPs? I have no idea. I mean, I know DHCP is not supposed to work that way, but WTF?.

Any ideas about how I can troubleshoot this?

Is your hub really a hub or is it actually a switch?

Check both local IPs for the MAC and PC. Run tracert between devices that can’t connect, gateway, DNS, google. Find out where the fail point is. Sounds like it could also be a layer 1 problem though. Try a different cable. Maybe it’s a bad NIC. Mind the broadcast storm.

roguefrog covered most possibilities. It sounds like maybe one machine has a static IP address that is also getting assigned to the other machine? Or perhaps your DHCP is borked and assigning the same address to two machines? Just check the IPs on both machines.

Or, quite possibly, the hub/switch is dying.

The most likely culprit is a bad cable, honestly. Get yourself a new cable (or all new cables for all devices) to connect to the PC.

It’s also possible, though far less likely, that the ethernet port on your PC is going bad. You could get yourself a USB Ethernet Adapter port and try running it through that instead of the on-board one that came with the motherboard.

What is your DHCP server? Is it a service provider box, or something you can get logs from, and check DHCP allocation table details?

And no reason to use a hub in a setup like this instead of a switch. You would be leaving a lot of performance on the table with high-speed devices.

How can I tell? It’s just a little box with five RJ45 ports and a power adapter.

This was a good idea. I used traceroute to determine that I can connect to my router and my NAS, but ONLY if I plug the cable from the wall in the other room directly into the NAS. I think that means the hub that I’m using in the other room to distribute the signal between the PC/Mac is the culprit?

I do think one of the cables was bad, but I also think maybe the hub is slowly dying.

I probably do need to purchase a new device to distribute the signal in the back room, might as well purchase a switch. Can I just search for switch at Amazon or can you recommend something?

If you need one, little unmanaged 5 to 8port Gbit switches are pretty much commodity items. Without PoE or 2.5/5/10Gbit capability, most any vendor will work the same: D-link, TP-link, Netgear, Linksys, etc, I usually buy TrendNet. Should be around $20 for 8 ports or maybe a bit less for 5 ports.

Be aware and don’t accidentally buy a 10/100 speed only “fast” switch, that is 1990s era “fast”, get Gigabit or higher speed only.

They are usually labeled.

Hubs are obsolete network technology. The only real application of a hub these days is as a poor mans quick and dirty way to packet capture since all traffic is blasted out of all interfaces. A “dumb” device and full blown collision domain.

Switches are “smart” and only direct traffic out of the appropriate interface. (Also switches can have tapped interfaces for packet capture)

Okay, cool. That’s what I have in the back. It’s this one:

There is another one and perhaps that’s a hub. I may have had it for a while.

I can’t figure this out, but it’s not as bad tonight.

Here is my setup:

  • I have my router in room 1.
  • I have a mac in room 2 with either a hub or a switch.
  • I have a Mac, PC, NAS, and the switch above in room 3.

Here is what happens:

  • I can traceroute from bedroom 2 to the router, but not the NAS unless I unplug the upstream wire from the switch and plug it directly into the NAS. :(

  • I can tracert from the PC in room 3 to the router and all the other devices in room 3. I can’t test if I can tracert to the Mac in bedroom 2 because my wife is asleep. :) I’ll try that tomorrow.

I wish I could understand why I can’t access the NAS in room 3 from room 2. I’ve done it before, but suddenly it won’t work. This afternoon, I thought that meant the switch in room 2 was bad, but this looks like the new one I bought at the start of COVID, and it’s a switch, so maybe it’s something else.

You guys are awesome and I appreciate your help. We will figure this out!

Okay, so I actually can tracert to this device. It saw it appear in my list of connected devices on the router and so I did the tracert and it worked.

But – a new mystery.

I can’t get tracert to another PC in a room previously not mentioned, but it’s my son’s PC and he’s awake. I just don’t understand how I can have connectivity to some spots, but not others, but all of us can somehow access the router to get out to the internet. How is this possible?

Did you make sure the PC and MAC aren’t using the same IP? In room 2, you have a switch that is used for only one device, with only two ports in use?

My advice for home network issues that may come from the cables or switch/router is check if a you have old cables or switches laying around, or if a friend can drop over and bring one. A home switch needs no configuration and if you can swap them out it can let you pinpoint the problem.

If you want to eliminate DHCP as a factor, log in to your router and give each device a manual local IP address.

So if your LAN network is 192.168.0.0 or 192.168.1.0
Your gateway router would be 192.168.0.1 or 192.168.1.1

Give each device on the network an incremental IP address

192.168.0.2 or 192.168.1.2
192.168.0.3 or 192.168.1.3
192.168.0.4 or 192.168.1.4
ETC.

It’s the craziest thing. It all works tonight.

I did very little. I switched a cord from the switch in room 3 to the Mac. It’s the cord that was giving me problems the first night. With the new cord added, it didn’t start immediately working. One night I couldn’t get traceroute from room 2 to room 3 and then suddenly the next night it works.

I suppose that means something is dying, but I’m still not sure what or how to figure it out.

At least I know that I have two switches (not hubs) that are rated for high speed (Gigabit).

Do the five ports switches have a significant port for the upstream wire? With hubs, you have to use a special port for the wire that comes in “from the wall” and then the other four you can use to distribute connectivity to different devices.

Yes, I can see the IP assignments on the router management page and they were all different–of course, I had to wait to get connectivity to use the router management page, so maybe that was the problem and it resolved itself. I will have to dig through the logs.

The switch is for getting a wire to a dock (for the Macbook) and then sending the signal back to room 3. It’s ugly, but this is what it looks like:

  • CAT5 cable from room 1 to room 2
  • Room 2 also has CAT5 that goes to room 3

(So in room 2, I have a jack in the wall with two RJ45 ports)

Thanks! Switches aren’t that expensive. I should probably just get one for a backup. I should also start throwing out all the random CAT5 cables I get from various projects and maybe just get a few I know are good.

This is a good idea. My router administration page makes this super easy. I did it for the NAS last night, but I should probably do it for the others, too. Thanks!

Nope. All 5 are ethernet ports. So they allow you to expand the number of wired devices inside of your network. You still need to link the switch to your router which is connected to your modem (if separate)

Simple diagram

Internet Devices ]—ethernet—[ switch ]—ethernet—[ router ]—WAN—[ Modem ]—[ Internet

If it ends up not being the cord, do check on the switches. I had a switch get slightly zapped during a brownout and it was in the “I’ll work 95% of the time” category for weeks before I figured out the issue.

Huh. While troubleshooting the connection to my Mac, I switched the cables around to different ports on the same switch, and the Mac suddenly found the connection. Maybe that means the switch in the room with the Mac is the one that’s dodgy. Very interesting.

Thanks for your help @roguefrog!