Expired

DrayTek Vigor routers and access points are primarily configured and monitored through the Web User Interface (WUI) but can also be monitored or configured through the router's Command Line Interface (CLI). The router will accept commands that follow valid syntax (type "?" in the CLI for examples of these) and allows the router to output information that may be required for diagnostics.

More information on the functions of available commands can typically be found in the router's User Guide or in the Command Reference available on the Downloads page.

This guide is broken into 3 sections, to cover different methods to access the router's Command Line Interface:

CLI via Web Console DrayTek Vigor routers from the Vigor 2860 / 2925 and later support the Web Console feature, which allows command line interface via the router's web interface, using the same encryption that the web interface is accessed with (HTTPS is recommended). The output of some log commands, typically ones that are more verbose, such as "log -wt" is not supported through this interface.
CLI via SSH DrayTek Vigor routers from the Vigor 2820 / 2920 and later support accessing the router's SSH (Secure SHell) interface, which is similar to Telnet with additional encryption and authentication.
CLI via Telnet It is possible to access all models of DrayTek router via Telnet, which is an un-encrypted TCP/IP protocol for accessing a command line interface. 


CLI via Web Console

To access the router's Web Console, access the router's Web Interface and click the "sliders" icon in the top right menu of the router's web interface:

This will pop-up the router's Web Console interface which can be used to enter commands immediately. Logging in to this interface is not required because access to the web console requires logging in to the router's Web Interface.

Entering "?" as a command will show which commands are available. Additionaly, entering a valid command followed by "?" such as "mngt ?" will show options and sub-commands available.


CLI via SSH

Microsoft Windows does not have an SSH client utility built-in, an SSH utility such as PuTTY (a free terminal utility) is required - This article will demonstrate how PuTTY can be used to connect to the router's Command Line Interface, but any SSH client utility will be able to connect to the router this way.


Download PuTTY from the author's website and install it with the default options.


Once PuTTY has installed, run the application and it will load the Configuration window.

In the Session section, enter the Host Name or IP address of the router to connect to, its SSH Port (22 by default) and set the Connection Type to SSH.

At this stage, the connection details and other settings can be saved by clicking the Save button, which will save the session settings.

Click Open to start the session:

When first connecting to an SSH session, the PuTTY utility will pop-up a prompt warning of security risks involved with connecting to unknown hosts. If you trust that the host details are correct then click Yes to save the key details and PuTTY will not ask for this in future (for this host).

The router will then prompt for the Username to log in with; enter the username of "admin" and press Enter, then enter the Password for the account.

If the details are correct, the account will be able to log in and it will be possible to access the router's Command Line Interface.

Entering "?" as a command will show which commands are available. Additionaly, entering a command followed by "?" such as "mngt ?" will show options and sub-commands available.

CLI via Telnet

Note: It is recommend to use SSH instead of telnet because telnet is unencrypted

Microsoft Windows has a built-in Telnet client that can be accessed from the Windows Command Prompt. Windows Vista and later versions of Windows do not have this enabled by default however. If this is not enabled, Windows will not recognise the "telnet" command from the command prompt. This can be enabled by following the instructions below.

To access the router's Command Line Interface using the Windows Telnet utility, check the Usage section.


How to enable Telnet in Windows

To enable the built-in Windows Telnet client, go to the Start Menu and open the Control Panel and click on the Uninstall a program option.

If the Control Panel shows icons instead of Categories, open the Programs and Features control panel.

In the Programs and Features control panel, click Turn Windows features on or off:

Check the tickbox for the Telnet Client and click OK:

Wait until Windows finishes installing the feature:

Once this completes, the Windows Telnet client will be available from the Windows Command Prompt.

Usage

The Windows Telnet utility is accessed from the Windows Command Prompt. Open the Windows Command Prompt by clicking the Start button and type "cmd" into the search box. This should find "cmd.exe" as an available program, click that to open it:

In the Windows Command Prompt, type "telnet <ip address/host>" to open telnet and connect to that IP address / host name. For instance if the router is on 192.168.1.1, enter the command as "telnet 192.168.1.1".

Additionally, if the Telnet management port of the router has been changed, the syntax for the telnet client port setting is "telnet <ip address/host> <port>".

Press Enter to run telnet and the Telnet client will attempt to connect to the router:

If the connection attempt is successful, the router will prompt for the Username ("admin" by default) and the Password (also "admin" by default).

If the credentials are accepted, the router will present the CLI interface as shown below:

Entering "?" as a command will show which commands are available. Additionaly, entering a command followed by "?" such as "mngt ?" will show options and sub-commands available.


It is also possible to log the output of the Telnet session by starting Telnet with the following options:

"telnet -f <log file location & filename> <IP address/host> <port>"

This will log the output of the session shown above to the "log.txt" file located in "C:\Users\User\Desktop". This can be opened in a text editor such as Notepad and can be used for recording the output of log options in the CLI such as "log -wt"


How do you rate this article?

1 1 1 1 1 1 1 1 1 1