Fri Jan 30, 2015 2:58 pm
No good way to do this that I know.
There is a virtual-ethernet interface (vif), but its purpose is to allow communication between host router and virtualized router (either KVM on x86, or MetaROUTER on MIPSBE and single-core Freescale PowerPC), so not all boxes that run RouterOS will show you the option.
理论上,RouterOS设备上,l雷竞技有一口port for '/interface virtual-ethernet', you could create a bunch, just not use them with a virtual router, and bridge all of them together, or for router models that don't support this interface type, you could create a bunch of some other ethernet-like interface that is essentially virtual (e.g., EoIP) and bridge THOSE together. But all direct member interfaces of a bridge will assume the bridge's MAC address and not their own when transmitting frames, so you would still be stuck with a single MAC address. To transmit individual, unique MAC addresses, the bridge has to be forwarding frames, not originating/outputting frames, which still means multiple devices.
If you *are* using a router that has support for virtualization (KVM or MetaROUTER), the easiest way is to fire up one virtual router per IP address and dump them all in a bridge with your WAN port on the host. But that does seem a bit excessive to be running 4 or 5 virtual routers just to do this.
One final possibility that you might investigate is to do as suggested earlier and create a bunch of virtual ethernet-like interfaces and bridge them with the WAN port, and then use '/interface bridge nat' to construct L2 NAT rules to change the MAC address used on frame transmission. This might get complex rather quickly, though, and may even be impossible, since bridge NAT is basically stateless (no tracking of any kind) and the specific matchers that you might need to translate the MAC address on egress and ingress may not even exist.
-- Nathan