LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 05-05-2005, 02:50 PM   #1
nkeever
Member
 
Registered: Apr 2005
Distribution: Debian / Redhat
Posts: 45

Rep: Reputation: 15
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
 
Old 05-05-2005, 03:38 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
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
 
Old 05-05-2005, 03:39 PM   #3
nkeever
Member
 
Registered: Apr 2005
Distribution: Debian / Redhat
Posts: 45

Original Poster
Rep: Reputation: 15
thanks

what is the best way to restart networking?
 
Old 05-05-2005, 03:46 PM   #4
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
# /etc/init.d/network restart
or on my Fedora box, I use
# service network restart
 
Old 05-05-2005, 03:46 PM   #5
nkeever
Member
 
Registered: Apr 2005
Distribution: Debian / Redhat
Posts: 45

Original Poster
Rep: Reputation: 15
thanks

i will try your suggestions
 
  


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 04:25 PM
editing ifcfg-wlan0 (WG111v2 usb) DanBallance Suse/Novell 0 11-10-2005 07:35 AM
RH9 ignoring /etc/.../.../ifcfg-eth0 eccles23 Linux - Networking 12 07-16-2005 03:14 PM
ifcfg-eth0 configuration problem shyam Linux - Networking 2 08-06-2003 07:25 AM
ifcfg-eth0:X alias problem dgenne Linux - Networking 1 03-17-2002 02:43 AM


All times are GMT -5. The time now is 07:47 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration