Skip to content
TheChatArchiveThe Chat Archive
grok-3-mini-high· xAIHugging Face LMArena Human Preference 140K

I have an Edgerouter 6P at my home acting as the main router. Some while I go I set up…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-3-7-sonnet-20250219-thinking-32k’s answer.
  1. User

    I have an Edgerouter 6P at my home acting as the main router. Some while I go I set up load balancing with my dad. We somehow locked our home server to only a single interface, basically removing it from the balancing process cause it hosts some public facing stuff and load balancing would have broken it. I would like to disable that now and instead of load balancing set up just a failsafe where eth0 is prioritized and eth1 is just a backup that will only get used if eth0 fails. I do not remember how we locked the home server to eth0... can you help me find out how we likely did it and then roll back these settings?

  2. Assistant

    Sure, I can help you with this. Since you're dealing with an EdgeRouter 6P running EdgeOS, I'll walk you through the steps based on how these configurations are typically handled. EdgeOS is based on Vyatta/EdgeOS, and load balancing/failover features are common for multi-WAN setups. From your description, it's likely that the "lock" to eth0 was implemented using policy-based routing (PBR) via a firewall modify rule, which is a standard way to exclude specific devices from load balancing in EdgeOS. This is often done when setting up load balancing to ensure certain traffic (like your home server's public-facing services) always uses a specific WAN interface.

    I'll break this down into two main parts:

    1. Finding and rolling back the settings that locked your home server to eth0.
    2. Reconfiguring your setup for a failsafe (failover) mode with eth0 prioritized and eth1 as a backup.

    Before we start, a few important notes:

    • Backup your configuration first: Always back up your current config before making changes. You can do this via the CLI with configure; save backup.cfg (this saves a file you can restore later). Or, use the web interface (go to System > Backup/Restore).
    • Access the CLI: You'll need SSH or console access to the router. Log in and enter configuration mode with configure.
    • Test changes carefully: After making changes, commit and save them with commit; save, then test your setup (e.g., ping external sites from different devices, and simulate a failure on eth0 by unplugging it).
    • EdgeOS version matters: If your router is running an older version of EdgeOS, some commands or features might differ slightly. Check your version with show version.

    Part 1: Finding and Rolling Back the Lock on Your Home Server

    In EdgeOS load balancing setups, devices are often "locked" to a specific interface by adding a custom rule in a firewall modify chain. This modify chain is typically created during the load balancing wizard and is used to direct traffic based on rules. For your home server, a rule was probably added with a high priority (e.g., a high rule number like 5000) that matches the source IP of your server and forces traffic to use eth0's routing table (e.g., table 1, which is often assigned to eth0 in default configs).

    Step 1: Identify the Lock

    • Log into the CLI and enter configuration mode:
      configure
      
    • Show all firewall modify rules to find the one related to load balancing:
      show firewall modify
      
      • Look for a modify rule set. Common names include BALANCE, LB, or something similar (it might be named based on what you set during the wizard). For example:
        modify BALANCE {
            rule 10 {
                action modify
                modify {
                    lb-group G  // This is the load balance group
                }
            }
            rule 5000 {  // High priority rule
                action modify
                source {
                    address 192.168.1.100/32  // This might be your home server's IP
                }
                modify {
                    table 1  // Likely corresponds to eth0
                }
            }
        }
        
      • Check for rules that match the source IP of your home server. You'll need to know the IP address of your home server (e.g., 192.168.1.100). If you don't remember it, you can find it by checking your LAN devices or running show arp or show ip route.
    • If you see a rule like the one above (with source address matching your server and modify table 1 or similar), that's likely how it was locked to eth0.
    • You can also search the entire config for keywords:
      cat /config/config.boot | grep -i "source address"  // Look for your server's IP
      cat /config/config.boot | grep -i "modify table"
      
      This might help you spot the rule faster.

    Step 2: Roll Back the Lock

    • Once you've identified the rule (e.g., in the BALANCE modify set, rule 5000), delete it:
      delete firewall modify BALANCE rule 5000  // Replace BALANCE and 5000 with the actual name and rule number
      
    • Commit and save the changes:
      commit
      save
      
    • After this, your home server should no longer be locked to eth0 and will be subject to the general load balancing rules (if load balancing is still enabled). Test this by checking connectivity from your home server to the internet—traffic might now be balanced across both WANs.

    If you don't find a modify rule matching your server's IP, it could be something else, like:

    • A static route: Check with show ip route or show running-config protocols static. Look for a route like 0.0.0.0/0 via <eth0 gateway>, but this is less likely since you mentioned load balancing.
    • Firewall rules or interface bindings: Less common, but you can check show firewall or interface configs with show interfaces. If it's not in the modify rules, reply with more details, and we can dig deeper.

    Part 2: Reconfiguring for Failover with eth0 Prioritized

    Now that the home server is unlocked, you want to switch from load balancing to a failover setup where eth0 is the primary interface (used as long as it's up) and eth1 is only used if eth0 fails. EdgeOS has built-in support for this through the load balancing feature, but it needs to be reconfigured. The load balancing system includes health checks (e.g., pinging a target to detect interface failure), which is perfect for automatic failover.

    There are a few ways to approach this:

    • Preferred method: Modify the existing load-balance group to favor eth0 heavily (using weights) or set it up for strict failover. This keeps the health check features intact.
    • Alternative: Use the web interface wizard for a cleaner setup if you're not comfortable with CLI.
    • Caveat: EdgeOS load balancing is designed for distributing traffic, so achieving "strict priority" (where eth0 is always used if up, with no load balancing) isn't perfectly built-in. However, you can get very close by setting a high weight difference or using PBR rules.

    Option A: CLI-Based Reconfiguration (Recommended for Precision)

    Here's how to modify your existing load-balance setup for failover with eth0 priority. This assumes you have a load-balance group already configured (e.g., named G). If not, you might need to create one.

    1. Show your current load-balance config:

      show load-balance group  // This lists all groups; look for the name, e.g., G
      show load-balance group G  // Replace G with the actual group name
      
      • Note the interfaces (e.g., eth0 and eth1) and any other settings.
    2. Modify the load-balance group for failover:

      • Enter config mode if not already:
        configure
        
      • Edit the load-balance group (replace G with your group name):
        edit load-balance group G
        
      • Set weights to heavily favor eth0. For example:
        set interface eth0 weight 100
        set interface eth1 weight 1
        
        • This makes eth0 handle most traffic (about 99% with this ratio), and eth1 is only used minimally if eth0 is up. If eth0 fails (detected by health checks), all traffic should switch to eth1.
        • If you want stricter failover (closer to no load balancing when eth0 is up), you can increase the weight difference (e.g., eth0 weight 1000, eth1 weight 1). However, some traffic might still spill over to eth1.
      • Ensure health checks are enabled (they usually are by default). You can verify or set a health check target (e.g., ping 8.8.8.8):
        set interface eth0 route-test {
            initial-delay 60
            interval 10
            failure-count 5
            type ping
            target 8.8.8.8
        }
        set interface eth1 route-test {
            initial-delay 60
            interval 10
            failure-count 5
            type ping
            target 8.8.8.8
        }
        
        • This pings a reliable IP (like Google's DNS) to check if the interface is up.
      • Exit back to the main config level:
        top
        
      • Commit and save:
        commit
        save
        
    3. Adjust the firewall modify rules if needed:

      • Since you removed the home server lock, the modify rules should now apply load balancing/failover to all traffic. But with the weight changes, it should prioritize eth0.
      • Check the modify rules again with show firewall modify to ensure no other custom rules are interfering.
      • If you want even stricter priority (e.g., always use eth0 via PBR before load balancing), you could add a high-priority rule in the modify chain:
        edit firewall modify BALANCE
        set rule 100 action modify  // Add a new rule with high priority (low number)
        set rule 100 modify table 1  // Force traffic to eth0's table
        set rule 100 source group address any  // Applies to all traffic, but you might want to refine this
        top
        commit
        save
        
        • This isn't necessary with the weight approach and might overcomplicate things. Test first.
    4. Verify the setup:

      • Check load-balance status: show load-balance status
      • Simulate a failure: Unplug eth0 and check if traffic switches to eth1 (e.g., ping an external site from a device on your LAN).
      • Monitor logs: show log for any errors.

    Option B: Use the Web Interface for Simpler Setup

    If you're more comfortable with the GUI, EdgeOS has wizards that can handle this more intuitively:

    • Log into the web interface (usually at https://192.168.1.1 or your router's IP).
    • Go to the Dashboard or Wizards section.
    • Run the "Load Balancing/Failover" wizard:
      • Choose "Failover" instead of "Load Balancing."
      • Set eth0 as the primary WAN and eth1 as the backup.
      • The wizard will configure everything, including health checks.
    • After the wizard, your home server should no longer be locked (since you removed the rule in Part 1), and the failover should be active.
    • Test the setup as before.

    Additional Tips for Failover

    • Health Check Tuning: By default, EdgeOS pings a target (e.g., 8.8.8.8) to detect failures. Make sure this is set to a reliable IP. You can change it in the load-balance group config as shown above.
    • No Load Balancing at All: If you want a simpler setup without any load balancing (e.g., just static routes), you could delete the load-balance group entirely:
      delete load-balance group G
      commit
      save
      
      Then set static routes with metrics for failover:
      set protocols static route 0.0.0.0/0 next-hop <eth0_gateway> distance 10
      set protocols static route 0.0.0.0/0 next-hop <eth1_gateway> distance 20
      commit
      save
      
      • However, this won't have automatic health checks, so failover might not happen if eth0 goes down without a full interface failure (e.g., if the link is up but the internet is down). The load-balance feature is better for this reason.
    • Reapply Load Balancing if Needed: If you ever want to go back to load balancing, you can run the wizard again or adjust the weights to be equal (e.g., both interfaces with weight 50).

    After these changes, your setup should have eth0 as the primary with automatic failover to eth1. If you run into any issues or the lock wasn't in the modify rules, share more details (e.g., output from show firewall modify or show load-balance), and I can refine the steps. Let me know how it goes!

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.