Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Double IP

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
GogoAkira
Posts: 50
Joined: 2014-09-09 14:37

Double IP

#1 Post by GogoAkira »

Does anyone know why my wlan0 would get assigned two ip addresses.

I have dhclient and iwd installed for my networking ( this also happens on Gentoo with openRC )

Everything is fine if my AP is working, wlan0 get's a single ip, but this AP is very iffy and sometimes the 5Ghz is off so iwd doesn't connect.
When that happens systemd is saying *** raising network devices , so after that's done in today's instance the iffy AP got a hold of himself in the meantime and iwd connected to it, not always the case. So when this happens like this I have to manually dhclient , and when I do I receive two ip addresses instead of one, right now i have 3 :) the more the better. After running dhclient wlan0 got two ip addresses assigned and few minutes later a third one appeared.

So this probably doesn't happen with wpa supplicant? Would this be in direction of iwd or dhclient or systemd. The fact that my router isn't on shouldn't be an issue, nic device gets raised no problem only it doesn't get an ip assigned because it isn't plugged in, but with wifi I think dhclient want's to assign an ip becuase it can't tell that iwd isn't connected? But dhclent can tell the Ethernet isn't connected so it doesn't try to assign an ip?, and I mean dhclient request an ip from dhcp server to be assigned then it assigns is to device. I have no idea of steps involved in any of these or how to research, one of these days.

enp0s25 device has that weird ip address because I had to run dhclient manually after reboot.

Also this never happened on Buster, only happens on Bullseye.

Also this is more of me trying to find out what is happening, internet works fine, I can ssh to any of these addresses and it works

Code: Select all

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 70:5a:0f:cf:7a:60 brd ff:ff:ff:ff:ff:ff
    inet 169.254.7.174/16 brd 169.254.255.255 scope link enp0s25:avahi
       valid_lft forever preferred_lft forever
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 64:80:99:d5:13:80 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.92/24 brd 10.0.0.255 scope global dynamic wlan0:avahi
       valid_lft 39156sec preferred_lft 39156sec
    inet 10.0.0.93/24 brd 10.0.0.255 scope global secondary dynamic wlan0
       valid_lft 39156sec preferred_lft 39156sec
    inet 10.0.0.88/24 brd 10.0.0.255 scope global secondary dynamic wlan0
       valid_lft 39407sec preferred_lft 39407sec
    inet6 fe80::6680:99ff:fed5:1380/64 scope link
       valid_lft forever preferred_lft forever


Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Double IP

#2 Post by Deb-fan »

Only some thoughts on it, oddball situation.

Might want to look at specs on the router and through its settings. Some will automatically switch freqs to give clients best connection, so signal strength, interference, congestion etc could cause it to dynamically be shifting you around. If each freq on a dual band has an Ssid being broadcast could see how someone in that situation could end up being assigned an IP for each. Like they'd be considered separate AP's(which they are.) Might look into setting a static IP to get rid of that/this. Doesnt sound like you're having problems, drops and so forth. If not, no biggie and would say let DHCP do it's thing.

Would be curious in that position too. Not at all familiar with iwd. Would be interested in hearing what you think and found out about it. Opted for networkd + wpa_supplicant cause wpa-etc is better proven and that combo seemed better documented at the time. Didn't exhaustively look at iwd either. What ive got works really well regardless so not pressed to change at all. Curious about iwd though, couldn't find any solid stats on it like speed test comparisons, any diff in signal strength, link quality etc. The above about your situation is only speculation. Makes sense in general anyway. :)

Ps, With diff ssid's set to automatically connect, even w/o any auto freq switching could see the same thing happening, two ip's assigned.
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Double IP

#3 Post by Head_on_a_Stick »

@OP: I can't claim to fully understand what's going on but it looks like Avahi is "helping" you. Perhaps kill it with fire? :mrgreen:
GogoAkira wrote:enp0s25 device has that weird ip address because I had to run dhclient manually after reboot.
That's an IPv4 link-local address (as per RFC 3927), again generated by Avahi.
deadbang

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Double IP

#4 Post by Deb-fan »

Just more junk, how are you even determing what/which AP you're connected to at any given time? Try-install wavemon ncurses, continously updates and does show ssid/freq/channel of an ongoing connection. Well plus other stuff I've just been using it as a quick connection status check tool. Works well.
Most powerful FREE tech-support tool on the planet * HERE. *

Post Reply