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

Notices

Reply
 
Search this Thread
Old 06-03-2003, 03:50 PM   #1
upr8830
LQ Newbie
 
Registered: Jun 2003
Posts: 11

Rep: Reputation: 0
Unhappy routing table


i am running redhat 8.0 on my machine. I was having problems connecting to my ISP and found out that by adding a default route to my routing table sovled the problem.

:/sbin/route add default gw router

however, this default route is deleted everything i restart the network services.

Is there a way where i can add this route to a network script so that it is added to the routing table everytime i start the network service.

Thank you.

upr8830
 
Old 06-03-2003, 04:14 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Try adding "GATEWAY=router" to both:
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
 
Old 06-03-2003, 04:35 PM   #3
upr8830
LQ Newbie
 
Registered: Jun 2003
Posts: 11

Original Poster
Rep: Reputation: 0
Unhappy

Added "Gateway=router" to both the files and restarted the network services but the default route was still missing from the routing table.

Thank you.

upr8830
 
Old 06-03-2003, 04:46 PM   #4
Blindsight
Member
 
Registered: Mar 2003
Distribution: Slackware
Posts: 234

Rep: Reputation: 30
old fashioned way

Alright, here's the deal straight forward without redhat's crazy scripting.

'Add /sbin/route add default gw router' directly to your network script in your start function, just after it assigns an IP address to your interface.
 
Old 06-04-2003, 02:01 PM   #5
upr8830
LQ Newbie
 
Registered: Jun 2003
Posts: 11

Original Poster
Rep: Reputation: 0
Could it also be because I don't have any static routing table?

- upr8830
 
Old 06-04-2003, 03:28 PM   #6
Blindsight
Member
 
Registered: Mar 2003
Distribution: Slackware
Posts: 234

Rep: Reputation: 30
Not sure what you mean. Do you mean your default gateway isn't static?
 
Old 06-18-2003, 03:04 AM   #7
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
You are trying to set a static routing table with the
/sbin/route add default gw $router_IP_number
command. Add this to your network startup script, as Blindsight suggested.
Also see,
http://www.linuxquestions.org/questi...threadid=66309

Last edited by moses; 06-18-2003 at 03:18 AM.
 
  


Reply


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
Routing table query mickboda Linux - Networking 3 11-05-2005 11:11 AM
routing table arvind kumar Linux - Networking 2 06-08-2005 11:59 PM
Help with a Routing Table maginotjr Linux - Networking 4 06-06-2005 09:49 AM
Change the routing table gubak Linux - Networking 1 07-19-2004 05:11 AM
Possible to have 2 gateways at once in routing table? magnakuz Linux - Networking 1 03-04-2002 09:54 AM


All times are GMT -5. The time now is 03:19 AM.

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