LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   editing ifcfg-eth0 (https://www.linuxquestions.org/questions/linux-newbie-8/editing-ifcfg-eth0-320457/)

nkeever 05-05-2005 01:50 PM

editing ifcfg-eth0
 
I would like to add another ip address to my nic. how do i format the ifcfg-eth0
file in /etc/sysconfig/network-scripts to do this. And is there anything else i would need to do?

thanks

homey 05-05-2005 02:38 PM

I just copy the original settings and make the changes below. For example.....
Don't forget to restart networking after making the changes.

# cat /etc/sysconfig/networking/devices/ifcfg-eth0

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.0.1
USERCTL=no
PEERDNS=yes
TYPE=Ethernet
IPV6INIT=no

DEVICE=eth0:0
ONBOOT=yes
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=10.0.0.1
USERCTL=no
PEERDNS=yes
TYPE=Ethernet
IPV6INIT=no

nkeever 05-05-2005 02:39 PM

thanks

what is the best way to restart networking?

homey 05-05-2005 02:46 PM

# /etc/init.d/network restart
or on my Fedora box, I use
# service network restart

nkeever 05-05-2005 02:46 PM

thanks

i will try your suggestions


All times are GMT -5. The time now is 01:47 PM.