Multiple WAN IPs on each interface with DHCP possible?

Started by TheForumTroll, November 14, 2020, 10:17:45 PM

Previous topic - Next topic
Hello experts  :)

Is it possible to have multiple WAN IPs on a interface via DHCP? We have multiple WAN IPs but while they are static in practice they get handed out by DHCP upstream. This means setting up the IPs as a static Virtual IP won't work as there are no route to the addresses before a lease is made. Our current (pfsense) firewall do not support this but I'm hoping a new opnsense setup will.

Thank you.

you want multiple ip on 1 interface
or you want to use the multiple ips assigned to you by your ISP?

Multiple IPs on one interface is not supported as far as I know. Your interface has only one MAC address and therefore gets only one address. Don't know which OS is capable of that.

You usually configure it once by dhcp, check the ip, netmask and gateway and then configure it manually. Those additional IPs mostly run through the same gateway.

If your OPNsense is virtualized you could add more interfaces on the WAN vswitch. Each interface has a different MAC address. In this case you should be able to have more dhcp addresses from WAN.

I'd ask the isp for the information needed to configure it manually with virtual IPs.
,,The S in IoT stands for Security!" :)

Thank you for the replies  :)

Quote from: Gauss23 on November 15, 2020, 07:41:35 AM
Multiple IPs on one interface is not supported as far as I know. Your interface has only one MAC address and therefore gets only one address. Don't know which OS is capable of that.
I used to have an OpenWRT router as the edge device. It could have as many virtual WAN interfaces with DHCP I wanted, so I'm guessing it also had different MAC addresses.

Quote from: Gauss23 on November 15, 2020, 07:41:35 AM
You usually configure it once by dhcp, check the ip, netmask and gateway and then configure it manually. Those additional IPs mostly run through the same gateway.

The IPs are static only in theory so the problem is that unless I request the IP via DHCP and get a lease (and let the lease be updated when it runs out) there isn't any route to the IPs. I don't know how OpenWRT did it internally but it was mostly the same in the setup as a Virtual IP in pfsense. I'll have a look at OpenWRT again and see how it did it.