Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 09-03-2005, 08:59 AM   #1
Registered: Nov 2004
Location: Tallahassee, FL
Distribution: Fedora Core 15
Posts: 95

Rep: Reputation: 17
How do I add a route???

(This is an offshoot from a previous post, but I think that it is sufficiently different to merit a separate thread. If not, then I apologise in advance).

I have two Linux machines, one of which can access the internet and one which cannot. The difference appears to be a routing problem. Running "netstat -rn" shows that the one which works has the line " UG 0 0 0 Eth 0" and the other one does not.

What do I need to do to add the route? I tried running "/sbin/dhclient eth0" but it didn't help. The system which works OK is CentOS and the system which does not work OK is Fedora Core 4.

Both machines are running with dynamic IP addressing, but with a lease of "forever."
Old 09-03-2005, 09:10 AM   #2
Registered: Aug 2005
Location: Saint Paul, MN
Distribution: Kubuntu
Posts: 34

Rep: Reputation: 15
route add -net gw x.x.x.x eth0
Old 09-03-2005, 09:38 AM   #3
Registered: Nov 2004
Location: Tallahassee, FL
Distribution: Fedora Core 15
Posts: 95

Original Poster
Rep: Reputation: 17
Yup. That did the trick. Thanks much.

Old 09-04-2005, 06:25 AM   #4
Red Hat India
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 36
also u can edit the file /etc/sysconfig/network and add the line "GATEWAY=X.X.X.X". restart the network service . also u can do it by the command netconfig. this command brings up a graphical box where u can specify ur gateway.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
route add powah Linux - Newbie 4 09-01-2005 02:24 PM
route add robf2301 Linux - Networking 6 03-11-2005 04:06 AM
ip route add ducati620 Linux - Networking 0 06-06-2004 06:11 AM
Help with Route Add command? graystarr Linux - Networking 4 01-13-2004 04:12 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:29 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration