# basic net setup

## idella4

I posted another thread re the wireless setup which I basically resolved by installing another package.

My system does work but it needs tweaking to work properly.  I have a wireless network card and an onboard network card.

I've been working off the wired connection.  I've setup the wireless card, but it's very messy.

On boot up, I currently have both the eth0 and wlan0 activated.  For the moment, I'd like to utilise the wlan0.

So, the first thing I have to do is shutdown eth0 with ifconfig eth0 down.  No problem.  The two clearly interfere with one another. 

If I really wanted, I can exclude eth0, that's easy enough, but not the task at hand.

Only one at a time should be up.  I re bring up wlan0

```

ifconfig wlan0 up

[check] iwlist wlan0 scan

wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

```

Now here is a rough spot.  I assume this command should complete.  This is what it does.

```

idella@genny /usr/src/linux-2.6.31-gentoo-r6 $ sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)

Associated with 00:1f:c6:5c:3f:cd

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (auth) [id=0 id_str=]

sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

```

It hangs.  So in another tab of bash, enter

```

idella@genny ~/Documents $ sudo dhclient wlan0

Internet Systems Consortium DHCP Client V3.1.2p1-Gentoo

Copyright 2004-2009 Internet Systems Consortium.

All rights reserved.

For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/wlan0/00:11:95:e9:b2:b7

Sending on   LPF/wlan0/00:11:95:e9:b2:b7

Sending on   Socket/fallback

DHCPREQUEST on wlan0 to 255.255.255.255 port 67

DHCPNAK from 192.168.0.1

DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7

DHCPOFFER from 192.168.0.1

DHCPREQUEST on wlan0 to 255.255.255.255 port 67

DHCPACK from 192.168.0.1

bound to 192.168.0.51 -- renewal in 1592 seconds.

```

I generally get connectivity.

It does NOT renew.  Every 1592 seconds or so, it cuts out, so I'm having to manually repeat the above to re-connect.

Also, the little wpa_supplicant gui comes up and just doesn't work or do anything.  It has a scan button which fails to scan.

It did work just once, but no longer.  Once connected, by rights it should list the wireless essid and all data details.  It misses everything.

There is another little wireless gui but I haven't bothered to install it.  This wpa_supplicant gui should work properly.

----------

## truc

 *idella4 wrote:*   

>  This wpa_supplicant gui should work properly.

 

Indeed, but you can save you a lot of trouble by using e.g. wicd to manage both your wired&wireless connections. I know that's yet an other package to install (well, at least two actually since it's a daemon/client software), but it litterally makes your life easier!   :Very Happy: 

----------

## idella4

truc,

yes, wicd was the one I was referring to.  I shall emerge it then.  The guide pages I used cited wicd and I've just held off from installing it.

The guides seemed to imply that the settings provided for /etc/conf.d/net and for wpa_supplicant would suffice.

Only one thing, I haven't yet tried it without eth0 disengaged.  Does kde4 not have a wireless manager tool?  kde 3 did which worked properly.

Do you have any idea why the wpa_supplicant command hangs?

----------

## truc

 *idella4 wrote:*   

> truc,
> 
> yes, wicd was the one I was referring to.  I shall emerge it then.  The guide pages I used cited wicd and I've just held off from installing it.
> 
> The guides seemed to imply that the settings provided for /etc/conf.d/net and for wpa_supplicant would suffice.
> ...

 

I'm not sure how you're supposed to switch between wired&wireless with the gentoo configuration, I've use wpa_supplicant alone before(no wicd or equivalent), and IIRC it didn't fork in the background by itself (or at least not by default EDIT: it needs the -B option).

Iif your wireless network settings  already are in /etc/wpa_supplicant.conf (or /etc/wpa_supplicant/wpa_supplicant.conf), it should automatically connect to it. You can use wpa_cli to check/modify your wireless settings (list available networks...)

There is a wpa_cli action file, which is a simple script executed on special event (connect/disconnect), you can modify it and make it more verbose if you like, I played with it, it was interesting:)

Anyway...

 *Quote:*   

>   Does kde4 not have a wireless manager tool?  kde 3 did which worked properly.

 

it probably does, and it 's probably based on network manager which I don't like for several reasons:

not so much intuitif

no connection until you're logged in, which is annoying when you just want ssh access without physically login...

----------

## idella4

truc,

There are version problems.  So far, my kernel 2.6.30 work like a charm.  

Two years ago the packages and kernel of then just worked out of the box.  The newer versions have developed rough spots.

I tried and tried with kernel 2.6.31 and eventually tracked down a bug in bugzilla.  The 'fix' results in the description of this post.

I installed wicd, and it's not working either, just like wpa_supplicant.

```

idella@genny ~/Documents $ wicd

bash: wicd: command not found

idella@genny ~/Documents $ sudo wicd

```

I expected a wpa_supplicant like gui.  Nothing.  I have yet to remove eth0 references form con.d/net.

Currentl I'm getting eth0 being brought up, but on completing boot, it's offline.

I have to manually enter the code in post one which brings it up ok.  I suppose I can always throw the sequence 

into a local init script, but I'd rather the packages work properly.

It just always seems to be struggling.  I have a connection which is enabling this entry.

```

idella@genny ~/Documents $ sudo wpa_cli

Password:

wpa_cli v0.7.2

Copyright (c) 2004-2010, Jouni Malinen <j@w1.fi> and contributors

This program is free software. You can distribute it and/or modify it

under the terms of the GNU General Public License version 2.

Alternatively, this software may be distributed under the terms of the

BSD license. See README and COPYING for more details.

Selected interface 'wlan0'

Interactive mode

> interface wlan0

Could not connect to interface 'wlan0' - re-trying

> interface wlan0

Could not connect to interface 'wlan0' - re-trying

> reconnect

OK

> interface wlan0

Could not connect to interface 'wlan0' - re-trying

```

I don't know.  It enters this mode with selected iface wlan0, then can't even manage it in the console??/???!!!!

----------

## truc

as I said, wicd is a daemon/client software, so you need to start the daemon, then connect to it with a client, available clients are:

wicd-gtkwicd-cursewicd-cliif you're not sure, start with wicd-gtk (make sure you've disable net.eth0 and net.wlan0 as the post install message probably suggested

----------

## idella4

truc, thanks

ok got you. 

```

idella@gentoo64 ~ $ sudo chroot /mnt/genny

bash: /dev/null: Permission denied

gentoo64 / # which wicd-gtk

/usr/bin/wicd-gtk

gentoo64 / # whereis wicd-curse

wicd-curse:

gentoo64 / # which wicd-cli

/usr/bin/wicd-cli

```

I'm in a gentoo64 [yes I have two].  From here I have to re-boot.  This gentoo is still set up for normal eth0,

the other is now geared towards wireless.  Just have one of each!.  From here I have to reboot into genny.

rebooted:

```

idella@genny ~/Documents $ uname -a

Linux genny 2.6.31-xen-r10 #26 SMP Sat Mar 6 02:34:37 WST 2010 i686 Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz GenuineIntel GNU/Linux

idella@genny ~/Documents $ lsmod

Module                  Size  Used by

............................

snd_mixer_oss          14500  1 snd_pcm_oss

nvidiafb               39972  0

vgastate                8996  1 nvidiafb

forcedeth              57936  0

i2c_nforce2             6500  0

ath5k                 147348  0

```

I have both guis up and they both don't work.  I wish this forum supports posting screenshots.

I tried and tried with wicd gui, it got to obtaining the ip address then couldn't do it.

I'm in a xen kernel which has no difference on the connection.  The idea is to get the wicd gui to connect.

Once again, I had to do it with the cited commands  Observe !!

```

idella@genny /usr/src/linux-2.6.31-gentoo-r6 $ sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf                                                             

ioctl[SIOCSIWSCAN]: Device or resource busy                                                 

Failed to initiate AP scan.                                                                 

ioctl[SIOCSIWSCAN]: Device or resource busy

Failed to initiate AP scan.                

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)

Associated with 00:1f:c6:5c:3f:cd                                        

WPA: Invalid EAPOL-Key MIC when using TPTK - ignoring TPTK               

WPA: Could not verify EAPOL-Key MIC - dropping packet                    

WPA: Invalid EAPOL-Key MIC when using TPTK - ignoring TPTK               

WPA: Could not verify EAPOL-Key MIC - dropping packet                    

Authentication with 00:1f:c6:5c:3f:cd timed out.                         

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0                 

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)

Associated with 00:1f:c6:5c:3f:cd                                        

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (auth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED bssid=00:1f:c6:5c:3f:cd reason=0                              

ioctl[SIOCSIWSCAN]: Device or resource busy                                           

Failed to initiate AP scan.                                                           

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)             

Associated with 00:1f:c6:5c:3f:cd                                                     

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]             

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (reauth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED bssid=00:1f:c6:5c:3f:cd reason=0                                

ioctl[SIOCSIWSCAN]: Device or resource busy                                             

Failed to initiate AP scan.                                                             

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)               

Associated with 00:1f:c6:5c:3f:cd                                                       

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]               

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (reauth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED bssid=00:1f:c6:5c:3f:cd reason=0                                

ioctl[SIOCSIWSCAN]: Device or resource busy                                             

Failed to initiate AP scan.                                                             

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)               

Associated with 00:1f:c6:5c:3f:cd                                                       

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]               

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (reauth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED bssid=00:1f:c6:5c:3f:cd reason=0                                

ioctl[SIOCSIWSCAN]: Device or resource busy                                             

Failed to initiate AP scan.                                                             

ioctl[SIOCGIWSCAN]: Resource temporarily unavailable                                    

ioctl[SIOCSIWSCAN]: Device or resource busy                                             

Failed to initiate AP scan.                                                             

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)               

Associated with 00:1f:c6:5c:3f:cd                                                       

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]               

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (reauth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED bssid=00:1f:c6:5c:3f:cd reason=0                                

ioctl[SIOCSIWSCAN]: Device or resource busy                                             

Failed to initiate AP scan.                                                             

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)               

Associated with 00:1f:c6:5c:3f:cd                                                       

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]               

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (reauth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED bssid=00:1f:c6:5c:3f:cd reason=0                                

ioctl[SIOCSIWSCAN]: Device or resource busy                                             

Failed to initiate AP scan.                                                             

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)               

Associated with 00:1f:c6:5c:3f:cd                                                       

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]               

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (reauth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED bssid=00:1f:c6:5c:3f:cd reason=0                                

ioctl[SIOCSIWSCAN]: Device or resource busy                                             

Failed to initiate AP scan.                                                             

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)               

Associated with 00:1f:c6:5c:3f:cd                                                       

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]               

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (reauth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED bssid=00:1f:c6:5c:3f:cd reason=0                                

ioctl[SIOCSIWSCAN]: Device or resource busy                                             

Failed to initiate AP scan.                                                             

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)               

Associated with 00:1f:c6:5c:3f:cd                                                       

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]               

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (reauth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED bssid=00:1f:c6:5c:3f:cd reason=0                                

ioctl[SIOCSIWSCAN]: Device or resource busy                                             

Failed to initiate AP scan.                                                             

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)               

Associated with 00:1f:c6:5c:3f:cd                                                       

WPA: Invalid EAPOL-Key MIC when using TPTK - ignoring TPTK                              

WPA: Could not verify EAPOL-Key MIC - dropping packet

WPA: Invalid EAPOL-Key MIC when using TPTK - ignoring TPTK

WPA: Could not verify EAPOL-Key MIC - dropping packet

Authentication with 00:1f:c6:5c:3f:cd timed out.

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)

Associated with 00:1f:c6:5c:3f:cd

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (reauth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED bssid=00:1f:c6:5c:3f:cd reason=0

ioctl[SIOCSIWSCAN]: Device or resource busy

Failed to initiate AP scan.

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)

Associated with 00:1f:c6:5c:3f:cd

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (reauth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED bssid=00:1f:c6:5c:3f:cd reason=0

ioctl[SIOCSIWSCAN]: Device or resource busy

Failed to initiate AP scan.

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)

Associated with 00:1f:c6:5c:3f:cd

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (reauth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED bssid=00:1f:c6:5c:3f:cd reason=0

ioctl[SIOCSIWSCAN]: Device or resource busy

Failed to initiate AP scan.

Trying to associate with 00:1f:c6:5c:3f:cd (SSID='delaney' freq=2462 MHz)

Associated with 00:1f:c6:5c:3f:cd

WPA: Key negotiation completed with 00:1f:c6:5c:3f:cd [PTK=TKIP GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:1f:c6:5c:3f:cd completed (reauth) [id=0 id_str=]

```

This is in fact progress.  It took many lines, but it finally completed, for the first time.

Followed by

```

idella@genny ~/Documents $ sudo dhclient wlan0

```

and it connected.  The wicd actually picked up on it and finally reports connected,  only because I did it manually, which defeats the whole purpose.

wpa_supplicant still can't do anything useful.

wicd offers to create an ad-hoc network, or find a hidden network.  What about the type of network mode that it is; managed.

So it misses an essential basic.

sheeeeesh

Question, is static DNS  sensible properties selection?  If so, how do I select an entry for 

DNS domain

search domain

DNS 1

2

3

Neddy, you're close by, can you makesense of this?

----------

## NeddySeagoon

I've been using NetworkManager to manage wired, wireless and 3G connectivity.

----------

## idella4

ok thanks Neddy.  I'll sort it out eventually I think.  Just not today.

----------

