From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933046AbcGIIiK (ORCPT ); Sat, 9 Jul 2016 04:38:10 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:52618 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750768AbcGIIh7 convert rfc822-to-8bit (ORCPT ); Sat, 9 Jul 2016 04:37:59 -0400 From: Alexey Brodkin To: "netdev@vger.kernel.org" CC: "davem@davemloft.net" , "lede-dev@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" Subject: DHCP via bridge in case of IPv4 Thread-Topic: DHCP via bridge in case of IPv4 Thread-Index: AQHR2b0wP3SlCVXWzEuA1iaa0r9rVA== Date: Sat, 9 Jul 2016 08:37:55 +0000 Message-ID: <1468053400.5007.5.camel@synopsys.com> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.225.15.82] Content-Type: text/plain; charset="utf-7" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, I was playing with quite simple bridged setup on different boards with very recent kernels (4.6.3 as of this writing) and found one interesting behavior that I cannot yet understand and googling din't help here as well. My setup is pretty simple: -------------+AKAAoACgAKAAoACgAKA-------------------+AKAAoACgAKAAoACgAKA-------------------------- +AHw- HOST+AKAAoACgAKAAoACgAHwAoACgAKAAoACgAKAAoAB8- +ACI-Dumb AP+ACIAoACgAKAAoACgAKAAfACgAKAAoACgAKAAoACgAHw- Wireless client+AKAAoACgAKAAoACgAKAAfA- +AHw- with DHCP +AHwAPA------+AD4-(eth0)+AKAAoACgAKAAoA-(wlan0)+ADw------+AD4AfA- attempting to+AKAAoACgAKAAoACgAKAAoACgAHw- +AHw- server+AKAAoACgAKAAfACgAKAAoACgAKAAoACgAHwAoACgAKAAoABc- br0 /+AKAAoACgAKAAoAB8AKAAoACgAKAAoACgAKAAfA- get settings via DHCP +AHw- -------------+AKAAoACgAKAAoACgAKA-------------------+AKAAoACgAKAAoACgAKA-------------------------- +ACo- HOST is my laptop with DHCP server that works for sure. +ACo- +ACI-Dumb AP+ACI- is a separate board (I tried ARM-based Wandboard and ARC-based +AKA- AXS10x boards but results are exactly the same) with wired (eth0) and wireless +AKA- (wlan0) network controllers bridged together (br0). That +ACI-br0+ACI- bridge flawlessly +AKA- gets its settings from DHCP server on host. +ACo- Wireless client could be either a smatrphone or another laptop etc but +AKA- what's important it should be configured to get network settings by DHCP as well. So what happens +ACI-br0+ACI- always gets network settings from DHCP server on HOST. That's fine. But wireless client only reliably gets settings from DHCP server if IPv6 is enabled on +ACI-Dumb AP+ACI- board. If IPv6 is disabled I may see that wireless client sends +ACI-DHCP Discover+ACI- then server replies with +ACI-DHCP Offer+ACI- but that offer never reaches wireless client. Well actually sometimes very-very rarely that offer may reach wireless client but I cannot understand how to reproduce it reliably. Still looks like enabling of IPv6 fixes that issue. So my question here is: why I see that difference with IPv4 vs IPv6? One sidenote: +AKA- Somehow I figured out that in case of IPv4 so-called routing +AKA- cache is absent (it was removed in Linux kernel 3.6) while with IPv6 it +AKA- still exist. And assuming my hardware is sane and no data gets lost I may +AKA- think that it's really a routing problem and missing routing cache might +AKA- be an answer. Still being a noob in networking stuff I'd like to get a bit +AKA- better explanation of things I see. All thoughts and comments are more than welcome. Regards, Alexey