Port-xen archive

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

Re: Specifying names for tap interfaces



On 20.06.2012 23:14, Roger Pau Monné wrote:
>> BTW, what is the problem with symlinks like Mouse suggested? Pass down
>> the /dev/tap-foobar to Qemu, use SIOCIFCREATE and if successful, symlink
>> /dev/tap-foobar to /dev/tapN from Qemu? This avoids playing with ifnet
>> and kernel.
> 
> But then when the hotplug script tries to do a `brconfig bridge0 add
> tap-foobar` it will fail.

Fair point. Do a readlink + basename first :o

Yeah, everything is a file... except interfaces.

> Also, as someone already suggested it will be interesting to be able
> to give interfaces associated with guests a permanent name, which this
> approach doesn't solve. The solution should be at least applicable to
> both tap and vif interfaces, but since we are there, why not make it
> work for all network interfaces? I think other users might benefit
> from this feature (like not having to rewrite firewall rules when
> changing network cards).

IMHO this is not the right place to fix this. First, most firewalls out
there support variables, like macros in pf.conf. IMHO adding more
complexity to kernel for this is questionable.

Instead of renaming your interface inside the config files, you alias it
in kernel. Which is anyway a dubious construct because it will not
survive a reboot... except if you edit a config file that sets up this
aliasing for you. Ewww. Back to square one.

-- 
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost


Home | Main Index | Thread Index | Old Index