Page 1 of 1

2 Ips 2 macs one NIC..

Posted: 22. Feb 2016, 17:28
by Porsche_maniak
Hi there.
I know there isn't much help available on the net except here for such cases :)
This isn't much related to vbox but some experts must have a clue about this.


I have one network card and my ISP has gave me 2 ips but they must be used with specific MAC address for each.
46.xx.xx.10 must use MAC xx-xx-xx-c1
46.xx.xx.20 must use MAC xx-xx-xx-c2

The purpose of this is to use 46.xx.xx.10 as default connection and 46.xx.xx.20 will be binded to application.
Windows has the option for multiple ips - > Right click on the adapter>properties>ipv4 properties>Advanced... and then I can add up 2nd IP.
But this uses only the default NIC MAC address for both IPs.
Is there a way to use ARP command and the microsoft loopback adapter or even the virtualbox ethernet adapter to be able to use the 2nd IP with the appropriate MAC?

Any help is appreciated :)

Re: 2 Ips 2 macs one NIC..

Posted: 26. Feb 2016, 12:57
by fozboz
Hello,

Is the single NIC a requirement?

Is there any reason you can't enable Adapter 2 in the settings of your VM and assign it the appropriate MAC?

Re: 2 Ips 2 macs one NIC..

Posted: 27. Feb 2016, 18:29
by Porsche_maniak
Hi. Thanks for the reply. This is not VBOX related question.
I can only have one NIC in my PC. I want to have 2 ips but the MAC address have to be different for both of them. MAC spoofing softwares can just change the MAC for one IP.

Re: 2 Ips 2 macs one NIC..

Posted: 28. Feb 2016, 02:12
by fozboz
I don't think what you're attempting is possible in the physical realm. A physical NIC can only have one MAC. You would need a second hardware NIC.

However, using VBOX, you can configure a VM with 2 NICs in Bridged Mode and give each one whatever MAC you like. That might do what you need, but without more information about your network infrastructure I can't be sure.

Re: 2 Ips 2 macs one NIC..

Posted: 28. Feb 2016, 10:58
by Porsche_maniak
Why impossible?
If it happens with VBOX then it should be possible in real.
I've learned that VBOX has a filter network driver that makes it possible to have 2 macs with 2 ips.
I was looking at this https://github.com/Microsoft/Windows-dr ... dis/filter but I don't know how to comple this source code and with what modifications as it is do-nothing pass-through driver...

Re: 2 Ips 2 macs one NIC..

Posted: 28. Feb 2016, 18:06
by fozboz
Porsche_maniak wrote: If it happens with VBOX then it should be possible in real.
No. It doesn't happen in VBox either. A NIC, whether physical or virtual, can only have one MAC.

The whole point about virtual infrastructure is to allow us to do things that aren't possible in physical!
Porsche_maniak wrote: I've learned that VBOX has a filter network driver that makes it possible to have 2 macs with 2 ips.
Yes. But only if you give the guest two NICs.