LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 08-21-2005, 04:50 AM   #1
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Rep: Reputation: 38
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
 
Old 08-21-2005, 06:22 AM   #2
umeshbabu
LQ Newbie
 
Registered: Jun 2005
Location: India
Distribution: RH SUSE FEDORA
Posts: 19

Rep: Reputation: 0
have a look at this link

http://www.linuxhomenetworking.com/l...work-linux.htm
 
Old 08-21-2005, 01:47 PM   #3
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Original Poster
Rep: Reputation: 38
Thanks, this is exactly what I was looking for.
 
Old 09-22-2005, 08:56 AM   #4
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Rep: Reputation: 144Reputation: 144
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
 
Old 10-26-2005, 05:10 AM   #5
lockout
LQ Newbie
 
Registered: Sep 2005
Location: Riga, LV
Distribution: Slackware/Gentoo
Posts: 26

Rep: Reputation: 15
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!
 
  


Reply



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
multiple ip addresses on 1 nic? houler Linux - Networking 4 04-26-2005 03:53 PM
binding multiple IPs to single NIC? lok1 Linux - Networking 2 11-16-2003 02:58 PM
Binding multiple IP addresses to a nic card Natalie Linux - Networking 9 08-12-2003 08:27 PM
Multiple addresses for a single NIC grub Programming 1 08-04-2003 02:24 AM
Multiple IP addresses on one NIC hrr Linux - Networking 2 03-07-2003 12:04 PM

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

All times are GMT -5. The time now is 11:49 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
Open Source Consulting | Domain Registration