BitHead
Posts: 15
Joined: Wed Sep 03, 2014 1:14 pm

DHCP-HELPER ... not helping

Fri Jun 14, 2019 1:35 am

Yay!
I followed the steps outlined in the Debian-WIki BridgeNetworkConnectionsProxyArp and it works... almost.
I have a Windows PC getting internet from RPI(2B) via eth0 via wlan0(tiny generic 802.11n USB plug) via WiFi router on other side of building!
But... only when the Windows PC has IPv4 address set statically.
I remove dhcp-helper from the Pi and it still works fine, of course, with static IP address.
I set the PC to use DHCP and IP address defaults to the 169.254... number, as you would expect (no dhcp-helper).
I put dhcp-helper ( DHCPHELPER_OPTS="-b wlan0" ) back in the RPI and the PC always fails to get an IP address.
Htop shows it's there, running just fine.
The RPI is getting its' IP address assigned from router OK.
RPI eth0 IP address mirrors that of wlan0.
So, now I'm wondering... Raspbian kernel != Debian kernel => dhcp-helper not work?
Or... (please let it be) is there something silly I need to do that is not mentioned in the Debian Wiki. ?

epoch1970
Posts: 3308
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: DHCP-HELPER ... not helping

Fri Jun 14, 2019 9:23 am

Well, proxy ARP bridging. Almost working, that looks to me like a good description of it...
One thing that does work is running a "real" L2 tunnel over an L3 wifi link and bridging both ends. There is an old post of mine on this forum on doing that via openvpn.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

BitHead
Posts: 15
Joined: Wed Sep 03, 2014 1:14 pm

Re: DHCP-HELPER ... not helping

Fri Jun 14, 2019 2:01 pm

Thanks for the redirect!
Now that there is 'ProxyARP failure' and your old post prompting another look into tunneling, I will give PiVPN http://www.pivpn.io/ a try.
...
OMG - how easy was that! ( curl -L https://install.pivpn.io | bash )

However, while this is fine for the glued-to-the-bench PC, my next step was to plug a switch into eth0 so can connect 'whatever' for OS upgrading/app installing.
I'm not sure how that's going to work - can't really do VPN client stuff on each and every little thing that gets plugged in.
Maybe it's a Windows 10 thing? I've seen words about things working fine with Linux and 7 - will drag out a Linux box and try...
...
agh...also a no-go with Lubuntu box - works with static IP, not dhcp. :-(

epoch1970
Posts: 3308
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: DHCP-HELPER ... not helping

Fri Jun 14, 2019 3:04 pm

I have no idea what pivpn is.
If you're using a bridged tunnel there is no question about installing a VPN client or whatsoever on the machines. There is a single network spanning 2 "sites", machines "see" each other normally.

I found back my post: viewtopic.php?t=204361
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

BitHead
Posts: 15
Joined: Wed Sep 03, 2014 1:14 pm

Re: DHCP-HELPER ... not helping

Wed Jun 19, 2019 11:55 am

So... I WAS sort of right - there WAS something I needed to do that was not mentioned in the Debian Wiki.
I needed to create/enable/start a parprouted.service - as per the excellent guidance given by Ingo on raspberrypi.stackexhange.com's question #88954.
As per Ingo's instructions, I created file 'parprouted.service' in /etc/systemd/system.
In it, I put his...

####################################################
[Unit]
Description=proxy arp routing service
Documentation=https://raspberrypi.stackexchange.com/q/88954/79866

[Service]
Type=forking
# Restart until wlan0 gained carrier
Restart=on-failure
RestartSec=5
TimeoutStartSec=30
ExecStartPre=/lib/systemd/systemd-networkd-wait-online --interface=wlan0 --timeout=6 --quiet
ExecStartPre=/bin/echo 'systemd-networkd-wait-online: wlan0 is online'
# clone the dhcp-allocated IP to eth0 so dhcp-helper will relay for the correct subnet
ExecStartPre=/bin/bash -c '/sbin/ip addr add $(/sbin/ip -4 -br addr show wlan0 | /bin/grep -Po "\\d+\\.\\d+\\.\\d+\\.\\d+")/32 dev eth0'
ExecStartPre=/sbin/ip link set dev eth0 up
ExecStartPre=/sbin/ip link set wlan0 promisc on

# v minus sign
ExecStart=-/usr/sbin/parprouted eth0 wlan0

ExecStopPost=/sbin/ip link set wlan0 promisc off
ExecStopPost=/sbin/ip link set dev eth0 down
ExecStopPost=/bin/bash -c '/sbin/ip addr del $(/sbin/ip -4 -br addr show eth0 | /bin/grep -Po "\\d+\\.\\d+\\.\\d+\\.\\d+")/32 dev eth0'

[Install]
WantedBy=[email protected]
############################################

Then...
[email protected]:/ $ systemctl enable parprouted.service

All's good now! Thanks to Ingo!

BitHead
Posts: 15
Joined: Wed Sep 03, 2014 1:14 pm

Re: DHCP-HELPER ... not helping

Tue Jun 25, 2019 5:11 pm

Update...
Premature 'All's good'.
I AM writing this on Win10-64 machine through cable to the Pi to the Wifi router, but...
this is the ONLY machine that does it.
I can not get another Pi to work.
I can not get a Win7 ultimate-32 machine to work.
When I 'fing' on this machine it shows ALL the Host 192.168.1.xx subnets scrolling by - all 255 of them.

And... it takes about a minute for this machine to get IP served.
And... it seems to hang for a bit every few minutes.

Something's not right - just lost connection when ssh'd in to investigate 'ip addr'
No joy yet. :-(

BitHead
Posts: 15
Joined: Wed Sep 03, 2014 1:14 pm

Re: DHCP-HELPER ... not helping

Wed Jun 26, 2019 11:16 am

It seems that Win10 has 'LLDP" things that aren't in Win7 or Stretch.

Link-Layer Topology Discovery Responder
Link-Layer Topology Discovery Mapper I/O Driver
and...
Microsoft LLDP Protocol Driver - which is a MS Data Center Networking (DCN) thing - so maybe not relevant.
I see LLDP can be apt-get'ed - will see what happens.

BitHead
Posts: 15
Joined: Wed Sep 03, 2014 1:14 pm

Re: DHCP-HELPER ... not helping

Wed Jun 26, 2019 11:47 am

Agh! This issue is only about DHCP requests not forwarding/returning - all's good with static IP.
LLT-Responder/Mapper set to enable 'domain' and 'public' does not help.
Maybe it IS DCN - it's not on Win7.
Am giving up. Dasvidania!

Return to “Networking and servers”