Need Help: 2 public IP on WAN, How to assign IP 1 to Port 1 and IP 2 to Port 2+3+WIFI

I am new to Openwrt, and install OpenWrt R21.7.26 to my AX3600, it works.

My ISP send me two dynamic IP in one WAN cable.

in my old set up, I use a "small 5 port hardware switch", to get "IP 1" to my "PC A",
and "IP 2" to my old router, this old router connect to wifi + "PC B" + "PC C".

I am wondering, is it possible to use OpenWrt, and get rid of the "small hardware router", and do the following.
"IP 1" to AX3600 "Port 1", and connect to "PC A"
"IP 2" to AX3600 "Port 2, 3 and WIFI", and connect to "PC B" + "PC C"

Please help.
getting rid of this hardware switch can save energy to save the planet. :slight_smile:

There is the general guide.
Then at the part of the SNAT you could make a rule for PCa to use IP1 and the rest IP2.

1 Like

Hi @trendy
Seems that guide is for "multiple Fixed IP in WAN", but I got two dynamic IP.
The dynamic are getting from ISP's DHCP server.

Then the other solution I can think of is to use policy based routing and force the individual devices to use specific interfaces to get to the internet.

  1. mwan3 package
  2. pbr package
  3. a set of rules/routes for each internet connection.
1 Like