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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-16-2003, 04:40 PM
|
#1
|
LQ Newbie
Registered: Jun 2003
Posts: 6
Rep:
|
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

|
|
|
06-16-2003, 04:46 PM
|
#2
|
Member
Registered: Feb 2002
Location: Fairfax, VA
Distribution: RedHat 8, Mandrake9.1, Slack9
Posts: 456
Rep:
|
ifconfig eth0 192.168.0.2 netmask 255.255.255.255
ifconfig eth0 192.168.0.3 netmask 255.255.255.255 alias
|
|
|
06-16-2003, 04:53 PM
|
#3
|
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731
Rep:
|
or
ifconfig eth0 192.168.0.2 <options>
ifconfig eth0:0 192.168.0.3 <options>
|
|
|
08-02-2003, 10:31 PM
|
#4
|
LQ Newbie
Registered: Aug 2003
Location: Portland, OR, USA
Distribution: slak9, rh6.2, 8, yd2.0, OSX
Posts: 1
Rep:
|
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... 
|
|
|
08-03-2003, 04:08 AM
|
#5
|
Member
Registered: Aug 2003
Location: Sweden
Posts: 83
Rep:
|
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
|
|
|
08-03-2003, 04:33 AM
|
#6
|
Member
Registered: Nov 2002
Location: London UK
Distribution: RedHat 9
Posts: 58
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 11:49 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|