OpenWrt on AMD64 vmware VM

Hello friends!

While I wait my new ER-X arrive to try to install OpenWRT on it, I decided to start another project to learn more.

I was also considering building a DIY PC for router and was studying OSs differences to choose which to use, but dropped the idea to wait for a Intel 10nm CPU, network cards that use 3GIO 4.0 x1 instead of 2.1 or 3.0 x4, and also for 10GbE prices to drop. I'm not building the PC but wanna test OpenWRT on AMD64 with more resources. The idea is to stop using VMware's NAT and use OpenWRT instead to connect my VMs to LAN and Internet.

This is what I had done so far:

  1. created a new VMnet11 of type host-only
  2. created a VM with 1GB storage and 512MB RAM and installed OpenWRT 19.07.7 on it
  3. this VM has 3 net adapters: 1 bridge type, 1 on VMware NAT, 1 on VMnet11

On first boot, OpenWRT was making an odd and annoying error about source packages arriving on destination. I googled about it and it seemed to be MAC conflict, I then genereated new MACs for its adapters and looked on other VMs to assure there's no repeated MAC. Waste of time.

It happens that OpenWRT was using VMnet11/eth0 as WAN and creating br-lan interface on it. eth0 and br-lan were replicating the same MAC and that was causing the error. I had to ifconfig eth0 down to stop the annoyance and edit /etc/config/network to set lan to eth2 and wan to eth0. Then the error stopped and Internet became reacheable.

From LuCI I finished other settings and could confirm with traceroute that VMs whose net adapter were moved to VMnet11 that they're using VM OpenWRT (and OpenWRT ER-X) to reach Internet, and it becomes unreachable when VM OpenWRT is turned off.

I also installed a few apps: bash, dig, fping, vim-full, subversion-client. One of the reasons I wanna build a router using DIY AMD64 PC is because my ER-X router is on its limits of RAM usage. BusyBox is great for low resources hardware, but very limited and some times it annoys me. I wanna see how close I can get OpenWRT to Ubuntu (in example) on terminal usability and installed softwares. A VM is perfect for that because I can revert snapshot after messing around.

Some things I'm still unable to make work:

  1. I'm able to reach Internet using eth1/VMware NAT, but traceroute fails after leaving VM environment. I had disabled it from vmware settings and will try to fix it later.
  2. Since both my ISP provide a single /64 IPv6 global prefix, I'm very sadly unable to delegate prefix from ER-X OpenWRT to VM OpenWRT. Because of that, IPv6 works on it, but doesn't work on VMnet11 devices.

My next works will be:

  1. Fix eth1/VMware NAT traceroute issue
  2. Install and configure mwan3 to use both eth0 and eth1 in load balancing
  3. Setup NAT6 to provide IPv6 to VMnet11, and test if Lix and Win10 are actually using it instead of IPv4
  4. Setup mwan3 to make load balancing on IPv6
  5. Disable IPv4 on VM OpenWRT and see how much I can use VMs without it
  6. Review some more apps to install and use which ER-X doesn't have resources to

You made it Host Only:

How?

Next, in OpenWrt, the first interface is LAN. You need to setup 2 interfaces, with the second having an Internet connection. The second interface will be made WAN by default.

You must have did some configs you failed to mention?

1 Like

Tnx for the reply.

As I said, I added 3 adapters:

this VM has 3 net adapters: 1 bridge type, 1 on VMware NAT, 1 on VMnet11

Host-only VMnet11 is eth0, that's working. The issue is with eth1, traceroute fails on it.

So, by default, eth0 should be LAN and create br-lan, and eth1 should be WAN?

I don't understand why it put bridged on eth0 and VMware NAT on eth1 and Host-only on eth2. Maybe I created adapters on the wrong order lol. Anyway I just had to switch devices on interfaces settings and it was solved. At least for eth0 and eth2.

1 Like