【A10 Thunder】よく使用するCLI コマンド 5.2.0

A10 Thunderは 、Ciscoライクで、非常に使いやすいコマンド体系です。

この記事では、A10 Thunder を使用する上で、よく使用しているCLIコマンドを記事にします。

スポンサーリンク

基本操作

Execモード

CLIでログインする際、デフォルトのユーザIDとパスワードは下記となります。

  • ユーザ名:admin
  • パスワード:a10

ログイン後、Execモードとなり、プロンプトが  と表示されます。

vThunder>

Execモードでは、参照(show)、pingsshhealth-test  などを実行できますが、設定変更はできません。

Exec モードを抜ける場合は、exit を入力します。

vThunder>exit
Are you sure to quit (N/Y)?:Y

特権モード(enable)

enable コマンドにより、Execモードから特権モードへ移動し、プロンプトが # に変更されます。

特権モードでは、Execモードで実行できるコマンドに追加して、backuprebootshutdown なども実行できます。デフォルトの特権モードへのパスワードは、パスワード無しです。

vThunder>enable 
Password:
vThunder#

特権モードを抜ける場合は、exit を入力します。

vThunder#exit
vThunder>

特権モードでも設定は変更できません。設定変更する場合は、設定モードへ移動します。

設定モード(configure terminal)

設定変更する場合は、設定モードへ移動する必要があります。設定モードへ移動するには、configure terminal  と入力します。

vThunder#configure terminal 
vThunder(config)#

設定モードを抜けるには、exit を入力します。

vThunder(config)#exit
vThunder#

設定保存(write memory)

設定を保存し、次回起動の読み込まれるStartup-configに反映するには、write memory と入力します。

vThunder# write memory 
Building configuration...
Write configuration to default primary startup-config
[OK]
vThunder#

ページング無効化(terminal length 0)

デフォルトでは、CLIの出力結果が長い場合、「-More-」が出力され、エンターキーでページ送りする必要があります。ページングを無効化するには、特権モードで、terminal length 0と入力します。

vThunder#terminal length 0

セッションが切れると、ページングは元に戻ります。セッションが切れても、ページングを無効化したい場合は、コンフィグモードで、terminal length 0を実行します。

vThunder(config)#terminal length 0
vThunder(config)#show running-config 
!Current configuration: 892 bytes       
!Configuration last updated at 13:08:06 GMT Mon Nov 29 2021
!Configuration last saved at 13:09:24 GMT Mon Nov 29 2021
!64-bit Advanced Core OS (ACOS) version 5.2.0, build 155 (Aug-10-2020,14:34)/
!
no terminal auto-size 
terminal idle-timeout 60 
terminal length 0 
!
vlan 10 
  untagged ethernet 1
  router-interface ve 10 
!

設定で、ページングを無効化する場合は、terminal length 0 を入力します。

vThunder(config)# terminal length 0

ページングを有効に(元に戻す)には、no terminal length を入力します。

vThunder# no terminal length 

出力結果を条件によりフィルタ(begin , include , exclude , section)

出力結果に対して、条件に一致した行のみを抽出します。パイプ(|)のあとに条件を設定します。

条件文字から始まる(begin)

show running-config の結果を“vlan”という文字から開始する場合

vThunder#show running-config  | begin vlan
vlan 10 
  untagged ethernet 1
  router-interface ve 10 
!
vlan 200 
  untagged ethernet 2
  router-interface ve 200 
!
!
web-service gui-timeout-policy idle 60 
!

条件文字を含む( include)

show running-config の結果で“pool”という文字を含む行を抽出する場合

vThunder# show running-config | include pool
ip nat pool snat_pool_group_member1 10.0.200.13 10.0.200.13 netmask /24 
ip nat pool snat_pool_group_member2 10.0.200.15 10.0.200.15 netmask /24 
ip nat pool snat_pool_group_member3 10.0.200.17 10.0.200.17 netmask /24 
ip nat pool-group snat_pool_group1 
  member snat_pool_group_member1 
  member snat_pool_group_member2 
  member snat_pool_group_member3

条件文字を除く(exclude )

show running-config の結果で“vlan”という文字を除く行を抽出する場合

vThunder# show running-config  | exclude vlan
!Current configuration: 873 bytes       
!Configuration last updated at 13:18:12 GMT Mon Nov 29 2021
!Configuration last saved at 13:09:24 GMT Mon Nov 29 2021
!64-bit Advanced Core OS (ACOS) version 5.2.0, build 155 (Aug-10-2020,14:34)
!
no terminal auto-size 
terminal idle-timeout 60 
!
  untagged ethernet 1
  router-interface ve 10 
!
  untagged ethernet 2
  router-interface ve 200 
!
!

条件文字を含むセクションの情報

show running-config の結果で“slb server”という文字を含むセクションの行を抽出する場合

vThunder#show running-config  | section slb server
slb server Web-01 10.0.200.100 
  health-check custom_ping 
  port 80 tcp 
    health-check hc_http 
slb server Web-02 10.0.200.173 
  port 80 tcp

起動領域(bootimage)

Thunderでは、OSと設定の保存先として、プライマリー領域セカンダリ領域があります。

現在、どの領域で起動しているか確認するには、show bootimage  を入力します。

vThunder#show bootimage 
                      (* = Default)
                          Version
-----------------------------------------------
Hard Disk primary         5.2.0.155 (*)
Hard Disk secondary       5.2.0.155

(*) が現在、起動している領域となります。上の例では、プライマリ領域で起動しています。

上の起動状態で、write memory を実行すると、プライマリのstartup-configに設定が反映されます。

vThunder#write memory 
Building configuration...
Write configuration to default primary startup-config
[OK]

保存したい領域を指定したい場合は、write memoryにオプションとして指定します。

vThunder# write memory primary 
Building configuration...
Write configuration to default primary startup-config
[OK]

vThunder#write memory secondary 
Building configuration...
Write configuration to default secondary startup-config
[OK]
vThunder#

プライマリ・セカンダリの起動領域を変更するには、bootimage hd コマンドにて、次回起動時の領域を指定します。

vThunder(config)#bootimage hd ?
  pri  Primary image
  sec  Secondary image

セカンダリ領域からの起動にするには、bootimage hd sec を実行します。

vThunder(config)#bootimage hd sec
Secondary image will be used if system is booted from hard disk
vThunder(config)#exit

機器を再起動後、次回起動時は、セカンダリ領域から起動していることが確認できます。

vThunder# reboot
Proceed with reboot? [yes/no]: yes
vThunder# show bootimage 
                      (* = Default)
                          Version
-----------------------------------------------
Hard Disk primary         5.2.0.155
Hard Disk secondary       5.2.0.155 (*)
スポンサーリンク

設定情報取得

設定情報取得(show running-config)

現在稼働中の設定内容を確認するには、show running-config を実行します。

vThunder#show running-config 
!Current configuration: 873 bytes       
!Configuration last updated at 13:18:12 GMT Mon Nov 29 2021
!Configuration last saved at 13:09:24 GMT Mon Nov 29 2021
!64-bit Advanced Core OS (ACOS) version 5.2.0, build 155 (Aug-10-2020,14:34)
!
no terminal auto-size 
terminal idle-timeout 60 
!
vlan 10 
  untagged ethernet 1
  router-interface ve 10 
!

デフォルト設定情報取得(with-default)

稼働中の設定でデフォルト値も表示する場合は、with-default オプションをつけます。

vThunder#show running-config with-default 
!Current configuration: 19388 bytes     
!Configuration last updated at 13:18:12 GMT Mon Nov 29 2021
!Configuration last saved at 13:09:24 GMT Mon Nov 29 2021
!64-bit Advanced Core OS (ACOS) version 5.2.0, build 155 (Aug-10-2020,14:34)
!
visibility 
  granularity 5 
  file metrics enable 
  reporting 
    session-logging disable 
  anomaly-detection 
    sensitivity low 
    disable 
    logging disable 
  port-scan-detection 
    threshold 10 60 
  ping-sweep-detection 
    threshold 10 60 
  packet-capture 
    capture-config 
      concurrent-captures-age 1 
      number-of-packets-per-conn 0

次回起動時の設定情報取得(show startup-config)

次回起動時の設定(startup-config)を確認するには、show startup-configを実行します。

vThunder#show startup-config 
Show default startup-config
Building configuration...

!Current configuration: 2430 bytes
!Configuration last updated at 13:08:06 GMT Mon Nov 29 2021
!Configuration last saved at 13:09:24 GMT Mon Nov 29 2021
!64-bit Advanced Core OS (ACOS) version 5.2.0, build 155 (Aug-10-2020,14:34)
!
no terminal auto-size 
terminal idle-timeout 60 
terminal length 0 
!

テクニカルサポート情報(show techsupport)

設定情報など情報一式を取得する場合、show techsupport を実行します。メーカサポート時などに提供する場合があります。

vThunder# show techsupport 

============= Clock Info  =============
*08:24:13 GMT Sun Nov 28 2021

============= Version Info  =============
Thunder Series Unified Application Service Gateway vThunder
                     

スポンサーリンク

基本設定

ホスト名(hostname)

ホスト名をA10-1に変更する場合

vThunder(config)# hostname A10-1
A10-1(config)#exit
A10-1#

パスワード設定

Execモード(admin)

ユーザ名 admin のパスワードをP@ssw0rdに変更する場合

vThunder(config)#admin admin password P@ssw0rd
Modify Admin User successful!

特権モード(enable-password)

特権モードのパスワードをP@ssw0rdに変更する場合

vThunder(config)# enable-password P@ssw0rd

DNS設定(ip dns primary / secondary)

Thunderが参照するDNSサーバを設定。プライマリとセカンダリの指定ができます。

GoogleのパブリックDNSを設定する場合

vThunder(config)#ip dns primary 8.8.8.8
vThunder(config)#ip dns secondary 8.8.4.4

名前解決ができるか、FQDNでPingを実行します。

vThunder# ping time.google.com
PING time.google.com (216.239.35.8) 56(84) bytes of data.
64 bytes from time3.google.com (216.239.35.8): icmp_seq=1 ttl=92 time=47.4 ms
64 bytes from time3.google.com (216.239.35.8): icmp_seq=2 ttl=92 time=41.9 ms

時刻同期(timezone / ntp server)

タイムゾーンをアジア(東京)で、サマータイムは無効化し、時刻同期先をGoogleのパブリックNTPとした場合

vThunder(config)# timezone Asia/Tokyo nodst
vThunder(config)# ntp server time.google.com
vThunder(config-ntpsvr:time.google.com)# exit
vThunder(config)#
スポンサーリンク

機器情報(show version)

バージョンやシリアル番号を確認するには、show version を入力します。

vThunder#show version 
・・・        
          64-bit Advanced Core OS (ACOS) version 5.2.0, build 155 (Aug-10-2020,14:34)
・・・        
          Serial Number: xxxxxxxxxxxxx
・・・               
          Hard Disk primary image version 5.2.0, build 155
          Hard Disk secondary image (default) version 5.2.0, build 155
スポンサーリンク

パフォーマンス情報

CPU使用状況(show cpu)

vThunder#show cpu
Time: Nov-29-2021, 22:48
                1Sec          5Sec         10Sec         30Sec         60Sec
-------------------------------------------------------------------------------
Control1         3%             5%           6%            6%            6%

Data1            0%             0%           0%            0%            0%
Data2            0%             0%           0%            0%            0%
I/O1             0%             0%           0%            0%            0%

メモリの使用状況(show memory system)

vThunder# show memory system 
         Total(KB)      Used         Free        Usage
------------------------------------------------------------
Memory:  16383328      6837923     9545405   41.70%

ディスク使用状況(show disk)

vThunder# show disk 
  Total(MB)    Used(MB)       Free(MB)       Usage
---------------------------------------------------
 40960          7774          33185          18%
スポンサーリンク

ネットワーク情報

インタフェース情報(show interfaces)

すべてのインタフェース情報(IPアドレス、MACアドレス、Duplexなど)を確認する場合は、show interfaces を入力します。

vThunder# show interfaces 
 Ethernet 1 is up, line protocol is up
  Hardware is up, Address is xxxx.xxxx.xxxx
  Internet address is 0.0.0.0, Subnet mask is 0.0.0.0
  Configured Speed auto, Actual 10Gbit, Configured Duplex auto, Actual fdx
  Member of L2 Vlan 10, Port is Untagged
  Flow Control is disabled, IP MTU is 1500 bytes
  Port as Mirror disabled, Monitoring this Port disabled
  94 packets input  8512 bytes
  Received  0 broadcasts, Received 0 multicasts, Received 94 unicasts
  0 input errors  0 CRC  0 frame
  0 runts  0 input giants
  639 packets output  32314 bytes
  Transmitted  0 broadcasts, Transmitted 0 multicasts, Transmitted 639 unicasts
  0 output errors  0 output giants 0 collisions 
  300 second input rate: 16 bits/sec, 0 packets/sec, 0% utilization
  300 second output rate: 88 bits/sec, 0 packets/sec, 0% utilization
・
・
・

ARPテーブル(show arp)

ARPテーブルを確認する場合は、show arp を入力します。

vThunder# show arp
Total arp entries: 3            Age time: 300 secs
IP Address         MAC Address          Type         Age   Interface    Vlan  
---------------------------------------------------------------------------
10.0.10.1          xxxx.xxxx.xxxx      Dynamic      61    ethernet 1   10    
10.0.100.1         xxxx.xxxx.xxxx      Dynamic      61    Management   1     
10.0.200.1         xxxx.xxxx.xxxx       Dynamic      61    ethernet 2   200

ルーティングテーブル(show ip route)

ルーティングテーブルを確認する場合は、show ip route を入力します。

vThunder# show ip route 
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default

Gateway of last resort is 10.0.10.1 to network 0.0.0.0

S*      0.0.0.0/0 [250/0] via 10.0.10.1, ve 10, 00:18:58
C       10.0.10.0/24 is directly connected, ve 10, 00:48:14
C       10.0.200.0/24 is directly connected, ve 200, 00:48:21
スポンサーリンク

ネットワーク診断(ping / traceroute)

pingをマネージメントポートから送信する場合は、use-mgmt-port  オプションを使用します。

vThunder# ping 8.8.8.8 use-mgmt-port 
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=105 time=2.63 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=105 time=2.68 ms

tracerouteもPingと同様のコマンドです。

vThunder# traceroute use-mgmt-port 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
・
・
17  108.170.242.193 (108.170.242.193)  4.541 ms * *
18  dns.google (8.8.8.8)  1.553 ms  1.528 ms  2.228 ms
スポンサーリンク

ヘルスチェックテスト(health-test)

サーバへヘルスチェックが通るのかどうか health-test で確認することができます。

リアルサーバ10.0.200.100に対して、ICMPによるヘルスチェックができるかテストし、応答がある場合は、ノード状態がUPになります。

vThunder# health-test 10.0.200.100                    
node status UP.
ICMP Receive OK.

ICMPの応答がなければ、ノード状態がDOWNになります。

vThunder# health-test 10.0.200.101                             
node status DOWN.
ICMP Receive Error.

すでに設定しているヘルスチェックを使用して、テストすることもできます。ヘルスチェック hc_httpを用いて、リアルサーバ 10.0.200.100へのテストをする場合は、

vThunder# health-test 10.0.200.100 monitorname hc_http
node status UP.
HTTP Status Code OK.

上記のヘルスチェック(hc_http)の設定は、下記の記事を参考にしてください。

  >> 参考記事 :  【A10 Thunder】サーバ負荷分散ヘルスチェックと動作確認
スポンサーリンク

ログ情報(show log)

システムログは、show log で取得します。

vThunder# show log 
Log Buffer: 30000
Nov 29 2021 22:41:27 Error       [SYSTEM]:NTP server time.google.com is not reachable
Nov 29 2021 22:40:04 Notice      [SYSTEM]:Timezone is set to JST
Nov 29 2021 13:15:44 Notice      [SYSTEM]:A cli session for user "admin" from 126.141.222.40 has been opened. Session ID assigned is 5.
Nov 29 2021 13:15:44 Info        [SYSTEM]:set SSH_AUTH_SOCK
Nov 29 2021 13:15:41 Notice      [SYSTEM]:Session ID 3 is now cl
スポンサーリンク

再起動・停止

再起動(reboot / reload)

再起動時は、reboot コマンドを実行します。

vThunder# reboot
Proceed with reboot? [yes/no]: yes

プロセスを再起動する場合は、reload コマンドを実行します。

vThunder# reload
Do you wish to proceed with reload? [yes/no]:yes

停止(shutdown)

機器を停止するには、shutdownコマンドを実行します。

vThunder# shutdown 
System configuration has been modified. Save? [yes/no]:yes 
Building configuration...
Write configuration to default secondary startup-config
[OK]
Proceed with shutdown? [yes/no]:yes 
スポンサーリンク

設定比較(diff)

現在稼働中の設定(running-config)と起動時に読み込まれる設定(startup-config)をdiffコマンドで比較することができます。

vThunder# diff startup-config running-config

下記の例では、左側が startup-config で そのうち、running-config 上で変更されている設定が、右側に表示されています。

スポンサーリンク

コマンドの自動更新(repeat)

指定したコマンドを定期的に実行するには、repeatコマンドを使用します。下記は、1秒間隔でshow memory system を実行する場合の例です。

vThunder# repeat 1 show memory system

Ctrl +C するまで、コマンドは実行され続けます。

コメント