Re: Virtual interfaces with own MACs

2018-09-26 Thread Per-Olov Sjöholm



On Wed, Sep 26, 2018, at 15:51, Jarkko Oranen wrote:
> On Wed, 2018-09-26 at 14:45 +0200, Paul de Weerd wrote:
> > 
> > 
> > Note that I haven't tried this .. may need some tweaking.
> 
> 
> I have pretty much exactly this setup except vether1 is in a separate
> rdomain to avoid issues with the default route. And 'dhclient' is
> 'dhcp' instead:
> 
> # cat /etc/hostname.vether1
> rdomain 1
> group dmz
> lladdr ee:64:de:b9:72:87
> dhcp
> 
> I use the extra IP for a 1:1 NAT to a specific host in my local
> network. It works well enough.
> 
> > 
> > Cheers,
> > 
> > Paul 'WEiRD' de Weerd
> > 
> -- 
> Jarkko Oranen 
> 

Thanks for all replies.

But today The ISP has changed their mind and have now reconfigured so non 
business customers that buy more than one fixed IP now are allowed to set them 
without DHCP :)

Peo



Re: Virtual interfaces with own MACs

2018-09-26 Thread Jarkko Oranen
On Wed, 2018-09-26 at 14:45 +0200, Paul de Weerd wrote:
> 
> 
> Note that I haven't tried this .. may need some tweaking.


I have pretty much exactly this setup except vether1 is in a separate
rdomain to avoid issues with the default route. And 'dhclient' is
'dhcp' instead:

# cat /etc/hostname.vether1
rdomain 1
group dmz
lladdr ee:64:de:b9:72:87
dhcp

I use the extra IP for a 1:1 NAT to a specific host in my local
network. It works well enough.

> 
> Cheers,
> 
> Paul 'WEiRD' de Weerd
> 
-- 
Jarkko Oranen 



Re: Virtual interfaces with own MACs

2018-09-26 Thread Anders Andersson
On Wed, Sep 26, 2018 at 1:54 PM, Per-Olov Sjöholm  wrote:
> 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…

Here is an old post of mine explaining what sounds like your exact
setup for the same reason:
http://openbsd-archive.7691.n7.nabble.com/Bridged-vether-interfaces-can-t-talk-to-each-other-multiple-routing-tables-td316937.html

I did get most of it working, but it was a long time ago and I never
used the router in "real life". I had issues communicating between the
domains. I'm not sure if those examples are good or bad but it could
be a starting point.



Re: Virtual interfaces with own MACs

2018-09-26 Thread Paul de Weerd
On Wed, Sep 26, 2018 at 01:54:40PM +0200, Per-Olov Sjöholm wrote:
| 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?

Something similar can be done with a bridge(4), your ISP-interface and
two vether(4) interfaces.

/etc/hostname.ix3
up

/etc/hostname.bridge0
up
add ix3
add vether0
add vether1

/etc/hostname.vether0
up
lladdr yo:ur:ma:ca:dd:re:ss:he:re
dhclient

/etc/hostname.vether1
up
lladdr yo:ur:ma:ca:dd:re:ss:he:re
dhclient


Note that I haven't tried this .. may need some tweaking.

Cheers,

Paul 'WEiRD' de Weerd

-- 
>[<++>-]<+++.>+++[<-->-]<.>+++[<+
+++>-]<.>++[<>-]<+.--.[-]
 http://www.weirdnet.nl/ 



Virtual interfaces with own MACs

2018-09-26 Thread Per-Olov Sjöholm
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