Re: Netgraph VLANs on Hyper-V

2020-04-10 Thread Paul Thornton

Hi,

I have recently been testing with jails, vnet and netgraph on ESXi - so 
not Hyper-V - but to make this work I needed to:


ngctl msg vmx0: setpromisc 1
ngctl msg vmx0: setautosrc 0

outside of the jail when setting up netgraph (where vmx0 is the "real" 
NIC that the ng_vlans are part of).


and then I had to set the mac address for the ngeth interface that was 
set to be put into the jail


ifconfig ngeth0 ether 02:00:01:02:03:04

Once done, and the jail started, ngeth0 worked as expected.

In ESXi, the portgroup that vmx0 is connected to allowed spoofing and 
promiscuous mode.


Paul.


On 10/04/2020 08:07, Reshad Patuck wrote:

Hi,

I am trying to use ng_vlan on Hyper-V to deploy vnet jails.
The "Enable MAC address Spoofing" setting on the Hyper-V host is enabled.
However when I try to use ng_vlan I am not able to reach the jail.
If I change this to if_vlan instead everything works fine.

Is there something that creating a VLAN using ifconfig does that ng_vlan
does not.
The same setup works well on VMware ESXi, Xen and KVM.

I am not sure if this is relevant to my issue but the hn1 devices sysrc's
changes when I use different vlan methods:

no vlan:
dev.hn.1.rxfilter: 9
dev.hn.1.hwassist: 17

if_vlan:
dev.hn.1.rxfilter: 20
dev.hn.1.hwassist: 17

ng_vlan:
dev.hn.1.rxfilter: 9
dev.hn.1.hwassist: 0

All the other sysrc's either stay the same or seem to be counters.
I can provide you with scripts to setup vlans and jails with both if_vlan
and ng_vlan if that helps.

Any help understanding what these sysrc's do, or on how I could get ng_vlan
to work would be very appreciated.

Best,

Reshad
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


--
Paul Thornton

___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: Netgraph VLANs on Hyper-V

2020-04-10 Thread Reshad Patuck
Hi Sami,

I the interfaces in the VNET jails are both epair interfaces with
auto-generated mac addresses in the 02:xx:xx:xx:xx:xx range.

When I use if_vlan I can connect to the IP address in the jail.
For ng_vlan I can not connect to the IP address in the jail.

I will test again using a mac address statically set to:
- mac address of hn1 interface
- mac address of hn1 + 1

I will drop my results here in a bit.

Thanks for your help.

Reshad

On Fri, 10 Apr, 2020, 16:40 Sami Halabi,  wrote:

> Hi,
> If I recall correctly it has something to do with Mac addresses netgraph
> expose not recognized by Hyper-v and maybe other Hypetvisors.
>
> Myabe someone can shed more light on it.
>
> Sami
>
> בתאריך יום ו׳, 10 באפר׳ 2020, 10:07, מאת Reshad Patuck ‏<
> reshadpatu...@gmail.com>:
>
>> Hi,
>>
>> I am trying to use ng_vlan on Hyper-V to deploy vnet jails.
>> The "Enable MAC address Spoofing" setting on the Hyper-V host is enabled.
>> However when I try to use ng_vlan I am not able to reach the jail.
>> If I change this to if_vlan instead everything works fine.
>>
>> Is there something that creating a VLAN using ifconfig does that ng_vlan
>> does not.
>> The same setup works well on VMware ESXi, Xen and KVM.
>>
>> I am not sure if this is relevant to my issue but the hn1 devices sysrc's
>> changes when I use different vlan methods:
>>
>> no vlan:
>> dev.hn.1.rxfilter: 9
>> dev.hn.1.hwassist: 17
>>
>> if_vlan:
>> dev.hn.1.rxfilter: 20
>> dev.hn.1.hwassist: 17
>>
>> ng_vlan:
>> dev.hn.1.rxfilter: 9
>> dev.hn.1.hwassist: 0
>>
>> All the other sysrc's either stay the same or seem to be counters.
>> I can provide you with scripts to setup vlans and jails with both if_vlan
>> and ng_vlan if that helps.
>>
>> Any help understanding what these sysrc's do, or on how I could get
>> ng_vlan
>> to work would be very appreciated.
>>
>> Best,
>>
>> Reshad
>> ___
>> freebsd-net@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-net
>> To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
>>
>
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: Netgraph VLANs on Hyper-V

2020-04-10 Thread Sami Halabi
Hi,
If I recall correctly it has something to do with Mac addresses netgraph
expose not recognized by Hyper-v and maybe other Hypetvisors.

Myabe someone can shed more light on it.

Sami

בתאריך יום ו׳, 10 באפר׳ 2020, 10:07, מאת Reshad Patuck ‏<
reshadpatu...@gmail.com>:

> Hi,
>
> I am trying to use ng_vlan on Hyper-V to deploy vnet jails.
> The "Enable MAC address Spoofing" setting on the Hyper-V host is enabled.
> However when I try to use ng_vlan I am not able to reach the jail.
> If I change this to if_vlan instead everything works fine.
>
> Is there something that creating a VLAN using ifconfig does that ng_vlan
> does not.
> The same setup works well on VMware ESXi, Xen and KVM.
>
> I am not sure if this is relevant to my issue but the hn1 devices sysrc's
> changes when I use different vlan methods:
>
> no vlan:
> dev.hn.1.rxfilter: 9
> dev.hn.1.hwassist: 17
>
> if_vlan:
> dev.hn.1.rxfilter: 20
> dev.hn.1.hwassist: 17
>
> ng_vlan:
> dev.hn.1.rxfilter: 9
> dev.hn.1.hwassist: 0
>
> All the other sysrc's either stay the same or seem to be counters.
> I can provide you with scripts to setup vlans and jails with both if_vlan
> and ng_vlan if that helps.
>
> Any help understanding what these sysrc's do, or on how I could get ng_vlan
> to work would be very appreciated.
>
> Best,
>
> Reshad
> ___
> freebsd-net@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
>
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Netgraph VLANs on Hyper-V

2020-04-10 Thread Reshad Patuck
Hi,

I am trying to use ng_vlan on Hyper-V to deploy vnet jails.
The "Enable MAC address Spoofing" setting on the Hyper-V host is enabled.
However when I try to use ng_vlan I am not able to reach the jail.
If I change this to if_vlan instead everything works fine.

Is there something that creating a VLAN using ifconfig does that ng_vlan
does not.
The same setup works well on VMware ESXi, Xen and KVM.

I am not sure if this is relevant to my issue but the hn1 devices sysrc's
changes when I use different vlan methods:

no vlan:
dev.hn.1.rxfilter: 9
dev.hn.1.hwassist: 17

if_vlan:
dev.hn.1.rxfilter: 20
dev.hn.1.hwassist: 17

ng_vlan:
dev.hn.1.rxfilter: 9
dev.hn.1.hwassist: 0

All the other sysrc's either stay the same or seem to be counters.
I can provide you with scripts to setup vlans and jails with both if_vlan
and ng_vlan if that helps.

Any help understanding what these sysrc's do, or on how I could get ng_vlan
to work would be very appreciated.

Best,

Reshad
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"