Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm wondering what is the purpose of the GATEWAY entries in the ifcfg-xxx files as they don't seem to be used to add any gateway or route either after a network restart or a reboot.(using REDHAT ES4)
I have added GATEWAY entries to ifcfg-bond0, ifconfig-bond0:0 etc... but these entries don't seem to be used, as per netstat -rn output. In order to apply a persistent gateway I added a static route to the rc.local and a default gateway to the /etc/sysconfig/network file.
1) rc.local requires a reboot
2) whereas the network file addition just requires a network service restart.
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 188.8.131.52, KDE 3.5.8 and KDE 4.0 beta, Plu
I would post the info pretaining to the eth0 bond0 bond0:0 items and anything else in there related to ifcfg-xxxx. Now not sure on gateway on the bond stuff. gateway unless routing commands are enabled it is best to have only one file use the gateway option. Like in masquerading I set the Internet nic with gateway and for the lan nic I only set IP and subnet. Setting gateway on the lan interfaces causes problems. IP masquerading handles this routing for you this way.
Actually my question is more general as I HAVE ALREADY added a gateway and static route via the 'network' file and the 'rc.local' file, but I don't know what script should NORMALLY pick up the GATEWAY from the ifconfig-eth0 file. (in general). This setting seems to have no purpose on systems I have looked at. I think there must be a script somewhere that SHOULD read the GATEWAY FOR THE interface and call a 'route add' command in a shell.
I too have noticed that, but I am aware that it DOES make a difference. No GATEWAY = packets don't know where there next hop is. They really should implement a feature that allows you to change your gateway via the command line like just about every other interface option...
Hi edclancy7715, I'm not talking about the PURPOSE of a gateway per se, actually I am talking about whether or not the line 'GATEWAY=' is read/used by any script.
If I add this line GATEWAY=XX.XX.XX.XX in any of the installations I have access to then restart network/or reboot!!, calling 'netstat -rn' there is NO GATEWAY for any routes, so the setting is NOT USED to configure the interface!
Maybe it is just my installations, but if anyone can please confirm on their own installation. If they add the line:
GATEWAY=XX.XX.XX.XX to their ifconfig-eth0 file, restart network, is there a gateway listed in their 'netstat -rn' output.
there is certainly no *point* in putting that line in there, as it's the /etc/sysconfig/network file that holds the system wide gateway. it's the /sbin/ifup scripts which processes this, and it suggests it is going to use that if there is no other one in a better location. just read that scritp and answer your own question i guess.
you said: "there is certainly no *point* in putting that line in there, as it's the /etc/sysconfig/network file that holds the system wide gateway."
1) well actually there is a *point* as I said and IN FACT you said yourself(I AM defining a default gateway!!)
which is what you say in your next sentence..
2) well my question is NOT about this network file...AT ALL
... my question is WHAT reads the GATEWAY line from the ifconfig-eth0 file.. because if I define a gateway in this file, NOTHING seems to read it... as per output of netstat -rn. (and others have told me similar things)
thankyou to yourself and others for your comments. But I've tried to explain and re-explain the question.. it seems no-one understands what I'm asking...that's ok.... I guess I'll work it out