Problems adding eth1 and eth2 to br-lan on a Hyper-V VM with 22.03.5

I have exactly the same problem on Hyper-V VM. I'm using Current Stable Release - OpenWrt 22.03.5

When working with VMs, there are depencies on the way that the host system manages the hardware and/or virtual interfaces, how they are presented to the guest OS, and how they are configured on the hypervisor/host configuration.

That said, can you describe your goal and what specific problems you are having? And, let's see your configuration.

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

cat /etc/config/network

Thanks for your reply!
My goal is to have OpenWRT VM as a virtual router in my LAN. I've created a VM with 4 vNICs:

  1. eth0 - LAN1 with clients connected
  2. eth1 - DHCP Internet from provider
  3. eth2 - LAN2 with clients connected
  4. eth3 - LAN3 with clients connected

I installed latest stable OpenWRT and with default setup all I've changed is I added eth2 and eth3 interfaces into default br-lan. I was hoping that this will connect all my 3 LANs into one LAN and they all will be able to recieve IPs from DHCP. LAN1 connected to eth0 works just fine. LAN2 and LAN3 works only one way LAN->OpenWRT. Clients sending requests to DHCP to recieve IPs, and OpenWRT see these requests and trying to offer IPs, but clients recieve 0 bytes data back.
I tried to switch connected LANs on VM just to test, so I connected LAN2 into eth0 and LAN1 into eth2. Now LAN2 works as expected and LAN1 can't recieve data from OpenWRT.
I tried to activate Enable promiscuous mode on eth0 eth2 and eth3 with no luck.

root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd68:3bd0:3f33::/48'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'
	list ports 'eth2'
	list ports 'eth3'

config interface 'lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option device 'br-lan'

config interface 'wan'
	option device 'eth1'
	option proto 'dhcp'

config interface 'wan6'
	option device 'eth1'
	option proto 'dhcpv6'

config device
	option name 'eth0'
	option promisc '1'

config device
	option name 'eth2'
	option promisc '1'

config device
	option name 'eth3'
	option promisc '1'
brctl show
bridge name	bridge id		STP enabled	interfaces
br-lan		7fff.00155df3a401	no		eth0
            							eth2
            							eth3

UPD: I was quite sure OpenWRT is the issue, so I tried to recreate this on my VMWare Workstation and surprisinly everything works as expected. Now I'm confused. I will try OPNsense on Hyper-V now.

UPD2: OPNsense works exactly the same. It's the Hyper-V virtual network related. You can close this thread, it's not related to OpenWRT.

Just to carify: Do you need multiple untagged interfaces?

I nenver used Hyper-V, but back in my days I played a little with VMware ESX. That was when version 5 was new.

There were virtual switches where every virtual switch was managed and vlan capable. I could go both ways, use either individual virtual switches per virtual network or use a single virtual switch and separate network by vlan.

I found a single virtual switch where the OpenWRT instance was connected as trunk/tagged port easier to manage.

In terms of performance I managed to utilize a single CPU core entirely inside the virtual OpenWRT although the virtual NIC was only a e1000. I don't remember the actual numbers but they were massive and way beyond GBit.

So: Maybe going with a single virtual NIC and connect it tagged to the virtual switch on Hyper-V is an option for you, too.

@golialive, my plan is to use 3 different virtual switches without VLan and tags.

Here is detailed desc. of my problem and how to reproduce: https://learn.microsoft.com/en-us/answers/questions/1347461/issue-with-virtual-network-configuration-in-hyper

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