Static ips and dhcp

Traxman

Honorable
Oct 2, 2013
7
0
10,510
Ok I searched but not coming up with the right topics, I am hoping there is a better way to do this but.....


My friends store has dsl internet, with a 4 port modem/router. His isp (att) gave him 8 static ips. These are not ips within the network they are isp supplied. The first static ip is the the modem ip. There are 4 other static ips used in this network. 2 static ips are used on slave routers and the other 2 are for his security system and atm. The store is adding more networking type of equipment (cash register's and rewards cards) so two more static ips are needed for this.

Right now all static ips are coming from the modem/router then we have two slave routers. Is there a way I can apply the static ip addresses through the modem then through one of the routers? Or is there a better way of doing this?

We are more than willing to buy new equipment eg. modem, routers. Also I should have mentioned that we have about 8-10 other devices wired and wireless running off the dhcp on the other 2 routers.

This is all an amalgamation of adding something new to the whole setup that started with a camera system a couple pc's and an atm. now we have a ton of devices and adding more.
 
"Is there a way I can apply the static ip addresses through the modem then through one of the routers?"

So you want to use one of your static IP on some device that will be behind the router? if so which device.

Clarify that part so I might be able to help you, most likely what you want to do is a Static NAT in the router that will have the new device connected to it.
 

Traxman

Honorable
Oct 2, 2013
7
0
10,510
Well all the wired devices will be static ip. From the 4 port modem/router we have two other routers and then the surveillance system and atm machine. Then from those other two routers we have probably 5 or 6 wired pc's including 2 cash registers that do not need static ip addresses.

So at the moment all ports on the modem/router are used and all have static ip addresses 74.156.xxx.xxx or something to that effect. So the other 2 routers are also wireless and everything on those are dhcp.

Now everything off the modem/router has the 74.156.xxx.140 to 74.156.xxx.147 or whatever the actual ip is. Been a while since I worked on it. Of course the 2 wireless routers are have local addresses of 192.168.1.1 and 192.168.2.1 respectively. Now I need to aassign the static ips 145 and 146 to a rewards card system that are a part of 2 new cash registers.

Also I apologize if I am not clear on this, at work on my phone when I can out in the cold and it looks like we are working 24-48 hours straight because of the cold.
 
This is going to depend on the ability of your slave routers and how exactly the ISP is giving you these IP addresses.

Now it also depends if you really need the end devices to have those IP addresses or if you can NAT them. I am betting you are doing static nat of multiple addresses in your router. Ie you map real address 1 to internal address 1 and real address 2 to internal address 2.

This works fine until you put your secondary routers in the mix. The secondary router will only know its internal address on its wan port. It will nat all the devices behind it to the address and then your main router will nat them a second time to the real address. So that likely works well.

Now with your new requirement to assign a real address to device that is hiding behind a secondary router it gets tough. So I will first assume this is not a consumer "router" since almost all on the market can only have a single WAN ip and can only NAT to that single address. Your main router is likely a special one that can do this.

So to solve this your secondary router must be able to take multiple IP addresses from the same subnet on its wan port like your main router does or it must have the ability to do static routes for subnets that are not either on its wan or lan.

So lets say your secondary router now has 192.168.100.5 and 192.168.100.6 ie the first option. You want to use 192.168.100.5 for the router and 192.168.100.6 for the new device behind it. In your main router your would map the real ip to each of these ip addresses. Now in the secondary router let say you are using 10.10.100.100 for this new device on its lan. You would NAT the 10.10.100.100 to 192.168.100.6 and nat all the other IP to 192.168.100.5. When the traffic finally gets to the main router it will change the 192.168.100.6 to the real ip for the end device. In effect you have natted 10.10.100.100 to this real ip though a 2 step process.

Now the other way to do this is to actually route the real ip to the secondary router. Say the real ip is xx.xx.xx.05. and you were using 192.168.100.5 for the secondary router. You would place a route in the primary router for xx.xx.xx.05 to 192.168.100.5. Then in the secondary router if the real device was on 10.10.100.100 the secondary router would nat directly from 10.10.100.100 to xx.xx.xx.05. In this case there is a single nat.

The single nat is better if you need to get access from the internet because it makes the port mapping easier.

Now this all depends on your routers abilities. If your secondary routers are consumer routers there is likely no way to make this work. You would have to load dd-wrt on them to even have a chance.

You may want to consider a redesign and run all your network as one large flat network and use the secondary router as AP if your need extra wireless. You main router would then see all the end devices directly

 

Traxman

Honorable
Oct 2, 2013
7
0
10,510
Ok real quick I am on break been working since 7:00 am yesterday its now 7:00 pm the next day with only a few more hours left and put this together on my breaks. I seen one reply but havent been able to dig into this since then. I am dead tired and probably going to sleep for two days straight but here is a quick flowchart of the setup. Maybe when I wake up from this nightmare I will be able to explain in more detail.

http://bloodstorm-clan.com/Network/networkSetup.html
 
From the diagram you uploaded there are 3 public IPs in use, I assume each router has also a public IP assigned, and then the networks 192.168.1.0/24 192.168.2.0/24 are for the devices behind the routers.

From your post I assume you want to assign the remaining public IPs to some devices that are behind the routers? if so you could do it with a static NAT, how to will vary depending which routers you have, but basically you have to set the router to assign the public IP to the internal IP of the device you want:

i.e. Static NAT -> public IP:74.156.xxx.146/29 to internal IP -> 192.168.0.23/24

On simple routers that's usually under advanced->NAT or advanced -> Virtual Server->NAT
 

Traxman

Honorable
Oct 2, 2013
7
0
10,510
Just woke up and yes the modem is a router as well. I have one of the routers is a linksys. I should be able to go Advanced routing->NAT Enabled->Destination LAN IP->Gateway->Subnet Mask.......etc.

Am I thinking right on this? It seems almost to simple. I have basic networking knowledge from setting up different types of networks over the years but some of that knowledge has gone by the wayside because I don't do it everyday. Now I can write code but I do that all the time.

And like I said I really appreciate the reply's. I know no one has to do this and I am greatful everytime someone attempts to help a guy out.