Asus AX86u turn off auto negotiation

josh3003

Regular Contributor
I have had a few times where my WAN speed is 100mbs and have had to set
Code:
ethctl eth0 media-type 1000FD
to set the 1gb link back. Is there a way to force that and keep it that way as it states auto negotiation is enabled.
 

drinkingbird

Very Senior Member
I have had a few times where my WAN speed is 100mbs and have had to set
Code:
ethctl eth0 media-type 1000FD
to set the 1gb link back. Is there a way to force that and keep it that way as it states auto negotiation is enabled.

Haven't yet seen an ISP that isn't set to auto, I would check/replace the cable between your WAN and ISP. The only other time I've seen a 1G link start at 1G and then go to 100 is when a device goes into sleep, but that should not be the case here. A loose wire in one of the connectors or other bad connection can cause it to drop to 100M.

If you want that command to "stick" you will need to run it as a startup script, but typically hardcoding one side of the connection when the other is set to auto isn't good and it technically wouldn't be fixing the problem if it is a wiring issue, the only difference is when the problem happens you'll lose the connection completely.
 

josh3003

Regular Contributor
If you want that command to "stick" you will need to run it as a startup script,
I understand running it at startup but isn't the whole point auto neg is still enabled so at anytime it can flick. I want to rule that out I did try a different cable and it worked for sometime. Want to just rule out any other factors. I am sure there is a way in the SSH commandline to disable auto negotiation.
 

drinkingbird

Very Senior Member
I understand running it at startup but isn't the whole point auto neg is still enabled so at anytime it can flick. I want to rule that out I did try a different cable and it worked for sometime. Want to just rule out any other factors. I am sure there is a way in the SSH commandline to disable auto negotiation.

That should be the command to hardcode it and disable auto negotiation. After you run it, it should confirm the speed/duplex and that auto is disabled. You should only lose that if you reboot the router (and don't have a script to reapply it).

Instead of 1000FD did you try 1GFD? I thought that was the syntax but maybe it varies. The 1000FD may be enough to get the port to bounce (thus renegotiating to gig) but not actually apply the setting if the syntax isn't right. Running just "ethctl eth0 media-type" should give you a list of supported speeds and the current status, whatever it gives there is what you want to put in your command to hardcode it.

However as I mentioned, this may just mean whatever event is causing it to downspeed just results in a full outage for a while. Something is going on, possibly faulty ISP device. What kind of cable is it, CAT5e or better? Not running parallel to AC power for any significant distance, etc?

Port in your router or ISP device could be going faulty too, or could be as simple as the contacts are dirty/dusty and a little rubbing alcohol on a Q tip could solve it.

If you really want to troubleshoot you could reassign one of your LAN ports into the WAN VLAN and try using that for a while. Not much you can do on the ISP device unless it has multiple LAN ports.
 

mlord

Regular Contributor
I have had a few times where my WAN speed is 100mbs and have had to set
Code:
ethctl eth0 media-type 1000FD
to set the 1gb link back. Is there a way to force that and keep it that way as it states auto negotiation is enabled.
The same bug happens on my AX86U from time to time. So I put this script onto jffs and arranged for it to be invoked periodically. It detects the wrong speed and sets it back again. AFAIK, auto-neg must remain enabled for 1000 to work.

Code:
#!/bin/sh

## Keep the Modem connection at full GigE speed.
## For some reason it periodically drops to 100mbit instead.

if ethctl eth0 media-type | grep -q "Link is Up at Speed: 100M" ; then
   sleep 2 ## wait, then check again to make sure it is stable
   if ethctl eth0 media-type | grep -q "Link is Up at Speed: 100M" ; then
      ethctl eth0 media-type 1000FD >/dev/null 2>&1
   fi
fi
exit 0
 
Last edited:

josh3003

Regular Contributor
The same bug happens on my AX86U from time to time. So I put this script onto jffs and arranged for it to be invoked periodically. It detects the wrong speed and sets it back again. AFAIK, auto-neg must remain enabled for 1000 to work.
Does this ever 'drop' your internet connection doing this periodically? Otherwise if not, I'd implement this handy script of yours. Thanks for providing it.
 

mlord

Regular Contributor
The connection has a brief pause while the ethernet goes down and back up again (fairly quickly), but doesn't "drop" because the modem (and Merlin) maintains its connection throughout.
 

josh3003

Regular Contributor
The same bug happens on my AX86U from time to time. So I put this script onto jffs and arranged for it to be invoked periodically. It detects the wrong speed and sets it back again. AFAIK, auto-neg must remain enabled for 1000 to work.
I tried the script but I came back today to see my WAN defaulted back to 100mb/s

I created the script under /jffs/scripts/services-start

I made the changes with 'chmod a+rx /jffs/scripts/*'


Am I missing something here? It's been a little while so just need a refresher on the scripts so this doesn't happen again lol.
 

octopus

Part of the Furniture
I created the script under /jffs/scripts/services-start
I made the changes with 'chmod a+rx /jffs/scripts/*'
Don't forget to set any script you create as being executable:
chmod a+rx /jffs/scripts/*

try without " ' "
 

muffintastic

Senior Member
Can we start from the top and try again? is there a different name or filepath I should use?
All the information provided is correct, I have this script on my router, AC86U. Make sure custom scripts is enabled in the router before doing this, under Administration - System
 

mlord

Regular Contributor
I created the script under /jffs/scripts/services-start
..
Am I missing something here? It's been a little while so just need a refresher on the scripts so this doesn't happen again lol.
Yes. You have to arrange for the script to be run periodically, rather than just once at start-up. :)
Or, put a loop in it and allow it to keep running. So, do what you have already done, but replace the script with this version:

Bash:
#!/bin/sh

## Keep the Modem connection at full GigE speed.
## For some reason it periodically drops to 100mbit instead.

## Background task:
function monitor_eth0(){
        while true ; do
                if ethctl eth0 media-type | grep -q "Link is Up at Speed: 100M" ; then
                        sleep 2  ## wait, then check again to make sure it is stable
                        if ethctl eth0 media-type | grep -q "Link is Up at Speed: 100M" ; then
                                ethctl eth0 media-type 1000FD >/dev/null 2>&1
                        fi
                fi
                sleep 15  ## check again every 15 seconds
        done
}

## launch the background task and then exit back to original caller
monitor_eth0 >/dev/null 2>&1 &
exit 0
 
Last edited:

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top