Stephen Hemminger
2016-Dec-13 19:16 UTC
[Bridge] Bridge interface not forwarding DHCP-Broadcast
On Tue, 13 Dec 2016 23:45:52 +0530 Balaji J <ping2balaji at gmail.com> wrote:> Thanks Stephen. > Can i attach an interface with IP assigned to it already/statically to a > bridge? > So if i understand correctly from your response, i should run dhcpclient on > br0 interface to assign IP for the same? and Lets say br0 gets an IP > assigned by DHCP-Server as "12.0.0.1". > > Now my intention is to assign IP address to the Host(say host1) behind > Router-1 using the DHCP-Server running on/behind Router-2 as shown below: > Host1 <------> (eth2)[Router-1](eth1:100.1.1.1) <----------EoGRE > Tunnel----->(eth0:100.1.1.254)[Router-2](DHCP-Server) > > So i thought Bridging eth2 to eth1 in Router-1 is the only way to achieve > the same as i want the dhcp-broadcast packet from Host-1 to get tunneled > over EogRE till Router-2. Is this assumption correct? or i am missing > something here? > > Or i should not assign any IP to eth2 and instead do it in br0 in Router-1? > > Any guidance would be very helpful and greatly appreciated. > > Thanks, > ...Balaji.JThe problem is that the IP address on an enslaved interface is not used by the IP stack and packets destined for that address tend to be blackholed. Packets being sent out get put on the enslaved interface and only sent out that interface not bridged.
Thanks Stephen. In the following article it is quoted that dhclient can be run on the interface attached to the bridge: https://wiki.linuxfoundation.org/networking/bridge So does it not mean against what you have mentioned below? "You can't and shouldn't try to do anything that assigns an IP address to a device that is a member of a bridge. In your case that is eth2." i have tried to do the same like this as below: --> brctl addif br0 eth2 --> dhclient eth2 Quoting from the link: " Does DHCP work over/through a bridge? The bridge will forward DHCP traffic (broadcasts) and responses. You can also use DHCP to set the local IP address of the bridge pseudo-interface. One common mistake is that the default bridge forwarding delay setting is 30 seconds. This means that for the first 30 seconds after an interface joins a bridge, it won't send anything. This is because if the bridge is being used in a complex topology, it needs to discover other bridges and not create loops. This problem was one of the reasons for the creation of Rapid Spanning Tree Protocol (RSTP). If the bridge is being used standalone (no other bridges near by). Then it is safe to turn the forwarding delay off (set it to zero), before adding interface to a bridge. Then you can run DHCP client right away. # brctl setfd br0 0 # brctl addif br0 eth0 # dhclient eth0 " On Wed, Dec 14, 2016 at 12:46 AM, Stephen Hemminger < stephen at networkplumber.org> wrote:> On Tue, 13 Dec 2016 23:45:52 +0530 > Balaji J <ping2balaji at gmail.com> wrote: > > > Thanks Stephen. > > Can i attach an interface with IP assigned to it already/statically to a > > bridge? > > So if i understand correctly from your response, i should run dhcpclient > on > > br0 interface to assign IP for the same? and Lets say br0 gets an IP > > assigned by DHCP-Server as "12.0.0.1". > > > > Now my intention is to assign IP address to the Host(say host1) behind > > Router-1 using the DHCP-Server running on/behind Router-2 as shown below: > > Host1 <------> (eth2)[Router-1](eth1:100.1.1.1) <----------EoGRE > > Tunnel----->(eth0:100.1.1.254)[Router-2](DHCP-Server) > > > > So i thought Bridging eth2 to eth1 in Router-1 is the only way to achieve > > the same as i want the dhcp-broadcast packet from Host-1 to get tunneled > > over EogRE till Router-2. Is this assumption correct? or i am missing > > something here? > > > > Or i should not assign any IP to eth2 and instead do it in br0 in > Router-1? > > > > Any guidance would be very helpful and greatly appreciated. > > > > Thanks, > > ...Balaji.J > > The problem is that the IP address on an enslaved interface is not used > by the IP stack and packets destined for that address tend to be > blackholed. > Packets being sent out get put on the enslaved interface and only sent > out that interface not bridged. > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linuxfoundation.org/pipermail/bridge/attachments/20161214/c7726a66/attachment.html>