I had a backup issue (see my other thread) that caused me to reboot proxmox. On reboot, I lost lan and internet connection. I'm new to proxmox, and I started with the standard configuration just like everyone else. After much googling I edited the /etc/network/interfaces to use OVS and create a vswitch.
I know I did 1 reboot to get it to work because it needed to release the original configuration. Then it was definitely working fine for days. I think after I got that working I got a VM and an lxc setup. The VM got internet fine. Didn't really do much on the lxc. Anyhow, after this last reboot, the network setup wouldn't work anymore. I could not ping my router nor anything on my lan. Tried several reboots. Finally, I went back to the original interfaces file and that is working.
So I'm guessing that my problem is that I added the OVS settings straight to interfaces file, and maybe I should use OVS commands instead? So besides letting me know if there is any issues with my interfaces settings below, could some1 get me started on what OVS commands on the CLI, I would need to type in to recreate the interfaces file?
---------------------
auto lo
iface lo inet loopback
allow-vmbr0 enp0s31f6
iface enp0s31f6 inet manual
ovs_type OVSPort
ovs_bridge vmbr0
auto vmbr0
iface vmbr0 inet manual
ovs_type OVSBridge
ovs_ports vlan20 enp0s31f6
auto vlan20
allow-vmbr0 vlan20
iface vlan20 inet static
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options tag=20
ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)-${IFACE}-vif
network 192.168.20.0
address 192.168.20.3
netmask 255.255.255.0
gateway 192.168.20.1
broadcast 192.168.20.255
---------------------------
The VM has this network setting:
net0: virtio=XX:XX:XX:XX:9E:7C,bridge=vmbr0,tag=20
Also, could someone tell me what the following command does:
ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)-${IFACE}-vif
I know I did 1 reboot to get it to work because it needed to release the original configuration. Then it was definitely working fine for days. I think after I got that working I got a VM and an lxc setup. The VM got internet fine. Didn't really do much on the lxc. Anyhow, after this last reboot, the network setup wouldn't work anymore. I could not ping my router nor anything on my lan. Tried several reboots. Finally, I went back to the original interfaces file and that is working.
So I'm guessing that my problem is that I added the OVS settings straight to interfaces file, and maybe I should use OVS commands instead? So besides letting me know if there is any issues with my interfaces settings below, could some1 get me started on what OVS commands on the CLI, I would need to type in to recreate the interfaces file?
---------------------
auto lo
iface lo inet loopback
allow-vmbr0 enp0s31f6
iface enp0s31f6 inet manual
ovs_type OVSPort
ovs_bridge vmbr0
auto vmbr0
iface vmbr0 inet manual
ovs_type OVSBridge
ovs_ports vlan20 enp0s31f6
auto vlan20
allow-vmbr0 vlan20
iface vlan20 inet static
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options tag=20
ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)-${IFACE}-vif
network 192.168.20.0
address 192.168.20.3
netmask 255.255.255.0
gateway 192.168.20.1
broadcast 192.168.20.255
---------------------------
The VM has this network setting:
net0: virtio=XX:XX:XX:XX:9E:7C,bridge=vmbr0,tag=20
Also, could someone tell me what the following command does:
ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)-${IFACE}-vif