LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 04-15-2004, 06:51 AM   #1
John Micheal
Member
 
Registered: Apr 2004
Location: Germany
Distribution: RedHat 9
Posts: 38

Rep: Reputation: 15
Unhappy routing table quiestion


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, 08:41 AM   #2
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
route -n
man route

you can't save your route, you'll have to add some line at some boot scripts.
 
Old 04-15-2004, 08:43 AM   #3
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
1) route just typing "route" will show you some stuff. The Gateway will be listed in the colum that says "Gateway". The default route is the line that has 0.0.0.0 somewhere in it. I don't have access to a Linux box to give a more descriptive answer but on my box the default route looks something like:

default 192.168.1.1 0.0.0.0 UG 0 0 eth0

i may be off but basically that says the gateway IP that eth0 is connected to is 192.168.1.1. Now my other interface (eth1) is itself a gateway (10.1.1.1) but with IP Forwarding on and a NAT rule, everything headed for the internet still goes out of eth0 because eth0 is connected to the default gateway.

2) Not sure about how it's done in Red Hat but It involves and init script.

Last edited by Robert0380; 04-15-2004 at 08:44 AM.
 
Old 04-15-2004, 09:23 AM   #4
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
You agreed not to double post.
Double posting only makes people annoyed less willing to help.
 
  


Reply



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 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
Where is the routing table created? sidra Linux - Networking 1 04-18-2005 05:08 AM
strange ip routing table props666999 Slackware 3 11-03-2004 10:58 AM
routing table upr8830 Linux - Networking 6 06-18-2003 03:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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