Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wlan keeps changing/droping ip address
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
prffzc
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2005
Posts: 105

PostPosted: Mon Jan 28, 2013 10:54 am    Post subject: wlan keeps changing/droping ip address Reply with quote

Can someone help me with this?
I can't understand what makes wlan to change its ip address from "normal" 192..... to 169....

I did a massive upgrade recently (did not upgrade dhcpcd though) but not at the moment when this is actually happening, so I don't know where to start.


These are the two states that keep interchanging.

Code:

ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.68.231  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::c617:feff:fe70:3bc2  prefixlen 64  scopeid 0x20<link>
        ether c4:17:fe:70:3b:c2  txqueuelen 1000  (Ethernet)
        RX packets 4916  bytes 2588871 (2.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4868  bytes 963467 (940.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.121  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::c617:feff:fe70:3bc2  prefixlen 64  scopeid 0x20<link>
        ether c4:17:fe:70:3b:c2  txqueuelen 1000  (Ethernet)
        RX packets 7070  bytes 3559077 (3.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6948  bytes 1393439 (1.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Back to top
View user's profile Send private message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 453

PostPosted: Mon Jan 28, 2013 2:14 pm    Post subject: Reply with quote

Your wlan is using dhcp to ask for an IP address from a dhcp server. If a dhcp server replies, it gives you the 192.168.x.x addresses (at least in your case, it could also be another range, but that depends on your server). If no server reply is received, you wlan tries to assign itself a so called 'link-local' IP adress. This is the kind of adresses that start with 169.x.x.x

I assume that you configuration somewhere defines a fallback ip address or method (I am not in front of gentoo, so I don't know exactly how it is done. Check /etc/conf.d/net.wlan.
Back to top
View user's profile Send private message
ferrelas
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jun 2008
Posts: 109

PostPosted: Mon Jan 28, 2013 9:38 pm    Post subject: Reply with quote

I think this could be related to an upgrade of udev, I had a similar problem with my system lately, do you have CONFIG_DEVTMPFS set in the kernel .config file?
Back to top
View user's profile Send private message
prffzc
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2005
Posts: 105

PostPosted: Tue Jan 29, 2013 1:14 pm    Post subject: Reply with quote

Yes, did the udev update too.
Recompiled the kernel several times -> frozen on udev events a couple of times. Got it to work at the moment with one of the "older" configurations.
I'm not sure if the kernel I'm running now has the CONFIG_DEVTMPFS set, but the frozen ones don't (although I did set it when udev asked I can only think that I messed up the settings).
Started cleaning. Will return to close the topic once I get everything to work.
Back to top
View user's profile Send private message
prffzc
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2005
Posts: 105

PostPosted: Tue Jan 29, 2013 9:40 pm    Post subject: Reply with quote

So everything looks ok now.

The one thing that I don't understand now is this: when the wireless lost its ip

Code:

Jan 28 12:20:26 localhost wpa_cli: interface wlan0 DISCONNECTED
Jan 28 12:20:26 localhost wpa_cli: executing 'false /etc/init.d/net.wlan0 --quiet stop' failed
Jan 28 12:20:27 localhost kernel: [ 2271.040951] wlan0: authenticate with 68:7f:74:7e:8b:ac
Jan 28 12:20:27 localhost kernel: [ 2271.054100] wlan0: send auth to 68:7f:74:7e:8b:ac (try 1/3)
Jan 28 12:20:27 localhost kernel: [ 2271.254069] wlan0: send auth to 68:7f:74:7e:8b:ac (try 2/3)
Jan 28 12:20:27 localhost kernel: [ 2271.256668] wlan0: authenticated
Jan 28 12:20:27 localhost kernel: [ 2271.264021] wlan0: associate with 68:7f:74:7e:8b:ac (try 1/3)
Jan 28 12:20:27 localhost kernel: [ 2271.286462] wlan0: RX AssocResp from 68:7f:74:7e:8b:ac (capab=0x531 status=0 aid=1)
Jan 28 12:20:27 localhost kernel: [ 2271.286527] wlan0: associated
Jan 28 12:20:27 localhost dhcpcd[5434]: wlan0: carrier acquired
Jan 28 12:20:27 localhost dhcpcd[3547]: wlan0: carrier acquired
Jan 28 12:20:27 localhost dhcpcd[2363]: wlan0: carrier acquired
Jan 28 12:20:27 localhost wpa_cli: interface wlan0 CONNECTED
Jan 28 12:20:27 localhost wpa_cli: executing '/etc/init.d/net.wlan0 --quiet start' failed
Jan 28 12:20:27 localhost dhcpcd[3547]: wlan0: sending IPv6 Router Solicitation
Jan 28 12:20:27 localhost dhcpcd[3547]: wlan0: checking for 169.254.163.148
Jan 28 12:20:27 localhost dhcpcd[2363]: wlan0: sending IPv6 Router Solicitation
Jan 28 12:20:27 localhost dhcpcd[2363]: wlan0: checking for 169.254.163.148
Jan 28 12:20:27 localhost dhcpcd[5434]: wlan0: sending IPv6 Router Solicitation
Jan 28 12:20:27 localhost dhcpcd[5434]: wlan0: checking for 169.254.163.148
Jan 28 12:20:31 localhost dhcpcd[3547]: wlan0: sending IPv6 Router Solicitation
Jan 28 12:20:31 localhost dhcpcd[2363]: wlan0: sending IPv6 Router Solicitation
Jan 28 12:20:31 localhost dhcpcd[5434]: wlan0: sending IPv6 Router Solicitation
Jan 28 12:20:32 localhost dhcpcd[2363]: wlan0: using IPv4LL address 169.254.163.148
Jan 28 12:20:32 localhost dhcpcd[3547]: wlan0: using IPv4LL address 169.254.163.148
Jan 28 12:20:32 localhost dhcpcd[5434]: wlan0: using IPv4LL address 169.254.163.148
Jan 28 12:20:35 localhost dhcpcd[3547]: wlan0: sending IPv6 Router Solicitation
Jan 28 12:20:35 localhost dhcpcd[2363]: wlan0: sending IPv6 Router Solicitation
Jan 28 12:20:35 localhost dhcpcd[3547]: wlan0: broadcasting for a lease
Jan 28 12:20:36 localhost dhcpcd[2363]: wlan0: broadcasting for a lease
Jan 28 12:20:37 localhost dhcpcd[5434]: wlan0: broadcasting for a lease
Jan 28 12:20:39 localhost dhcpcd[5434]: wlan0: offered 192.168.1.114 from 192.168.1.155
Jan 28 12:20:39 localhost dhcpcd[3547]: wlan0: sending IPv6 Router Solicitation
Jan 28 12:20:39 localhost dhcpcd[3547]: wlan0: no IPv6 Routers available
Jan 28 12:20:39 localhost dhcpcd[2363]: wlan0: sending IPv6 Router Solicitation
Jan 28 12:20:39 localhost dhcpcd[2363]: wlan0: no IPv6 Routers available
Jan 28 12:20:39 localhost dhcpcd[5434]: wlan0: sending IPv6 Router Solicitation
Jan 28 12:20:39 localhost dhcpcd[5434]: wlan0: no IPv6 Routers available
Jan 28 12:20:41 localhost dhcpcd[3547]: wlan0: offered 192.168.1.114 from 192.168.1.155
Jan 28 12:20:48 localhost dhcpcd[2363]: wlan0: offered 192.168.1.114 from 192.168.1.155
Jan 28 12:21:17 localhost dhcpcd[2363]: wlan0: acknowledged 192.168.1.114 from 192.168.1.155
Jan 28 12:21:17 localhost dhcpcd[2363]: wlan0: checking for 192.168.1.114
Jan 28 12:21:22 localhost dhcpcd[2363]: wlan0: leased 192.168.1.114 for 86400 seconds
Jan 28 12:21:22 localhost dhcpcd[3547]: wlan0: removing IP address 192.168.1.114/16
Jan 28 12:21:22 localhost dhcpcd[5434]: wlan0: removing IP address 192.168.1.114/16
Jan 28 12:21:25 localhost dhcpcd[3547]: wlan0: carrier lost
Jan 28 12:21:25 localhost dhcpcd[5434]: wlan0: carrier lost
Jan 28 12:21:25 localhost dhcpcd[2363]: wlan0: carrier lost
Jan 28 12:21:25 localhost kernel: [ 2328.782085] cfg80211: Calling CRDA for country: GB
Jan 28 12:21:25 localhost wpa_cli: interface wlan0 DISCONNECTED
Jan 28 12:21:25 localhost wpa_cli: executing 'false /etc/init.d/net.wlan0 --quiet stop' failed
Jan 28 12:21:26 localhost kernel: [ 2329.936395] wlan0: authenticate with 68:7f:74:7e:8b:ac
Jan 28 12:21:26 localhost kernel: [ 2329.949679] wlan0: send auth to 68:7f:74:7e:8b:ac (try 1/3)
Jan 28 12:21:26 localhost kernel: [ 2329.952140] wlan0: authenticated
Jan 28 12:21:26 localhost kernel: [ 2329.958901] wlan0: associate with 68:7f:74:7e:8b:ac (try 1/3)
Jan 28 12:21:26 localhost kernel: [ 2329.977025] wlan0: RX AssocResp from 68:7f:74:7e:8b:ac (capab=0x531 status=0 aid=1)
Jan 28 12:21:26 localhost kernel: [ 2329.977092] wlan0: associated
Jan 28 12:21:26 localhost dhcpcd[2363]: wlan0: carrier acquired
Jan 28 12:21:26 localhost dhcpcd[3547]: wlan0: carrier acquired
Jan 28 12:21:26 localhost dhcpcd[5434]: wlan0: carrier acquired
Jan 28 12:21:26 localhost wpa_cli: interface wlan0 CONNECTED
Jan 28 12:21:26 localhost wpa_cli: executing '/etc/init.d/net.wlan0 --quiet start' failed

and so on.


Now that it IS working quote from the log

Code:

 localhost dhcpcd[2002]: wlan0: sending IPv6 Router Solicitation
 localhost dhcpcd[2002]: wlan0: leased 192.168.1.3 for 86400 seconds
....
 localhost dhcpcd[2264]: wlan0: sending IPv6 Router Solicitation
 localhost dhcpcd[2264]: wlan0: sending IPv6 Router Solicitation
 localhost dhcpcd[2264]: wlan0: no IPv6 Routers available


and everything works just fine.

So, I still don't know what went wrong....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum