Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-21-2005, 04:50 AM   #1
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:

How do I do this?


Old 08-21-2005, 06:22 AM   #2
LQ Newbie
Registered: Jun 2005
Location: India
Distribution: RH SUSE FEDORA
Posts: 19

Rep: Reputation: 0
have a look at this link
Old 08-21-2005, 01:47 PM   #3
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
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 481

Rep: Reputation: 127Reputation: 127
Thanks. Just in case the link changes here is the info in brief... type
ifconfig eth0:0 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
LQ Newbie
Registered: Sep 2005
Location: Riga, LV
Distribution: Slackware/Gentoo
Posts: 26

Rep: Reputation: 15
I had done that by useing the IP command:
ip addr add brd + dev eth0 label eth0:0

where xxx - your IP
/nn - netmask

Works fine!


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
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 > Forums > Linux Forums > Linux - Networking

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration