LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-14-2004, 09:47 PM   #1
nigeledge
LQ Newbie
 
Registered: Aug 2003
Distribution: Slackware
Posts: 11

Rep: Reputation: 0
How to add IP addresses


I have a server and just bought a block of IP addresses for it. How do I add them to the machine?

Do I just have to run ifconfig? What exactly is the format for the command? I have seen many completely different examples.

Also, I heard that I have to add something to rc.local. Is this right? If so, what do I add and how?

I'm running Redhat Enterprise 3. Thanks in advance for any help you may have.
 
Old 04-15-2004, 12:00 AM   #2
czarherr
Member
 
Registered: Sep 2003
Location: Suwon, Korea
Distribution: Slackware 14
Posts: 288

Rep: Reputation: 32
usually it can be done through either netconfig or (more reliably), through /etc/rc.d/rc.inet1

At least, in slackware this works, you may need to find an alternate file for redhat
 
Old 04-15-2004, 09:44 AM   #3
nigeledge
LQ Newbie
 
Registered: Aug 2003
Distribution: Slackware
Posts: 11

Original Poster
Rep: Reputation: 0
What is the exact command to do so?

Also, I heard if I don't add someting to rc.local the IP addresses will be lost on bootup. Is this correct?
 
Old 04-15-2004, 04:32 PM   #4
czarherr
Member
 
Registered: Sep 2003
Location: Suwon, Korea
Distribution: Slackware 14
Posts: 288

Rep: Reputation: 32
well, the command i was talking about was simply netconfig, after running it you need to reboot in RH, though. i cant think of anything in rc.local that would have to be there, though. rc.inet1 is where that info is on my system
 
Old 04-15-2004, 04:40 PM   #5
nigeledge
LQ Newbie
 
Registered: Aug 2003
Distribution: Slackware
Posts: 11

Original Poster
Rep: Reputation: 0
Can't figure it out on redhat. Thanks though.

Is there anyone who knows how to do this on redhat?
 
Old 04-16-2004, 05:25 AM   #6
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
czarherr is right. "netconfig" command will help u. if u arent root, become root. if u have more than 1 NIC. try
"/usr/sbin/netconfig eth0"
"/usr/sbin/netconfig eth1"
...

actually it creates a file (like ifcfg-eth0) for specified net device in /etc/sysconfig/network-scripts/

and when it runs init script (when booting) "/etc/rc.d/rc.sysinit" it loads net confgiuration from /etc/sysconfig/network file and the files in /etc/sysconfig/network-scripts/ directory

for nameserver (DNS) ip it uses /etc/resolv.conf file

if u are running on X windows u can prefer "redhat-config-network"

Last edited by maxut; 04-16-2004 at 05:29 AM.
 
  


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
add CD-ROM? add Floppy? Devices? Kelphyr Slackware 5 10-10-2004 06:17 PM
kdevelop add folder and add new class is slow edwardt Programming 0 03-03-2004 06:04 PM
Cant add MySQL through add/remove programs Hero Doug Fedora 6 01-03-2004 10:35 PM
how to add / bind ip addresses to one box on slackware ? Mouse_103 Linux - Newbie 3 03-30-2003 12:11 PM
Miss Match IP Add and Adapter Add. ???? hitesh_linux Linux - Networking 5 02-08-2003 01:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:19 PM.

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
Open Source Consulting | Domain Registration