OpenWrt VMWare ESXi 6.7 & VLANs

Hello All,

I'm looking to virtualize OpenWRT in my ESXi 6.7 server and have a couple of questions.
So far I have OpenWRT 19.07.3 r11063 booting up just fine. I threw a number of virtual interfaces at it and at least one of them actually pulls an IP (I don't know why the others don't, but that's not a major concern at the moment). I have a quad interface nic that I passthrough to the VM and OpenWRT sees it without issue.

I next took the interfaces I passed to the vm and bonded them via this:
1 - https://openwrt.org/packages/pkgdata/kmod-bonding
2 - https://forum.archive.openwrt.org/viewtopic.php?id=69209

root@OpenWrt:~# cat /etc/rc.local
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
ifconfig bond0 down
echo 802.3ad > /sys/devices/virtual/net/bond0/bonding/mode
#echo balance_rr > /sys/devices/virtual/net/bond0/bonding/mode
echo fast > /sys/devices/virtual/net/bond0/bonding/lacp_rate
echo layer3+4 > /sys/devices/virtual/net/bond0/bonding/xmit_hash_policy
ifconfig bond0 up

echo +eth3 > /sys/devices/virtual/net/bond0/bonding/slaves
echo +eth4 > /sys/devices/virtual/net/bond0/bonding/slaves
echo +eth5 > /sys/devices/virtual/net/bond0/bonding/slaves
exit 0
root@OpenWrt:~#

All seems to be working as expected as I see bond0 in addition to the other interfaces I expect to see.

root@OpenWrt:~# ifconfig
bond0     Link encap:Ethernet  HWaddr EA:AA:63:95:0B:F4
          UP BROADCAST MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth2      Link encap:Ethernet  HWaddr 00:0C:29:F1:19:BB
          inet addr:192.168.0.132  Bcast:192.168.1.255  Mask:255.255.254.0
          inet6 addr: fe80::20c:29ff:fef1:19bb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:223 errors:0 dropped:0 overruns:0 frame:0
          TX packets:92 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19552 (19.0 KiB)  TX bytes:16396 (16.0 KiB)

eth6      Link encap:Ethernet  HWaddr 00:1B:21:78:57:FE
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:17 Memory:fd280000-fd2a0000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1136 (1.1 KiB)  TX bytes:1136 (1.1 KiB)

The issue I am experiencing is that I don't know how to create VLANs (and associated dhcp/dnsmasq/etc) and trunk them to my bond0 interface. Anyone with insight as to how to do this, please?

On the other end of those interfaces will be a Brocade 6450-48P Switch.

There is no "Switch" option under "Network" in luci.

Thank you in advance.

  • Only eth1 would get an IP, as it's the WAN with a DHCP Client by default
  • eth0 is LAN and is a DHCP Server by default
  • All other NICs are unconfigured
  • Go to Interfaces and Add.
  • Specify a new ethx.x, etc.
  • Then configure its DHCP attributes
  • Add to a firewall zone

(I assume you did this for the other NICs already.)

Because you have [virtual] NICs, not a [hardware] switch. :wink:

(The problem it seems you're describing, I'd solve in VMWare.)

1 Like

Thank you for the explanation!

(The problem it seems you're describing, I'd solve in VMWare.)

I'd love to know how to do it better, if you can explain a bit more, please.

It's a VMWare thing, not OpenWrt...

I'll be honest, I need more clarity on what you're tying to solve with the bond interface...your Host, etc. (which seems more like a VMWare config than OpenWrt).

Because, in my case, I'd just assign the correct VLAN to the NIC (in VMWare), simple.

I don't use pass-thru, though, I actually use VMWare to VLAN.