HOWTO: set the link speed / duplex of a port on an ASUS router

By | November 30, 2014

P_500I searched high and low unsuccessfully for instructions on how to set the link speed and/or duplex on one of the ports of an ASUS router (in my case, the RT-N66U, though I think other ASUS routers behave similarly). Once I had already figured out the answer on my own, I was able to find the instructions buried on various forum threads, but that only worked once I knew the command to run so I could search for that particular command. That’s not much of a help ;-), so I’m posting the answer here, in the hope that this page will show up more prominently the next time someone else searches for the answer to this question.

This is a three-step process:

  1. Enable the telnet port on the router so you can get access to its command line.
  2. Use the “robocfg” command on the command line to configure the port the way you want it.
  3. Put a script on a USB thumb drive so that the port configuration can be persisted across router reboots.

Note that of these three steps, the last one is the only mandatory one, for reasons that will become clear. However, the first two steps are useful for finding the right robocfg command and making sure it works before putting it into a script on a thumb drive, so I’ll explain all of them.

Enable the telnet port

In the router’s web UI:

  1. click on “Administration” under “Advanced Settings” on the left;
  2. click on the “System” tab at the top;
  3. next to “Enable Telnet”, select “yes”; and
  4. click the “Apply” button.

Use “robocfg” from the command line

  1. Telnet to the LAN IP address of the router, and log in with the same username and password you use to log into the web UI.
  2. Run “robocfg show” to list all the router’s ports.
  3. Figure out which port you want to configure by finding the correct MAC address in the port list.
  4. Run “robocfg port port-number media speed-duplex” to change the port configuration from automatic to pinned at the config you specify. For “speed-duplex“, specify “10”, “100”, or “1000” for the speed, followed by “HD” or “FD” for the duplex. For example, “robocfg port 1 media 1000FD” to configure port 1 for full-duplex gigabit ethernet.
  5. Run “robocfg show” again to confirm that the port is configured the way you want it to be.

You can run “robocfg help” for more information about what robocfg can do.

Persist the change across reboots

H/t to Darell Tan for showing me how to do this!

  1. Get yourself a USB thumb drive.
  2. Create a directory called “asusware” on the drive.
  3. Create an executable file called “.asusrouter” within the “asusware” directory and put this in it:
    while [ $i -le 20 ]; do
          success_start_service=`nvram get success_start_service`
          if [ "$success_start_service" == "1" ]; then
          echo "autorun APP: wait $i seconds...";
          sleep 1
    [insert commands that you want to run on boot here, e.g., a robocfg command as shown above]
  4. Plug the thumb drive into your router.

As I noted above, this thumb drive trick is actually all you need to do if you already know the robocfg command you need to run. As soon as you plug the thumb drive in, the script you created will be executed, and it’ll be executed from then on every time the router reboots.

Please post a comment if you found this posting useful!

Print Friendly

3 thoughts on “HOWTO: set the link speed / duplex of a port on an ASUS router

  1. Patrick

    I am using Asus RT-AC68U. I cannot find the command “robocfg”. It returned “-sh: robocfg: not found” . Is there any similar command in my router? Thanks.

    1. Hal

      I’m using the Asus RT-AC68U and the robocfg command works for me. The executable is in /usr/sbin/robocfg. I’m using firmware and I don’t remember adding robocfg or anything like that to the router. I suppose it is possible that I have made a modification at some point that added the command, though I don’t recall doing so.


Leave a Reply

Your email address will not be published.