Discussion:
Openbsd VMM with VLAN
Irshad
2021-05-30 19:44:09 UTC
Permalink
Hi all


i have two Openbsd box Running Like Below one As Firewall and Another one As
VMM
With two VLAN's

OPENBSD_FIREWALL

IoT_AP (VLAN10) . -VLAN10
|--OpenWRT---------em0---| -------pf ------em1--Internet
| |- VLAN20
trusted_AP(VLAN20)
this Works fine


Another Separate OpenBSD Box for VM

openbsd(vmGuest)---vether0---openbsdHost——NAT—em0--OpenBSD_FW--Internet

is it possible Add openbsd(vmguest) to VLAN10 network


this is MY vm config [HomeAssistance]



switch "uplink" {
interface bridge1
}
vm "hass" {
disable
owner irshad
memory 2G
disk "/home/irshad/iso/disk.qcow2"

interface {
switch "uplink"
lladdr fe:e1:bb:01:01:01
}
}
David Gwynne
2021-06-01 23:59:47 UTC
Permalink
Hi Irshad,

Assuming I understand your layout correctly, you should be able to use hostname.if configurations files like the following:

$ cat hostname.em0:
up

$ cat hostname.vlan20
description "Trusted (L2+L3)"
vnetid 20 parent em0
inet aa.bb.cc.dd 255.255.255.0
up

$ cat hostname.vlan10:
description "IoT (L2)"
vnetid 10 parent em0
up

$ cat hostname.veb10
description "IoT bridge"
add vlan10
add vport10
up

$ cat hostname.vport10
description "IoT (L3)"
inet ee.bb.cc.dd 255.255.255.0
up

With the above, vlan10 on the wire will be connected using veb10 to the IP stack on your firewall on vport10. To have the virtual machine also plug into that VLAN 10 Ethernet segment, you can use veb10 as your "uplink" switch interface in vmm.conf.

dlg
Post by Irshad
Hi all
i have two Openbsd box Running Like Below one As Firewall and Another one As
VMM
With two VLAN's
OPENBSD_FIREWALL
IoT_AP (VLAN10) . -VLAN10
|--OpenWRT---------em0---| -------pf ------em1--Internet
| |- VLAN20
trusted_AP(VLAN20)
this Works fine
Another Separate OpenBSD Box for VM
openbsd(vmGuest)---vether0---openbsdHost——NAT—em0--OpenBSD_FW--Internet
is it possible Add openbsd(vmguest) to VLAN10 network
this is MY vm config [HomeAssistance]
switch "uplink" {
interface bridge1
}
vm "hass" {
disable
owner irshad
memory 2G
disk "/home/irshad/iso/disk.qcow2"
interface {
switch "uplink"
lladdr fe:e1:bb:01:01:01
}
}
Irshad Sulaiman
2021-06-07 09:37:57 UTC
Permalink
Thank you David Gwynne



Irshad
Post by David Gwynne
Hi Irshad,
up
$ cat hostname.vlan20
description "Trusted (L2+L3)"
vnetid 20 parent em0
inet aa.bb.cc.dd 255.255.255.0
up
description "IoT (L2)"
vnetid 10 parent em0
up
$ cat hostname.veb10
description "IoT bridge"
add vlan10
add vport10
up
$ cat hostname.vport10
description "IoT (L3)"
inet ee.bb.cc.dd 255.255.255.0
up
With the above, vlan10 on the wire will be connected using veb10 to the IP stack on your firewall on vport10. To have the virtual machine also plug into that VLAN 10 Ethernet segment, you can use veb10 as your "uplink" switch interface in vmm.conf.
dlg
Post by Irshad
Hi all
i have two Openbsd box Running Like Below one As Firewall and Another one As
VMM
With two VLAN's
OPENBSD_FIREWALL
IoT_AP (VLAN10) . -VLAN10
|--OpenWRT---------em0---| -------pf ------em1--Internet
| |- VLAN20
trusted_AP(VLAN20)
this Works fine
Another Separate OpenBSD Box for VM
openbsd(vmGuest)---vether0---openbsdHost——NAT—em0--OpenBSD_FW--Internet
is it possible Add openbsd(vmguest) to VLAN10 network
this is MY vm config [HomeAssistance]
switch "uplink" {
interface bridge1
}
vm "hass" {
disable
owner irshad
memory 2G
disk "/home/irshad/iso/disk.qcow2"
interface {
switch "uplink"
lladdr fe:e1:bb:01:01:01
}
}
Loading...