LinuxQuestions.org
Help answer threads with 0 replies.
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 01-17-2006, 07:36 PM   #1
srns
LQ Newbie
 
Registered: Sep 2004
Posts: 29

Rep: Reputation: 15
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..
 
Old 01-17-2006, 07:58 PM   #2
Lenard
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: Reputation: 58
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.
 
Old 08-28-2013, 06:35 PM   #3
mcadoosf
LQ Newbie
 
Registered: Aug 2013
Posts: 7

Rep: Reputation: Disabled
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?
 
Old 08-28-2013, 07:04 PM   #4
dt64
Member
 
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 218

Rep: Reputation: 38
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
 
Old 09-05-2013, 03:48 AM   #5
mcadoosf
LQ Newbie
 
Registered: Aug 2013
Posts: 7

Rep: Reputation: Disabled
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?
 
Old 09-07-2013, 05:54 AM   #6
dt64
Member
 
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 218

Rep: Reputation: 38
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.
 
Old 09-07-2013, 08:41 AM   #7
mcadoosf
LQ Newbie
 
Registered: Aug 2013
Posts: 7

Rep: Reputation: Disabled
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???
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
fedora/redhat: ifcfg-eth0 and ifcfg-eth1 Shaun2222 Linux - Networking 9 01-23-2008 03:25 PM
RH9 ignoring /etc/.../.../ifcfg-eth0 eccles23 Linux - Networking 12 07-16-2005 02:14 PM
editing ifcfg-eth0 nkeever Linux - Newbie 4 05-05-2005 02:46 PM
ifcfg-eth0 configuration problem shyam Linux - Networking 2 08-06-2003 06:25 AM
ifcfg-eth0:X alias problem dgenne Linux - Networking 1 03-17-2002 01:43 AM

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

All times are GMT -5. The time now is 06:36 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