# Not getting default route when I boot [SOLVED]

## Punchcutter

I have been having an odd problem lately.  I have a static IP on my eth0, and when I boot the machine, there is no default route assigned.  

My /etc/conf.d/net looks like this:

```
config_eth0="***.***.232.212/24"

routes_eth0="default via ***.***.232.1"

dns_servers_eth0="***.***.254.2 ***.***.253.1"

```

I have to do

```
route add default gw ***.***.232.1

```

by hand and then it's fine.  But does anyone know why this is not working the way it should? Thanks.Last edited by Punchcutter on Sun Sep 13, 2009 5:17 pm; edited 1 time in total

----------

## kiksen

Hmm. According to the handbook the correct syntax is:

routes_eth0=( "default via 192.168.0.1" )

Dunno if that will change your luck.

[edit] Else I would try ( "default gw 192.168.1.1") [/edit]

/Kiksen

----------

## Punchcutter

No, it wasn't the syntax of the conf.d/net file.... as a matter of fact using parens or not using them caused some other weird behavior! (don't have the details on the tip of my tongue now, as it was a week or more ago...)

This problem was (apparently) solved by solving another (seemingly unrelated) problem I was having, with my wireless.  I was getting a message like the following at boot-time:

```
socket(PF_PACKET): Address family not supported by protocol
```

(I think I got that right... going from memory)

This was associated with my wlan0 interface.  Today I decided to sit down and try to solve that problem, and I solved it by turning on CONFIG_PACKET in my kernel. It is found here:

```
-*- Networking support  --->

        Networking options  --->

           <*> Packet socket

```

I don't know how that ever got turned off but...... anyway it solved the wlan problem, and apparently I'm getting default routes now, as well, on my wired interface.  Go figure.

Hope this information helps someone else!  I have gotten a lot of help on these forums, and it's nice to be able to give a little back once in a while....

----------

