まず、ルータ内部にはテキストファイルがあると思ってください。ここに、いろいろなコマンドをバッチファイルのように羅列していきます。設定を追加する場合は行を挿入しますし、設定を無効にするにはその行を削除します。ルータのOSは、起動時(および設定の反映を行うコマンドを投入した時)にそれらのコマンドを1行ずつ解釈し、自分自身の設定を行います。
この製品にはいろいろなモデルがありますが、(たぶん)すべて同じOSを使用していますので、設定方法も同じです。
Ciscoルータは、telnetでリモートログインして、コマンドライン・ベースで設定するのが基本です。購入時の初期設定については、ここでは言及していません。
ここでは、以下の状況を想定しています。
PCからリモート・ログインを行います。
c:\>telnet ncr64edo[Enter]
User Access Verification
Password: ログイン・パスワード[Enter](表示されない)
ncr64edo>enable[Enter]
Password: 特権パスワード[Enter](表示されない)
ncr64edo#
入力待ち(プロンプト)の状態になりました。この状態のことを、正式には「EXECインタープリタの特権モード・コマンドレベル」というのかもしれませんが、ここでは単にプロンプトと呼ぶことにします。
実は、プロンプトにはいろいろな種類があって、プロンプトによりあるコマンドが使えたり使えなかったりします。現在の状態で使えるコマンドを表示するには、単に'?'をタイプします。
ncr64edo#?
Exec commands:
<1-99> Session number to resume
clear Reset functions
clock Manage the system clock
configure Enter configuration mode
connect Open a terminal connection
copy Copy a config file to or from a tftp server
debug Debugging functions (see also 'undebug')
disable Turn off privileged commands
disconnect Disconnect an existing network connection
enable Turn on privileged commands
erase Erase flash or configuration memory
exit Exit from the EXEC
help Description of the interactive help system
lock Lock the terminal
login Log in as a particular user
logout Exit from the EXEC
name-connection Name an existing network connection
no Disable debugging functions
ping Send echo messages
ppp Start IETF Point-to-Point Protocol (PPP)
reload Halt and perform a cold restart
--More--
「--More--」の状態では、以下のことができます。
| キー | 動作 |
|---|---|
| スペースキー | 次の1画面を表示 |
| [Enter] | 次の1行を表示 |
| q | プロンプトに戻る |
たとえば、'show'(表示)というコマンドがありますが、
ncr64edo#show[Enter]
% Type "show ?" for a list of subcommands
ncr64edo#
と、引数(サブコマンド)がないと怒られます。こういった場合は、「show ?」のように、引数をタイプするべきところで'?'を入力すると、そのコマンドで入力可能な引数が表示されます。
ncr64edo#show ?
access-expression List access expression
access-lists List access lists
aliases Display alias commands
arp ARP table
async Information on terminal lines used as router interfaces
bridge Bridge Forwarding/Filtering Database [verbose]
(中略)
--More--
ヘルプ('?')コマンドは、その時点(カーソル位置)で
入力可能なコマンドをすべて表示してくれます。
現在の設定内容を表示するには、「show configuration」を使用します。
ncr64edo#show configuration[Enter]
Using 574 out of 7506 bytes
!
version 10.3
no service pad
service udp-small-servers
service tcp-small-servers
!
(中略)
--More--
コマンド名は、省略することができます。
ncr64edo#s[Enter]
% Type "show ?" for a list of subcommands
's'一文字でも'show'という意味になるようですね。
ncr64edo#s c[Enter]
% Ambiguous command: "show c"
ncr64edo#s co[Enter]
% Ambiguous command: "show co"
ncr64edo#s con[Enter]
% Ambiguous command: "show con"
ncr64edo#s conf[Enter]
Using 574 out of 7506 bytes
!
version 10.3
no service pad
service udp-small-servers
service tcp-small-servers
!
(中略)
--More--
これでお分かりのように、
一意に単語が識別できる必要最小限の長さまでを
タイプすれば、そのコマンドを解釈してくれます。