Operating System - Linux
1829749 Members
1254 Online
109992 Solutions
New Discussion

Chaneg ip addr in RedHat AS3

 
SOLVED
Go to solution
franlo
Advisor

Chaneg ip addr in RedHat AS3

Hello,

I'm new on Linux,
Could you tell me how to change (in command line) the ip address on redhat AS4 ?

No netconf file and net startup script found ;-)


ifconfig tell me 3 nic with all the same address (eth0, eth1 and bond0) and all of then have the same mac adrress. what does it mean ?


Sure it's a basic question but i'hadn't found aswer in admin guid (only gui way).


Thanks a lot

Regards

Francois

6 REPLIES 6
Ivan Ferreira
Honored Contributor
Solution

Re: Chaneg ip addr in RedHat AS3

The file is:

/etc/sysconfig/network-scripts/ifcfg-eth0

Change the line:

IPADDR

The run:

ifdown eth0
ifup eth0
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: Chaneg ip addr in RedHat AS3

Shalom,

Suggestion for testing. cp the ifcfg-eth0 file to /root so if you make mistake you can recover.

You can try out your ideas or change temporarily with the ifconfig command, which works the same as HP-UX.

The GATEWAY for the NIC can be in the ifcfg-eth0 or /etc/sysconfig/network

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vipulinux
Respected Contributor

Re: Chaneg ip addr in RedHat AS3

Hello

Use the foll. command:

ifconfig eth0 192.x.x.x netmask 255.x.x.x up

Cheers
Vipul

franlo
Advisor

Re: Chaneg ip addr in RedHat AS3

Hello all,

Thanks a lot for your answers.

ifconfig is alright for me but i was lokking for configuration files. I read in man that /etc/sysconfig/network 's files are not editable, but in fact it's ok to change those.

I saw after that bound0 is for agregate nic, that's why i have same mac address.

thanks a lot

Francois
Alan_152
Honored Contributor

Re: Chaneg ip addr in RedHat AS3

Steven E. Protter
Exalted Contributor

Re: Chaneg ip addr in RedHat AS3

That would be bond0

In this case you don't want to change eth0 and eth1 because they are slaves to the software bond ethernet driver bond0

You change the ip address with the ifconfig command to bond0 instead of eth0 and change the file /etc/sysconfig/network-scripts/ifcfg-bond0

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com