IIJ製ルータ「SEIL(ザイル)」の使い方簡易まとめ


IIJ製ルータ「SEIL(ザイル)」の使い方簡易まとめ

  • 本ページは、簡易的な使用方法を記載したものです。本格的な内容を求める場合には、以下のリンクから各種マニュアルを参照してください。
  • 「SEIL/X1」を対象とした使い方を記載しているため、他の型番とは内容が異なる場合があります。
  • CUIでの操作を想定しているため、GUI操作は省略します。


目次

コンソール接続での注意事項
装置の初期化(工場出荷時に設定を戻す)
時刻設定
ユーザアカウント及びパスワード
リモートアクセスの設定
よく使う管理コマンド
よく使うshowコマンド
通信確認コマンド
投入コンフィグの例


コンソール接続での注意事項

コンソールケーブルのピンアサイン

SEILのコンソールポートはRJ45ですが、ピンアサインが特殊なため、通常のCiscoケーブル等では接続できません。
会社から借りれればいいのですが、無いとなると、自作するか購入するか・・・9,155円は出せないので、必要になったら自作します。

参考URL
自作:コンソールケーブルのピンアサイン
購入:IIJ メンテナンスケーブル

装置の初期化(工場出荷時に設定を戻す)

IDとPassを知っている場合

管理者権限でログインし、コマンドでコンフィグ初期化を実行します。

factory-config
    ; Really initialize configuration in flash ROM?[y/N]
    y
reboot
    ; Really reboot system now?[y/N]
    y
    ;rebooting...

IDとPassを忘れた場合

物理リセットボタンによる初期化を実行します。

1.爪楊枝などの細いピン用意する
2.SEIL電源をOFFにした状態から始める
3.本体前面にある"RESET"と書かれた穴を確認する
4.穴の中のプッシュスイッチを押したまま電源をONにする
5.電源を投入後、スイッチを5秒間程度押したままにした後に離す
6.ステータスLEDが初期化操作が行われたことを示す点灯になる
7.初期化された状態で起動してきます

参考URL
初期化・工場出荷時コンフィグ

初期化後のコンフィグ


クリックで展開
DefaultConfig_ver5.63
hostname ""
timezone "Japan"
environment login-timer 300
environment pager off
option ip monitor-linkstate on
option ip update-connected-route on
option ipv6 monitor-linkstate on
option ipv6 update-connected-route on
ppp add pppoe-sample keepalive 30 ipcp enable ipcp-address on ipcp-dns on ipv6cp enable authentication-method chap identifier "" tcp-mss auto
interface lan0 media auto
interface lan0 add 192.168.0.1/24
interface lan1 media auto
interface lan1 queue normal
interface lan2 media auto
interface pppoe0 over lan1
bridge disable
bridge ip-bridging on
bridge ipv6-bridging on
route add default pppoe0
route dynamic rip disable
route dynamic ospf disable
route dynamic bgp disable
route dynamic redistribute static-to-rip disable
route dynamic redistribute static-to-ospf disable
route dynamic redistribute ospf-to-rip disable
route dynamic redistribute rip-to-ospf disable
route dynamic redistribute connected-to-rip enable
route dynamic redistribute connected-to-ospf enable
route dynamic pim-sparse disable
route6 dynamic ripng disable
route6 dynamic redistribute static-to-ripng disable
route6 dynamic redistribute connected-to-ripng enable
route6 dynamic pim-sparse disable
filter add seil_ctl_lan0 interface lan0 direction in action pass protocol tcp srcport 0-65535 dst self dstport 0-65535 state disable logging off enable
filter add telnetd_block interface any direction in action block protocol tcp srcport 0-65535 dst self dstport 23 state disable logging on enable
filter add httpd_block interface any direction in action block protocol tcp srcport 0-65535 dst self dstport 80 state disable logging on enable
filter6 add seil_ctl_lan0 interface lan0 direction in action pass protocol tcp srcport 0-65535 dst self dstport 0-65535 state disable logging off enable
filter6 add telnetd_block interface any direction in action block protocol tcpudp srcport 0-65535 dst self dstport 23 state disable logging on enable
filter6 add httpd_block interface any direction in action block protocol tcpudp srcport 0-65535 dst self dstport 80 state disable logging on enable
nat timeout 900
nat logging off
nat upnp off
nat upnp interface lan1
nat napt add private 192.168.0.0-192.168.255.255 interface pppoe0
nat proxy sip add port 5060 protocol tcpudp
nat option port-assignment random
proxyarp disable
dhcp enable
dhcp mode server
dhcp interface lan0 enable
dhcp interface lan0 expire 24
dhcp interface lan0 pool 192.168.0.2 253
dhcp interface lan0 dns add 192.168.0.1
dhcp6 client disable
dhcp6 client interface pppoe0
dns forwarder enable
dns forwarder add ipcp
ntp disable
cbq link-bandwidth 100Mbps
snmp disable
snmp community "public"
snmp security-model community-based off
snmp security-model user-based on
snmp trap disable
syslog debug-level off
syslog facility local1
syslog remote off
translator timeout 300
resolver disable
rtadvd disable
httpd enable
sshd hostkey rsa1 none
sshd hostkey rsa auto
sshd hostkey dsa auto
sshd disable
telnetd enable
vendor OEM


初期化後のログイン情報

LoginID : admin
LoginPass : (無し、空Enter)


時刻設定

タイムゾーン

デフォルトで日本時間が設定されています。

timezone "Japan"

現在のシステム時刻を変更する

date YYYYMMDDHHMM.ss
  ; (例)
  ; SEIL-B# date 201809201258.00
  ; Thu Sep 20 12:58:00 JST 2018

現在のシステム時刻を表示する

show date


ユーザアカウント及びパスワード

既存ユーザ

・ admin (管理者)
・ user (利用者)

既存ユーザのPassword変更(管理者権限で実行)

password admin
    New password:*******
    Retype new password:********


ユーザアカウントの追加

ローカル認証レルムを作成してから、その認証レルムへユーザの設定を追加する。
・ローカル認証レルム「QIITA-REALM」を作成
・ユーザ「QIITA-MAN」とPassを設定

authentication realm add QIITA-REALM type local
authentication local QIITA-REALM user add QIITA-MAN password *******

[参考URL]
http://www.seil.jp/doc/index.html#fn/pppac/cmd/authentication_realm.html#add
http://www.seil.jp/doc/index.html#fn/pppac/cmd/authentication_local.html#user_add

※ 認証レルムは、セキュリティードメインなどと呼ばれ、共通のセキュリティーポリシーが定義および適用される範囲


リモートアクセスの設定

PC -> SEIL/X1 へTelnetする

Telnetサーバ機能はデフォルト有効(enable)。
ターミナルソフト等からIPaddress:Port23でTelnet可能。

telnetd enable

PC -> SEIL/X1 へSSH(Secure Shell)する

SSHサーバ機能はデフォルト無効(disable)。
コマンドにて有効化(sshd enable)が必要。
有効後、ターミナルソフト等からIPaddress:Port22でSSH可能。

sshd enable

その他リモート接続

SSHの細かい部分は以下URLを参照
ssh
SSHでリモートログインを安全に


よく使う管理コマンド

特権モードへの移行 ※Cisco「enable」

不要。管理者でログイン後に設定可能。

ページャーのOFF ※Cisco「terminal length 0」

environment pager off
    ; 設定ファイルに残るタイプ

コンフィグ保存 ※Cisco「write memory/copy run start」

save-to flashrom

再起動 ※Cisco「reload」

reboot
    ; Really reboot system now?[y/N]
    y
    ;rebooting...


よく使うshowコマンド

show config

現在動作中の設定内容を表示
※Cisco「show running-config」

show config

起動時に読み込む設定内容を表示
※Cisco「show startup-config」

show config flashrom

特定機能の設定部分のみを表示

show config <option>

optionの参考URL
show config

show status route

ルーティングテーブルを表示
※Cisco「show ip route」

show status route

show status route dynamic ospf

OSPFプロセスが保持している経路情報を参照する。
※Cisco「show ip route ospf」

show status route dynamic ospf

OSPFプロセスで動作中のネイバ情報を参照
※Cisco「show ip ospf neighbor」

show status route dynamic ospf neighbor

OSPFプロセスが保持しているospfデータベース情報を参照
※Cisco「show ip ospf database」

show status route dynamic ospf database

参考URL
show status route

show system

SEILのシステム情報を参照

show system

参考URL
show system

show log

メモリ上に保存されているログメッセージを参照

show log

show tech-support

サポートを受けるときに最低限必要となる情報を参照

show tech-support

show status arp

ARPの状態を参照

show status arp

通信確認コマンド

ping

ICMP Echo(IPv4)を利用し、指定したホストへの通信の到達性を調査する。

ping <IPv4address> count <count>
  ※回数を無指定時はCtrl-Cが入力されるまで送信し続けます。

(例)
ping 127.0.0.1 count 5

その他のオプションはURL先を参照
ping

traceroute

IPv4ネットワーク上で、指定したホストへのネットワーク経路を調査する。

traceroute <IPv4address>
  ※実行を途中で終了する場合はCtrl-Cを入力する。

(例)
traceroute 8.8.8.8

その他のオプションはURL先を参照
traceroute


投入コンフィグの例

OSPFでの簡易的な接続を検証するために作成したconfigです。
なんとなくのコマンド感を確認するために記載sitaだけなので、構成等は除きます。
※実機が手元に無いため精度低いです。

投入config.conf
hostname "SEIL-A"
ppp delete all

interface lan0 delete all
interface lan0 address 10.0.3.2/24
interface lan1 delete all
interface lan1 address 192.168.41.254/24

route dynamic ospf router-id 10.0.3.2
route dynamic ospf enable
route dynamic ospf area add 0.0.0.0
route dynamic ospf link add lan0 area 0.0.0.0
route dynamic ospf link add lan1 area 0.0.0.0

nat napt delete all
nat proxy sip delete all

filter delete all
filter6 delete all

dhcp disable
dhcp interface lan0 disable
dhcp interface lan0 pool none
dhcp interface lan0 dns delete all

dns forwarder disable

httpd disable

sshd enable


投入コンフィグ設定後のshow config ※クリックで展開
SEIL-A_sh-conf.log.

SEIL-A# show config
hostname "SEIL-A"
timezone "Japan"
environment login-timer 300
environment pager off
option ip monitor-linkstate on
option ip update-connected-route on
option ipv6 monitor-linkstate on
option ipv6 update-connected-route on
interface lan0 media auto
interface lan0 add 10.0.3.2/24
interface lan1 media auto
interface lan1 queue normal
interface lan1 add 192.168.41.254/24
interface lan2 media auto
interface lan2 add 192.168.42.254/24
interface pppoe0 over lan1
bridge disable
bridge ip-bridging on
bridge ipv6-bridging on
route add default pppoe0
route dynamic rip disable
route dynamic ospf router-id 10.0.3.2
route dynamic ospf enable
route dynamic ospf area add 0.0.0.0
route dynamic ospf link add lan0 area 0.0.0.0
route dynamic ospf link add lan1 area 0.0.0.0
route dynamic bgp disable
route dynamic redistribute static-to-rip disable
route dynamic redistribute static-to-ospf disable
route dynamic redistribute ospf-to-rip disable
route dynamic redistribute rip-to-ospf disable
route dynamic redistribute connected-to-rip enable
route dynamic redistribute connected-to-ospf enable
route dynamic pim-sparse disable
route6 dynamic ripng disable
route6 dynamic redistribute static-to-ripng disable
route6 dynamic redistribute connected-to-ripng enable
route6 dynamic pim-sparse disable
nat timeout 900
nat logging off
nat upnp off
nat upnp interface lan1
nat option port-assignment random
proxyarp disable
dhcp disable
dhcp mode server
dhcp interface lan0 expire 24
dhcp6 client disable
dhcp6 client interface pppoe0
dns forwarder disable
dns forwarder add ipcp
ntp disable
cbq link-bandwidth 100Mbps
snmp disable
snmp community "public"
snmp security-model community-based off
snmp security-model user-based on
snmp trap disable
syslog debug-level off
syslog facility local1
syslog remote off
translator timeout 300
encrypted-password admin uijw7JI8IN3Ho
encrypted-password-long admin $1$9M35Sm1z$pbK2ClKu2s..KZ2ujuq8L.
resolver disable
rtadvd disable
httpd disable
sshd hostkey rsa1 none
sshd hostkey rsa 883,2d2d2d2d~省略~2d0a
sshd hostkey dsa 668,2d2d2d2d~省略~2d0a
sshd password-authentication on
sshd enable
telnetd enable
vendor OEM




以上。