Re: How to configure mutil IP address on same NIC?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





2009/1/6 Nikhil Talpallikar <nikhil.talpallikar@xxxxxxxxx>
Hi,

Do you want to create a new interface ethX for another NIC card or do you want to create a new interface and do not have another NIC ??
The later is not possible afaik.
I want that when OS start up , two ips can be attached on one interface,for example :eth0 automatically. But ifcfg-eth0 file only support one IP even you write multi IPs in the file and I do not want to interface alias which mean add another IP in ifcfg-eth0:1 file because this way is same use ipconfig to add another IP on same NIC. How to only configure the ifcfg-eth0 file can let OS automatically add two IPs on one interface when OS start up?

cheers,
nikhil


2009/1/6 Carter Smithhart <carter.smithhart@xxxxxxxxx>

2009/1/5 shark huang <shark.hh@xxxxxxxxx>
Hi:

2009/1/5 Vaughn Clinton <vclinton@xxxxxxx>
I'm sorry - I read the initial email incorrectly.  Anyway, bonding would allow you to configure multiple NICs to utilize the same IP address and not the other way around.

The other (the best) option is to use a virtual interface, i.e. "ifcfg-eth:x" where "x" is a unique number.  You can define the interface just like you would any physical device within the "ifcfg-eth0:0"

I've have good experience with:
ip addr add IP_ADDR/NETWORK dev DEVICE

e.g.
ip addr add 10.0.0.56/24 dev eth0

There are lots of other useful things you can do with the ip command.

I've used bonding as well, but only if you have two (or more) NICs that you want to load balance or for failover/redundancy reasons.

Carter
 

Sorry for my earlier misunderstanding.

cheers,


Date: Mon, 5 Jan 2009 21:05:51 +0800To: vclinton@xxxxxxx; linux-net@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx

Subject: Re: How to configure mutil IP address on same NIC?



On Mon, Jan 5, 2009 at 1:43 PM, Vaughn Clinton <vclinton@xxxxxxx> wrote:
would bonding be an option?
Could you explain it more detail? 



Date: Mon, 5 Jan 2009 09:46:02 +0800
From: shark.hh@xxxxxxxxx
To: kernelnewbies@xxxxxxxxxxxx
Subject: Re: How to configure mutil IP address on same NIC?
CC: linux-kernel@xxxxxxxxxxxxxxx


Hi:
    CC to linux-kernel group!

2009/1/4 shark huang <shark.hh@xxxxxxxxx>
Hi:
    I  know both ifconfig or ip addr add command can add mutil IP address on same NIC and Ip addr add is recommanded because interface alias is easy to cause confusion。
    May question is how configure the network related files, such as ifcfg-eth0 file to let mutil IPs can be attached on same NIC. I know one way is use the interface alias to configure the ifcfg-eth0:1 file. But it is same as to use ifconfig command to add another IP address on interface with alias. How to configure the network related file to add mutil IP address on same NIC which same as to use IP addr add command?

Br
Shark 




Get easy photo sharing with Windows Live™ Photos. Drag n' drop



Get news, entertainment and everything you care about at Live.com. Check it out!





--
If you fool me once shame on you. If you fool me twice shame on me.

          \|||/
         (o o)
----ooO-(_)-Ooo----

Nikhil Talpallikar
--talli ;)


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux