Hi, thank you first, and I think I totally misunderstand vlan.
I want create vlan network, because minidlna / wifi.
My openbsd system have 4nics(em0-3), and em2 is connected a wifi
rounter(tplink), which already setup as bridge,
and the wifi client(sony tv/mobile) can request dhcp/ip from openbsd.
And em3 is directly(no switch/pub, just cat6 cable) connected
linux/debian system,
and this debian is kvm/lxc host, and the eth0 is already setup as
bridge, (debian/lxc/kvm also can request dhcp/ip from openbsd)
one of the lxc/guest is minidlna server.
I created bridge0 on openbsd(em2, em3 and vether0), reference of this
https://www.openbsd.org/faq/faq6.html#Bridge.
and setup 10.10.10.1/24 on vether0, so debian(lxc/kvm/minidlna) and
wifi(tv) all is the same subnet (10.10.10.0/24).
and I can see minidlna server on tv/mobile, it work.
(one thing is I need run mcastproxy on vether0 to make minidlna/tv work,
both up/down stream on vether0, before 6.4 is not needed, I don't know
why)
Now. I want try to setup vlan network like this. (I don't know is it
popper way or even impossible)
em2 --> bridge0
em3 --> 10.10.10.0/24 (debian/kvm/lvm on this)
vlan3 --> on top of em3 --> bridge0
vether0 --> bridge0
(bridge0,vether0,em2,vlan3) --> 10.10.20.0/24 (wifi/tv/mobile on this)
And I can split (is it good idea?)two subnet, but also can set minidlna
server to use 10.10.20.0/24 (wifi network).
I think, I need to setup debian/bridge to support vlan tagged to achieve
it, right?
I am wondering, how people setup home network, to serve dlna (all
Iot/computer on one subnet)?
Thank you, thanks all.
Zé Loff 於 2019-01-28 16:29 寫到:
On Mon, Jan 28, 2019 at 07:57:01PM +0800, johnw wrote:
hi, I want create vlan network, I create two files
hostname.vio0
up
hostname.vlan0
inet 10.10.10.101 255.255.255.0 10.10.10.255 parent vio0 vnetid 10
then reboot
I can not ping 10.10.10.1
If I create bridge0, and add vio0 and vlan0 to bridge0, then I can
ping 10.10.10.1
Or if I just use vio0 without vlan,
hostname.vio0
inet 10.10.10.101 255.255.255.0 10.10.10.255
I can also ping 10.10.10.1.
Why vlan0 not linked vio0(parent) without create bridge?
Is this normal? AM I miss understand vlan?
(eg: I also tried on real machine with hostname.em0 card, same result)
Thanks.
Key fingerprint: CDB3 6C62 254B C088 1E5D DD32 182C 97DB CF2C 80AC
You don't give any details regarding the physical network (are both
machines virtual? are they connected directly? is there a switch
between
them?) so we are left guessing. Given the lack of information, I'll
just state some general stuff about VLANs and try to guess what's
happening.
Usually, packets run around without a VLAN tag (something that added to
their header), so everything that leaves vio0 or em0 will go out
untagged and usually when the get to an ordinary switch they go out on
all ports and get picked up by whichever machines are connected to it.
These machines, unless configured otherwise, will only pick up untagged
packets.
When you configure a vlan device, you are appending a VLAN tag to some
of the packages that leave a physical interface. Crucially, the
packets
have to be received by a host that has an interface that is "listening"
on the same VLAN, i.e., that's expecting tagged packets with the same
vnetid. So unless the receiving end also has a vlan interface, it
won't
be expecting tagged packets and will thus ignore them.
My guess is that in your case the other host has 10.10.10.1 on a
"normal" interface, instead of a tagged one. And since it is not
expecting tagged packets for that subnet (or at all), it ignores the
ping.
To fix this you have two options: either create a vlan device on the
other host and configure it with 10.10.10.1 or have a managed switch
between both hosts that has a port configured to VLAN 10 and that
untags the packets that leave that port.
When you bridge vio0 and vlan0 -- note: for clarity this should be
vlan10 and not vlan0, to match the vnetid. this is not mandatory but
makes the configuration easier to understand -- I am guessing that the
packet leaves the vio0 interface untagged, and that's why it gets
picked
up on the other end.
Also, note that there is no requirement for a managed switch, unmanaged
switches will gladly pass tagged packets around. However, unlike
managed switches, they won't forward them to specific ports and/or
untag them.
--
Key fingerprint: CDB3 6C62 254B C088 1E5D DD32 182C 97DB CF2C 80AC