[Bug 263846] ng_bridge: can't ge an IP using DHCP when creating a vlan on an interface in the bridge

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 09 May 2022 15:18:04 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263846

Lutz Donnerhacke <donner@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |donner@FreeBSD.org
           Assignee|net@FreeBSD.org             |donner@FreeBSD.org
             Status|New                         |Open

--- Comment #2 from Lutz Donnerhacke <donner@FreeBSD.org> ---
ng_bridge is ethertype transparent, that means that vlan tagging is ignored.
OTOH this may cause problems, if the same MAC address is used on different
interfaces with different VLAN tags.

I currently do not understand your setup. May I ask you to provide a bit more
about the netgraph topology? Something like the following:

```
# ngctl show bridge0:
  Name: bridge0         Type: bridge          ID: 00000003   Num hooks: 2
  Local hook      Peer name       Peer type    Peer ID         Peer hook      
  ----------      ---------       ---------    -------         ---------      
  link1           ngeth1          eiface       00000006        ether          
  link0           ngeth0          eiface       00000005        ether          

# ifconfig
ngeth0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=28<VLAN_MTU,JUMBO_MTU>
        ether 58:9c:fc:10:80:4d
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ngeth1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=28<VLAN_MTU,JUMBO_MTU>
        ether 58:9c:fc:10:ff:86
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ngeth0.100: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
1500
        ether 58:9c:fc:10:80:4d
        inet 192.168.1.2 netmask 0xfffffff8 broadcast 192.168.1.7
        groups: vlan
        vlan: 100 vlanproto: 802.1q vlanpcp: 0 parent interface: ngeth0
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ngeth1.100: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
1500
        ether 58:9c:fc:10:ff:86
        inet 192.168.2.3 netmask 0xfffffff8 broadcast 192.168.2.7
        groups: vlan
        vlan: 100 vlanproto: 802.1q vlanpcp: 0 parent interface: ngeth1
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
```


May I ask you to provide the bridge statistics?

```
# ngctl msg bridge0: getstats 0
Rec'd response "getstats" (4) from "[3]:":
Args:   { recvOctets=230 recvPackets=5 recvBroadcast=5
          xmitOctets=552 xmitPackets=12 xmitBroadcasts=12 }

# ngctl msg bridge0: getstats 1
Rec'd response "getstats" (4) from "[3]:":
Args:   { recvOctets=552 recvPackets=12 recvBroadcast=12
          xmitOctets=230 xmitPackets=5 xmitBroadcasts=5 }
```

As you can see, the interfaces are mirroring each other: What is received on
one link was transmitted to the other one.

-- 
You are receiving this mail because:
You are the assignee for the bug.