Deploying OpenWrt 23.05.3 on VMware ESXi

Deploying OpenWrt 23.05.3 on VMware ESXi

Total: 1234 words, 38 images,Estimated reading time: 2 minutes

Previously, OpenWrt was deployed on VMware Workstation (Deploying the latest version of OpenWrt 23.05.3 on VMware Workstation). If you want to deploy OpenWrt directly on ESXi, you will find that the conversion of the image cannot directly generate OVF or OVA files, and ESXi also has recognition problems when directly using the converted disk. Therefore, currently, you can only first deploy the disk image to Workstation, then export it as an OVF file, and finally migrate it to ESXi.

While OpenWrt is running, first check the host status information.

Deploying OpenWrt 23.05.3 on VMware ESXi

The disk space utilization and memory utilization are surprisingly low, with the disk using a total of 29 MB, memory using 55 MB, and CPU load being 0. Although it is much higher than the previous old version, the overall load is still very low.

Deploying OpenWrt 23.05.3 on VMware ESXi
Migrating to ESXi
Deploying OpenWrt 23.05.3 on VMware ESXi

First, change the network connection to “Bridged Mode”.

Deploying OpenWrt 23.05.3 on VMware ESXi

Then click on the “File” menu and select “Export as OVF”, where the generated OVF file and VMDK file are the two main files for importing into ESXi.

Deploying OpenWrt 23.05.3 on VMware ESXi

In ESXi, create a new virtual machine, select the type “Deploy a virtual machine from an OVF or OVA file”.

Deploying OpenWrt 23.05.3 on VMware ESXi

Select the exported OVF file and VMDK file, then give the virtual machine a name.

Deploying OpenWrt 23.05.3 on VMware ESXi

Select storage.

Deploying OpenWrt 23.05.3 on VMware ESXi

Then steps 4 and 6 disappear, leaving only step 5 “Deployment Options”. Choose “Thin Provision” for disk provisioning, modify the network mapping, and uncheck “Power on automatically”.

Deploying OpenWrt 23.05.3 on VMware ESXi

Confirm the host configuration and click “Finish”.

Deploying OpenWrt 23.05.3 on VMware ESXi

Before booting, adjust the hardware configuration slightly higher.

Deploying OpenWrt 23.05.3 on VMware ESXi

After adjustment, boot up successfully.

Deploying OpenWrt 23.05.3 on VMware ESXi

According to the previous method, change the host network card address to 192.168.1.225, test access through the browser, and it can be accessed normally.

Deploying OpenWrt 23.05.3 on VMware ESXi

Deploying OpenWrt 23.05.3 on VMware ESXi
Adjusting Network Card Configuration
Deploying OpenWrt 23.05.3 on VMware ESXi

How can a normal router have only one network card? Add another one, and change the adapter type to VMXNET (In VMware ESXi, the performance of different virtual network cards can vary up to three times!).

Deploying OpenWrt 23.05.3 on VMware ESXi

Check the network card information, where eth0 and br-lan are bound, corresponding to the host’s network adapter 1, connected to the VM Network, which should normally be the WAN port but is currently used as the LAN port and needs adjustment.

Deploying OpenWrt 23.05.3 on VMware ESXi

First, change the interface bound to the br-lan bridge interface to eth1.

Deploying OpenWrt 23.05.3 on VMware ESXi

Then change the IP address of the br-lan interface to 172.16.113.1, subnet mask 24 bits; now it is the gateway itself and does not need to configure a gateway.

Deploying OpenWrt 23.05.3 on VMware ESXi

Then click “Add new interface” to create a WAN interface, select protocol “Static address”, and choose interface “eth0”.

Deploying OpenWrt 23.05.3 on VMware ESXi

Configure the address as 192.168.1.225, subnet mask as 24 bits, and gateway as 192.168.1.1.

Deploying OpenWrt 23.05.3 on VMware ESXi

After adjustment, it will prompt that the configuration has not been saved and take effect, you need to click “Save & Apply” to make the changes take effect.

Deploying OpenWrt 23.05.3 on VMware ESXi

Then find a host and connect to the port group corresponding to the eth1 network card “LINK01”. You can see that the new network card has successfully obtained an address.

Deploying OpenWrt 23.05.3 on VMware ESXi

Then use the gateway of the LAN port on this host to log in to the router and test network connectivity.

Deploying OpenWrt 23.05.3 on VMware ESXi

Next, set the DNS information for the interface.

Deploying OpenWrt 23.05.3 on VMware ESXi

Then add the WAN interface to the security zone named WAN.

Deploying OpenWrt 23.05.3 on VMware ESXi

Save and apply to make the configuration take effect. Then the host can go online.

Deploying OpenWrt 23.05.3 on VMware ESXi

At this point, the network card adjustment is complete.

Use iperf3 to run a stream, test the bandwidth, and see if the traffic topology can be used.

Deploying OpenWrt 23.05.3 on VMware ESXi

Preliminary tests show that the difference in forwarding between going through OpenWrt and not going through OpenWrt is not significant. The average traffic through OpenWrt is 3.08 Gbps, which is similar to the data monitored by OpenWrt. The instantaneous flow is very large, but the device load is not high at all, even less than 10%.

Deploying OpenWrt 23.05.3 on VMware ESXi

Check the interface traffic statistics, LAN port received 18.73 GB, WAN port forwarded 18.90 GB, which is basically accurate.

Deploying OpenWrt 23.05.3 on VMware ESXi

This is a router.

Deploying OpenWrt 23.05.3 on VMware ESXi
Firewall Function Testing
Deploying OpenWrt 23.05.3 on VMware ESXi

This firewall function is still very attractive to me. Check the firewall rules.

Deploying OpenWrt 23.05.3 on VMware ESXi

Allow all traffic from LAN to WAN. If this rule is deleted, the traffic should be cut off.

Deploying OpenWrt 23.05.3 on VMware ESXi

At the same time, the traffic from the terminal to OpenWrt is also not available.

Deploying OpenWrt 23.05.3 on VMware ESXi

First, confirm the security zone settings, as the configuration rules will call here.

Deploying OpenWrt 23.05.3 on VMware ESXi

Then create a rule to allow ICMP packets.

Deploying OpenWrt 23.05.3 on VMware ESXi

After applying, it was found that it did not take effect. It only took effect after restarting the firewall on the firewall status page. I don’t know if this is normal.

Deploying OpenWrt 23.05.3 on VMware ESXi

After the restart, it worked, but why did the delay become 1ms, and TTL became 64?

Deploying OpenWrt 23.05.3 on VMware ESXi

Address resolution is normal, but the delay and TTL are incorrect. Confused? The configuration above is DNAT, and it should normally be configured on the page below for SNAT.

Deploying OpenWrt 23.05.3 on VMware ESXi

Then drove away the “ghost”.

Deploying OpenWrt 23.05.3 on VMware ESXi

Another configuration is to allow ICMP traffic, configured in Traffic Rules.

Deploying OpenWrt 23.05.3 on VMware ESXi

Now only ICMP is allowed, then allow the traffic for iperf stream. Create a rule that matches TCP port 5201.

Deploying OpenWrt 23.05.3 on VMware ESXi

Actually, it can be done here.

So the question is, under the normal status of the server, in addition to the normal status, there are also two types of abnormal connection statuses: one is timeout, and the other is rejection. Do you know the reason?

Deploying OpenWrt 23.05.3 on VMware ESXi

Long press the QR code to follow us

Deploying OpenWrt 23.05.3 on VMware ESXi
Deploying OpenWrt 23.05.3 on VMware ESXi
Deploying the latest version of OpenWrt 23.05.3 on VMware Workstation
Quickly customize VMware ESXi 8.0U2 and deploy it to DL580 Gen9
HPE DL580 Gen9 has arrived, successfully powered on!
【Clearer】Photo sharing, welcome new family member HPE ProLiant DL580 Gen9
HPE server configuration through business network card to log in to iLO management page
How to expand RAID 5 array?
Can the disk order of the RAID array be adjusted? How long does RAID reconstruction take?
Crash! 360 Driver Master crashed my server!
Installing the latest version of Windows Server 23H2, encountered pitfalls!
RDP authorization 119 days not enough? Give your Windows Server a new lease on life!
Strange knowledge learned again: What to do if the server’s serial number, product ID, and UUID are missing?
Installing Pytorch, CUDA, and cuDNN on MX250 laptop
Successfully copied! GTX1050Ti version change to install Pytorch, CUDA, and cuDNN
Using vSRX to test the performance differences of various encryption algorithms of IPsec VPN
How did artificial intelligence develop into AIGC? Decoding a machine learning sharing material I wrote four years ago
Let’s learn a few simple Python algorithm implementations together
Tensor and matrix operations in GPU performance testing
Initial experience of deploying Tsinghua’s large model ChatGLM3

Leave a Comment

Your email address will not be published. Required fields are marked *