1

Ive got a block of 5 static IP's from the ISP at this jobsite i'm currently on. the POS vendor installed a router, connected it to the modem, and did not configure it with one of the ISP's static IP's. the device i'm working on, got plugged into this routers network (due to cable path issues, connection directly to the modem is extremely difficult).

is it possible to configure my device using the ISP's static ip, and have it route correctly thru the dhcp enabled (and dynamic ip configured) router?

my biggest question is the gateway address. will my device be able to resolve the gateway address of the modem thru the router? do i put the routers gateway address in my device or the modem's?

to ask it another way, is there a way for a device connected to the modem thru the router to bypass (or communicate thru) the router's gateway and communicate directly with the modem?

That doesnt seem to fully encapsulate the question either, but I cant think of another way to ask it, so let me know if I can clarify anything, or if this doesnt make sense at all. Thanks in advance for any help!

  • I understand makes and model numbers of modems and routers would help, but the question is a more general is-it-possible kind of question. Thanks again for any assistance! – Paul K Dec 29 '15 at 4:18
1

is it possible to configure my device using the ISP's static ip, and have it route correctly thru the dhcp enabled (and dynamic ip configured) router?

No.

to ask it another way, is there a way for a device connected to the modem thru the router to bypass (or communicate thru) the router's gateway and communicate directly with the modem?

Again, No.

By definition, devices inside your router's LAN network need to use your router's LAN interface to communicate with any devices outside their subnet. If you set a device with a public IP address on a NATted network, it's not going to work.

The best you can do is to configure a 1:1 NAT on the router to NAT traffic to/from that IP address to/from the private IP of the internal device.

If you do not have access to modify the router's configuration, well then this question is off-topic here and you'll need to deal directly with whomever has administrative rights on that router.

  • Ah, just as I figured! thanks so much for the quick reply – Paul K Dec 29 '15 at 4:22
0

It's absolutely possible if the router is based on Linux and you have a way of changing its routing table. One key observation is that since we have very few addresses, we can't do the traditional assignment of one address to an interface. So the existing NAT-style address of the router will have to be used as the gateway and the PC will have to have 2 addresses - one in the private range to access the router as gateway and another public IP to actually use. Consider

ip route add 20.20.20.0/29 dev br0

on the router (DD-WRT GUI > Administration > Commands > paste into textbox > Save Firewall). Then add 2 IPs on the PC:

192.168.1.200, 255.255.255.0, no gateway
20.20.20.2, 255.255.255.248, gateway 192.168.1.1

where 20.20.20.1 is an address occupied by the router for its NAT purposes, so we use one above it assuming the range is continuous, br0 is the interface from the router to you (default on DD-WRT), 192.168.1.200 is a free private address outside of the router's DHCP range and 192.168.1.1 is the router's private address. Picking /29 or 255.255.255.248 for the subnet mask is probably enough to surround the odd 5-address range you've been given without barring a large range on the outside from being accessed. You can split it into 2 ranges if needed (when the 5 addresses cross the multiple of 8 in this example).

Watch out for any firewall rules blocking your progress on the router. Disable firewall for testing; if you see that it stops working after re-enabling it, you can move from there.

One note: I assume that Linux can handle a single IP on one interface and an overlapping range on another interface since the range is less specific. If this proves problematic, try adjusting the routed range so that it avoids the address used by NAT, but still covers the ISP-given rest of the addresses.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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