Command Line NIC/eth0 Configuration

Issues related to configuring your network
absolutezero273
Posts: 16
Joined: 2006/09/26 14:26:43

Command Line NIC/eth0 Configuration

Post by absolutezero273 » 2006/12/19 15:52:48

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.

foxb
Posts: 1927
Joined: 2006/04/20 19:03:33
Location: Montreal/QC

Re: Command Line NIC/eth0 Configuration

Post by foxb » 2006/12/19 16:01:57

Did you try setup--->network?

rapo1
Posts: 27
Joined: 2006/06/20 11:43:02
Location: Munich

Re: Command Line NIC/eth0 Configuration

Post by rapo1 » 2006/12/20 12:48:50

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.

absolutezero273
Posts: 16
Joined: 2006/09/26 14:26:43

Re: Command Line NIC/eth0 Configuration

Post by absolutezero273 » 2006/12/20 14:23:56

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

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Command Line NIC/eth0 Configuration

Post by gerald_clark » 2006/12/20 14:27:19

Why don't you just follow foxb's advice and run setup--->network,
or run netconfig?

absolutezero273
Posts: 16
Joined: 2006/09/26 14:26:43

Re: Command Line NIC/eth0 Configuration

Post by absolutezero273 » 2006/12/20 14:55:43

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.

absolutezero273
Posts: 16
Joined: 2006/09/26 14:26:43

Re: Command Line NIC/eth0 Configuration

Post by absolutezero273 » 2006/12/20 15:57:11

BTW, ran netconfig and that worked fine.

Thanks!

seeRpea
Posts: 36
Joined: 2007/05/02 17:45:47
Contact:

Re: Command Line NIC/eth0 Configuration

Post by seeRpea » 2007/05/31 21:03:17

Is netconfig supposed to be available in CentOS5 ?
[quote]
[root@localhost etc]# locate netconfig
/etc/setuptool.d/98netconfig
[/quote]
but no plain old netconfig.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Command Line NIC/eth0 Configuration

Post by gerald_clark » 2007/06/01 13:46:00

Look on your installation media.
netconfig-0.8.24-1.2.2.1.i386.rpm

seeRpea
Posts: 36
Joined: 2007/05/02 17:45:47
Contact:

Re: Command Line NIC/eth0 Configuration

Post by seeRpea » 2007/06/01 16:55:26

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.

Post Reply

Return to “CentOS 4 - Networking Support”