# all interfaces up and yet cant connect to internet?

## JmpEax

Been trying to figure this out for hours now.

My necesarry drivers/modules are loaded.

Wlan0 is loaded.

Yet when I iwconfig and net-setup or even wpa_supllicant my gentoo still does not want to reach/ping any hosts.

also if i ping my router it says destination host unreachable

----------

## BillWho

JmpEax,

Does dmesg show any helpful info   :Question: 

----------

## JmpEax

also weird enough...if i boot from live cd i can connect but once i chroot it does not want to connect unless i net-setup again.

and dmesg output that stood out to me(wont let me wgetpaste)

```
r8169 000:07:000:0 eth0: link down
```

let me get on live cd and post my wgets from that.

dmesg from chroot

http://bpaste.net/show/81036/

wgetpaste of resolv.conf

http://bpaste.net/show/81037/

wgetpaste of /etc/conf.d/net

http://bpaste.net/show/81038/

wpa_supllicant

http://bpaste.net/show/81038/Last edited by JmpEax on Sun Mar 03, 2013 3:42 am; edited 1 time in total

----------

## BillWho

JmpEax,

Are you mounting /proc /sys and /dev like:

mount -t proc none /media/gentoo/proc

mount --rbind /sys /media/gentoo/sys

mount --rbind /dev /media/gentoo/dev

It's been a while, but I think you have to copy resolv.conf to the chroot too.

----------

## JmpEax

 *BillWho wrote:*   

> JmpEax,
> 
> Are you mounting /proc /sys and /dev like:
> 
> mount -t proc none /media/gentoo/proc
> ...

 

well i had already done that. btw im trying to get network to work post installation. like its all installed already.

also the re adding resolv.conf did not fix it. 

if it helps, net-setup also always clears my iwconfig

----------

## BillWho

 *JmpEax wrote:*   

> wgetpaste of /etc/conf.d/net
> 
> http://bpaste.net/show/81038/
> 
> wpa_supllicant
> ...

 

Both are showing /etc/conf.d/net

Try booting to the new installation and redirect or tee dmesg, ifconfig, iwconfig to files that you can later access them from the chroot to paste back.

Also lspci -k and lsusb -v if the wireless adapter is of that type.

----------

## JmpEax

 *BillWho wrote:*   

>  *JmpEax wrote:*   wgetpaste of /etc/conf.d/net
> 
> http://bpaste.net/show/81037/
> 
> wpa_supllicant
> ...

 

my bad the first link is fixed

----------

## JmpEax

alright here are the files you requested

dmesg

http://bpaste.net/show/81220/

ifconfig

http://bpaste.net/show/81221

iwconfig

http://bpaste.net/show/81222

lspci -k

http://bpaste.net/show/81223

whenever i use iwconfig wlan0 key (my key) and then use net-setup...it always clears my iwconfig.

----------

## BillWho

JmpEax,

ifconfig shows no ip address and dmesg shows wlan0: deauthenticating

Try something like this in /etc/conf.d/net

```
modules="wpa_supplicant"

wpa_supplicant_wlan0="-Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf"

wpa_timeout_wlan0=60

config_wlan0="192.168.1.105/24 brd 192.168.1.255"

routes_wlan0="default via 192.168.1.1"

dns_servers_wlan0="8.8.8.8"

```

You shoud use you service provider's dns servers.

In /etc/wpa_supplicant/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

update_config=1

network={

   ssid="myrouter"

   psk="secret"

   proto=WPA2

   key_mgmt=WPA-PSK

   pairwise=CCMP TKIP

   group=CCMP TKIP 

   id_str="gentoo-laptop"

}

```

Check that CONFIG_MAC80211 and CONFIG_CFG80211 are enabled.

The rest is matching the router to the protocol etc.

----------

## JmpEax

 *BillWho wrote:*   

> JmpEax,
> 
> ifconfig shows no ip address and dmesg shows wlan0: deauthenticating
> 
> Try something like this in /etc/conf.d/net
> ...

 

Also as a note; the network I am currently on is actually a WEP network with a ascii hex password. I used wpa_config to set it up before so it shouldn't be any different right?

Alright after changing some settings, if i still run ifconfig no ip shows up.

My WPA Supplicant due to my network being WEP

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

update_config=1

network={

        # ssid is necessary for psk

        ssid="Your-AP-SSID"

   # You need double quotes

        psk="your-password"

        key_mgmt=WPA-PSK

        priority=5

}
```

Got the internet to work via net-setup. Instead of using WPA-Supplicant I changed my config file. I'll upload via other computer in  sec.

----------

## BillWho

JmpEax,

Try the simplest configuration:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

  ssid="Your-AP-SSID"

  psk="your-password" 

  key_mgmt=NONE

}

```

You can also try to start it from the cl with debugging messages:

```
wpa_supplicant -iwlan0 -Dnl80211 -d -c/etc/wpa_supplicant/wpa_supplicant.conf
```

-dd will increase the debugging verbosity. That might help with determining the problem.

----------

## JmpEax

 *BillWho wrote:*   

> JmpEax,
> 
> Try the simplest configuration:
> 
> ```
> ...

 

Thanks for your help. With your guidance I actually figured out how it works and now my internet is running smoothly. Question though. Do I still need eth0 even though I use a wireless interface?

----------

## BillWho

 *JmpEax wrote:*   

> Thanks for your help. With your guidance I actually figured out how it works and now my internet is running smoothly. Question though. Do I still need eth0 even though I use a wireless interface?

 

Glad to hear you got it going   :Very Happy: 

Since you have an Ethernet controller: Realtek Semiconductor it wouldn't be a bad idea to have it configured just in case.

You can always remove net.eth0 from the default runlevel so it doesn't attempt to start on bootup, but you could start it manually if you should need it.

It's entirely up to you   :Wink: 

----------

