Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a router connected to a hub that connects two computers. I have some own-developed programs that connects via socket connection from one computer to the other. But after doing a factory reset of the router, these programs are unable to make a connection. I can still ping the computer though.

Not sure where to start.. Would I need to set up some address/port forwarding or something in the router in order for this to work?

Visual Studio gives SocketException:

No connection could be made because the target machine actively refused it 192.168.1.xxx:xxxx
share|improve this question
    
Assuming that the two computers are in the same local subnet, then you should be able to connect the computers with just the hub (or a switch which is far more common these days). The only function of the router the computers would be using for your test is obtaining their dynamic IP addresses from the DHCP server. If you assign static IP addresses to each computer, then you could dispense with the router. –  sawdust Apr 5 '12 at 21:04
    
@sawdust Maybe it's a "switch", I'm not really aware of the difference. It's a good old Dlink DI604 router, using just the LAN ports. The router is a cable modem, so that's why it's connected. –  bretddog Apr 5 '12 at 21:09
    
"Maybe it's a "switch", "router is a cable modem" - You need to slow down, and provide us with a concise and accurate description of the hardware connections and network configuration. Hubs are not switches. A cable modem may or may not include a router. The D-Link DI-604 is not a hub as you first described, but a router-plus-switch. So you might have two routers in your setup? If so, one of those routers has to be disabled. –  sawdust Apr 5 '12 at 21:34
    
@sawdust Yes it's a cable modem router with wifi. And the DLink I use as a switch, connecting the router and the two computers to it's LAN ports 1-2-3. I think that's a sensible setup? –  bretddog Apr 5 '12 at 23:10
    
That setup will work most of the time. But you probably have two DHCP servers running, and if they are using the same pool of IP addresses, then you could have each PC using the same IP address. That problem is not likely to happen, but the simple way to avoid it completely is to disable the DHCP server in the D-Link unit. –  sawdust Apr 6 '12 at 9:38

2 Answers 2

If both computers are on the same router (you can safely ignore the hub in this situation) you shouldn't need any port forwarding. When you login to the router you see both computers attached? Have you verified that their IP addresses didn't change after the factory reset?

Perhaps your router had some type of firewall enabled by default. this would be in the settings somewhere.

Bear in mind these are only vague guesses because you were vague on the details of your setup.

share|improve this answer
    
Yes IP addresses are the same as before, and they are both listed as connected in router admin. Firewall is set to minimum security (accept inbound and outbound). Not sure what you mean by ignoring the hub? I use the hub because the router is located in another room, so to just run one cable to the computer room. But I guess the hub doesn't have any effect on the setup in this configuration. Would of course give more details, I just don't know what is relevant. –  bretddog Apr 5 '12 at 20:52
up vote 0 down vote accepted

Solved: The problem was simply that the software for some reason had turned off it's socket enabled parameter automatically when the router was reset.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.