作成途中ではあるが、下記のTTLマクロ構文を利用するとMEの初期設定を自動的に実施できる。
;●起動から待機時間90秒後に空エンターの送信
wait 'Starting image'
pause 120
sendln ''
;●ログイン
wait 'Username'
sendln 'cisco'
wait 'Password'
sendln 'Cisco'
;●特権モードへ移行
waitrecv '>' 17 17
sendln 'en'
wait 'Password'
sendln 'Cisco'
;●ter len 0の設定
waitrecv '#' 17 17
sendln 'ter len 0'
;●バージョン確認及びMEバージョンへの切り替え
waitrecv '#' 17 17
sendln 'sh ver'
;の場合は、MEへ切り替え
;
;タイムアウト15秒
timeout = 15
;文字列 "NOT MOBILITY" か "ERROR" を待つ。
wait 'NOT MOBILI' 'ERROR'
; "NOT MOBILITY" が来たなら、:ok へジャンプ
If result=1 goto NOTMOBILITY
; "ERROR" が来たなら、:error へジャンプ
If result=2 goto error
;"MOBILITY" が来たなら、タイムアウトで:MESETTING へジャンプ。
if result=0 goto MESETTING
endif
;MEに切り替え後に初期設定へジャンプ
:NOTMOBILITY
waitrecv '#' 17 17
sendln 'ap-type mobility-express'
goto MESETTING
;●ME初期設定開始
:MESETTING
timeout = 0
wait 'autoinstall?' 'Administrative User Name'
if result=1 then
goto AUTO
elseif result=2 then
goto USERNAME
endif
:AUTO
sendln ''
wait 'Enter Administrative User Name'
:USERNAME
sendln 'admin'
wait 'Enter Administrative Password '
sendln 'Isms0630cs'
wait 'Re-enter Administrative Password'
sendln 'Isms0630cs'
wait 'System Name'
sendln 'test'
wait 'Name' 'Country'
if result=1 then
goto Name
elseif result=2 then
goto Country
endif
:Name
sendln 'admin'
wait 'Enter Password for AP'
sendln 'Isms0630cs'
wait 'Re-enter Password for AP'
sendln 'Isms0630cs'
wait 'Enter Enable Password for AP'
sendln 'Isms0630cs'
wait 'Re-enter Enable Password for AP:'
sendln 'Isms0630cs'
wait 'Enter Country Code list'
:Country
sendln 'J4'
wait 'Configure a NTP server now? [YES][no]:'
sendln 'no'
wait 'Configure the system time now? [YES][no]:'
sendln 'no'
wait 'Management Interface IP Address Configuration [STATIC][dhcp]:'
sendln 'STATIC'
wait 'Management Interface IP Address:'
sendln '192.168.1.1'
wait 'Management Interface Netmask:'
sendln '255.255.255.0'
wait 'Management Interface Default Router:'
sendln '192.168.1.254'
wait 'Create Management DHCP Scope? [yes][NO]:'
sendln 'NO'
wait 'Employee Network Name (SSID)?:'
sendln 'test-WiFi'
wait 'Employee Network Security? [PSK][enterprise]:'
sendln 'PSK'
wait 'Employee PSK Passphrase (8-63 characters)?:'
sendln 'Isms0630cs'
wait 'Re-enter Employee PSK Passphrase:'
sendln 'Isms0630cs'
wait 'Enable RF Parameter Optimization? [YES][no]:'
sendln 'no'
wait 'Configuration correct?'
sendln 'yes'
sendln ''
;●ユーザログイン
wait 'User:'
sendln 'admin '
wait 'Password'
sendln 'Cisco'
;●クライアントAPへのIP設定
;マクロの終了
end