View previous topic :: View next topic |
Author |
Message |
asheridan n00b
Joined: 08 Aug 2004 Posts: 2
|
Posted: Sun Aug 08, 2004 7:20 pm Post subject: no default gateway? |
|
|
All --
I just switched my eth0 device from dhcp to a static ip. My /etc/conf.d/net file is essentially the following (with comments removed, etc.):
iface_eth0="192.168.0.128 broadcast 192.168.0.255 netmask 255.255.255.0"
gateway="eth0/192.168.0.1"
With this configuration, an /etc/init.d/net.eth0 restart gives the following error:
netmmask: Unknown host
ifconfig: `--help' gives usage information. [ !! ]
.. and I am unable to ping an address outside my LAN. Also, the "route" command does not show a default gateway in the routing table. If I give the command:
%> route add default gw 192.168.0.1
Then everything works fine (e.g. I can ping google.com).
It appears as though the gateway="eth0/192.168.0.1" line in the /etc/conf.d/net file is being ignored.
Does anyone have any ideas how to fix this? Is this a bug, or I have I missed some configuration file that I need to change somewhere.
Thanks in advance. _________________ -- Andrew |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54810 Location: 56N 3W
|
Posted: Sun Aug 08, 2004 7:30 pm Post subject: |
|
|
asheridan,
From your error message, I would guess that yoy have a typo
In Code: | iface_eth0="192.168.0.128 broadcast 192.168.0.255 netmask 255.255.255.0"
gateway="eth0/192.168.0.1" | probably somewhere near the netmask entry. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
asheridan n00b
Joined: 08 Aug 2004 Posts: 2
|
Posted: Sun Aug 08, 2004 8:04 pm Post subject: |
|
|
Damn!
I was wondering what the extra "m" in "netmmask" was for. In fact, my
iface_eth0="192.168.0.128 broadcast 192.168.0.255 netmask 255.255.255.0"
...line did have an extra "m" in "netmask".
I don't know how many times I read that line looking for typos. Sometimes it just takes an extra set of eyes...
Thanks. It works now. _________________ -- Andrew |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54810 Location: 56N 3W
|
Posted: Sun Aug 08, 2004 8:53 pm Post subject: |
|
|
asheridan,
Always copy and paste when you post. You would have seen it just after you hit send. It lets your readers see what you have really got too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
srlinuxx l33t
Joined: 22 Nov 2003 Posts: 627
|
Posted: Tue Aug 10, 2004 2:27 am Post subject: |
|
|
I've had trouble with that
gateway="eth0/113.456.789.101
I have to remove that eth0 for mine stuff to work whether it's dhcp or static.
you might try that.
hth,
-susan _________________ --You talk the talk, but do you waddle the waddle?
-Gentoo Monthly Screenshots |
|
Back to top |
|
|
|