VMs are not getting IP from OpenWrt virtual router

Hi, I'm just a beginner of OpenWrt and an intermediate user of Linux. Recently I got my homelab server and I'm running Proxmox Virtual Environment on it. I'd like to use OpenWrt as a virtual router for VPN for some of my VMs, but there is something wrong with my configuration that my VMs can't get an IP from the OpenWrt VM. Here are my configurations:

Host Machine Network Configuration

The two physical ports are bounded into a linux bound bond0 and the first Linux Bridge vmbr0 was bridged to it and was assigned an IP 192.168.1.252 (which is the IP of the proxmox installation). Then, vmbr1 is a second empty linux bridge (I can only embed one picture, please check Pic 1 in the end).

OpenWrt VM Network Configuration

Next, in the OpenWrt VM, I attached two network devices net0(=vmbr0) which I intend to use as WAN port, and net1(=vmbr1) which I intend to use as LAN port (please check Pic 2 in the end).

The WAN port got an IP address of 192.168.1.71 and here is the configuration of both ports: (please check Pic 3 in the end)

For the best of my knowledge, I think I should enable the DHCP service of the LAN port, but I'm not quite sure if I should check Ignore Interface (I've tried both, but neither worked).

Ubuntu VM Network Configuration

Here is the network configuration of one of my VM (Ubuntu). The 2nd network device net1 is recently added, but it cannot get an IP from the OpenWrt LAN port's DHCP service.
(please check Pic 4 in the end)

My Question

I also knew using VLAN might be able to solve my need, but I think I'll learn that later and I'd like to understand what I did wrong.

Working with VMs can be tricky... so you should simplify where you can.

I notice that your lan is a dhcp client... why did you change it from the default (static with a DHCP server enabled)?

Beyond that, using a bond will make things considerably more complicated, and there is probably no value in doing so.

Follow the guides here:

1 Like

You must set a static IP address in a different subnet on the LAN interface.

Ignore interface means to disable the DHCP server for that interface, so it should be unchecked.

3 Likes

why did you change it from the default (static with a DHCP server enabled)?

I can't remember why did I change it, perhaps it was because the default was originally in the same subnet (192.168.1.1) and it didn't work so I tried to play with other options. After changing it to default, following @pavelgl 's post, it's working now! :smiley:

As for the bond, it was in the network config of host machine, so it think (in my humble opinion) it have little to do with VMs including my OpenWrt VM.

And thanks for posting the virtualization link, I'll check it out and learn more options (VLAN I think).

Thanks :heart:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.