Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
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.
|
 |
08-21-2005, 04:50 AM
|
#1
|
Member
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316
Rep:
|
Binding multiple IP Addresses to same NIC
I have a nic, eth0. I would like to bind two IP Addresses to it:
192.168.115.21
10.10.1.21
How do I do this?
Thanks,
Harlin
|
|
|
08-21-2005, 06:22 AM
|
#2
|
LQ Newbie
Registered: Jun 2005
Location: India
Distribution: RH SUSE FEDORA
Posts: 19
Rep:
|
|
|
|
08-21-2005, 01:47 PM
|
#3
|
Member
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316
Original Poster
Rep:
|
Thanks, this is exactly what I was looking for.
|
|
|
09-22-2005, 08:56 AM
|
#4
|
Member
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 518
Rep: 
|
Thanks. Just in case the link changes here is the info in brief... type
ifconfig eth0:0 xxx.xxx.xxx.xxx netmask yyy.yyy.yyy.yyy up
(obviously replace the x's with your second ip address, and the y's with the mask for it.). you can add this line to /etc/rc.d/rc.local so that it is run each time the pc starts.
no doubt if you want a thrid ip address you can use eth0:1
and if you want the second ip on eth1 use eth1:0
|
|
|
10-26-2005, 05:10 AM
|
#5
|
LQ Newbie
Registered: Sep 2005
Location: Riga, LV
Distribution: Slackware/Gentoo
Posts: 26
Rep:
|
Hi!
I had done that by useing the IP command:
ip addr add xxx.xxx.xxx.xxx/nn brd + dev eth0 label eth0:0
where xxx - your IP
/nn - netmask
Works fine!
|
|
|
All times are GMT -5. The time now is 07:28 PM.
|
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
|
|