# ping results in "connect: network is unreachable"

## cgroh

Dear All,

after a system update and restart my wireless network is not functioning properly anymore.

The output of iwconf shows that I'm connected to my usual access point.

The output of cat  /etc/resolv.conf is

```

# Generated by dhcpcd from wlan0

# /etc/resolv.conf.head can replace this line

nameserver 192.168.1.1

# /etc/resolv.conf.tail can replace this line

```

However, route -n just show

```

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo

```

No sign of wlan0???

Any help would be greatly appreciated.

Many thanks

cgroh

----------

## eccerr0r

What was updated?  Updated kernel but not wireless driver maybe?  What wireless card, and are you using kernel or external drivers?

It looks like dhcp failed and put in an empty file and of course, no wireless setup.  Did your machine detect/initialize the wireless card completely (look at dmesg output).  Perhaps firmware got messed up or something partially initialized?

If you try to ifconfig wlan0 manually, does it display output?

----------

## cgroh

dmesg output suggests that everything is okay with wlan0. drivers seem to work fine. the last message is wlan0: no IPv6 routers present.

As for the update: nothing wireless related was updated. A xorg-server update gave me the output to recompile drivers. Me being silly, I only recompiled the nvidia driver, forgetting about xf86-input-mouse, etc. Hence, after reboot, keyboard and mouse didn't work properly. 

Booting a live cd and chrooting into my normal system to recompile these drivers, I also tried to start the wireless card to download the packages using /etc/init.d/net.wlan0 start. This didn't work and returned some error messages which I now cannot remember   :Sad:  Could this have changed some configuration files that now cause the missfunction?

Thanks for your help,

cgroh

----------

## eccerr0r

What authentication/encryption mechanism are you using for wireless, is that still up to date and is that working?

Are you using gnome and networkmanager?  That seems to be a ball of wax I don't like playing with when it breaks...

----------

## cgroh

I didn't upgrade the kernel, so encryption etc should still be okay.

I use wpa_supplicant which I configured in /etc/wpa_supplicant/wpa_supplicant.conf. This config file looks okay, and indeed, iwconfig reveals that I'm connected to the access point. But no gateway is defined.

No networkmanager and no gnome.

Thanks for your help,

cgroh

----------

## cgroh

could it have anything to do with some routing options that are wrong in the kernel?

I have noticed that, even though I'm connected to my wireless access point (according to the output of iwconfig), I don't get an IP address. ifconfig returns something like this:

```

wlan0     Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX    

          inet6 addr: fe80::xxx:xxxx:xxxx:xxxx/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:25 errors:0 dropped:0 overruns:0 frame:0

          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:1715 (1.6KiB)  TX bytes:993 (993.0 B)

```

i.e. the inet line with the ip address does not appear.

Is this a hint to what's wrong? 

Many thanks,

cgroh

----------

## cgroh

okay, so i narrowed down the problem.

dhcpcd does not seem to start properly! if I run dhcpcd manually the wlan0 card gets its IP address and everything works fine.

any idea why this might be?

i use (and have always used) the following in /etc/conf.d/net

```

config_wlan0="dhcp"

```

many thanks,

cgroh

----------

