# failing to mix bridge, vlans and lagg with netgraph



## benoitc (Apr 18, 2022)

I am trying touse netgraph for the bhyve vms with the following goals:


I setup 2 bridge using an LACP bond
one dedicated bridge for the vlan 1002
one bridge for all others vlans
The network coming on the bridge that has untagged vlan 1002 is working, but it seems I can only get the vlan 1 on the other bridge. I tried to pass a tagged vlan 1002  but I can't ping between  the machine without any routers. Is the bridge containing the lagg without any vlan supopsed to received all tagged vlans?

rc.conf is the following :


```
ifconfig_ix0="up"
ifconfig_ix1="up"
cloned_interfaces="lagg0 vlan1002 lo1"

ifconfig_lagg0="laggproto lacp laggport ix0 laggport ix1"
ifconfig_vlan1002="vlan 1002 vlandev lagg0"
```

and for netgraph:


```
ngctl -f- <<EOF
    mkpeer lagg0: bridge lower link0
    name lagg0:lower public
    connect lagg0: lagg0:lower upper link1
    mkpeer vlan1002: bridge lower link0
    name vlan1002:lower vlan1002bridge
    connect vlan1002: vlan1002:lower upper link1
    msg lagg0: setpromisc 1
    msg lagg0: setautosrc 0
    msg vlan1002: setpromisc 1
    msg vlan1002: setautosrc 0
EOF
```


----------



## benoitc (Apr 19, 2022)

Does someone have an example of using ng_vlan and ng_bridge netgraph components together?

Does it allows to setup different tagged interfaces / bridge?


----------



## SirDice (Apr 19, 2022)

Don't post the same (or similar) question in more than one thread.


----------

