LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Closed Thread
  Search this Thread
Old 04-15-2004, 07:11 AM   #1
John Micheal
Member
 
Registered: Apr 2004
Location: Germany
Distribution: RedHat 9
Posts: 38

Rep: Reputation: 15
Unhappy routing table problem RH9


Dear All ,

i have few quiestions i would like to ask about :

1) how can i know the gateway of the interface from command line , when i try ifconfig -a , it show the ip address and mask but not the gateway.
is there any command i can use to show the gateway of my interface ??


2) how to configure my routing table to be saved even after i restart the system , every time i restart i need to use "route add " command to modify my routing table , is there any files i can use or edit to make my routing table permenant ??
 
Old 04-15-2004, 07:36 AM   #2
andguent
Member
 
Registered: Sep 2003
Distribution: Woody, SuSE, RH, LAS
Posts: 55

Rep: Reputation: 15
To see your default gateway, simply type "route" or "route -n" if you want to see just the numbers.

Right now I do not have access to my redhat server, so I am going to have to guess where the best place would be to put a startup command. However I think I put mine in /etc/rc.d/network or something similar. You can add your route add default gw line at the end of it, or another similar file.

Good luck.
 
Old 04-15-2004, 08:21 AM   #3
John Micheal
Member
 
Registered: Apr 2004
Location: Germany
Distribution: RedHat 9
Posts: 38

Original Poster
Rep: Reputation: 15
okay thanks alot , i will try it , but if you got the exact place to put the route please tell me

by the wat i put the commands in an excutable file and put it in /etc/rc.d/rc5.d and name it as S75route
so when i log on it run , but i guess i should find a file that i can add routes as a text .

thanks
 
Old 04-15-2004, 08:53 AM   #4
andguent
Member
 
Registered: Sep 2003
Distribution: Woody, SuSE, RH, LAS
Posts: 55

Rep: Reputation: 15
Ok. Just FYI - Scripts in /etc/rc.d/rc5.d only run when you go into graphical mode.

The 5 stands for run level 5, or graphical interface. You may also want to add it to the folder for run level 3 which is the standard command line only run level.
 
Old 04-15-2004, 09:11 AM   #5
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
At least on a Red Hat system the file is
/etc/sysconfig/network

Add a line that says
GATEWAY=<IP of gateway>
 
Old 04-15-2004, 01:06 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

Please respond here:
http://www.linuxquestions.org/questi...999#post878999
 
  


Closed Thread



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
SUSE + Routing table problem yvesg Linux - Networking 1 08-13-2005 05:20 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
FIle include problem (regarding routing table) rajesh_b Programming 3 10-18-2004 11:37 PM
routing table upr8830 Linux - Networking 6 06-18-2003 03:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 10:20 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration