From 94265e8404b917a0d8fb2dc9c64643d95e18aa2b Mon Sep 17 00:00:00 2001 From: medusa Date: Thu, 18 Apr 2024 21:22:04 +0000 Subject: [PATCH] Update docs/tech_docs/OPENwrt.md --- docs/tech_docs/OPENwrt.md | 80 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/docs/tech_docs/OPENwrt.md b/docs/tech_docs/OPENwrt.md index 98c9a13..4f20b1d 100644 --- a/docs/tech_docs/OPENwrt.md +++ b/docs/tech_docs/OPENwrt.md @@ -208,4 +208,82 @@ iface vmbr3 inet manual iface wlp2s0 inet manual source /etc/network/interfaces.d/* -``` \ No newline at end of file +``` + +--- +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: + +1. **Update Network Interface Configuration:** + - Open `/etc/network/interfaces` in a text editor: + ```bash + nano /etc/network/interfaces + ``` + - Change the `vmbr0` configuration from static to DHCP: + ```bash + auto vmbr0 + iface vmbr0 inet dhcp + bridge-ports enp3s0 + bridge-stp off + bridge-fd 0 + ``` + - Save the changes and exit the editor. + +2. **Restart Networking to Apply Changes:** + - Apply the new network settings: + ```bash + systemctl restart networking + ``` + +3. **Find the New DHCP-Assigned IP Address:** + - After the network restarts, check the assigned IP: + ```bash + ip addr show vmbr0 + ``` + +4. **Update `/etc/hosts` with the New IP:** + - Edit the `/etc/hosts` file to replace the old static IP with the new one: + ```bash + nano /etc/hosts + ``` + - Modify the line with the old IP to the new one you just obtained: + ```plaintext + 192.168.86.62 whitebox.foxtrot.lan whitebox # Old IP + 192.168.x.x whitebox.foxtrot.lan whitebox # New DHCP IP + ``` + - Save and exit. + +5. **Reserve IP in DHCP Server (Optional but Recommended):** + - To ensure the IP does not change on reboots, reserve the IP in your DHCP server settings to always assign the same IP to the MAC address of `vmbr0`. + +### Creating a New Virtual Bridge (`vmbrX`): + +1. **Add a New Virtual Bridge Configuration:** + - Edit `/etc/network/interfaces`: + ```bash + nano /etc/network/interfaces + ``` + - Add a new bridge configuration at the end of the file: + ```bash + 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. + +2. **Activate the New Bridge:** + - Restart the networking service to bring up the new bridge: + ```bash + systemctl restart networking + ``` + +### General Notes: + +- **Backup Configurations:** Always backup configuration files before making changes (`cp /etc/network/interfaces /etc/network/interfaces.bak`). +- **Documentation:** Update all relevant documentation with the new bridge details and IP changes. +- **Monitoring:** Monitor the network and server behavior after changes to ensure everything is functioning as expected. + +This approach provides a structured method to manage IP address configurations and virtual bridges on your Proxmox server, enhancing flexibility and ensuring consistent network settings across system reboots or changes. \ No newline at end of file