13. Netmikoによる状態表示例(結果)
13
> python netmiko_show.py
Interface IP-Address OK? Method Status Protocol
Vlan1 10.1.0.254 YES NVRAM up down
Vlan2 10.2.0.254 YES NVRAM up down
Vlan192 192.168.0.254 YES NVRAM up up
GigabitEthernet1/0/1 unassigned YES unset down down
GigabitEthernet1/0/2 unassigned YES unset down down
GigabitEthernet1/0/3 unassigned YES unset down down
GigabitEthernet1/0/4 unassigned YES unset down down
GigabitEthernet1/0/5 unassigned YES unset down down
GigabitEthernet1/0/6 unassigned YES unset down down
(略)
GigabitEthernet1/0/21 unassigned YES unset down down
GigabitEthernet1/0/22 unassigned YES unset down down
GigabitEthernet1/0/23 unassigned YES unset down down
GigabitEthernet1/0/24 unassigned YES unset up up
>
コマンド実行結果が
そのまま表示される
スクリプト実行
15. router1# sh run int vlan 1
Building configuration...
Current configuration : 99 bytes
!
interface Vlan1
description ***testdesc***
ip address 10.1.0.254 255.255.255.0
ip ospf cost 10
end
Netmikoによる設定変更例(結果)
15
> python netmiko_config.py
>
設定が入る
NW機器側で確認
スクリプト実行