Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
01-17-2006, 08:36 PM
|
#1
|
LQ Newbie
Registered: Sep 2004
Posts: 29
Rep:
|
ifcfg-eth0 file settings
Hello guys,
My machine: FC3
What are all the different options/settings that we can put in /etc/sysconfig/network-scripts/ifcfg-ethX file?
Is there a document that describes this? Whenever I see a different box, I see few more options..
DEVICE ==> interface name
BOOTPROTO ==> DHCP (for DHCP); none/static (for static)
ONBOOT ==> active on boot
IPADDR ==> IP addr if configured as static
NETMASK ==> mask
BROADCAST ==> Bcast addr
GATEWAY ==> Gateway addr
NETWORK ==> (Sub)Network addr
USERCTL ==> letting normal user control this.
PEERDNS ==> **WHAT IS THIS?**
Are all these fields a must? I don't see "NETWORK" in some boxes at all..
Thanks..
|
|
|
01-17-2006, 08:58 PM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790
Rep:
|
All of my network-scripts/ifcfg-ethX files start with;
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
initscripts-* == initscripts-<version_number>
Have a look.
|
|
|
08-28-2013, 07:35 PM
|
#3
|
LQ Newbie
Registered: Aug 2013
Posts: 7
Rep:
|
more info needed
i am continuing/reopening this thread beause it deals with ip routinng file configuration issues...but not mine so far as I can tell, I'm a relative neophyte in networking and linux networking configuration so be gentle.
I'm supporting a Centos machine and I have just been through a configuration effort with my router tech rep. He ascertained that this particular router/machine needed a default gateway set up in the Centos machine. Together we worked out an "ip route add default" command that solves the default gateway problem. However, I need to set up configuration files (ifcfg-eth0?) to contain this info. Yet I cannot find documentation for a default gateway in configuration files. Is it in ifcfg-eth0 or somewhere else? and what would be the format for such a line in the file?
|
|
|
08-28-2013, 08:04 PM
|
#4
|
Member
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 218
Rep:
|
add a file route-eth0 with content
Code:
default via 1.2.3.4
and you'll be ok
replace 1.2.3.4 with you gateway's IP address
there are many other possibilities as well
|
|
|
09-05-2013, 04:48 AM
|
#5
|
LQ Newbie
Registered: Aug 2013
Posts: 7
Rep:
|
Well, not so good results:
I have been working this machine through a VPN tunnel and using putty to get a text window into the machine. I logged in as root.
First I went to the configuration files directory:
cd /etc/sysconfig/network-scripts/
Next I was following instructions in the answer above on this linux forum:
The answer, above, seemed reasonable based on other research I'd done so yesterday I was following the answer to create the route-eth0 file. Starting with:
vi route-eth0
then
idefault via 10.10.10.1<esc>
I then needed to save and exit vi so I used ZZ based on this from a vi tutorial (Its been a long time since I've used vi). To quote the tutorial: ?The easiest way to save your changes and exit out of vi is the ZZ command. When you are in command mode, type ZZ and it will do the equivalent of :wq."
Getting out of vi should have written the route-eth0 file with the appropriate default route (according to the answer above). As soon as I typed in ZZ the window froze/system hung and nothing could get into 10.10.10.50 or receive answers to queries. I wonder if I mistyped the content and the file was read by the networking daemon(s) immediately?
Anyway, the system is not reachable and I'll have to go to it and reboot but what to do next? Delete the route-eth0 before rebooting? Where did I go wrong?
|
|
|
09-07-2013, 06:54 AM
|
#6
|
Member
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 218
Rep:
|
That doesn't sound that good
but... just saving the route-eth0 file shouldn't have that effect. The new settings would only kick in after a service network restart command or a reboot.
I can't tell about your mentioned ZZ command in vi since I'm not using vi that much, but if it was just saving and closing the file as you wrote it shouldn't have that effect either.
|
|
|
09-07-2013, 09:41 AM
|
#7
|
LQ Newbie
Registered: Aug 2013
Posts: 7
Rep:
|
The computer is quite a way away from where my associate and I normally hang out so we try to work via VPN. My associate went to the computer and found a spelling error in the content of the file, fixed it, rebooted but still didn't get it available on the network. Later I went out to the computer, deleted the new file, rebooted and it worked. In fact, curiously, it appeared to have the correct set up that I was trying to accomodate on reboot in the first place. Go figure???
|
|
|
All times are GMT -5. The time now is 07:30 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.
|
Latest Threads
LQ News
|
|