OpenWrt x86 VM - Network Switch with br-lan Issue

Hi Guys,

I am attempting to set up OpenWrt as a flat switch using an x86_64 image in a virtual machine. I have disabled dnsmasq, firewall and odhcpd services in the startup menu.

Currently I have it set up as
Router (gives out DHCP) >eth1 OpenWrt eth0> Wired Laptop


config interface 'lan'
     option type 'bridge'
     option ifname 'eth0 eth1'
     option proto 'static'
     option ipaddr ''
     option netmask ''

If I use option ifname 'eth0 eth1' the laptop can ping OpenWrt, but my router cannot.
If I use option ifname 'eth1 eth0' the laptop can no longer ping OpenWrt, but the router can.

Am I missing something with how this is meant to work? All the documention I have read seems to suggest I am setting things up correctly.

Any help would be massively appreciated! :smiley:

uci show network | grep wan
1 Like

I removed the WAN interfaces present by default, so that does not give any output.

I have just put both WAN interfaces back in using eth2. With that, the output is below.


what is your hypervisor? what are the settings of each nic within the hyoervisor?

1 Like

I am using ovirt as my hypervisor. No rules, completely open links on the NICs. I have confirmed network connectivity from both ports, to and from OpenWrt.

I might throw the same image on an old desktop with a NIC to confirm whether or not it works on bare metal.

It really shouldn't matter which order you list the interfaces. There is preferably the syntax

    list ifname 'eth0'
    list ifname 'eth1'

Run brctl show to see if the bridge has been set up properly.


Thanks for the replies! I ended up building it on a bare metal desktop to check if it was an issue with the config, or the hypervisor. Turns out something was funny with the hypervisor network, and the OpenWrt config is correct for this.

Managed to solve it in the end, but didn't think to look at the hypervisor as I could ping from both interfaces with the config changes, and I wasn't 100% sure with OpenWrt and I'm a new user. :slight_smile:

Thanks again!

1 Like

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