You are not logged in.

#1 2023-11-19 19:59:43

cammytown
Member
Registered: 2023-11-19
Posts: 2

[SOLVED] Strange DHCP IPv4 assignment

Apologies in advance for my lack of expertise with Linux.

I have had a very strange networking issue for a long time that I've just been enduring but I'd really like to know what's going on.

I have a device for extending a wireless network (TP-Link Long Range Outdoor Wifi Transmitter). The device rebroadcasts the wifi network. When I connect to the device through wifi, I get really weird behavior.

The computer will be assigned IPv6 and IPv4 addresses, but only sometimes will the IPv4 address be valid. In the networking configuration for my device, I have specified a range of IPv4 addresses to assign to devices. When one of the addresses in this range is assigned, IPv4 websites do not work but IPv6 websites do.

If I run `dhcpcd -k` and then `dhcpcd` to restart the DHCP client, it will eventually assign me an IP address that is not within the range specified in my configuration, but which functions correctly in allowing me to access both IPv4 and IPv6 sites/addresses.

Adding to the confusion: if I connect an ethernet cable between my computer and the device, I cannot access the device control panel at 192.168.0.254 unless I assign my computer a static address which doesn't seem unreasonable, but when I do that, the internet no longer works-- I need to have a dynamic address assigned and it needs to be the right one.

Stranger still (and probably indicative of whatever is going on), when I have a dynamic IP that actually works, I can actually login to the control panel of the router of the actual internet (the one I'm extending). This suggests that I'm somehow bypassing my network extender when requesting an IP? I'm really confused by what's going on here.

The extender rebroadcasts the wifi network as a new wifi network, so there shouldn't be any confusion on the part of my computer as to which device it is connecting to. Nonetheless, whether the extender is set to rebroadcast the wifi network as is or rebroadcast it under a different name, I get the same behavior.

Here's an image of my device network config:
https://i.imgur.com/qYiJmmD.png

Here's the log of me running DHCPD a couple times to get a working IP:

$ sudo dhcpcd
dhcpcd-10.0.5 starting
dev: loaded udev
DUID 00:01:00:01:2b:f5:72:b3:40:23:43:76:b9:b5
wlan0: connected to Access Point: MiddleHaus
wlan0: IAID 43:76:b9:b5
wlan0: adding address fe80::53ec:a87:8d59:25cc
wlan0: soliciting a DHCP lease
wlan0: soliciting an IPv6 router
wlan0: offered 192.168.1.226 from 192.168.1.254
wlan0: ignoring offer of 192.168.0.102 from 192.168.0.254
wlan0: NAK: from 192.168.0.254
wlan0: soliciting a DHCP lease
wlan0: offered 192.168.0.102 from 192.168.0.254
wlan0: probing address 192.168.0.102/24
wlan0: leased 192.168.0.102 for 7200 seconds
wlan0: adding route to 192.168.0.0/24
wlan0: adding default route via 192.168.0.254

$ sudo dhcpcd -k
sending signal ALRM to pid 2894
waiting for pid 2894 to exit

$ sudo dhcpcd
dhcpcd-10.0.5 starting
dev: loaded udev
DUID 00:01:00:01:2b:f5:72:b3:40:23:43:76:b9:b5
wlan0: connected to Access Point: MiddleHaus
wlan0: IAID 43:76:b9:b5
wlan0: adding address fe80::53ec:a87:8d59:25cc
wlan0: soliciting an IPv6 router
wlan0: soliciting a DHCP lease
wlan0: offered 192.168.1.226 from 192.168.1.254
wlan0: probing address 192.168.1.226/24
wlan0: leased 192.168.1.226 for 86400 seconds
wlan0: adding route to 192.168.1.0/24
wlan0: adding default route via 192.168.1.254

`192.168.0.254` is the IP to my network extender device. `192.168.1.254` is the IP to the router my device is extending. Note that when I get a working IP, it is leasing directly from the router... but this only happens sometimes?

Any guidance on this would be greatly appreciated. For Linux, I can just keep restarting DHCPD until it acquires a good IP. For my phone, it seems to almost never acquire a working IPv4 address.

Thank you.

Last edited by cammytown (2023-11-19 21:03:45)

Offline

#2 2023-11-19 20:55:39

seth
Member
Registered: 2012-09-03
Posts: 51,340

Re: [SOLVED] Strange DHCP IPv4 assignment

There're two dhcp servers and you get offered to IPs.
Remove the rogue dhcp server (I assume the checkbox in your screenshot will do the job)

Speaking of screenshots, please replace it w/ a link (the board rules 250x250px max for embedded images)

Offline

#3 2023-11-19 21:02:37

cammytown
Member
Registered: 2023-11-19
Posts: 2

Re: [SOLVED] Strange DHCP IPv4 assignment

seth wrote:

There're two dhcp servers and you get offered to IPs.
Remove the rogue dhcp server (I assume the checkbox in your screenshot will do the job)

Speaking of screenshots, please replace it w/ a link (the board rules 250x250px max for embedded images)

Wow. Thanks. I was not correctly understanding how DHCP worked. Thanks for letting me know about the forum rule and best wishes.

Offline

Board footer

Powered by FluxBB