Bug 263847 - netgraph ng_bridge: can't ge an IP using DHCP when creating a vlan using an interface in the bridge
Summary: netgraph ng_bridge: can't ge an IP using DHCP when creating a vlan using an i...
Status: Closed DUPLICATE of bug 263846
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 13.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2022-05-07 16:24 UTC by benoitc
Modified: 2022-05-07 16:29 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description benoitc 2022-05-07 16:24:47 UTC
I am using a bridge `bridge0` that will contain a native nic interface ixl3 and add a tap interface in it:

ifconfig bridge0 create
ifconfig bridge0 addm ixl3 addm tap0
ifconfig bridge0
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 58:9c:fc:10:e7:20
    id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
    maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
    root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
    member: ixl3 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 6 priority 128 path cost 2000
    member: tap1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 12 priority 128 path cost 2000000
    member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 11 priority 128 path cost 2000000
    groups: bridge vm-switch viid-73f50@
    nd6 options=1<PERFORMNUD>

When I create a bhyve vm `test` with a network interface on this bridge, it is able to access to the vlan101:

root@test:~ # ifconfig vtnet1 up
root@test:~ # dhclient vtnet1.101
DHCPDISCOVER on vtnet1.101 to port 67 interval 4
DHCPREQUEST on vtnet1.101 to port 67
bound to -- renewal in 300 seconds.

I can access to this machine using SSH and ping it with success. But when I try to do the same using netgraph (initial bridg0 has been destroyed), my VM is not able to retrieve the IP using DHCP. It is only possible to do it on the untagged vlan. Is there something wrong in the configuration below? 

Why the behaviour is not the same using a bridge created with if_bridge? Is this a bug?

ngctl -f- <<EOF
mkpeer ixl3: bridge lower link0
name ixl3:lower bridge0
connect ixl3: bridge0: upper link1
msg ixl3: setpromisc 1
msg ixl3: setautosrc 0
Comment 1 benoitc 2022-05-07 16:29:32 UTC

*** This bug has been marked as a duplicate of bug 263846 ***