Page 1 of 2

Command Line NIC/eth0 Configuration

Posted: 2006/12/19 15:52:48
by absolutezero273
G'Day, all.

I was wondering if you might be able to help me with my eth0 configuration?

I want to be able to configure my eth0 from the command line. I've installed CactiEZ and the GUI is not available so I need to configure the eth0 and change it from DHCP to static.

I was able to change the ip address and the subnet using ifconfig. But after I've manually changed the ip address do I still need to change the configuration from dhcp to static?

Also, I'm hoping to find and learn more commands in CentOS but I don't see any under Documentation from the CentOS site.

Thanks.

Re: Command Line NIC/eth0 Configuration

Posted: 2006/12/19 16:01:57
by foxb
Did you try setup--->network?

Re: Command Line NIC/eth0 Configuration

Posted: 2006/12/20 12:48:50
by rapo1
Hi absolutezero273

if you have given an IP-address to a eth, you do not have to change anything else. The system detects the configured IP-address and uses it as long as it is not used by an other device in the subnet.

Re: Command Line NIC/eth0 Configuration

Posted: 2006/12/20 14:23:56
by absolutezero273
rapo1,

Are you speaking of reserving and assigning an ip address on the DHCP server? I suppose that would get me where I want to be. But I still wouldn't have learned how to do this at the command line.

And, unfortunately, I rebooted the box and it assigned it an ip address via DHCP again.

I ran the ifconfig eth0 x.x.x.x command again to assign the ip.

I have done some reading and it appears as though I need to edit a config file to make these changes permanent.

I did find the location of the config file and will attempt to locate the settings there to make this static: /etc/sysconfig/network-scripts/ifcfg-eth0

...I was able to locate the parameters for the ifcfg-ethx file here: http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Network_Related_Configuration/s1-networkscripts-interfaces.html

Re: Command Line NIC/eth0 Configuration

Posted: 2006/12/20 14:27:19
by gerald_clark
Why don't you just follow foxb's advice and run setup--->network,
or run netconfig?

Re: Command Line NIC/eth0 Configuration

Posted: 2006/12/20 14:55:43
by absolutezero273
Sorry. Completely new to this.

How do you run setup-->network? I figured he was mentioning menu options in the GUI from the sounds of it. I should have asked but didn't want to look like a complete idiot. But maybe I did anyway.

And netconfig? That sounds more like a command line utility but still not familiar with it.

I'll do some more googleing.

Re: Command Line NIC/eth0 Configuration

Posted: 2006/12/20 15:57:11
by absolutezero273
BTW, ran netconfig and that worked fine.

Thanks!

Re: Command Line NIC/eth0 Configuration

Posted: 2007/05/31 21:03:17
by seeRpea
Is netconfig supposed to be available in CentOS5 ?
[quote]
[root@localhost etc]# locate netconfig
/etc/setuptool.d/98netconfig
[/quote]
but no plain old netconfig.

Re: Command Line NIC/eth0 Configuration

Posted: 2007/06/01 13:46:00
by gerald_clark
Look on your installation media.
netconfig-0.8.24-1.2.2.1.i386.rpm

Re: Command Line NIC/eth0 Configuration

Posted: 2007/06/01 16:55:26
by seeRpea
I didn't use an install media, did it over the wire.
But i did use your message to do a yum install netconfig
which worked great.
Thanks.