# ifconfig eth0 failed [SOLVED]

## strubbldesign

hi everyone...

sorry for serving in this topic not clear quotes

i have a fresh installed gentoo amd64 (tuxonice-sources 2.6.31)

everything runs fine (xfce4)

but i am not able to connect via wicd (to a wpa network)

________

# ifconfig

lo (gives me all info about lo, lists no eth0 or wlan0)

#ifconfig eth0

(gives me all info about eth0(no routes, no ip), lists no lo no wlan0)

# tail /var/log/wicd/wicd.log

...[ 'ifconfig' ] unable to find wlan0

___________

any ideas what could went wrong? or how to fix it?

thanks

PS

why does gentoo liveDVD doesn't use a /etc/wpa_supplicant/wpa_supplicant.conf ??

----------

## strubbldesign

as I have wpa_supplicant and installed and wicd added to runlevel boot I do not have 

```
#iwlist
```

any ideas?

----------

## strubbldesign

now I am able (different location) to paste the outputs

log file of wicd.log

 *Quote:*   

> daxbau fysi # tail /var/log/wicd/wicd.log 
> 
> 2009/12/02 13:01:50 :: 
> 
> 2009/12/02 13:01:50 :: eth0: checking 192.168.7.10 is available on attached networks
> ...

 

(i also have removed device-mapper from bootrunlevel and don't get the errormessage (that it is written for baselayout2) still running on baselayout1 (do i really have to upgrade it?)

here's my /etc/conf.d/net *Quote:*   

> # This blank configuration will automatically use DHCP for any net.*
> 
> # scripts in /etc/init.d.  To create a more complete configuration,
> 
> # please review /etc/conf.d/net.example and save your configuration
> ...

 

here's my rc-update list *Quote:*   

> daxbau fysi # rc-update show --verbose
> 
>                acpid |                               
> 
>            alsasound | boot                          
> ...

 

also thewpa_supplicant.conf it is a wpa(1) network

 *Quote:*   

> daxbau fysi # more /etc/wpa_supplicant/wpa_supplicant.conf 
> 
> ctrl_interface=/var/run/wpa_supplicant
> 
> ctrl_interface_group=0
> ...

 

last but not least emerge --info *Quote:*   

> daxbau fysi # emerge --info
> 
> Portage 2.1.6.13 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.31-tuxonice x86_64)
> 
> =================================================================
> ...

 

what did I miss??

thanks for your help and patience

----------

## d2_racing

Hi, did you install wireless-tools ?

```

# emerge -av wireless-tools

```

----------

## strubbldesign

 *d2_racing wrote:*   

> Hi, did you install wireless-tools ?
> 
> 

 

no I haven't

1st I thougt wireless-tools is incompatible to wpa (only wep)

2nt if you look at the settings at /etc/conf.d/net there is an entry  *Quote:*   

> modules=( "wpa_supplicant" )

  wich indicates that wpa_supplicant should be used instead of wireless-tools

or did i understand the wpa_supplicant gentoo howto guide wrong??

----------

## strubbldesign

PS:

do I need net-misk/networkmanager?

it pulls as dependencies "wireless-tools"

----------

## d2_racing

I asked you this because of this error :

```

2009/12/02 13:01:55 :: Sending connection attempt result Success

2009/12/02 13:01:55 :: Running command ['iwconfig', 'wlan0'] failed: [Errno 2] No such file or directory 

```

iwconfig is part of the wireless-tools package.

----------

## strubbldesign

So does that mean to install both? Wireless-tools and wpa_supplicant?

Are there any miss-set configlines?

----------

## d2_racing

Yes.

----------

## strubbldesign

do you mean "yes" to all three questions?

if so could you please tell me what i have miss-confed?

----------

## strubbldesign

now i also added dhcdbd and networkmanager like: http://www.gentoo-wiki.info/HOWTO_NetworkManager

still the same

----------

## strubbldesign

how can it be: https://forums.gentoo.org/viewtopic-t-805594.html that he has no configlines in /etc/conf.d/net

----------

## strubbldesign

here's some helpfull output

lspci -n *Quote:*   

> (chroot) livecd / # lspci -n
> 
> 00:00.0 0600: 8086:2a00 (rev 0c)
> 
> 00:01.0 0604: 8086:2a01 (rev 0c)
> ...

 

so the driver should be iwlagn...

----------

## d2_racing

 *strubbldesign wrote:*   

> So does that mean to install both? Wireless-tools and wpa_supplicant?

 

Yes I mean this one.

----------

## strubbldesign

may anyone can guide me?

my aim is to use wicd as networkmanager...

thank you

kind reguards

----------

## dtjohnst

 *strubbldesign wrote:*   

> how can it be: https://forums.gentoo.org/viewtopic-t-805594.html that he has no configlines in /etc/conf.d/net

 

wpa_supplicant gets all it's information from wpa_supplicant.conf, so it needs no data in /etc/conf.d/net if you're using dhcpcd.

Does iwconfig work now? Does it show a wlan0?

----------

## d2_racing

I recommend that you use WICD inside your WM.

It will configure all the stuff for you.

But before doing this, you should double check that your wireless card is actually working :

```

# ifconfig -a

# iwconfig

# iwlist scan

# dmesg | tail

```

----------

## strubbldesign

ifconfig -a  *Quote:*   

> daxbau fysi # ifconfig -a
> 
> eth0      Link encap:Ethernet  HWaddr 00:1a:4b:7e:d3:a8  
> 
>           inet addr:194.208.249.149  Bcast:194.208.249.255  Mask:255.255.255.0
> ...

 

ifconfig *Quote:*   

> daxbau fysi # ifconfig 
> 
> eth0      Link encap:Ethernet  HWaddr 00:1a:4b:7e:d3:a8  
> 
>           inet addr:194.208.249.149  Bcast:194.208.249.255  Mask:255.255.255.0
> ...

 

iwlist scan *Quote:*   

> daxbau fysi # iwlist scan
> 
> lo        Interface doesn't support scanning.
> 
> eth0      Interface doesn't support scanning.
> ...

 

dmesg | tail

 *Quote:*   

> daxbau fysi # dmesg | tail
> 
> EXT3-fs: mounted filesystem with ordered data mode.
> 
> Adding 1959888k swap on /dev/sda5.  Priority:-1 extents:1 across:1959888k
> ...

 

ifconfig wlan0 up

 *Quote:*   

> daxbau fysi # ifconfig wlan0 up
> 
> SIOCSIFFLAGS: No such file or directory
> 
> daxbau fysi #

 

----------

## d2_racing

Can you post this :

```

# ifconfig wlan0 up

# iwlist scan

# dmesg | tail

```

----------

## strubbldesign

as you can see i have addet your first command request ifconfig wlan0 up

iwlist scan

reports an error like cannot scan cause wlan0 ist not up

dmes ¦ tail ...

the card is internal in my laptop

i know its the iwlang driver (i used it bevore on this book)

----------

## NathanZachary

Firstly, net.* should be removed from the default runlevel if you are going to use wicd.  Secondly, what is the wireless chipset?  Some chipsets require firmware to be installed as well.  If you post the output of lspci, we can figure out if that is the problem.

----------

## d2_racing

You should post :

```

# lspci -n

```

----------

## strubbldesign

i thin i know where the problem is...

the driver is compiled but not loaded correctly...

you know i allways have to chroot to the system to get access to the wlan   :Cool: 

----------

## NathanZachary

Well please keep us posted on what you try and what you find out.  We'll be here if you have any further questions.  :Smile: 

----------

## strubbldesign

what i have done:

1st i went back to stable (~amd64) of  *Quote:*   

> #>sys-kernel/tuxonice-sources-2.6.31 ~amd64
> 
> #sys-kernel/linux-headers ~amd64
> 
> #x11-drivers/nvidia-drivers ~amd64
> ...

 

so i have now  *Quote:*   

> (chroot) livecd / # cat /proc/version 
> 
> Linux version 2.6.30-gentoo-r5 (root@jasmin) (gcc version 4.3.2 (Gentoo 4.3.2-r3 p1.6, pie-10.1.5) ) #1 SMP Fri Oct 9 19:28:18 UTC 2009
> 
> 

  running quite good...

allso all modules were compiled  *Quote:*   

> (chroot) livecd linux # make modules_install
> 
>   INSTALL drivers/bluetooth/btsdio.ko
> 
>   INSTALL drivers/bluetooth/hci_uart.ko
> ...

 

And then my drifting has begun....

emerging and unemerging wireless-tools networkmanager wicd 

adding things to runlevel... and removing...

editing wpa_supplicant.conf conf.d/net *Quote:*   

>  This blank configuration will automatically use DHCP for any net.*
> 
> # scripts in /etc/init.d.  To create a more complete configuration,
> 
> # please review /etc/conf.d/net.example and save your configuration
> ...

 

and wpa_supplicant.conf *Quote:*   

> 
> 
> (chroot) livecd linux # more /etc/wpa_supplicant/wpa_supplicant.conf 
> 
> ctrl_interface=/var/run/wpa_supplicant
> ...

 

my first aim is that i can use wicd on my xfce4  (works wired-mode)

and my second aim is that wicd connects to available predefinied networks during boot prozess

thank you for your help

----------

## strubbldesign

please help me to find where i have my error

----------

## VinzC

Sorry for jumping in late but I've just seen you've PM'ed me...

I'm not using NetworkManager nor wicd (I once did but only on non Gentoo distro's). To make your wlan0 interface work, first make sure you've emerged wireless-tools as suggested. That package contains tools that you might need to test your wireless connection. Both wpa_supplicant and wireless-tools may coexist, they don't clash.

I'm personally using wpa_suppplicant but my own network script (one script for all my network interfaces). Bringing a wireless interface up with wpa_supplicant takes two commands:

```
/usr/sbin/wpa_supplicant -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf -W -B -iwlan0 -P/var/run/wpa_supplicant-wlan0.pid

/usr/bin/wpa_cli -B -a/etc/wpa_supplicant/wpa_cli.sh -p/var/run/wpa_supplicant -iwlan0 -P/var/run/wpa_cli-wlan0.pid
```

Not all arguments are required as they've got default values but I don't remember which ones in fact. Configuration file wpa_supplicant.conf lists the wireless networks you allow your computer to bind against.

Also, to check what interfaces you have on your system:

```
# ls -l /sys/class/net/

...

lrwxrwxrwx 1 root root    0 déc 14 08:53 eth0 -> ../../devices/pci0000:00/0000:00:1c.5/0000:08:00.0/net/eth0

...

lrwxrwxrwx 1 root root    0 déc 14 08:53 wlan0 -> ../../devices/pci0000:00/0000:00:1c.1/0000:04:00.0/net/wlan0

...
```

This will just ensure that your wireless interface binds with an access point. Then it must get its IP address from some DHCP server -- unless you want to set a static IP. So emerge dhcpcd.

You should follow Gentoo wireless guide as it contains excellent resources to start with.

Hope this helps.

----------

## strubbldesign

thank you VinzC!

yeah i know the gentoo wireless guide... but it confuses me...

either via wireless-tools or via wpa_supplicant

i think i know that wireless-tools doesn't support wpa2 encr. so i should use wpa_supplicant (but for the configuration and ... (sorry my english) i net wireless-tools)

and this guide doesn't describe howto do it with a networkmanager like gui-wicd or NetworkManager

it's a little confusing, everbody tells me different things...

maybe you/anybody can guide me?

----------

## VinzC

 *strubbldesign wrote:*   

> maybe you/anybody can guide me?

 

I'm afraid I can be of no help about NetworkManager or wicd. Fact is I don't really love these -- I'm more of the manual way, you guessed it probably...

----------

## d2_racing

Hi, you can translate my guide : http://gentoo-quebec.org/wiki/index.php/Utilisation_de_Wicd

WICD is working pretty well on my testing box.

----------

## strubbldesign

 *d2_racing wrote:*   

> Hi, you can translate my guide : http://gentoo-quebec.org/wiki/index.php/Utilisation_de_Wicd
> 
> WICD is working pretty well on my testing box.

 

if you would have this guide in english i would be able to translate it to german  :Very Happy: 

sorry no french...

----------

## d2_racing

Ok, I will take the time to translate it one day  :Razz: 

----------

## strubbldesign

well now i know the error isn't wicd or networkmanager with xfce4-plugin

remember that i had to replace -Dw.... with iwlan (intel agn card)

```
 /usr/sbin/wpa_supplicant -iwlagn -c /etc/wpa_supplicant/wpa_supplicant.conf  -W -B -iwlan0 -P /var/run/wpa_supplicant-wlan0.pid 
```

 *Quote:*   

> 
> 
> SIOCSIFFLAGS: No such file or directory
> 
> Could not set interface 'wlan0' UP
> ...

 

how do i have to solve this?

the interfaces were set corret: *Quote:*   

> daxbau fysi # ls -l /sys/class/net/
> 
> total 0
> 
> lrwxrwxrwx 1 root root 0 Dec 18 14:50 eth0 -> 
> ...

 

----------

## VinzC

 *strubbldesign wrote:*   

> well now i know the error isn't wicd or networkmanager with xfce4-plugin
> 
> remember that i had to replace -Dw.... with iwlan (intel agn card)

 

I think you don't have to. I have iwlagn wireless driver too and -Dwext works perfectly well with wpa_supplicant, as per the example I gave. Is it a requirement for wicd?

----------

## strubbldesign

 *VinzC wrote:*   

>  *strubbldesign wrote:*   well now i know the error isn't wicd or networkmanager with xfce4-plugin
> 
> remember that i had to replace -Dw.... with iwlan (intel agn card) 
> 
> I think you don't have to. I have iwlagn wireless driver too and -Dwext works perfectly well with wpa_supplicant, as par the example I gave. Is it a requirement for wicd?

 

i used iwlagn bevore it also worked properly

have a look at dmesg *Quote:*   

> Freeing unused kernel memory: 588k freed
> 
> udev: starting version 141
> 
> iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27ks
> ...

 

----------

## strubbldesign

and its exactly the same output if i use -Dwext as if i use iwlagn

SIOCSIFFLAGS: No such file or directory

Could not set interface 'wlan0' UP

----------

## strubbldesign

the error was like always between the keyboard and the screen

a siply 

```
emerge -va net-wireless/iwl4965-ucode
```

now everything works fine

so if you ever have a error like SIOCSIFFLAGGS and you are shure the kernel config is set correctly don't forget to emerge the driver  :Very Happy: 

----------

## VinzC

Good to know  :Very Happy:  .

----------

## strubbldesign

@vinzC

thanks for teaching me setting up without a manager...

----------

## VinzC

 *strubbldesign wrote:*   

> @vinzC
> 
> thanks for teaching me setting up without a manager...

 

You're welcome.

----------

