ty9919 发表于 2018-8-5 08:12:36

Python netmiko 管理 network devices 简例

1、show run 的输出如下:  Building configuration...
  Current configuration : 874 bytes
  !
  version 12.4
  service timestamps debug datetime msec
  service timestamps log datetime msec
  logging synchronous
  line aux 0
  exec-timeout 0 0
  privilege level 15
  logging synchronous
  line vty 0 4
  login local
  !
  !
  end
  ----------------------
  2、配置默认路由后的输出:
  config term
  Enter configuration commands, one per line.End with CNTL/Z.
  R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.60.129
  R1(config)#end
  R1#
  3、查看路由条目:
  Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
  D - EIGRP, EX - EIGRP external, 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, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
  ia - IS-IS inter area, * - candidate default, U - per-user static route
  o - ODR, P - periodic downloaded static route
  Gateway of last resort is 192.168.60.129 to network 0.0.0.0
  C    192.168.60.0/24 is directly connected, FastEthernet0/0
  S*   0.0.0.0/0 via 192.168.60.129
  Process finished with exit code 0
页: [1]
查看完整版本: Python netmiko 管理 network devices 简例