Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1439919 > unrolled thread

DHCP via bridge in case of IPv4

Started byAlexey Brodkin <Alexey.Brodkin@synopsys.com>
First post2016-07-09 10:40 +0200
Last post2016-07-11 08:20 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel


Contents

  DHCP via bridge in case of IPv4 Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-07-09 10:40 +0200
    Re: [LEDE-DEV] DHCP via bridge in case of IPv4 Aaron Z <aczlan+ledev@gmail.com> - 2016-07-09 13:50 +0200
      Re: [LEDE-DEV] DHCP via bridge in case of IPv4 Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-07-09 14:10 +0200
        Re: [LEDE-DEV] DHCP via bridge in case of IPv4 Russell Senior <russell@personaltelco.net> - 2016-07-10 09:30 +0200
          Re: [LEDE-DEV] DHCP via bridge in case of IPv4 Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-07-11 08:20 +0200

#1439919 — DHCP via bridge in case of IPv4

FromAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Date2016-07-09 10:40 +0200
SubjectDHCP via bridge in case of IPv4
Message-ID<rSVXP-tW-9@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1439940 — Re: [LEDE-DEV] DHCP via bridge in case of IPv4

FromAaron Z <aczlan+ledev@gmail.com>
Date2016-07-09 13:50 +0200
SubjectRe: [LEDE-DEV] DHCP via bridge in case of IPv4
Message-ID<rSYVH-2rX-3@gated-at.bofh.it>
In reply to#1439919
On Sat, Jul 9, 2016 at 4:37 AM, Alexey Brodkin
<Alexey.Brodkin@synopsys.com> wrote:
> 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:
> -------------       ------------------       -------------------------
> | HOST      |       | "Dumb AP"      |       | Wireless client       |
> | with DHCP |<----->(eth0)     (wlan0)<----->| attempting to         |
> | server    |       |    \ br0 /     |       | get settings via DHCP |
> -------------       ------------------       -------------------------
>
> * HOST is my laptop with DHCP server that works for sure.
> * "Dumb AP" is a separate board (I tried ARM-based Wandboard and ARC-based
>   AXS10x boards but results are exactly the same) with wired (eth0) and wireless
>   (wlan0) network controllers bridged together (br0). That "br0" bridge flawlessly
>   gets its settings from DHCP server on host.
> * Wireless client could be either a smatrphone or another laptop etc but
>   what's important it should be configured to get network settings by DHCP as well.
>
> So what happens "br0" 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 "Dumb AP" board. If IPv6 is disabled I may see that
> wireless client sends "DHCP Discover" then server replies with "DHCP Offer" but
> that offer never reaches wireless client.
Do you have WDS enabled? If not, DHCP has issues in that scenario:
https://wiki.openwrt.org/doc/howto/clientmode

Aaron Z

[toc] | [prev] | [next] | [standalone]


#1439945 — Re: [LEDE-DEV] DHCP via bridge in case of IPv4

FromAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Date2016-07-09 14:10 +0200
SubjectRe: [LEDE-DEV] DHCP via bridge in case of IPv4
Message-ID<rSZf4-2OR-13@gated-at.bofh.it>
In reply to#1439940
Hi Aaron,

On Sat, 2016-07-09 at 07:47 -0400, Aaron Z wrote:
+AD4- On Sat, Jul 9, 2016 at 4:37 AM, Alexey Brodkin
+AD4- +ADw-Alexey.Brodkin+AEA-synopsys.com+AD4- wrote:
+AD4- +AD4- 
+AD4- +AD4- Hello,
+AD4- +AD4- 
+AD4- +AD4- I was playing with quite simple bridged setup on different boards with
+AD4- +AD4- very recent kernels (4.6.3 as of this writing) and found one interesting
+AD4- +AD4- behavior that I cannot yet understand and googling din't help here as well.
+AD4- +AD4- 
+AD4- +AD4- My setup is pretty simple:
+AD4- +AD4- -------------+AKAAoACgAKAAoACgAKA-------------------+AKAAoACgAKAAoACgAKA--------------------------
+AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- HOST+AKAAoACgAKAAoACgAHwAoACgAKAAoACgAKAAoAB8- +ACI-Dumb AP+ACIAoACgAKAAoACgAKAAfACgAKAAoACgAKAAoACgAHw- Wireless client+AKAAoACgAKAAoACgAKAAfA-
+AD4- +AD4- +AD4- with DHCP +AHwAPA------+AD4-(eth0)+AKAAoACgAKAAoA-(wlan0)+ADw------+AD4AfA- attempting to+AKAAoACgAKAAoACgAKAAoACgAHw-
+AD4- +AD4- +AD4- server+AKAAoACgAKAAfACgAKAAoACgAKAAoACgAHwAoACgAKAAoABc- br0 /+AKAAoACgAKAAoAB8AKAAoACgAKAAoACgAKAAfA- get settings via DHCP +AHw-
+AD4- +AD4- -------------+AKAAoACgAKAAoACgAKA-------------------+AKAAoACgAKAAoACgAKA--------------------------
+AD4- +AD4- 
+AD4- +AD4- +ACo- HOST is my laptop with DHCP server that works for sure.
+AD4- +AD4- +ACo- +ACI-Dumb AP+ACI- is a separate board (I tried ARM-based Wandboard and ARC-based
+AD4- +AD4- +AKA- AXS10x boards but results are exactly the same) with wired (eth0) and wireless
+AD4- +AD4- +AKA- (wlan0) network controllers bridged together (br0). That +ACI-br0+ACI- bridge flawlessly
+AD4- +AD4- +AKA- gets its settings from DHCP server on host.
+AD4- +AD4- +ACo- Wireless client could be either a smatrphone or another laptop etc but
+AD4- +AD4- +AKA- what's important it should be configured to get network settings by DHCP as well.
+AD4- +AD4- 
+AD4- +AD4- So what happens +ACI-br0+ACI- always gets network settings from DHCP server on HOST.
+AD4- +AD4- That's fine. But wireless client only reliably gets settings from DHCP server
+AD4- +AD4- if IPv6 is enabled on +ACI-Dumb AP+ACI- board. If IPv6 is disabled I may see that
+AD4- +AD4- wireless client sends +ACI-DHCP Discover+ACI- then server replies with +ACI-DHCP Offer+ACI- but
+AD4- +AD4- that offer never reaches wireless client.
+AD4- 
+AD4-
+AD4- Do you have WDS enabled? If not, DHCP has issues in that scenario:
+AD4- https://wiki.openwrt.org/doc/howto/clientmode

I don't have WDS enabled. I tried to have as simple setup as possible.
Still from what I see in the Wiki article above problem happens when
there're 4 devices in the chain, right? Because as it says:
------------------------+AD4-8------------------------
The 802.11 standard only uses three MAC addresses for frames transmitted between
the Access Point and the Station. Frames transmitted from the Station to the AP
don't include the ethernet source MAC of the requesting host and response frames
are missing the destination ethernet MAC to address the target host behind the
client bridge.
------------------------+AD4-8------------------------

But in my case I only have 3 devices in the chain so I would think it's
something else but issue described in the article.

Anyways thanks for the hint.

-Alexey

[toc] | [prev] | [next] | [standalone]


#1440039 — Re: [LEDE-DEV] DHCP via bridge in case of IPv4

FromRussell Senior <russell@personaltelco.net>
Date2016-07-10 09:30 +0200
SubjectRe: [LEDE-DEV] DHCP via bridge in case of IPv4
Message-ID<rThlD-5X6-5@gated-at.bofh.it>
In reply to#1439945
>>>>> "Alexey" == Alexey Brodkin <Alexey.Brodkin@synopsys.com> writes:

Alexey> Hi Aaron,
Alexey> On Sat, 2016-07-09 at 07:47 -0400, Aaron Z wrote:
>> On Sat, Jul 9, 2016 at 4:37 AM, Alexey Brodkin
>> <Alexey.Brodkin@synopsys.com> wrote:
>> > 
>> > 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: >
>> -------------       ------------------       -------------------------
>> > > 
>> > > HOST      |       | "Dumb AP"      |       | Wireless
>> client       | > > with DHCP |<----->(eth0)     (wlan0)<----->|
>> attempting to         | > > server    |       |    \ br0
>> /     |       | get settings via DHCP | >
>> -------------       ------------------       -------------------------
>> > 
>> > * HOST is my laptop with DHCP server that works for sure.  > *
>> "Dumb AP" is a separate board (I tried ARM-based Wandboard and
>> ARC-based >   AXS10x boards but results are exactly the same) with
>> wired (eth0) and wireless >   (wlan0) network controllers bridged
>> together (br0). That "br0" bridge flawlessly >   gets its settings
>> from DHCP server on host.  > * Wireless client could be either a
>> smatrphone or another laptop etc but >   what's important it should
>> be configured to get network settings by DHCP as well.
>> > 
>> > So what happens "br0" 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 "Dumb AP" board. If
>> IPv6 is disabled I may see that > wireless client sends "DHCP
>> Discover" then server replies with "DHCP Offer" but > that offer
>> never reaches wireless client.
>> 
>> 
>> Do you have WDS enabled? If not, DHCP has issues in that scenario:
>> https://wiki.openwrt.org/doc/howto/clientmode

If the Dumb AP's wireless interface is in ap-mode, then this shouldn't
be an issue.  It's only client-mode interfaces that have trouble with bridging.

I'd suggest running tcpdump on the Dumb AP's wireless interface and the
client's wireless interface and see which of them sees the various parts
of the DHCP handshake.


-- 
Russell Senior, President
russell@personaltelco.net

[toc] | [prev] | [next] | [standalone]


#1440274 — Re: [LEDE-DEV] DHCP via bridge in case of IPv4

FromAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Date2016-07-11 08:20 +0200
SubjectRe: [LEDE-DEV] DHCP via bridge in case of IPv4
Message-ID<rTCJr-3gm-9@gated-at.bofh.it>
In reply to#1440039
Hi Russel,

On Sun, 2016-07-10 at 00:19 -0700, Russell Senior wrote:
+AD4- +AD4- 
+AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- +AD4- +AD4- +ACI-Alexey+ACI- +AD0APQ- Alexey Brodkin +ADw-Alexey.Brodkin+AEA-synopsys.com+AD4- writes:
+AD4- Alexey+AD4- Hi Aaron,
+AD4- Alexey+AD4- On Sat, 2016-07-09 at 07:47 -0400, Aaron Z wrote:
+AD4- +AD4- 
+AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- On Sat, Jul 9, 2016 at 4:37 AM, Alexey Brodkin
+AD4- +AD4- +AD4- +ADw-Alexey.Brodkin+AEA-synopsys.com+AD4- wrote:
+AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- Hello,
+AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- I was playing with quite simple bridged setup on different boards
+AD4- +AD4- +AD4- with +AD4- very recent kernels (4.6.3 as of this writing) and found one
+AD4- +AD4- +AD4- interesting +AD4- behavior that I cannot yet understand and googling
+AD4- +AD4- +AD4- din't help here as well.
+AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- My setup is pretty simple: +AD4-
+AD4- +AD4- +AD4- -------------+AKAAoACgAKAAoACgAKA-------------------+AKAAoACgAKAAoACgAKA--------------------------
+AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- +AD4- HOST+AKAAoACgAKAAoACgAHwAoACgAKAAoACgAKAAoAB8- +ACI-Dumb AP+ACIAoACgAKAAoACgAKAAfACgAKAAoACgAKAAoACgAHw- Wireless
+AD4- +AD4- +AD4- client+AKAAoACgAKAAoACgAKAAfA- +AD4- +AD4- with DHCP +AHwAPA------+AD4-(eth0)+AKAAoACgAKAAoA-(wlan0)+ADw------+AD4AfA-
+AD4- +AD4- +AD4- attempting to+AKAAoACgAKAAoACgAKAAoACgAHw- +AD4- +AD4- server+AKAAoACgAKAAfACgAKAAoACgAKAAoACgAHwAoACgAKAAoABc- br0
+AD4- +AD4- +AD4- /+AKAAoACgAKAAoAB8AKAAoACgAKAAoACgAKAAfA- get settings via DHCP +AHw- +AD4-
+AD4- +AD4- +AD4- -------------+AKAAoACgAKAAoACgAKA-------------------+AKAAoACgAKAAoACgAKA--------------------------
+AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- +ACo- HOST is my laptop with DHCP server that works for sure.+AKAAoAA+- +ACo-
+AD4- +AD4- +AD4- +ACI-Dumb AP+ACI- is a separate board (I tried ARM-based Wandboard and
+AD4- +AD4- +AD4- ARC-based +AD4- +AKA- AXS10x boards but results are exactly the same) with
+AD4- +AD4- +AD4- wired (eth0) and wireless +AD4- +AKA- (wlan0) network controllers bridged
+AD4- +AD4- +AD4- together (br0). That +ACI-br0+ACI- bridge flawlessly +AD4- +AKA- gets its settings
+AD4- +AD4- +AD4- from DHCP server on host.+AKAAoAA+- +ACo- Wireless client could be either a
+AD4- +AD4- +AD4- smatrphone or another laptop etc but +AD4- +AKA- what's important it should
+AD4- +AD4- +AD4- be configured to get network settings by DHCP as well.
+AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- +AD4- So what happens +ACI-br0+ACI- always gets network settings from DHCP server
+AD4- +AD4- +AD4- on HOST.+AKAAoAA+- That's fine. But wireless client only reliably gets
+AD4- +AD4- +AD4- settings from DHCP server +AD4- if IPv6 is enabled on +ACI-Dumb AP+ACI- board. If
+AD4- +AD4- +AD4- IPv6 is disabled I may see that +AD4- wireless client sends +ACI-DHCP
+AD4- +AD4- +AD4- Discover+ACI- then server replies with +ACI-DHCP Offer+ACI- but +AD4- that offer
+AD4- +AD4- +AD4- never reaches wireless client.
+AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- Do you have WDS enabled? If not, DHCP has issues in that scenario:
+AD4- +AD4- +AD4- https://wiki.openwrt.org/doc/howto/clientmode
+AD4- If the Dumb AP's wireless interface is in ap-mode, then this shouldn't
+AD4- be an issue.+AKAAoA-It's only client-mode interfaces that have trouble with bridging.
+AD4- 
+AD4- I'd suggest running tcpdump on the Dumb AP's wireless interface and the
+AD4- client's wireless interface and see which of them sees the various parts
+AD4- of the DHCP handshake.

So I did but for DHCP server and wireless client (had no tcpdump on Dump AP
at the moment).

That's what I see on the server:
-----------------------------+AD4-8-------------------------------
No. Time+AKAAoACgAKAAoACgAKAAoA-Source+AKAAoACgAKAAoA-Destination+AKAAoACgAKAAoACg-Protocol Length Info
+AKA-3 0.151181000+AKAAoA-0.0.0.0+AKAAoACgAKA-255.255.255.255+AKAAoA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Discover - Transaction ID 0x31dc321f
11 2.760796000+AKAAoA-10.42.0.1+AKAAoA-10.42.0.13+AKAAoACgAKAAoACgAKA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Offer+AKAAoACgAKA-- Transaction ID 0x31dc321f
14 5.220985000+AKAAoA-0.0.0.0+AKAAoACgAKA-255.255.255.255+AKAAoA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Discover - Transaction ID 0x31dc321f
15 5.221150000+AKAAoA-10.42.0.1+AKAAoA-10.42.0.13+AKAAoACgAKAAoACgAKA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Offer+AKAAoACgAKA-- Transaction ID 0x31dc321f
23 15.649835000 0.0.0.0+AKAAoACgAKA-255.255.255.255+AKAAoA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Discover - Transaction ID 0x31dc321f
24 15.650017000 10.42.0.1+AKAAoA-10.42.0.13+AKAAoACgAKAAoACgAKA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Offer+AKAAoACgAKA-- Transaction ID 0x31dc321f
32 25.648589000 0.0.0.0+AKAAoACgAKA-255.255.255.255+AKAAoA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Discover - Transaction ID 0x31dc321f
33 25.648758000 10.42.0.1+AKAAoA-10.42.0.13+AKAAoACgAKAAoACgAKA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Offer+AKAAoACgAKA-- Transaction ID 0x31dc321f
43 35.864567000 0.0.0.0+AKAAoACgAKA-255.255.255.255+AKAAoA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Discover - Transaction ID 0x31dc321f
48 38.832837000 10.42.0.1+AKAAoA-10.42.0.13+AKAAoACgAKAAoACgAKA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Offer+AKAAoACgAKA-- Transaction ID 0x31dc321f
-----------------------------+AD4-8-------------------------------

That's on the wireless client:
-----------------------------+AD4-8-------------------------------
No.+AKAAoA-Time+AKAAoACgAKAAoACgAKAAoACgAKAAoA-Source+AKAAoACg-Destination+AKAAoACgAKAAoACg-Protocol Length Info
1171 94.192971000+AKAAoACg-0.0.0.0+AKAAoA-255.255.255.255+AKAAoA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Discover - Transaction ID 0x31dc321f
1182 99.263686000+AKAAoACg-0.0.0.0+AKAAoA-255.255.255.255+AKAAoA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Discover - Transaction ID 0x31dc321f
1185 109.692642000+AKAAoA-0.0.0.0+AKAAoA-255.255.255.255+AKAAoA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Discover - Transaction ID 0x31dc321f
1186 119.691474000+AKAAoA-0.0.0.0+AKAAoA-255.255.255.255+AKAAoA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Discover - Transaction ID 0x31dc321f
1190 129.907507000+AKAAoA-0.0.0.0+AKAAoA-255.255.255.255+AKAAoA-DHCP+AKAAoACgAKAAoA-342+AKAAoACgAKA-DHCP Discover - Transaction ID 0x31dc321f
-----------------------------+AD4-8-------------------------------

I'll try to capture data from Dumb AP sometime soon and will reply to the thread.

-Alexey

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web