R: Problem using and creating virtual interfaces

Pietro Paolini P.Paolini at ext.adbglobal.com
Tue Sep 18 15:28:25 EDT 2012


Hello,

thanks for your anser, I solved my problem using some virtual machine (kmv) but what I really would like was to do what virtual machine do:
1) create some virtual interfaces and assign them an IP addresses, each of them must have a different MAC address
2) make a bridge with my real one

I am able to catch the second point but not first one, can you provide me an example of use of the ip command for a virtual interface creation ?

Many thanks,
Pietro Paolini.


________________________________________
Inizio: Jeff Haran [Jeff.Haran at citrix.com]
Inviato: martedì 18 settembre 2012 19.36
Fine: Pietro Paolini
Oggetto: RE: Problem using and creating virtual interfaces

Not sure what you mean by “IP interface”, but perhaps network namespaces will provide the functionality you are looking for.

Running ifconfig like you did below simply adds another IP address to an existing interface. “ethX:1” isn’t really a separate network interface in the kernel (there’s no separate struct netdevice associated with it), it’s just an alias for “ethX” that addresses can be assigned to using the old BSD derived IOCTLs that ifconfig uses. ifconfig is more or less a deprecated command in linuxland. You will probably want to make yourself familiar with the iproute2 package ip command, which is its more modern equivalent and provides an interface that allows you to avoid using network interface alias names like “ethX:1”.

Jeff Haran

From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies-bounces at kernelnewbies.org] On Behalf Of Pietro Paolini
Sent: Tuesday, September 18, 2012 2:24 AM
To: kernelnewbies at kernelnewbies.org
Subject: Problem using and creating virtual interfaces

Hi all,

I am not really sure this is the correct newsletter  for  my question, if not please apologize me and suggest me a right newsletter, thanks.

My goal is to simulate more than one IP interface using just a physical interface, for do that I tried using this alias

Ifconfing ethX:1 <IP>

But when I try to send a packet over that interface I see the IP source the same as the original, and real,  Ethernet interface. Then I tried to use TAP interface but I was unable to “link” them with my physical one, I notice them can communicate each others but can not ping (ping –I tap0  <ip real IF>) the original one.
It is still valid if I create a bridge with all them.

I would like avoid to install many Virtual Box as I need but what I want is exactly what it do: build a new virtual interface and bridge it with a real one in order to have more IP interface attached at one physical.

Any suggestion ?

Thanks in advance,
Pietro.



More information about the Kernelnewbies mailing list