Table Of Contents
Using the Cisco Web Browser
Cisco Web Browser Task List
Using the Cisco Web Browser Interface to Issue Commands
Cisco Web Browser Interface Task List
Configuring the Cisco Web Browser Interface
Enabling the Cisco Web Browser Interface
Changing the Cisco Web Browser Interface Port Number
Controlling Access to the Cisco Web Browser Interface
Specifying the Method for User Authentication
Using the Correct Hardware and Software
Accessing Your Router's Home Page
Issuing Commands Using the Cisco Web Browser Interface
Entering Commands Using Hypertext Links
Entering Commands Using the Command Field
Entering Commands Using the URL Window
Customizing the User Interface on a Web Browser
User Interface Customization Task List
Understanding SSIs
Customizing HTML Pages Using SSIs
Copying HTML Pages to Flash Memory
Enabling the Cisco Web Browser Interface
Viewing HTML Files Containing SSIs
Displaying 8-bit and Multibyte Character Sets
Cisco Web Browser Configuration Examples
Using the SSI EXEC Command Example
Using the SSI ECHO Command Example
Using the Cisco Web Browser
The Cisco IOS software includes a Web browser from which you can issue Cisco IOS commands. This Cisco IOS feature is accessed from the router's home page and can be customized for your business environment. For example, you can view pages in different languages and save them in Flash memory for easy retrieval.
For a complete description of the Cisco Web browser configuration commands in this chapter, refer to the "Cisco Web Browser Commands" chapter of the Release 12.1 Cisco IOS Configuration Fundamentals Command Reference. To locate documentation of other commands that appear in this chapter, use the command reference master index or search online.
Cisco Web Browser Task List
Use of the Cisco Web browser is optional. To use and customize the Cisco Web browser, complete the tasks in the following sections:
•
Using the Cisco Web Browser Interface to Issue Commands
•
Customizing the User Interface on a Web Browser
Using the Cisco Web Browser Interface to Issue Commands
You can issue most of the Cisco IOS commands using a Web browser. This Cisco IOS feature is accessed by using the Cisco Web browser interface, which is accessed from the router's home page. (All Cisco routers and access servers loaded with the latest version of Cisco IOS software have a home page, which is password protected.)
From the router's home page, you click on a hypertext link titled "Monitor the Router." This link takes you to a Web page that has a "Command" field. You can type commands in this field as if you were entering commands at a terminal connected to the router. The page also displays a list of commands. You can execute these commands by clicking on them, as if you were clicking on hypertext links.
Cisco Web Browser Interface Task List
To use the Cisco Web browser interface to issue commands, use the commands in the following sections:
•
Configuring the Cisco Web Browser Interface
•
Using the Correct Hardware and Software
•
Accessing Your Router's Home Page
•
Issuing Commands Using the Cisco Web Browser Interface
–
Entering Commands Using Hypertext Links
–
Entering Commands Using the Command Field
–
Entering Commands Using the URL Window
Configuring the Cisco Web Browser Interface
The Web browser interface is automatically enabled when you use ClickStart to configure a Cisco 1003, Cisco 1004, or Cisco 1005 router. You must enable the Cisco Web browser interface on all other Cisco IOS routers. Once enabled, you will be able to issue Cisco IOS commands to your router using a Web browser.
If you have any other Cisco router, you must enable the Web browser interface by altering the routers' configuration. To do this, perform the tasks in the following list. The first task is required; the remaining are optional.
•
Enabling the Cisco Web Browser Interface
•
Changing the Cisco Web Browser Interface Port Number
•
Controlling Access to the Cisco Web Browser Interface
•
Specifying the Method for User Authentication
Enabling the Cisco Web Browser Interface
To enable a Cisco router to be configured from a browser using the Cisco Web browser interface, use the following command in global configuration mode:
Command
|
Purpose
|
ip http server
|
Enable a router to be reconfigured using the Cisco Web browser interface.
|
Now that the Cisco Web browser interface is enabled, you can perform any of the optional tasks or proceed to configure a router using the Cisco Web browser interface.
Changing the Cisco Web Browser Interface Port Number
By default, the Cisco Web browser interface uses port 80 on the router. To assign the Cisco Web browser interface to a different port, use the following command in global configuration mode:
Command
|
Purpose
|
ip http port number
|
Assign a port number to be used by the Cisco Web browser interface.
|
Controlling Access to the Cisco Web Browser Interface
To control which hosts can access the HTTP server used by the Cisco Web browser interface, use the following command in global configuration mode:
Command
|
Purpose
|
ip http access-class {access-list-number | name}
|
Control access to the HTTP server used by the Cisco Web browser interface.
|
Specifying the Method for User Authentication
To specify how HTTP server users are authenticated, use the following command in global configuration mode:
Command
|
Purpose
|
ip http authentication {aaa | enable | local | tacacs}
|
Specify how HTTP server users are authenticated.
|
Using the Correct Hardware and Software
To use the Cisco Web browser interface, your computer must have a World Wide Web browser. The Cisco Web browser interface works with most browsers, including Netscape Navigator. Your Web browser must be able read and submit forms. The original versions of Mosaic might have problems using the Cisco Web browser interface, because they either cannot submit forms or have difficulty doing so.
The computer must be connected to the same network that the router or access server is on.
Accessing Your Router's Home Page
Cisco IOS software allows users with a default privilege level of 15 to access a predefined home page for a router or access server. If you have been assigned a privilege level other than 15, the Web page will display and accept those commands which have been defined for your user level.
To access the home page for your router or access server with a default privilege level of 15, perform the following steps:
Step 1
Enter the following command in the URL field of your Web browser and press return: http://router-name/. (For example, to access a Cisco router named cacophony with a default privilege level of 15, type http://cacophony/.)The browser then prompts you for the password.
Step 2
Enter the password.
Note
The name and password for your router and access server are designated in their configuration. Contact your network administrator if you do not have this information.
The browser should display the home page for your router or access server.
The router's home page looks something like the Cisco 7200 home page shown in Figure 6.
Figure 6 Example of a Home Page for a Cisco 7200
To access a router Web page for a preassigned privilege level other than the default of 15, perform the following steps:
Step 1
Enter the following command in the URL field of your Web browser and press Return: http://router-name/level/level/mode/command. (For example, to request a user privilege level of 12 on a Cisco router named cacophony, type http://cacophony/level/12/exec).The browser then prompts you for the username or password.
Step 2
Depending on your authentication method, enter your username or password and press Return. The Web browser should display a Web page specific to your user privilege level, mode, and the command you have requested.
Table 8 lists the URL arguments you must use when requesting a Web page.
Table 8 Web Browser URL Argument Descriptions
Argument
|
Description
|
router-name
|
Name of the router being configured.
|
level
|
The privilege level you are requesting.
|
mode
|
The mode the command will be executed in, such as exec, configure, and interface.
|
command
|
(Optional) The command you want to execute. If you specify a command, your browser will display a Web page showing the results of the requested command. If you do not specify a command in the URL, your browser will display a Web page listing all of the commands available for your privilege level.
|
Issuing Commands Using the Cisco Web Browser Interface
To issue commands using the Cisco Web browser interface, click Monitor the router in the first list of hypertext links on the home page. This displays the Web page shown in Figure 7.
Figure 7 The "Command" Field Web Page for a Router Named "example"
Entering Commands Using Hypertext Links
To enter a command using hypertext links, scroll through the commands listed at the bottom of the screen and click the one you want to execute. If the link is a complete command, it is executed. If the command has more parameters, another list of command hypertext links is displayed. Scroll through this second list and click the one you want to execute.
If the command is a request for information, like a show command, the information is displayed in the Web browser window.
If the command requires a variable, a form in which you can enter the variable is displayed.
Entering Commands Using the Command Field
Entering the command in the command field is just like entering it at a terminal console. Enter the command using the syntax documented in the Cisco IOS command reference. If you are uncertain of the options available for a particular command, type a question mark (?).
For example, entering show ? in the command field displays the parameters for the show command. The Cisco Web browser interface displays the parameters as hypertext links. To select a parameter, you can either click on one of the links, or you can enter the parameter in the command field.
Entering Commands Using the URL Window
You can issue a command using the URL window for the Web browser.
For example, to execute a show configuration command on a router named example, you would enter the following in the URL window:
http://example/exec/show/configuration
The Web browser then displays the configuration for the "example" router. To save effort, modify the URL in the URL window in the browser control bar instead of retyping the entire URL.
The difference between entering a command in the command field and entering a command in the URL window is that in the URL window, command modes, keywords, and options should be separated by slashes, not spaces.
Customizing the User Interface on a Web Browser
You can customize HTML pages to display Cisco IOS command output and Cisco IOS platform-specific variables (for example, a router host name or router address typically used in router setup pages) for a Web browser. You can display this information using HTML formatted Server Side Includes (SSIs) that you insert into your custom HTML pages. SSIs are a Cisco IOS software feature described in the "Understanding SSIs" section which follows.
User Interface Customization Task List
To customize your HTML pages and view them from the user interface, perform the any of the tasks in the following sections:
•
Understanding SSIs
•
Customizing HTML Pages Using SSIs
•
Copying HTML Pages to Flash Memory
•
Enabling the Cisco Web Browser Interface
•
Viewing HTML Files Containing SSIs
•
Displaying 8-bit and Multibyte Character Sets
You can find configuration and display examples using SSIs in the "Cisco Web Browser Configuration Examples" section at the end of this chapter.
Understanding SSIs
SSIs are HTML formatted commands or variables that you insert into HTML pages when you customize Cisco IOS platform configuration pages for a Web browser. These SSI commands and SSI variables display Cisco IOS command output and Cisco IOS platform-specific variables.
The Cisco IOS software supports two HTML SSI commands defined for customizing HTML pages: the SSI EXEC command and the SSI ECHO command. The HTML format of the SSI EXEC command is <!--#exec cmd="xxx"-->, and the HTML format of the SSI ECHO command is <!--#echo var="yyy"-->. (See the section "Customize HTML Pages Using SSIs" later in this chapter for a description of how to use these commands).
In addition to the two SSI commands, the Cisco IOS software supports several SSI variables defined for customizing HTML pages. SSI variables are used with the SSI ECHO command. There is one SSI variable defined for all Cisco IOS platforms (SERVER_NAME) and other SSI variables specifically defined for ISDN, Frame Relay, and asynchronous serial platforms. The format and a description of all the available SSI variables are provided in Table 9. (See the section "Customize HTML Pages Using SSIs" later in this chapter for a description of how to use these SSI variables with the SSI ECHO command).
The SSI EXEC command is supported on all platforms. The SSI ECHO command, used with SSI variables, is supported on all platforms listed in Table 9.
Table 9 Description of SSI Variables
HTML Format of SSI Variable
|
Description of Variable Displayed on Browser Page
|
Cisco IOS Platform(s) This SSI Is Supported On
|
SERVER_NAME
|
Host name of the HTTP server.
|
All Cisco IOS platforms
|
EZSETUP_PASSWORD
|
Enable password (currently left blank).
|
Cisco 1000 series
|
EZSETUP_PASSWORD_VERIFY
|
Repeat of the enable password to verify accuracy (currently left blank).
|
Cisco 1000 series
|
EZSETUP_ETHERNET0_ADDRESS
|
IP address of the Ethernet 0 interface.
|
Cisco 1000 series
|
EZSETUP_ETHERNET0_MASK
|
IP mask of the Ethernet 0 interface.
|
Cisco 1000 series
|
EZSETUP_DNS_ADDRESS
|
DNS address used by the router.
|
Cisco 1000 series
|
EZSETUP_STANDARD_DEBUG_Y
|
Standard debug variable. Returns CHECKED if set to TRUE; otherwise, it is blank.
|
Cisco 1000 series
|
EZSETUP_STANDARD_DEBUG_N
|
Standard debug variable. Returns CHECKED if set to FALSE; otherwise, it is blank.
|
Cisco 1000 series
|
EZSETUP_ISDN_SWITCHTYPE
|
ISDN Switch type.
|
Cisco 1003 and Cisco 1004
|
EZSETUP_ISDN_REMOTE_NAME
|
Name of remote ISDN system.
|
Cisco 1003 and Cisco 1004
|
EZSETUP_ISDN_REMOTE_NUMBER
|
Phone number of remote ISDN system.
|
Cisco 1003 and Cisco 1004
|
EZSETUP_ISDN_CHAP_PASSWORD
|
CHAP password of remote ISDN system.
|
Cisco 1003 and Cisco 1004
|
EZSETUP_ISDN_SPID1
|
ISDN SPID 1.
|
Cisco 1003 and Cisco 1004
|
EZSETUP_ISDN_SPID2
|
ISDN SPID 2.
|
Cisco 1003 and Cisco 1004
|
EZSETUP_ISDN_SPEED_56
|
Speed of ISDN interface. Returns CHECKED if set to 56k; otherwise, it is blank.
|
Cisco 1003 and Cisco 1004
|
EZSETUP_ISDN_SPEED_64
|
Speed of ISDN interface. Returns CHECKED if set to 64k; otherwise, it is blank.
|
Cisco 1003 and Cisco 1004
|
EZSETUP_FR_ADDRESS
|
Frame-Relay IP address.
|
Cisco 1005
|
EZSETUP_FR_MASK
|
Frame-Relay IP mask.
|
Cisco 1005
|
EZSETUP_FR_DLCI
|
Frame-Relay DLCI.
|
Cisco 1005
|
EZSETUP_ASYNC_REMOTE_NAME
|
Name of remote system.
|
Cisco 1005
|
EZSETUP_ASYNC_REMOTE_NUMBER
|
Phone number of remote system.
|
Cisco 1005
|
EZSETUP_ASYNC_CHAP_PASSWORD
|
CHAP password for remote system.
|
Cisco 1005
|
EZSETUP_ASYNC_LINE_PASSWORD
|
Async line password.
|
Cisco 1005
|
EZSETUP_ASYNC_MODEM_SPEED
|
Speed of async modem (either 14.4k or 28.8k).
|
Cisco 1005
|
EZSETUP_ASYNC_MODEM_SPEED_144K
|
Returns CHECKED if async modem speed is 14.4k; otherwise it is blank.
|
Cisco 1005
|
EZSETUP_ASYNC_MODEM_SPEED_288K
|
Returns CHECKED if async modem speed is 28.8k; otherwise it is blank.
|
Cisco 1005
|
Once you have designed a set of HTML pages that include SSIs, you can copy these pages to a Cisco IOS platform's Flash memory. (See the section "Copy HTML Pages to Flash Memory" for instructions on storing HTML pages in Flash memory later in this section.) When you retrieve these pages from Flash memory and display them using a Web browser, any SSI command that was designed into these pages will either display Cisco IOS command output or display a current variable or identifier defined in Table 9. For example, the SSI ECHO command with the variable SERVER_NAME will display the current host name of the HTTP server you are using, and the SSI ECHO command with the variable EZSETUP_ISDN_SWITCHTYPE will display the current ISDN switch type you are using.
Using SSIs, you can customize one set of international HTML pages (for example, in Japanese) and copy these pages to Flash memory on multiple Cisco IOS platforms. When you retrieve these pages from the Flash memory of a Cisco IOS platform, current variables and identifiers associated with the platform you are currently using are displayed. SSIs save you from having to duplicate these international pages (considered relatively large images that contain 8-bit or multibyte characters) and store them in the source code for each platform you are using. (Refer to Table 9 to determine which Cisco IOS platforms support which SSIs variables.)
Customizing HTML Pages Using SSIs
When you are customizing an HTML page for a Web browser, type <!--#exec cmd="xxx"--> in your HTML file where you want Cisco IOS command output to appear on the browser page. Replace xxx with a Cisco IOS command that can be executed in the router's EXEC mode. (See the "SSI EXEC Command Example" section later in this chapter.)
When you are customizing an HTML page for a Web browser, type <!--#echo var="yyy"--> in your HTML file where you want a value or identifier associated with a particular Cisco IOS platform (for example, an ISDN or Frame Relay platform) to appear on the browser page. Replace yyy with an SSI variable described in Table 9. (See the "SSI ECHO Command Example" section later in this chapter.)
Copying HTML Pages to Flash Memory
Once you have customized HTML pages using SSIs, copy your HTML pages to a Cisco IOS platform's Flash memory. To do this, save your pages using a filename appended with ".shtml" (for example, filename.shtml) and copy your file to Flash memory using a copy command (for example, the copy tftp flash command). (Refer to the Cisco IOS command references for a copy command compatible with your Cisco IOS platform.)
Enabling the Cisco Web Browser Interface
To view the HTML pages you have just customized, you must first enable the Cisco Web browser interface. To enable the Cisco Web browser interface, use the following command in global configuration mode:
Command
|
Purpose
|
ip http server
|
Enable the Cisco Web browser interface.
|
Refer to the "Configuring the Cisco Web Browser Interface" section earlier in this chapter for further information on configuring the Cisco Web browser interface.
Viewing HTML Files Containing SSIs
Once the Cisco Web browser interface is enabled, you can retrieve your HTML page from Flash memory and view it on the Cisco Web browser by typing the URL http://router/flash/filename in the URL window. Replace router with the host name or IP address of the current Cisco IOS platform you are using, and replace filename with the name of the file you created with ".shtml" appended. For example, http://myrouter/flash/ssi_file.shtml.
Displaying 8-bit and Multibyte Character Sets
Your Cisco IOS platform will automatically display 8-bit and multibyte character sets and print the ESC character as a single character instead of as the caret and bracket symbols (^[) when the Cisco Web browser interface is enabled with the ip http server command.
If you are using Telnet to access a Cisco IOS platform, use the following command in line configuration mode to display 8-bit and multibyte international character sets and print the ESC character as a single character instead of "^[":
Command
|
Purpose
|
international
|
Configure a router to display 8-bit and multibyte international character sets and print the ESC character as a single character instead of "^[" when Telneting to a Cisco IOS platform.
|
If you are using Telnet to access a Cisco IOS platform, use the following command in EXEC mode to display 8-bit and multibyte international characters sets and print the ESC character as a single character instead of "^[" for the current Telnet session:
Command
|
Purpose
|
terminal international
|
Configure a router to display 8-bit and multibyte international character sets and print the ESC character as a single character instead of "^[" when Telneting to a Cisco IOS platform for the current session.
|
Cisco Web Browser Configuration Examples
This section provides the following examples:
•
Using the SSI EXEC Command Example
•
Using the SSI ECHO Command Example
Using the SSI EXEC Command Example
The following example shows how HTML SSI EXEC can be used to execute a command. In this example, the Cisco IOS show users EXEC command is executed:
Contents of the HTML file in Flash memory:
<TITLE> SSI EXEC Command Example</TITLE>
This is an example of the SSI EXEC command
<!--#exec cmd="show users"-->
Contents that the Web browser receives when the HTML file is retrieved from Flash memory:
<TITLE> SSI EXEC Command Example</TITLE>
This is an example of the SSI EXEC command
Line User Host(s) Idle Location
2 vty 0 idle 0 router.cisco.com
The Web Browser shows the following text:
This is an example of the SSI EXEC command
------------------------------------------
Line User Host(s) Idle Location
2 vty 0 idle 0 router.cisco.com
Using the SSI ECHO Command Example
The following is an example of the HTML SSI ECHO command used with the SSI variable SERVER_NAME (see Table 5) to display the Cisco IOS platform host name rain:
Contents of the HTML file in Flash memory:
<TITLE>SSI Echo Command Example</TITLE>
This is an example of the SSI echo command
The name of this server is:<BR>
<!--#echo var="SERVER_NAME"-->
Contents that the Web browser receives when the HTML file is retrieved from Flash memory:
<TITLE>SSI Echo Command Example</TITLE>
This is an example of the SSI echo command
The name of this server is:<BR>
A Web Browser shows the following text:
This is an example of the SSI echo command
------------------------------------------
The name of this server is: