LinuxQuestions.org
Help answer threads with 0 replies.
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 06-16-2003, 05:40 PM   #1
hvdwatt
LQ Newbie
 
Registered: Jun 2003
Posts: 6

Rep: Reputation: 0
Question Multiple ip's for same NIC


How do I assign multiple IP's to the same NIC?

I have setup DHCP and can assign IP's to all my machine on my home network but want to give multiple ip's to the same NIC connected to the Internal network.

What do I do. Please help.

Thanks

Hendrik
 
Old 06-16-2003, 05:46 PM   #2
manthram
Member
 
Registered: Feb 2002
Location: Fairfax, VA
Distribution: RedHat 8, Mandrake9.1, Slack9
Posts: 456

Rep: Reputation: 31
ifconfig eth0 192.168.0.2 netmask 255.255.255.255
ifconfig eth0 192.168.0.3 netmask 255.255.255.255 alias
 
Old 06-16-2003, 05:53 PM   #3
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
or
ifconfig eth0 192.168.0.2 <options>
ifconfig eth0:0 192.168.0.3 <options>
 
Old 08-02-2003, 11:31 PM   #4
svejk
LQ Newbie
 
Registered: Aug 2003
Location: Portland, OR, USA
Distribution: slak9, rh6.2, 8, yd2.0, OSX
Posts: 1

Rep: Reputation: 0
Thumbs down

have the same problem, so i guess this is not reply you can use. command /sbin/ifconfig eth0:0 xxx.xxx.xxx.xxx creates a new IP without any problem but after reboot it is gone. maybe i am missing something, need this for virtual host configuration in ProFTPD. just doing more search...
 
Old 08-03-2003, 05:08 AM   #5
lappen
Member
 
Registered: Aug 2003
Location: Sweden
Posts: 83

Rep: Reputation: 15
svejk you need to run the command everytime you boot up your computer

for slack check /etc/rc.d/rc.init1 or rc.init2.. or else you can add the command to any file you want as long as it loads at startup
 
Old 08-03-2003, 05:33 AM   #6
bleah-man
Member
 
Registered: Nov 2002
Location: London UK
Distribution: RedHat 9
Posts: 58

Rep: Reputation: 15
For RH I found you can also create additional files in /etc/sysconfig/network-scripts/

eth-cfg0:0
eth-cfg0:1
eth-cfg0:2 etc...

Just Vi/Emacs (I aint starting a debate) in and cp the original then mv rename it pop in and bind the extra ip address then when you start - hey presto!

Hope that helped
 
  


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
IPTables - Multiple Public IP's to private IP's matneyc Linux - Security 8 05-27-2005 01:23 PM
assigning multiple ip's to nic ? pingu_penguin Linux - Networking 2 05-14-2005 10:00 PM
Multiple Apache Sites, on Multiple IP's, on Same Box?? RickyJ Linux - General 1 06-19-2003 11:55 AM
Multiple Apache Sites, on Multiple IP's, on Same Box?? RickyJ Linux - Software 0 06-19-2003 10:50 AM
Multiple IP's on the 1 NIC dicka_j Linux - Hardware 4 04-08-2003 12:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:01 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration