Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] no wifi without connected ethernet cable
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
avion23
n00b
n00b


Joined: 20 Jul 2009
Posts: 8

PostPosted: Fri Jan 13, 2012 10:08 pm    Post subject: [SOLVED] no wifi without connected ethernet cable Reply with quote

EDIT: My routing was the problem. I had set two default gateways and all packets were routed over eth0 and not over wlan2. See third post for details.

Hi guys,

i can't connect to my wifi when there is no cable attached to eth0. wifi works fine if eth0 is connected.

This is what it looks like if i boot without cable:
Code:

[...]
an  7 19:49:37 dockstar /etc/init.d/net.wlan2[1310]: WARNING: net.wlan2 has started, but is inactive
Jan  7 19:49:38 dockstar /etc/init.d/net.wlan3[1481]: ERROR: interface wlan3 does not exist
Jan  7 19:49:38 dockstar /etc/init.d/net.wlan3[1482]: Ensure that you have loaded the correct kernel module for your hardware
Jan  7 19:49:38 dockstar /etc/init.d/net.wlan3[1407]: ERROR: net.wlan3 failed to start
Jan  7 19:49:38 dockstar kernel: [   32.041005] wlan2: direct probe to 00:24:fe:44:ea:91 (try 1/3)
Jan  7 19:49:38 dockstar kernel: [   32.045568] wlan2: direct probe responded
Jan  7 19:49:38 dockstar kernel: [   32.061517] wlan2: authenticate with 00:24:fe:44:ea:91 (try 1)
Jan  7 19:49:38 dockstar kernel: [   32.064306] wlan2: authenticated
Jan  7 19:49:38 dockstar kernel: [   32.085785] wlan2: associate with 00:24:fe:44:ea:91 (try 1)
Jan  7 19:49:38 dockstar kernel: [   32.089350] wlan2: RX AssocResp from 00:24:fe:44:ea:91 (capab=0x431 status=0 aid=2)
Jan  7 19:49:38 dockstar kernel: [   32.089367] wlan2: associated
Jan  7 19:49:38 dockstar kernel: [   32.206230] NET: Registered protocol family 10
Jan  7 19:49:38 dockstar kernel: [   32.209282] ADDRCONF(NETDEV_UP): eth0: link is not ready
Jan  7 19:49:38 dockstar wpa_cli: interface wlan2 CONNECTED
Jan  7 19:49:38 dockstar start-stop-daemon: pam_unix(start-stop-daemon:session): session opened for user nobody by (uid=0)
Jan  7 19:49:38 dockstar sshd[1524]: Server listening on 0.0.0.0 port 22.
Jan  7 19:49:38 dockstar sshd[1524]: Server listening on :: port 22.
Jan  7 19:49:39 dockstar /etc/init.d/lighttpd[1538]: Use of the opts variable is deprecated and will be
Jan  7 19:49:39 dockstar /etc/init.d/lighttpd[1539]: removed in the future.
Jan  7 19:49:39 dockstar /etc/init.d/lighttpd[1540]: Please use extra_commands or extra_started_commands.
Jan  7 19:49:39 dockstar start-stop-daemon: pam_unix(start-stop-daemon:session): session opened for user nobody by (uid=0)
Jan  7 19:49:39 dockstar start-stop-daemon: pam_unix(start-stop-daemon:session): session opened for user nobody by (uid=0)
Jan  7 19:49:41 dockstar ntpdate[1705]: Can't find host 0.gentoo.pool.ntp.org: Name or service not known (-2)
Jan  7 19:49:42 dockstar ntpdate[1705]: Can't find host 1.gentoo.pool.ntp.org: Name or service not known (-2)
Jan  7 19:49:42 dockstar ntpdate[1705]: Can't find host 2.gentoo.pool.ntp.org: Name or service not known (-2)
Jan  7 19:49:42 dockstar ntpdate[1705]: Can't find host 3.gentoo.pool.ntp.org: Name or service not known (-2)
Jan  7 19:49:42 dockstar ntpdate[1705]: no servers can be used, exiting
Jan  7 19:49:42 dockstar /etc/init.d/ntp-client[1683]: ERROR: ntp-client failed to start
Jan  7 19:49:42 dockstar start-stop-daemon: pam_unix(start-stop-daemon:session): session opened for user nobody by (uid=0)
Jan  7 19:49:42 dockstar cron[1770]: (CRON) STARTUP (V5.0)
Jan  7 19:50:03 dockstar cron[1819]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons)
Jan  7 19:50:03 dockstar cron[1820]: (munin) CMD ([ -x /usr/bin/munin-cron ] && /usr/bin/munin-cron)


The access point shows that the device is connected, but no ping, no ssh, no nothing comes through. After plugging in the cable i have no problem ssh-ing over the wifi. Everything works fine:
Code:

Jan  7 19:54:18 dockstar kernel: [  312.157853] mv643xx_eth_port mv643xx_eth_port.0: eth0: link up, 1000 Mb/s, full duplex, flow control disabled
Jan  7 19:54:18 dockstar kernel: [  312.157999] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Jan  7 19:55:01 dockstar cron[1911]: (munin) CMD ([ -x /usr/bin/munin-cron ] && /usr/bin/munin-cron)
Jan  7 19:55:20 dockstar sshd[1988]: SSH: Server;Ltype: Version;Remote: 192.168.178.30-39998;Protocol: 2.0;Client: OpenSSH_5.8p1-hpn13v10
Jan  7 19:55:20 dockstar sshd[1988]: Accepted publickey for root from 192.168.178.30 port 39998 ssh2
Jan  7 19:55:20 dockstar sshd[1988]: pam_unix(sshd:session): session opened for user root by (uid=0)


I have absolutely no idea what i'm doing wrong. I even tried an "emerge -e world" twice, even though the system is quite slow:
Code:
dockstar ~ # uname -a
Linux dockstar 3.1.1-gentoo-dockstar #1 PREEMPT Sat Nov 26 15:12:43 CET 2011 armv5tel Feroceon 88FR131 rev 1 (v5l) Marvell SheevaPlug Reference Board GNU/Linux


I checked /etc/rc.conf (i'm runing baselayout 2):
Code:

rc_depend_strict="NO"
rc_hotplug="!net.*"


net.wlan2 is in runlevel default:
Code:

dockstar ~ # rc-update |grep net
                local |      default nonetwork                       
             net.eth0 |      default                                 
               net.lo | boot                                         
            net.wlan2 |      default                                 
             netmount |      default 


And here is the content of /etc/conf.d/net:
Code:

modules="wpa_supplicant"
wpa_supplicant_wlan0="-D wext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf"
wpa_supplicant_wlan2="-D wext -i wlan2 -c /etc/wpa_supplicant/wpa_supplicant.conf"

config_wlan2="192.168.178.201/24"
routes_wlan2="default via 192.168.178.1"

config_eth0="192.168.178.202/24"
routes_eth0="default via 192.168.178.1"


If you have any idea how to continue debugging, please tell me. I'm working on this for weeks and haven't gotten anywhere yet.


Last edited by avion23 on Sun Jan 15, 2012 11:27 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46339
Location: 56N 3W

PostPosted: Sun Jan 15, 2012 10:21 am    Post subject: Reply with quote

avion23,

Please post the output of
Code:
route
for working and non working.
I expect you have two default routes, one for wlan0 and one for eth0 with eth0 being called up first. Thus all of your internet outbound packets are sent to eth0, which is not connected.

You can only have one default ... think about it.

Test. does
Code:
/etc/init.d/net.eth0 stop
make it work?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
avion23
n00b
n00b


Joined: 20 Jul 2009
Posts: 8

PostPosted: Sun Jan 15, 2012 11:25 am    Post subject: Reply with quote

Hi NeddySeagoon,
thanks for your answer. The default route thing certainly makes sense.

This is the output for working:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.178.1   0.0.0.0         UG    2      0        0 eth0
default         192.168.178.1   0.0.0.0         UG    2003   0        0 wlan2
loopback        localhost       255.0.0.0       UG    0      0        0 lo
192.168.178.0   *               255.255.255.0   U     0      0        0 eth0
192.168.178.0   *               255.255.255.0   U     0      0        0 wlan2


and for non-working:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.178.1   0.0.0.0         UG    2      0        0 eth0
default         192.168.178.1   0.0.0.0         UG    2003   0        0 wlan2
loopback        localhost       255.0.0.0       UG    0      0        0 lo
192.168.178.0   *               255.255.255.0   U     0      0        0 eth0
192.168.178.0   *               255.255.255.0   U     0      0        0 wlan2



I've removed net.eth0 from the default runlevel and everything works again. Thanks alot! It really just was the default gateway. I feel kind of dumb now.
I've set eth0 back to dhcp. This way i have a fallback if my wifi fails someday.

Thanks again!
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