# Caveat: Use Ubiquiti ER-X in China

After reading some articles about Ubiquiti EdegeRouter X, I realize this is a device I have no resistance not to buy it. Gigabyte Ethernet, multi-WAN, configurable by CLI (thus a lot of fun), reasonable price, and most importantly, high reliability. I enjoy exploring configurations, and in the meantime, it’s a double-edge knife, if not configured well, it could have a very negative effect on your network performance. In this article, I will describe 2 configurations that could severely affect the performance when using it in China.

Ubiquiti has a very user-friendly forum for beginners to learn almost all technologies for EdgeRouter X. However, for the second issue (if you think it’s an issue), I don’t find anything on the internet. Probably it’s not that popular in China? Anyway, here is the story.

### Requirement

• Dual WAN, both are connecting through PPPoE. eth0 connects pppoe0 (WAN0), and eth1 connects pppoe1 (WAN1).

• Six machines are in the LAN, with two connecting to WAN1 and four connecting to WAN0. All other devices will go through a load balancer to access the internet.

• No VLAN, because I want all devices to connect directly freely.

### Caveats

The first configuration is an easy one, the DNS name server. For dual WAN, we should use a name server at the system level instead of using the one automatically retrieved from ISP. Commands:

The second issue is not so obvious, and I find this issue by reading the message logs in /var/log/messages, sometimes, the load balance became inactive and then after a while became active again, and this happened once a while repeatly.

By checking connections, I see some strange connection to 8.8.8.8, which I never set as a DNS server in anyplace.

After a thorough read about https://help.ubnt.com/hc/en-us/articles/205145990-EdgeMAX-Dual-WAN-Load-Balance-Feature, I get to know that the default behavior for a load balancer is to send a ping to 8.8.8.8 every minute if it fails, then set the reachability to unreachable for that network and redirect all traffic to the other network. With that knowledge, it’s an easy fix then.

Also, we can tune the failure count and interval parameters to make this even more robust and reliable. Then final settings for each interface:

I hope you enjoyed reading this article, and in case you faced the same issue, and you feel this article helpful, please comment below and let me know.

### Reference

Here is the full configuration: