CML2 ではノードを起動する前に、予めコンフィグを設定しておくことが可能です。 今回はその手順をメモしておきます。 今回は IOSv (15.9) を使って検証しました。
IOSv の初期コンフィグ
IOSv の初期コンフィグは以下でした。
version 15.9
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/1
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/2
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/3
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
ipv6 ioam timestamp
!
!
!
control-plane
!
banner exec ^C
**************************************************************************
* IOSv is strictly limited to use for evaluation, demonstration and IOS *
* education. IOSv is provided as-is and is not supported by Cisco's *
* Technical Advisory Center. Any use or disclosure, in whole or in part, *
* of the IOSv Software or Documentation to any third party for any *
* purposes is expressly prohibited except as otherwise authorized by *
* Cisco in writing. *
**************************************************************************^C
banner incoming ^C
**************************************************************************
* IOSv is strictly limited to use for evaluation, demonstration and IOS *
* education. IOSv is provided as-is and is not supported by Cisco's *
* Technical Advisory Center. Any use or disclosure, in whole or in part, *
* of the IOSv Software or Documentation to any third party for any *
* purposes is expressly prohibited except as otherwise authorized by *
* Cisco in writing. *
**************************************************************************^C
banner login ^C
**************************************************************************
* IOSv is strictly limited to use for evaluation, demonstration and IOS *
* education. IOSv is provided as-is and is not supported by Cisco's *
* Technical Advisory Center. Any use or disclosure, in whole or in part, *
* of the IOSv Software or Documentation to any third party for any *
* purposes is expressly prohibited except as otherwise authorized by *
* Cisco in writing. *
**************************************************************************^C
!
line con 0
line aux 0
line vty 0 4
login
transport input none
!
no scheduler allocate
!
end
CML2 上から初期コンフィグを設定する
CML2 でラボを作成してノードを配置した後、以下の手順で操作します。
- 事前コンフィグを設定したいノードを選択する
EDIT CONFIG
を選択する- 事前コンフィグを入力する
- (このままだとコンフィグ右上に
Unsaved changes
と表示されたままになるので)SAVE
を選択し、コンフィグを保存する
今回は以下のコンフィグを入力しました。
hostname IOSv
!
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
!
logging buffered 65536 debugging
!
clock timezone JST +9
!
no ip domain-lookup
!
no banner exec ^C
no banner incoming ^C
no banner login ^C
!
line con 0
exec-timeout 300 0
privilege level 15
logging synchronous
length 0
!
line vty 0 4
exec-timeout 300 0
privilege level 15
logging synchronous
no login
length 0
transport input telnet
!
scheduler allocate
!
end
ノード起動後のコンフィグ (初回)
IOSv# show running-config
Building configuration...
Current configuration : 1256 bytes
!
version 15.9
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
no service password-encryption
!
hostname IOSv
!
boot-start-marker
boot-end-marker
!
!
logging buffered 65536
!
no aaa new-model
!
!
!
clock timezone JST 9 0
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!
!
!
!
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/1
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/2
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/3
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
ipv6 ioam timestamp
!
!
!
control-plane
!
!
line con 0
exec-timeout 300 0
privilege level 15
logging synchronous
length 0
line aux 0
line vty 0 4
exec-timeout 300 0
privilege level 15
logging synchronous
no login
length 0
transport input telnet
!
scheduler allocate 20000 1000
!
end
ノード起動後のコンフィグ (二回目以降)
IOSv の場合、コンフィグを保存した後で再起動すると以下の挙動になりました。
- 変更したコンフィグは反映されている
- しかし、仮に
banner
は削除してあっても復活してしまう
コメント