LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Unable to get the DHCP IP Address on the Bridge with vlan sub interface (https://www.linuxquestions.org/questions/linux-networking-3/unable-to-get-the-dhcp-ip-address-on-the-bridge-with-vlan-sub-interface-4175720800/)

bkumar82 01-11-2023 11:55 PM

Unable to get the DHCP IP Address on the Bridge with vlan sub interface
 
2 Attachment(s)
Hi

I have a bridge configuration that needs the IP Address however my DHCP Server can be reachable by vlan 3000 and the following is configured in the /etc/network/interfaces and the br0 comes up as the linux boots up and DHCP Discover is sent and the response is being received by the physical layer but the ip address does not reach the br0

auto ens1f0
auto ens1f0.3000
iface ens1f0.3000 inet manual
vlan-raw-device ens1f0

auto br0
iface br0 inet dhcp
bridge_ports ens1f0.3000
#bridge_waitport 0
bridge_maxwait 0
bridge_stp off
Screenshot of the DHCP Discover sent
Screenshot of the DHCP Offer seen in the /var/lib/dhcp/dhclient.br0.leases is attached.

the interface ens1f0 is up
the interface br0 is up

if i try it without the br0 on the interface ens1f0.3000 with dhcp then the ip address is seen for ens1f0.3000 but for the br0 the ip address is not seen.

Version: Debian
Linux test 5.10.0-16-amd64 #1 SMP Debian 5.10.127-1 (2022-06-30) x86_64 GNU/Linux

Ser Olmy 01-21-2023 06:13 AM

The fact that a lease entry appears in the lease file would indicate that at some point this must have worked; the client must have sent a DHCP ACK to the server in order to obtain the lease.

I'm not sure how Debian expects the network configuration file to be structured when creating a bridge. I do know that in order for a bridge to work, the following must be done:
  1. A bridge interface must be created
  2. The relevant physical interfaces must be added to the bridge
  3. All physical interfaces must be activated ("up")
  4. The bridge interface must be activated ("up")
  5. Any IP address(es) must be assigned to the bridge interface, not any of the physical interfaces
The steps above may be performed in any order, but steps 1-4 must be completed before 5 if you're using DHCP.

You could try performing these steps manually using the brctl and ip commands, and concentrate on getting the Debian-specific bits right once you've confirmed that the configuration is indeed working.

Also, note that DHCP ACKs are sent directly to the IP address of the DHCP server, and not to the broadcast address. I'm mentioning this because you didn't show the exact tcpdump command used to dump the DHCP transaction; if you were filtering on broadcasts, you'd have missed the final bits of the transaction.

bkumar82 01-21-2023 12:39 PM

Thanks @ser Olmy i will give it a try and post the outcome.

nini09 01-21-2023 04:58 PM

The bridge should be over a physical interface normally, NOT a VLAN interface. You can try a bridge over ens1f0.

bkumar82 01-28-2023 03:26 PM

Found that this was the result of the firmware issue and was fixed after doing the following firmware-misc-nonfree


All times are GMT -5. The time now is 03:28 AM.