Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[newbie] I can't setup wifi connection
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
starach
n00b
n00b


Joined: 21 Aug 2010
Posts: 10
Location: Warsaw

PostPosted: Sat Dec 31, 2011 2:49 pm    Post subject: [newbie] I can't setup wifi connection Reply with quote

I have tried doing manually, using net-setup and dhcpcd and I still can't get it to work properly.
Of course when I'm using wired connection everything works as expected and I don't really have to lift a finger to configure it but that is not the point. I'm one of those stubborn bastards and I want to do it via WiFi. ;)

I have a router with 192.168.1.254 ip address which surprisingly shows that computer with hostname of Gentoo-11 is connected and working but I cannot access internet. I have even turned off encryption for WiFi thinking it might be the problem. But well it looks like it isn't.

After I boot Gentoo from LiveDVD 11.2 using x86 no framebuffer I get my network cards configured and ready to use. Than I execute the fallowing commands:
Code:
# iwconfig wlan0 essid GentooNode
# ifconfig wlan0 192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0 up
# route add default gw 192.168.1.254
# echo "nameserver 192.168.1.254" >> /etc/resolv.conf ( not sure if it that command because Im doing it manually using nano - but I think you get the point ;) )


And what happens? Nothing... I cannot even ping my own gateway or other computers inside my local network and I'm sure ICMP's are allowed because any other computer inside my network using Crapdows is able to do it.

I'm probably making some small idiotic mistake ( like usual... ) so please give me a helping hand. Thanks a lot and happy new year everyone. :)

Code:
Gentoo-11 ~ # ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 24:3c:20:06:9e:71
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::263c:20ff:fe06:9e71/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17 errors:0 dropped:0 overruns:0 frame:0
          TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1397 (1.3 KiB)  TX bytes:10580 (10.3 KiB)

Gentoo-11 ~ # iwconfig wlan0
wlan0     IEEE 802.11bgn  ESSID:"GentooNode"  Nickname:"rtl_wifi"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:12:2A:54:18:D9
          Bit Rate:150 Mb/s   Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=93/100  Signal level=100/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Gentoo-11 ~ # route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.254   0.0.0.0         UG    1      0        0 wlan0
default         192.168.2.254   0.0.0.0         UG    302    0        0 wlan0
loopback        localhost       255.0.0.0       UG    0      0        0 lo
192.168.1.0     *               255.255.255.0   U     0      0        0 wlan0
192.168.2.0     *               255.255.255.0   U     0      0        0 wlan0
Gentoo-11 ~ # cat /etc/resolv.conf
nameserver 192.168.1.254
Gentoo-11 ~ # hostname
Gentoo-11
Gentoo-11 ~ # ping -c 1 192.168.1.254
PING 192.168.1.254 (192.168.1.254) 56(84) bytes of data.

--- 192.168.1.254 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

Gentoo-11 ~ # ping -c 1 192.168.1.4
PING 192.168.1.4 (192.168.1.4) 56(84) bytes of data.
From 192.168.1.4 icmp_seq=1 Destination Host Unreachable

--- 192.168.1.4 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

Gentoo-11 ~ #
Back to top
View user's profile Send private message
Telemin
l33t
l33t


Joined: 25 Aug 2005
Posts: 753
Location: Glasgow, UK

PostPosted: Sat Dec 31, 2011 5:33 pm    Post subject: Reply with quote

Hi Starach,

Just a few further questions about your specific setup. Does your wireless router use wpa2 encryption (and if not why not?). If it does then you need to be using wpa_supplicant instead of wireless tools, and to be honest it is a much better tool to use anyway.

Also I have personally chosen to forego the old style of doing things with net.wlan0 and net.eth0 in favour of adding wpa_supplicant and dhcpcd as init services instead, which I find a whole lot easier.

wpa_supplicant is pretty straightforward to setup the basic configfile is:

[code=/etc/wpa_supplicant/wpa_supplicant.conf]
network={
ssid="my_ssid"
psk="my_wpa_key"
}
[/code]

Then it should be as simple as

Code:

# /etc/init.d/wpa_supplicant start
# /etc/init.d/dhcpcd start


If you check the output of dmesg it may well give you messages along the lines of "associated with 00:4f:6c:7a:00:7d" or somesuch to tell you that it is at least correctly associating with the wireless.

-Telemin-f
_________________
The Geek formerly known as -Freestyling-
When you feel your problem has been solved please add [Solved] to the topic title.
Please adopt an unanswered post
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