Manuel changes in /etc/network/interfaces

Klaus Darilion

New Member
May 7, 2018
3
0
1
49
/etc/network/interfaces mentions that we should not edit it by hand, but put everything into /etc/network/interfaces.d/

a) In my case, I need some extra options on the OVS bridge and a GRE tunnel. Hence, I have in /etc/network/interfaces.d/tunnel:
Code:
auto tunnel-to-publicsbg
allow-vmbr2 tunnel-to-publicsbg
iface tunnel-to-publicsbg inet manual
        ovs_type OVSTunnel
        ovs_bridge vmbr2
        ovs_tunnel_type gre
        ovs_tunnel_options options:remote_ip=192.168.101.21 options:key=1
        up ovs-vsctl set bridge vmbr2 rstp_enable=true
# OVS Tunnel to public-sbg

Hence, "ifup tunnel-to-publicsbg" works fine, but the config gets not activated on startup as the port must be added to the bridge-config in interfaces:
Code:
iface vmbr2 inet manual
        ovs_type OVSBridge
        #ovs_ports ens1f2
        ovs_ports ens1f2 tunnel-to-publicsbg
#ovs public

So, what is the proper way to add additonal OVS-Ports without Proxmox removing the port when doing network changes via the GUI? I think it would be best to support OVS tunnels in the GUI. If you can point to some code I could try to add it.

b) I also have to add extra options to the OVS bridge to support MTU settings and RSTP settings.
Code:
iface vmbr2 inet manual
        ovs_type OVSBridge
        ovs_ports ens1f2 tunnel-to-publicsbg
        ovs_extra set Bridge ${IFACE} other_config:rstp-priority=0
        mtu 1300
#ovs public

What is the proper way to add additonal statements to the interface config and be safe that Proxmox does not remove them?

Thanks
Klaus
 
/etc/network/interfaces mentions that we should not edit it by hand, but put everything into /etc/network/interfaces.d/

a) In my case, I need some extra options on the OVS bridge and a GRE tunnel. Hence, I have in /etc/network/interfaces.d/tunnel:
Code:
auto tunnel-to-publicsbg
allow-vmbr2 tunnel-to-publicsbg
iface tunnel-to-publicsbg inet manual
        ovs_type OVSTunnel
        ovs_bridge vmbr2
        ovs_tunnel_type gre
        ovs_tunnel_options options:remote_ip=192.168.101.21 options:key=1
        up ovs-vsctl set bridge vmbr2 rstp_enable=true
# OVS Tunnel to public-sbg

Hence, "ifup tunnel-to-publicsbg" works fine, but the config gets not activated on startup as the port must be added to the bridge-config in interfaces:
Code:
iface vmbr2 inet manual
        ovs_type OVSBridge
        #ovs_ports ens1f2
        ovs_ports ens1f2 tunnel-to-publicsbg
#ovs public

So, what is the proper way to add additonal OVS-Ports without Proxmox removing the port when doing network changes via the GUI? I think it would be best to support OVS tunnels in the GUI. If you can point to some code I could try to add it.

b) I also have to add extra options to the OVS bridge to support MTU settings and RSTP settings.
Code:
iface vmbr2 inet manual
        ovs_type OVSBridge
        ovs_ports ens1f2 tunnel-to-publicsbg
        ovs_extra set Bridge ${IFACE} other_config:rstp-priority=0
        mtu 1300
#ovs public

What is the proper way to add additonal statements to the interface config and be safe that Proxmox does not remove them?

GUI supports only the basic and most common configuration. However, you can add anything you need via editing the respective files. Proxmox will not remove anything. If you are unsure check after each network configuration change the preliminary configuration file /etc/network/interfaces.new which goes into effect only after the subsequent reboot.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!