2.1 KiB
2.1 KiB
For your standalone Proxmox setup, switching between static and dynamic IP configurations and managing virtual bridges are important tasks. Below, I'll provide a concise guide to handle these changes effectively and safely.
Switching from Static IP to DHCP:
- Backup Configurations: Always backup configuration files before making changes (
cp /etc/network/interfaces /etc/network/interfaces.bak).
cp /etc/network/interfaces /etc/network/interfaces.bak
-
Update Network Interface Configuration:
- Open
/etc/network/interfacesin a text editor:vim /etc/network/interfaces - Change the
vmbr0configuration from static to DHCP:auto vmbr0 iface vmbr0 inet dhcp bridge-ports enp3s0 bridge-stp off bridge-fd 0 - Save the changes and exit the editor.
- Open
-
Restart Networking to Apply Changes:
- Apply the new network settings:
systemctl restart networking
- Apply the new network settings:
-
Find the New DHCP-Assigned IP Address:
- After the network restarts, check the assigned IP:
ip addr show vmbr0
- After the network restarts, check the assigned IP:
-
Update
/etc/hostswith the New IP:- Edit the
/etc/hostsfile to replace the old static IP with the new one:nano /etc/hosts - Modify the line with the old IP to the new one you just obtained:
192.168.86.62 whitebox.foxtrot.lan whitebox # Old IP 192.168.x.x whitebox.foxtrot.lan whitebox # New DHCP IP - Save and exit.
- Edit the
Creating a New Virtual Bridge (vmbrX):
-
Add a New Virtual Bridge Configuration:
- Edit
/etc/network/interfaces:vim /etc/network/interfaces - Add a new bridge configuration at the end of the file:
auto vmbrX # Replace X with the next available number iface vmbrX inet manual bridge-ports none bridge-stp off bridge-fd 0 - Save and exit the editor.
- Edit
-
Activate the New Bridge:
- Restart the networking service to bring up the new bridge:
systemctl restart networking
- Restart the networking service to bring up the new bridge: