Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ??
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.