# Cascading routers and external access



## twilyth (Jun 18, 2010)

I have an old ethernet surveillance camera that for some reason doesn't like being plugged into a switch.  There's not much I can do about it since I can't proceed until it gets the last node of the ip address and it is supposed to do that automatically.

DHCP is on for the router that the switch is attached to (and the router is connected to the leg bone, I mean the modem).

So, it seemed that my only option was to get a cheap ass router and use that instead of the switch.

I had tried this a couple years ago and it sort of worked for web browsing (had a rig attached to the second router) but anything else like file sharing was FailEx.

With the camera, I will need to be able to get to it through the external IP address.  That gets me to the first router.  How do I get to the second router where the camera is?

I know I've seen threads like this here before, but I have no fuckin' idea what to look for.

Thank you.  Any help is appreciated.


----------



## twilyth (Jun 18, 2010)

bump


----------



## Hybrid_theory (Jun 18, 2010)

I think you're basically asking how to get to the camera from the internet? If so the process is as follows:

Setup port forwarding on router one to router 2's ip address for the appropriate ports needed for the camera.

On router 2 setup port forwarding for the same ports to the ip of the camera. Make sure router 2 is physically connected to router 1 via the WAN/uplink/internet port.


----------



## twilyth (Jun 18, 2010)

Hybrid_theory said:


> I think you're basically asking how to get to the camera from the internet? If so the process is as follows:
> 
> Setup port forwarding on router one to router 2's ip address for the appropriate ports needed for the camera.
> 
> On router 2 setup port forwarding for the same ports to the ip of the camera. Make sure router 2 is physically connected to router 1 via the WAN/uplink/internet port.



OK, I think I know how to do that.  I just need to find what ports are used.  That should be in the documentation - I hope.

why does R2 have to be physically connected to R1 as opposed to R2 <--- switch <--- R1?  Does it have to do with DHCP?  Would that be the same reason the camera can't find it's IP address when connected through a switch?

Also, I think I read this in another thread but had forgotten about it.  What if you set both routers to the same internal IP address but turn off DHCP on one of them.  

If that would work, would you turn of DHCP on R2 or R1?

Sorry for all of the questions and thank you.


----------



## Completely Bonkers (Jun 18, 2010)

In a regular setup, you need to think of DHCP as a "server" giving out IP addresses on the router, and all other devices being clients "receiving" the IP address.

ONLY ONE router should be giving out DHCP address. Which one? The one connected to the internet that will also offer DNS and gateway server addresses.

Never put two routers as the same IP. Remember, an IP is like an email address or a telephone number. Want crossed lines? No. Any communication needs to know where to go to and where it is coming from (so it receives and answer).

What would you do if both YOU and YOUR GRANDMOTHER had the same telephone number but you lived in different cities. Silly eh?

I guess your camera is offering a web page, ie. port 80. Assuming you have no other HTTP server in your network, you need to port forward port 80 to the IP of the camera. Easy.

CAREFUL with Hybrid's suggestion of cascading routers. Are you REALLY doing that? Are you really LAN'ing to a WAN port and doing NAT on the second router, or are you essentially using the second router as a hub? More details needed.


----------



## twilyth (Jun 18, 2010)

Thanks for that, it's easy to forget there's a lot more going on that the stuff you have to know about like DHCP.

As the OP explains, I have a switch at a "remote" location (wired) that connects directly to the router (R1) which connects to the modem.

The switch has 8 ports and most are occupied.  None of the other devices have a problem with addressability or access using the switch.  File sharing, remote desktop - all work properly.  I even have a couple of VPN connections.

The camera is old - about 10-12 years, but it is still suitable for my purposes.  It can even pan and tilt - no zoom.

When you connect through the switch, it tries to get an IP address but it never succeeds.  

I have no idea why this didn't work and it's not like I can call tech support.  I did try it connecting directly to the router and it worked properly - at least as far as getting the address.  There might be other problems down the road since i never fully installed it.

Since I can't run another dedicated line back to R1, I figured there was some kind of router kung fu involved, so I figured I might have a shot with a second router.

But honestly, IDK since I have no idea why it isn't able to communicate through the switch.

Thanks.


----------



## Hybrid_theory (Jun 18, 2010)

A switch can be in between.  Do both routers have four switch ports? are they linksys/Dlink style devices? Or is the first one just a one port device, and the second a one port device?

If they do have switch ports, you can just hook up the 2nd router to the switch via a switch port, and the camera to the 2nd router via another switch port. This follows what bonkers was saying as to just port forward on the first router, and then thats done all the way to the camera.


----------



## twilyth (Jun 18, 2010)

OK, I was wondering about the second set of forwarding rules, but I wasn't going to question you.

Yes, both are 4 port routers.  The switch is 8 ports (not that it matters).

So:

1.  find which ports are used
2.  set up forwarding rules on R1
3.  done.

Is that about right?

Thanks.


----------



## Hybrid_theory (Jun 18, 2010)

Yep. On R2 if you just use the 4 switch ports it not doing any routing, its just acting as a switch. So yeah do that and you should be good

 Why the camera wont work on the 8 port could be a dead port, or maybe the port has a sticked MAC on it? Only that MAC address can connect to it and work.


----------



## twilyth (Jun 18, 2010)

Thanks.

Interesting.  I'll try another port, but I did this a couple times so there's a good chance I've already done that without intending to.

But it's worth checking.


----------

