Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking to setup a router with multiple public WAN/IP interfaces that can be routed across a single physical WAN interface/port. I realize it would be necessary to have different MAC addresses on each interface for full layer 2 compatibility, but this could be achieved via MAC cloning, randomizing the MAC, or using some sort of virtual MAC assigning (Similar to VMware Virtual LANs and Interfaces).

I'm pretty sure this is possible, as I've seen very similar setups for server environments with Linux network configs and only using a single physical NIC, but can anyone confirm this is possible or have a solution or basic explanation of why or why not this might work?

If so, is it possible with something like DD-WRT specifically? This is what I'm currently running on my Asus RT-N66U. OpenWRT seems much more similar to traditional Linux network configuration, but unfortunately isn't supported on my router. DD-WRT however works great, but network configuration is done through NVRAM variables - which isn't documented well, especially with network configuration specifically and interfacing.

I eventually will have some IPTables configuration to route separate subnets(maybe VLANs, but I would prefer to keep everything open and accessible, but limited to specific subnets) to each individual WAN interface.

What I don't want to have to do is configure multiple LAN ports to be used as WAN ports and setup a "dual" WAN connection and then just bridge them physically with a switch to connect to my single physical WAN connection to my ISP.

Here's a good example of what I'm looking to do, just with an actual network router rather than a server with a single NIC.


ISP provides internet via RADIUS/MAC authenticated DHCP connections. They also provide static IP blocks. Both options are available to me and work in any configuration. My main question here is how to setup virtual interfaces with a router. Preferably with DD-WRT, as that's what I'm currently using

share|improve this question
This doesn't make much sense. If you have multiple ISPs, you need to have multiple physical interfaces. If you just have multiple IP addresses from a single ISP, you can just add them all to a single interface. – Michael Hampton Jul 10 '13 at 7:08
@MichaelHampton when using WAN dialups like PPPoE it is rather easy to have a single WAN interface on the router to dial up different ISPs (possibly even over a number of modems interconnected by a switch). But you would not need different MACs, IPs or any other voodoo for this - just the ability to perform more than one PPPoE dialup. I agree that the question is rather vague in this respect. – the-wabbit Jul 10 '13 at 7:40
@MichaelHampton Many ISPs assign addresses via dhcp and you just can't do that for multiple addresses if you only have one MAC. Virtualization is the answer to this problem. – Iron Savior Jul 10 '13 at 7:41
@IronSavior Precisely! I multiple options for connecting to my ISP. In this specific situation, I'm using DHCP and static IP's provided by my ISP. For Layer 2 communications to work correctly across a WAN, multiple IP's can't ARP to the same MAC - or at least they're not supposed to. WAN and LAN have different limitations. – t3chman Jul 10 '13 at 8:11
up vote 0 down vote accepted

This is not only possible, but also common. My preferred method is to employ some sort of hypervisor to host discrete units of function each within their own virtual machine. Using this sort of technology will allow you to provision the ideal configurations in virtualized resources as well as keeping them somewhat isolated from each other. For example, you could very easily have a machine with a single physical NIC that hosts a gateway device that has been endowed with as many virtual nics as is convenient for your application.

As a testament to how easy this is, I happen to use Xen on a Intel Atom "netbook"-type computer to host a half-dozen individual VM's that provide network services at home. I know SF doesn't like to hear about home solutions--I only offer this as an anecdote, Xen is a mature production-ready hypervisor and I promise you that it is up to this task. This one physical NIC masquerades as many different devices and it also does VLAN tagging where appropriate.

If you want something a little lighter weight, you can also provision "macvlan" interfaces in Linux, but I've found the documentation to be hard to come by. I've made it work, but it was a lot more messy than going with Xen and provisioning VM's that behave as if they have many interfaces (or whatever hypervisor you may prefer because vmware is just as capable on the right hardware. I used Xen with the Atom CPU, but I've done the same with vmware with hardware that was more purpose-built for virtualization).

share|improve this answer
This is very interesting and good to know! I've built similar setups like this, but only with hyper-v, VMware, and some Linux configuration's. However, in this circumstance, I'm looking to do this with my gateway/router. I just can't seem to make it work. I think it's mostly because of NVRAM network configuration instead of the traditional Linux network interface files and ifconfig in combination with IPTable for firewall/routing. – t3chman Jul 10 '13 at 8:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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