Page 1 of 1

Port forwarding with a router and a switch

PostPosted: Mon Sep 14, 2009 6:52 am
by aphuey
Has anyone had issues port forwarding with a router that has a network switch hooked up to it?

I have used Subsonic behind a router without any problems for a couple years using port forwarding. Recently I placed a Netgear Network switch between my PC that is hosting the music and my Netgear Router. The port forwarding settings work for a short period of time and then, without changing anything, it acts like the port is not forwarding anymore. When I delete the port forwarding settings and then add them again, it works again.

I can only assume this is an issue with me adding the switch between the router and the PC since I wasn't having troubles before this time.

Do I have something hooked up wrong or configured incorrectly?

Thanks!

PostPosted: Tue Sep 15, 2009 5:17 pm
by donpearson
i no this isnt much help but i have switch between the router and the PC without any problems.

PostPosted: Thu Sep 17, 2009 9:32 pm
by aphuey
Yeah, thanks, man! That was ALOT of help! :wink:

Do you know if it is ok to have the subnet (or whatever they call it) be the same for both devices?

Both the router and the switch are set at 192.1.1.1. Is this a problem. It seems like every other aspect of the configuration is working perfectly, it's just that the port forwarding stops working a short time after it's configured. If I disable it, then reactivate it, it works again for a short time, then blocks the port back up again...

I'm sure I'm just doing something wrong - I just don't know what!

PostPosted: Thu Sep 17, 2009 10:38 pm
by jigsaw
aphuey wrote:Both the router and the switch are set at 192.1.1.1.


Hi aphuey. Considering the quoted statement I would state that you actually do not have a switch behind the router. You have another router behind the first router. Switches routes data at the data link layer, which in short means that it does not have an ip of it's own. If this is a fact than that could explain your issues. Having two routers linked serially NAT-ing the same net ( in your case 192.1.1.0/24 probably ) this would lead to conflicts and would very well explain how it works for some time and then stops. An actual switch does not affect this as it is completely transparent to the network elements ( router and pc ).

If it is an router you have, and you need it, I would suggest you switch the subnet on one of the routers to say 192.1.2.0/24.

PS: You sure it's 192.1.1.1 and not 192.168.1.1?

-jigsaw

PostPosted: Fri Sep 18, 2009 4:36 am
by BrianDelShasta
aphuey, are you sure nothing else has changed? Adding a switch into your configuration like you've stated *shouldn't* have any effect. That the port forward is working initially makes it sound like perhaps the device you're running subsonic on is dynamically change ip's. Is the ip statically set?

PostPosted: Fri Sep 18, 2009 11:02 pm
by aphuey
jigsaw wrote:PS: You sure it's 192.1.1.1 and not 192.168.1.1?
-jigsaw


Sorry for the typo - it is 192.168.1.1. (both of them are) It is definitely a switch and not a router. They are both Netgear brand. The router model is the WNR3500 and the switch is the GS605.

BrianDelShasta wrote: aphuey, are you sure nothing else has changed? Adding a switch into your configuration like you've stated *shouldn't* have any effect. That the port forward is working initially makes it sound like perhaps the device you're running subsonic on is dynamically change ip's. Is the ip statically set?


I need to change it from dynamic to static ip (I haven't done that yet :oops: ), but even though it is dynamic, the device has kept the same IP for the past 6 months or so - even when I changed the configuration, it stayed at 192.168.1.160.

Any ideas?

Thanks!

PostPosted: Wed Sep 23, 2009 8:39 pm
by semtex41
I would change the IP for the switch to something outside of your DHCP range. If I remember correctly, netgear DHCP range is by default from 192.168.1.2-192.168.1.100

If you set the IP of the switch (assuming its a managed switch) to something like 192.168.1.200 it would be outside of the range. This will do 2 things, avoid IP conflicts with windows (ie laptops waking up from hibernate) and allow you to manage the devices independently.

If the switch has DHCP, I would also turn it off, since your router is the item managing your network.

Hope this helps.