[pve-devel] Network configuration

Alexandre DERUMIER aderumier at odiso.com
Tue Jul 28 07:27:00 CEST 2015


we have done it for lxc container.
https://git.proxmox.com/?p=pve-container.git;a=blob_plain;f=src/PVE/LXC.pm;hb=HEAD
sub update_ipconfig {}





What I would like to do, is when in gui we have done the new config in /etc/network/interfaces.new,

then apply it online.

So manage dependencies between ethX->bondX->vmbrX->tapX  (and also ovs).

and manage in correct order remove/add of devices. (and maybe value update)

The main problem is ip change on bridge directly, because we can't shutdown it if vms tap are plugged on it.
So we need to do it online.
We the ip is on an admin interface, it's not a problem to shutdown it.



----- Mail original -----
De: "Martin Waschbüsch" <service at waschbuesch.it>
À: "datanom.net" <mir at datanom.net>
Cc: "aderumier" <aderumier at odiso.com>, "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Mardi 28 Juillet 2015 06:12:09
Objet: Re: [pve-devel] Network configuration

> Am 27.07.2015 um 20:27 schrieb Michael Rasmussen <mir at datanom.net>: 
> 
> On Mon, 27 Jul 2015 20:08:24 +0200 (CEST) 
> Alexandre DERUMIER <aderumier at odiso.com> wrote: 
> 
>>>> eval { 
>>>> ovs-vsctl add-port $bridge vlan$port tag=$port -- set interface 
>>>> vlan$port type=internal 
>>>> }; 
>> 
>> internal interface can have a random name. 
>> 
> I know, but to keep it simple and IMHO more intuitive use a descriptive 
> name. 
> 
> 
>> also, we need to manage update. (ip modification for example). 
>> we could do down, up . But it's not optimal. 
> 
> How would you do it otherwise? The only way to change IP on an 
> interface which is up is to bring it down first, change IP, and then 
> bring it up again. 

Is it? 
I thought you can do 

ip addr del 192.168.1.1/32 dev eth0 

to remove one IPv4 

or 

ip addr flush dev eth0 

to remove all IPs? 

This way, at least, the interface is not physically down, as you only modify a single layer 3 protocol's properties. 

Martin 



More information about the pve-devel mailing list