Skip to content

Instantly share code, notes, and snippets.

@LeonanCarvalho
Last active July 24, 2023 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LeonanCarvalho/3c9482a3ef9eac4a08d58edd4ebe1529 to your computer and use it in GitHub Desktop.
Save LeonanCarvalho/3c9482a3ef9eac4a08d58edd4ebe1529 to your computer and use it in GitHub Desktop.
Setting up dual WAN link aggregation on an Asus RT-AX88U router with an EdgeRouter X

Setting up dual WAN link aggregation on an Asus RT-AX88U router with an EdgeRouter X

This is a proof of concept I did, use at your own risk. I am not responsible for any damage you may cause to your equipment as a result of applying these commands. If you have suggestions or even corrections, you can write them in the comments.

Requirements:

  1. Ubiquiti EdgeRouter X (firmware v2.0.9-hotfix.7)
  2. Asus RT-AX88U Router (firmware 3.0.0.4.388_22525-gd35b8fe) (Maybe applies to any other router/switch with LACP turned on)
  3. Load Balancer configured from EdgeRouter X's Wizard

image

Configuration on EdgeRouter X:

  1. Enable hardware offloading.
set system offload hwnat enable
set system offload ipsec enable
  1. Remove eth2 and eth3 from switch0.
delete interfaces switch switch0 switch-port interface eth2
delete interfaces switch switch0 switch-port interface eth3
  1. Create a new bonding interface (bond0) and add eth2 and eth3 to it.
set interfaces bonding bond0 address 10.88.10.1/30
set interfaces bonding bond0 description AsusAgregation
set interfaces bonding bond0 hash-policy layer2
set interfaces bonding bond0 mode 802.3ad

set interfaces ethernet eth2 description 'LACP 1.1'
set interfaces ethernet eth2 bond-group bond0
set interfaces ethernet eth3 description 'LACP 1.2'
set interfaces ethernet eth3 bond-group bond0
  1. Set up NAT masquerade for the bond0 interface.
set service nat rule 5003 description 'masquerade for BOND'
set service nat rule 5003 log disable
set service nat rule 5003 outbound-interface bond0
set service nat rule 5003 protocol all
set service nat rule 5003 type masquerade
  1. Add a static host mapping for the Asus router.
set system static-host-mapping host-name router.asus.com alias router.asus.com
set system static-host-mapping host-name router.asus.com inet 10.88.10.2
  1. If you have a DNS Forwarding confiured don't forget to also include bond0 interface to listen-on configurations
set service dns forwarding listen-on bond0

Configuration on Asus RT-AX88U Router:

  1. Connect the EdgeRouter X's eth2 port to the Asus router's WAN port.

  2. Change the WAN Connection Type to "Static IP".

  3. Set the WAN IP Address to 10.88.10.2, Subnet Mask to 255.255.255.252, and the Default Gateway to 10.88.10.1 (the IP address of bond0).

  4. Enable "WAN Aggregation".

  5. Finally, with LACP active, connect the EdgeRouter X's eth3 port to the Asus router's LAN4 port.

Please remember that all steps are based on the specific firmware versions and might not work with other versions or models. Always backup your current configuration before making any changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment