Wednesday, September 26, 2018

Virtual interfaces with own MACs

Hi

I want to receive 2 IPs that are mine from the ISP (I have to supply 2 MACs) over DHCP. They have a problem letting me add them permanent without dhcp as their snooping blocks my connection if not using dhcp.

I want to use just one physical interface as I do not have more 10Gbit interfaces to spare. Also I want to use fake virtual MAC so I can switch hardware without contacting the ISP.

Is it possible in OpenBSD to create sub interfaces with different MACs on them and use dhcp for both? How?

In linux I think it can be done as:
ip link add link eth0 address 00:11:11:11:11:11 eth0.1 type macvlan
ifconfig eth0.1 up
dhclient -v eth0.1
ip link add link eth0 address 00:11:11:11:11:12 eth0.2 type macvlan
ifconfig eth0.2 up
dhclient -v eth0.2



Is it possible to something similar to

/etc/hostname.ix3
up

/etc/hostname.ix3:1
!ifconfig SUBINT VIRTUAL_NEW_MAC SUBDEV $if Public IP 1"
!dhclient ix3:1


/etc/hostname.ix3:2
!ifconfig SUBINT VIRTUAL_NEW_MAC SUBDEV $if Public IP 2"
!dhclient ix3:2


If so… What should they look like. Note that I want to provide the ISP the virtual MACs and not the cards physical MAC…





Many thanks in advance


Regards
Peo

No comments:

Post a Comment