# [SOLVED] Networking Not Working After Kernel Upgrade

## xeonman9000

Hi,

I recently made the huge leap from 2.6.31-r6 to 3.1.6 and everything works fine apart from networking. I have checked that the same drivers are used as in my previous kernel so I do not think that is the issue. And everything seems to run fine on bootup:

/var/log/rc.log

```

rc.log:

 * Bringing up interface lo

 *   127.0.0.1/8 ...

 [ ok ]

 *   Adding routes

 *     127.0.0.0/8 via 127.0.0.1 ...

 [ ok ]

...

 * Starting DHCP Client Daemon ...

 [ ok ]

 * Bringing up interface eth0

 *   dhcp ...

 *     Running dhcpcd ...

dhcpcd[2412]: sending commands to master dhcpcd process

 [ ok ]

 *     received address 

```

I have gone through the networking documentation as described in the Gentoo manual and everything seems to be setup correctly to use DHCP, but for some reason I cannot ping a domain name or an IP address:

```

lambert ~ # ping -c 3 google.com

ping: unknown host google.com

lambert ~ # ping -c 3 64.233.161.99

connect: Network is unreachable

lambert ~ # /etc/init.d/net.eth0 stop

 * Unmounting network filesystems ...                                     [ ok ]

 * Stopping KLive ...

 * start-stop-daemon: no matching processes found                         [ ok ]

 * Bringing down interface eth0

 *   Removing addresses

lambert ~ # /etc/init.d/net.eth0 start

 * Bringing up interface eth0

 *   dhcp ...

 *     Running dhcpcd ...

dhcpcd[3454]: sending commands to master dhcpcd process                   [ ok ]

 *     received address                                                   [ ok ]

lambert ~ # ifconfig eth0

eth0      Link encap:Ethernet  HWaddr 00:1a:4d:43:68:36  

          inet6 addr: fe80::21a:4dff:fe43:6836/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:7225 (7.0 KiB)  TX bytes:936 (936.0 B)

          Interrupt:16 

```

Last edited by xeonman9000 on Mon Jan 30, 2012 11:30 pm; edited 1 time in total

----------

## Kaso_da_Zmok

can you setup static ip if it works ok? i assume yes.

can you killall dhcpcd and run it ?

~# dhcpcd eth0

what do you get there? 

seems like the dhcpcd is not working as it should.

----------

## nasaiya

Yeah sounds like dhcpcd is not setting up your routes properly...

In my experience, the "network is unreachable" error has always meant that there is no route set up to handle the ip you tried to connect to.

Unless you have some sort of custom routing scheme set up 

Check the output of 

```
# /sbin/route
```

 and see if there is a "default" route.

dhcpcd should set that up for you based on the info from your ISP.

----------

## Jaglover

There is no IPv4 address assigned to this interface, yet OP tries to make an IPv4 connection. Too little information provided, is it an IPv6 network?

----------

## xeonman9000

 *Kaso_da_Zmok wrote:*   

> can you setup static ip if it works ok? i assume yes.
> 
> can you killall dhcpcd and run it ?
> 
> ~# dhcpcd eth0
> ...

 

It turns out not to be a DHCPCD issue. When restarting DHCPCD I got an error saying "eth0: open_socket: Address family not supported by protocol". A quick Google brought me to this thread: https://forums.gentoo.org/viewtopic-t-804108.html

So all I had to do was recompile my kernel with "packet socket" enabled (must have accidentally disabled it).

Thanks anyway everyone.

----------

