Configuring Default Gateway on Fedora Core 4

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Configuring Default Gateway on Fedora Core 4

Postby ZebCarnell » Thu Sep 01, 2005 5:55 am

Hey.

I have a Windows XP box as my gateway (so I don't have to dual boot for my windows apps) and I am running FC4 on my PC. I have tried to get the gateway configured through the route utillity and it works up to there. When I go to ping a outside source it takes a bit and then says its Unreachable. I tired this
Code: Select all
route add default gw 192.168.0.1 netmask 255.255.255.0 eth0
What am I missing? It shows the gateway when I just veiw route.

Thanks
Zeb
User avatar
ZebCarnell
 
Posts: 81
Joined: Thu Sep 01, 2005 5:48 am
Location: New Zealand

RE: Configuring Default Gateway on Fedora Core 4

Postby A-Wing » Thu Sep 01, 2005 8:52 am

That command seems ok to me, you should end up getting something like the following:
Code: Select all
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 wlan0
default         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0


I usually just leave DHCP to configure it for me though.
If your Genmask is different (it shouldn't be) that would cause the problem.
Andrew Hutchings, Linux Jedi
http://www.a-wing.co.uk
User avatar
A-Wing
LXF regular
 
Posts: 460
Joined: Tue Jul 05, 2005 7:25 pm
Location: Wellingborough

RE: Configuring Default Gateway on Fedora Core 4

Postby nelz » Thu Sep 01, 2005 10:18 am

Leave out the netmask when setting the default gateway. Your command means the gateway is only used for routing traffic to elsewhere on your LAN, the opposite of what you want. If you only have one network card,
Code: Select all
route add default gw 192.168.0.1

is all you need, otherwise use
Code: Select all
route add default gw 192.168.0.1 eth0
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8497
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

RE: Configuring Default Gateway on Fedora Core 4

Postby A-Wing » Thu Sep 01, 2005 10:28 am

Ah yes, very true, I must admit the last time I had to fiddle with route was begining of the year when we started using a second IP range. Can't remember much of that now.
Andrew Hutchings, Linux Jedi
http://www.a-wing.co.uk
User avatar
A-Wing
LXF regular
 
Posts: 460
Joined: Tue Jul 05, 2005 7:25 pm
Location: Wellingborough

RE: Configuring Default Gateway on Fedora Core 4

Postby ZebCarnell » Fri Sep 02, 2005 12:31 am

Yeah route looks configured fine to me. I've never used DHCP before I might give it a go.

I can now ping google.com but I get packet losses and when I try to ping say linux.org it comes up with unknown host.
"In short: just say NO TO DRUGS, and maybe you won't end up like the Hurd people." -- Linus Torvalds
User avatar
ZebCarnell
 
Posts: 81
Joined: Thu Sep 01, 2005 5:48 am
Location: New Zealand


Return to Help!

Who is online

Users browsing this forum: No registered users and 2 guests