Select specific WAN IP from routed Public IP range to use

Hi,

this is my situation:

Hardware: RB1100AHx2

Config:
main gateway: 1.1.1.1/30 - ether1
routed public range 1.1.2.0/29 - ether2
local machine: 192.168.0.3/24 - ether3

The question is, how to force a local machine to use a specific IP from routed public range as it’s WAN IP?

I need to have WAN IP set on the router, not local machine.

You could configure DHCP server on your ROS device and use DHCP on your local machines. You can also make your DHCP leases static so your machines will always receive the same IP.

That’s not what I mean. I don’t want a public IP on the local machine, I want it on the router, but everytime a local machine wants to communicate over internet it should use an IP from PUBLIC IP range on port ether2.

You configure your routerboard’s ether2 interface as 1.1.2.1/29 and your computers with 1.1.2.2/29 - 1.1.2.6/29 (netmask is 255.255.255.248) using 1.1.2.1 as gateway and 1.1.2.7 as broadcast ip.

The question is how will the local machine use IP 1.1.2.2 as it’s external WAN and not e.g. 1.1.2.3.

You configure it to do so. I assume you know how to configure you network connection on Windows, Linux or whatever system / device you are using.

Maybe I miss-posted the question.

So you mean your local machine has an internal IP only?

In that case NAT is your friend :slight_smile:

All this time and it was a typo… i used ether2 in my config instead of ether3. :frowning: Tnx for posting answers.