Applies To:

Show Versions Show Versions

Archived Manual Chapter: WANJet® Appliance Administrator Guide: 10 - Working from the Command Line
Manual Chapter
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

This article has been archived, and is no longer maintained.


10

Working from the Command Line


Command line overview

You can use the command line to configure the WANJet appliance and perform several commands. While it is not usually necessary to use the command line interface, some administrators may prefer to use the restricted shell in some cases.

For example, you may find that it is easier to perform initial configuration on the WANJet appliance at the command line than it is using the LCD included on some platforms. You can configure the WANJet appliance IP address, subnet mask, gateway, and so on using the config command.

All of the commands available at the command line are also available through the Web UI, after you have completed the initial configuration. Refer to Using commands , for a list of all available commands including where to find them in the Web UI.

If you are having problems with the WANJet appliance (such as getting to the Web UI), you can reboot the appliance. From the command line on the console, you can attempt to boot from the alternate image (rather than the default), bringing up the Web UI and reviewing the WANJet appliance status.

In addition, if you do not have physical access to the WANJet appliance, you can use an SSH program to connect to the command line interface. You can perform initial configuration, as described in Configuring the WANJet appliance from the command line . You can also use SSH for troubleshooting the WANJet appliance. For example, if your corporate firewall is blocking port 10000, you can log on to the command line using the console to troubleshoot that fact. (Port 10000 is the port that the Web UI uses to connect to the WANJet appliance.)

Attaching a computer to the WANJet appliance

You need to attach a computer to the WANJet appliance to access the command line through a serial console. You use a terminal emulator program, such as HyperTerminal, to connect to the WANJet appliance's command line interface.

Different WANJet platforms require different console cables to connect the computer. Refer to Replacing the console cable , for more information on the cable provided for each platform.

To connect a computer to a WANJet appliance

  1. On a computer or laptop, plug the console cable into the serial port on the computer and tighten the cable screws.
  2. Plug the other end of the cable into the port labeled Console on the WANJet appliance. The console port is an RJ-45 port on the front of the WANJet 400 and 500, and a serial port on the back of the WANJet 200.

Getting to the command line

You can access the command line in the following ways:

  • Using a terminal emulator on a serial console (local only)
  • Using an SSH program (local or remote)

You can use a terminal emulator program to access the command line if working locally using a serial console connected to the WANJet appliance. If you are using a computer running Microsoft® Windows®, you can use HyperTerminal™ or other terminal emulator program. You can also use any SSH program, such as PuTTY, AlphaCom, or SecureCRT® to get to the command line if working locally or remotely.

The following procedure uses HyperTerminal; other terminal emulators require similar setup steps. The procedure To use PuTTY to get to the command line , describes how to use an SSH client to get to the command line.

To use HyperTerminal to get to the command line

  1. On the connected computer, from the Start menu, choose All Programs, then Accessories, then Communications, and then click HyperTerminal.
    The Connection Description popup screen opens.
  2. In the Name box, type a name for the connection, then click OK.
    The Connect To popup screen opens.
  3. From the Connect using list, select the port where the WANJet appliance is connected to the computer.
    The Properties screen for the port opens.
  4. From the Bits per second list, select 9600.
  5. From the Data bits list, select 8.
  6. From the Parity list, select None.
  7. From the Stop bits list, select 1.
  8. From the Flow control list, select Xon/Xoff.
  9. Click OK.
    The connection session opens.
    If the WANJet appliance login prompt does not appear, press Enter once or twice.
    The login prompt appears in the console window.
  10. At the WANJet login prompt, type the user name you use to log on to the WANJet appliance.
  11. At the Password prompt, type the password.
    The Welcome message is displayed, as shown in Figure 10.1 .
    Figure 10.1 Welcome message using HyperTerminal
    Welcome to F5 WANJet
    The following commands are available:
    help - this help message
    config - set WANJet's network configuration and password
    ping [ip address] - the classic ping tool
    traceroute [ip address] - map the path to an ip address
    diagnose-connectivity - help diagnose connectivity issues
    reboot - reboot this WANJet
    halt - halt this WANJet
    exit - Disconnect from this session
    WANJet Version: x.x.x build xxxxx

To use PuTTY to get to the command line

  1. From any computer on a network that can connect to the WANJet appliance, start PuTTY.
    The PuTTY Configuration popup screen opens.
  2. In the Host Name (or IP address) box, type the IP address of the WANJet appliance.
  3. For the Protocol, select SSH.
  4. Click Open.
  5. When connecting to a WANJet appliance for the first time, a message asking you to check the host key appears. To continue, you must click Yes to indicate that you trust the host.
    A console window opens.
  6. At the login as prompt, type the administrator user name (default is admin).
  7. At the admin@<IP address> password prompt, type the administrator password (default is admin).
    The Welcome message is displayed, as shown in Figure 10.2 .
    Figure 10.2 Welcome message using PuTTY
    Welcome to F5 WANJet
    The following commands are available:
    help - this help message
    config - set WANJet's network configuration and password
    ping [ip address] - the classic ping tool
    traceroute [ip address] - map the path to an ip address
    diagnose-connectivity - help diagnose connectivity issues
    reboot - reboot this WANJet
    halt - halt this WANJet
    exit - Disconnect from this session
    WANJet Version: x.x.x build xxxxx

To log off the command line

When you are done working at the command line, you can log off by typing Exit or Logout.

Using commands

After you have logged on to the command line through your terminal emulator or SSH client, you can use the commands listed in Table 10.1 . All of the commands listed in the table are also available through the Web UI.

Table 10.1 WANJet appliance commands 
Command
Description
config
Configure network settings for the WANJet appliance including setting the IP address, NetMask, Gateway, Media Type for eth0 (LAN) and eth1 (WAN), the Management IP address, Management Netmask, Management Gateway, and the IP address of the only computer that can access the WANJet appliance.
In the Web UI, you can configure network settings through the Configuration section of the navigation pane.
diagnose-connectivity
Investigate connectivity issues and provide information including Ethernet configuration, LAN and WAN duplex and speed settings, WANJet IP configuration, software version, state, and remote WANJet appliances.
In the Web UI, you can display the command output in the Diagnostic reports; on the Connectivity menu, choose All.
exit
Log off the WANJet appliance.
In the Web UI, click Logout admin to log off the WANJet appliance.
halt
Shut down the WANJet appliance.
In the Web UI, you can shut down the WANJet appliance in the System section of the navigation pane. On the Shutdown & Restart screen, click Shutdown WANJet.
help
List available commands and a brief description of each.
In the Web UI, you can get help by clicking User Manual.
logout
Log off the WANJet appliance.
In the Web UI, click Logout admin to log off the WANJet appliance.
ping <IP address>
Test whether an IP address is reachable across an IP network.
In the Web UI, you can display the command output in the Diagnostic reports; on the General menu, choose Administration Tools.
reboot
Restart the WANJet appliance.
In the Web UI, you can restart the WANJet appliance in the System section of the navigation pane. On the Shutdown & Restart screen, click Restart WANJet.
traceroute <IP address>
Determine the route that packets take across an IP network to the specified IP address.
In the Web UI, you can display the command output in the Diagnostic reports; on the General menu, choose Administration Tools.

 

The following procedures describe how to use the commands after having logged on to the WANJet appliance in the terminal emulator.

Configuring the WANJet appliance from the command line

You can perform initial configuration of the WANJet appliance from the command line. On platforms that include a liquid crystal display, or LCD, you can configure the addresses there instead. The Quick Start Card included in the shipping box with your WANJet appliance describes the initial hardware installation and setup instructions using the LCD.

To configure the WANJet appliance from the command line

  1. In the terminal emulator, type config.
    You are prompted for new configuration values. Press Enter to keep the current value.
  2. At the Set WANJet IP prompt, type the IP address of the WANJet appliance (default is 192.168.168.100) and press Enter. This is the IP address you will use to log on to the Web UI (unless you want to use out-of-band management as described in step 6).
  3. At the Set WANJet NetMask prompt, type the netmask you want to assign to the WANJet appliance (default is 255.255.255.0) and press Enter.
  4. At the Set WANJet Gateway prompt, type the IP address of the gateway (default is 192.168.168.001) and press Enter.
    The media types are displayed.
  5. Type 0 for Auto Sense Type 100F for 100BaseTX Full-Duplex Type 100H for 100BaseTX Half-Duplex Type 10F for 10BaseT Full-Duplex Type 10H for 10BaseT Half-Duplex
  6. To set the media type, type the appropriate alphanumeric code that represents the required speed and duplex setting for the eth0 (LAN) and eth1 (WAN) media types, then press Enter. You can use the default value of Auto Sense (called Auto Negotiate in the Web UI) unless you are familiar with the settings required in your network environment and want to change them.
  7. If you want to manage the WANJet platform from a separate management subnet, you can optionally set the IP addresses for the WANJet Management IP, WANJet Management NetMask, and WANJet Management Gateway. (These options are blank, by default.) If you set the Management IP address, this is the address you use to log on to the Web UI (instead of the WANJet IP).
  8. Determine how you want to allow access to the Web UI.
    • To allow access from one IP address, at Set the IP of the first machine allowed to access WANJet UI, type the IP address of the only computer that you want to access the Web UI.
    • To allow access from multiple IP addresses, leave this blank (the default). In the navigation pane, expand Security and click IP Access Control. See Granting Web UI access , located in Chapter 5.
    • To allow access from any browser on any computer in your network (using the correct user name and password), leave this field blank (the default).
    • When you complete this step, the command line prompt returns and the new configuration information is applied to the WANJet appliance immediately. Values that you changed on the command line are also changed in the Web UI.

Running diagnostic tools from the command line

You can use the ping command to test whether a destination address is reachable across an IP network. For example, if you are having trouble connecting to a second WANJet appliance, you could ping the gateway IP address or the IP address of the other WANJet appliance.

To see the complete syntax of the ping or traceroute commands, type the command with no arguments.

To use ping from the command line

In the terminal emulator, type ping <destination>, where <destination> is the IP address or host name of the computer you are trying to reach. Ping output shows an overview of the command, followed by a list of responses received. It continues to show responses until you stop the command by typing Ctrl + C.

At the end of the command output, you can see ping statistics including the number of packets transmitted and received between the WANJet appliance on which you are working and the destination computer, the percentage of packet loss, the total time it took, and the round trip time between the two computers.

For example, the following command checks to see whether or not the computer at the IP address 192.168.72.254 is responsive. The -c 5 option specifies the count and stops sending requests after five replies are received (or when the deadline is reached). The -w 10 option indicates a deadline of 10 seconds.

ping -c 5 -w 10 192.168.72.254

Type ping with no arguments to see the complete syntax of the command. Refer to documentation on the Linux ping command for details on using all of the options. See Administration Tools , located in Chapter 8, for how to run the command in the Web UI.

To use traceroute from the command line

In the terminal emulator, type traceroute <host>, where <host> is the IP address or host name at the end of the route you are tracing. Traceroute output prints the route that packets take to the host, specifying the IP addresses of all of the computers (hops) in between the WANJet appliance and the host computer.

For example, the following command traces the route from the WANJet appliance you are working on to the computer at IP address 10.1.102.204. In the output, you see a summary of the command, then notice that it takes three hops to get to the IP address, as shown in Figure 10.3 .

Figure 10.3 Traceroute command example
traceroute -v 10.1.102.204
traceroute -v 10.1.102.204
traceroute to 10.1.102.204 (10.1.102.204), 30 hops max, 38 byte packets
1 10.1.105.1 (10.1.105.1) 36 bytes to 10.1.105.204 67.116 ms
60.849 ms 60.594 ms
2 10.1.101.251 (10.1.101.251) 36 bytes to 10.1.105.204 60.332 ms
60.360 ms 60.024 ms
3 10.1.102.204 (10.1.102.204) 36 bytes to 10.1.105.204 60.924 ms
60.721 ms 60.035 ms
[Finished (returned 0)]

 

Type traceroute with no arguments to see the complete syntax of the command. Refer to documentation on the Linux traceroute command for details on using all of the options. See Administration Tools , located in Chapter 8, for how to run the command in the Web UI.

To use diagnose-connectivity from the command line

In the terminal emulator, type diagnose-connectivity to investigate connectivity issues and display the following information:

  • Ethernet configuration including details on all four interfaces
  • LAN and WAN duplex and speed settings
  • WANJet appliance IP configuration
  • WANJet appliance software version and build number
  • WANJet appliance state (Active or Inactive)
  • Remote WANJet appliances

Refer to All connectivity diagnostics , located in Chapter 8, for information on running a report from the Web UI that includes this information.

Shutting down or restarting the WANJet appliance from the command line

You can shut down the WANJet appliance or restart it from the command line. Refer to Shutting down and restarting the WANJet appliance , located in Chapter 5, for details on performing these tasks from the Web UI.

To shut down the WANJet appliance from the command line

Type halt.
The WANJet appliance initiates its shutdown sequence. On some platforms, the appliance powers off when the sequence completes. On others, you may need to press the power switch to turn the power off after shutting it down.

To restart the WANJet appliance from the command line

Type reboot.
The WANJet appliance stops, then restarts automatically. You need to log on again to access the command line.

Replacing the console cable

The WANJet appliance includes a console cable for attaching a console to the appliance. If this cable is lost, or becomes damaged, you may need to create a new cable. This section describes the included cable, which you can use as a model to create or purchase a new cable.

The WANJet 200 uses a DB-9 null-modem female-to-female serial cable. This type of cable can be readily purchased, if needed.

Figure 10.4 illustrates the DB9 to RJ45 cable connector provided on the WANJet 400 and 500 platforms.

 

 

Figure 10.4 DB9 to RJ45 cable diagram (WANJet 400 and 500)

The numbers indicated in Figure 10.4 correspond to the mappings specified in Table 10.2 .

Table 10.2 Pinouts for DB9 to RJ45 cable (WANJet 400 and 500)
DB9 pin
Name
RJ45 pin
1
Carrier Detect (CD)
NC
2
Receive Data (RXD)
3
3
Transmit Data (TXD)
6
4
Data Terminal Ready (DTR)
7
5
GND
5
6
Data Set Ready (DSR)
4
7
Request to Send (RTS)
8
8
Clear to Send (CTS)
2
9
Ring Indicator (RI)
NC

 




Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Was this resource helpful in solving your issue?




NOTE: Please do not provide personal information.



Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)