Skip to contentSkip to conversation

Noob question on Linux networking

Qemu-devel Philip Prindeville 1 participant 1 message Apr 19, 2006

lore
Share & tools
lore
#0 lore raw

Hi.

I was looking at the way that Qemu works under Linux, and was surprised by the complexity required to configure networking.

I worked on a software harness on SunOS 3.5 17 years ago, and things seemed to be a bit simpler then.... You could create a "software" network interface cloned from a real physical interface (as long as it was a broadcast or multipoint network) and create a new, unique address to that interface.

For instance, you could clone an ethernet interface, give it a new IP address, and even set up new services running just on that interface...

This assumed that the Ethernet driver and hardware supported having multiple MAC addresses that it recognized as its own (usually implemented in a CAM as a key and mask... the mask would be applied to the destination address and compared to the key... usually the mask would be 48-bits of ones, i.e. match the entire key)... which most but not all controllers could do.

These days, I think just about any controller will allow you do this, even a lowly RealTek-8129.

So... my question is, why not create a mac-level interface alias, generate a separate unique mac address, and have Qemu use this as the client OS's interface?

Then the client OS could see all of the same things as the host OS, and they should even be able to ping each other (well, it depends... some Ethernet interfaces "hear" themselves when they transmit... some don't).

What would be involved in doing this?

Not sure that current Linux kernel drivers support creating additional destination addresses through a standardized interface...

I'll look into it.

-Philip