New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
What is the right way to restart networking on a Proxmox host?
I've just started experiment with Proxmox and I noticed that if I restart the network with service networking restart
or systemctl restart networking.service
I lose network connectivity to the VMs even from the host and I have to restart the host again.
The only change made in this case is to add more port-forwarding rules.
Is there some way to restart the networking on the host without affecting the connectivity?
Comments
i think it was ifreload -a but i am not sure
Adding a new port forwarding rule doesn't require to restart the networking service iirc. But even if it did, I just tested mine and no connectivity session was affected (I assume it was so quick therefore the host and VMs don't even detect it was down).
Are you sure it's not other issue? I'm using systemctl restart networking
@ProHosting24 command should work or Try
systemctl reload networking
it is effectively the same but using systemdYeah, he needs to provide more info on how he is doing the port forwarding exactly. as you can do it in different ways.
The documentation says:
https://pve.proxmox.com/wiki/Network_Configuration
From checking their docs it seems that using
ifup
may not be a good idea. I used that in some of the testing.systemctl restart networking likely gonna have some issue to not able to bring up some of the virtual network
Proxmox uses ifupdown so the correct way to reload interfaces would be
ifreload -a
That said as someone mentioned for port forwarding rules this is not something that needs a reload of interfaces or network.
Also if you make a change in the UI and then you apply configuration from the UI it also does a
ifreload -a
A simple iptables rule should not need a reload. You can change it directly in interfaces and it would obviously not apply until you reload or restart, BUT, if you cant really restart or reload at that point, you can always just apply the rule from the cli, it will disappear at the next restart, for whatever reason you would do it, and would not get doubled.
Now, if you have a really complicated networking structure, with numerous bridges, networks and VLANs at home or at work, then your safe bet is to restart it in a controlled way, because you do NOT wish it to crash and restart when you are not near it to restore functionality in case you made a horrible mistake and you assigned the wrong interface to the wrong VLAN or other typo which won't be caught by a simple
ifup --verbose --no-act
.You can't "restart" network, because it isn't a real process in OS. "systemctl restart networking.service" is just bringing down and up interfaces (which is not necessary in most cases) and reloading configuration. Reloading configuration will destroy your Proxmox bridges and all it's virtual ports, that is why you lost connectivity. If you need to change network config, use Proxmox UI, or edit config files and apply changes using "ip' utility. And as mentioned above, port forwarding does not belong to network setting at all, it's a firewall settings (you also can't "restart" firewall, btw, lmao )