On Fri, 10 Dec 2010 23:18:42 +0000 (GMT) Christian Gardner <[email protected]> wrote:
> Hi all, > > Sorry for the length, if I knew what I was talking about it'd be shorter. > I have a wireless internet connection. I upgraded to LFS 6.7, trashing my old > 6.3 system > and forgetting exactly how I got the wireless working :(. Hope someone can > help. > Here's too much information: > > 0) Running Windows XP on my Toshiba Satellite P100-429 laptop. Internet > works fine in this environment. Have a wireless router from Cable&Wireless, > plugged into phone socket, getting good ADSL. > > 1) Installed LFS 6.7 on my laptop, dual-boots with WinXP, thank Grub. > For sect 7.11, my /etc/sysconfig/network file says "HOSTNAME=HAL9000". > For sect 7.12, I use a version of /etc/hosts appropriate for a no-card-setup: > 127.0.0.1 HAL9000.discovery.ship HAL9000 localhost > For sect 7.13 I have done nothing except make a one-liner /etc/resolv.conf: > nameserver 10.0.0.2 > (which is what my router likes to be called). > I have glossed over these sections because I don't understand them, and > because I > thought that subsequent messing with wireless-tools would work. If this is > wrong, please tell me > what I should be doing in these sections! > > 2) While in the kernel configuration menu, I selected my wireless card - > Intel PRO/Wireless 3945ABG. It seems to work. > > 3) In my BLFS environment, I install wireless-tools. I also downloaded > iwlwifi-3945-2.ucode from www.intellinuxwireless.org, and threw it into > /lib/firmware. So far so good? > > 4) I've messed about with the network script in /etc/rc.d/init.d. I added > these lines to the 'start' case: > > ip addr add 10.0.0.3/24 dev wlan0 > ip route add default via 10.0.0.2 dev wlan0 > iwconfig wlan0 essid CableWireless > iwconfig wlan0 key E33841AB87457316E04FC930C2 > ip link set wlan0 up > > and this to the 'stop' case: > > ip link set wlan0 down > > 5) So, once I'm booted up I test as follows: "ip link" gives > > 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 > 2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 > link/ether 00:16:36:88:35:0b brd ff:ff:ff:ff:ff:ff > 3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen > 1000 > link/ether 00:18:de:2d:1d:31 brd ff:ff:ff:ff:ff:ff > 4: sit0: <NOARP> mtu 1480 qdisc noop state DOWN > link/sit 0.0.0.0 brd 0.0.0.0 > > while "iwconfig wlan0" gives > > wlan0 IEEE 802.11abg ESSID:"CableWireless" > Mode:Managed Frequency:2.457 GHz Access Point: 00:0E:2E:67:B3:1B > > Bit Rate=1 Mb/s Tx-Power=15 dBm > Retry long limit:7 RTS thr:off Fragment thr:off > Encryption key:[I've checked this and it's correct] > Power Management:off > Link Quality=62/70 Signal level=-48 dBm > Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 > Tx excessive retries:0 Invalid misc:0 Missed beacon:0 > > Pinging 10.0.0.2 gives: > > PING 10.0.0.2 (10.0.0.2): 56 data bytes > 64 bytes from 10.0.0.2: icmp_seq=0 ttl=64 time=2.560 ms > [...etc...] > --- 10.0.0.2 ping statistics --- > 5 packets transmitted, 5 packets received, 0% packet loss > round-trip min/avg/max/stddev = 2.444/2.628/3.167/0.272 ms This looks very good, 0% packet loss, clearly the hardware and the kernel driver are working, you're connected to the router. You're very nearly there. > but pinging, say, www.linuxfromscratch.org gives this: > > PING quantum.linuxfromscratch.org (216.171.237.234): 56 data bytes > ping: sendto: Network is unreachable > ping: sendto: Network is unreachable > [...etc...] > --- quantum.linuxfromscratch.org ping statistics --- > 0 packets transmitted, 0 packets received, [ctrl-C'd out] > > I am also trying to install the X-window system at the mo, and failing at > the first hurdle: wget can't download the files for the X-protocols, again > telling me 'Network is unreachable'. > > What's most puzzling to me is that I seem to be able to resolve domain > names! So communications must be working at least up to my ISP's DNS servers. > But it can hardly be a problem at their end if my WinXP system connects OK. > > So... what am I missing? My guess is that it's something to do with setting your default route. On my netbook I use this script to connect to my router: #!/bin/bash ip addr add 192.168.1.4 dev wlan0 ip link set wlan0 up wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dwext ip route add 192.168.1.1 dev wlan0 ip route add default via 192.168.1.1 dev wlan0 I use wpa_supplicant instead of iwconfig because it can do wpa-psk2 but the other commands are very similar to what you have. Except that I set up the link, then create the route to the router (192.168.1.1) then I set it as the default route. I don't remember why I wrote the script to do it in that order, once it started working I stopped thinking about it. wpa_supplicant knows about the wireless networks I use, the passwords to the routers are in /etc/wpa_supplicant.conf Except when I'm at University, then I use their wireless network and I have to use dhcp (I can't use the static address 192.168.1.4). When I use dhcpcd the script looks like this: #!/bin/bash wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dwext sleep 2 dhcpcd Hope that helps. -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
