Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
no default gateway?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
asheridan
n00b
n00b


Joined: 08 Aug 2004
Posts: 2

PostPosted: Sun Aug 08, 2004 7:20 pm    Post subject: no default gateway? Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Sun Aug 08, 2004 7:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
asheridan
n00b
n00b


Joined: 08 Aug 2004
Posts: 2

PostPosted: Sun Aug 08, 2004 8:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Sun Aug 08, 2004 8:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
srlinuxx
l33t
l33t


Joined: 22 Nov 2003
Posts: 627

PostPosted: Tue Aug 10, 2004 2:27 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum