Update docs/tech_docs/proxmox_dhcp.md

This commit is contained in:
2024-04-19 20:52:17 +00:00
parent a6a9f69cdf
commit 98284a6655

View File

@@ -8,44 +8,44 @@ For your standalone Proxmox setup, switching between static and dynamic IP confi
cp /etc/network/interfaces /etc/network/interfaces.bak cp /etc/network/interfaces /etc/network/interfaces.bak
``` ```
- **Update Network Interface Configuration:** **Update Network Interface Configuration:**
- Open `/etc/network/interfaces` in a text editor: Open `/etc/network/interfaces` in a text editor:
```bash ```bash
vim /etc/network/interfaces vim /etc/network/interfaces
``` ```
- Change the `vmbr0` configuration from static to DHCP: - Change the `vmbr0` configuration from static to DHCP:
```bash ```bash
auto vmbr0 auto vmbr0
iface vmbr0 inet dhcp iface vmbr0 inet dhcp
bridge-ports enp3s0 bridge-ports enp3s0
bridge-stp off bridge-stp off
bridge-fd 0 bridge-fd 0
``` ```
- Save the changes and exit the editor. - Save the changes and exit the editor.
- **Restart Networking to Apply Changes:** - **Restart Networking to Apply Changes:**
- Apply the new network settings: - Apply the new network settings:
```bash ```bash
systemctl restart networking systemctl restart networking
``` ```
- **Find the New DHCP-Assigned IP Address:** - **Find the New DHCP-Assigned IP Address:**
- After the network restarts, check the assigned IP: - After the network restarts, check the assigned IP:
```bash ```bash
ip addr show vmbr0 ip addr show vmbr0
``` ```
- **Update `/etc/hosts` with the New IP:** - **Update `/etc/hosts` with the New IP:**
- Edit the `/etc/hosts` file to replace the old static IP with the new one: - Edit the `/etc/hosts` file to replace the old static IP with the new one:
```bash ```bash
nano /etc/hosts nano /etc/hosts
``` ```
- Modify the line with the old IP to the new one you just obtained: - Modify the line with the old IP to the new one you just obtained:
```plaintext ```plaintext
192.168.86.62 whitebox.foxtrot.lan whitebox # Old IP 192.168.86.62 whitebox.foxtrot.lan whitebox # Old IP
192.168.x.x whitebox.foxtrot.lan whitebox # New DHCP IP 192.168.x.x whitebox.foxtrot.lan whitebox # New DHCP IP
``` ```
- Save and exit. - Save and exit.
### Creating a New Virtual Bridge (`vmbrX`): ### Creating a New Virtual Bridge (`vmbrX`):