由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
EmergingNetworking版 - 你们知道有没有open source python router console/telnet lib
相关主题
Cisco怎么想的?现在这么多种类IOS谁给推荐个multicast的基础读物啊
思科和Juniper的操作系统之争:一个还是多个?acorn在么?
Juniper Opens OS To Third-Party Developers问一个AAA认证的问题
Network Onionuse xml to replace normal CLI?
SW的section不能用啊。发一个NAT的配置,能帮我解释一下么?
[合集] Cisco怎么想的?现在这么多种类IOS问一个QOS的问题。
思科路由牛在什么地方?F5 trick
J家的看过来,这个video有点意思Please recommend a long range wireless router
相关话题的讨论汇总
话题: password话题: telnet话题: ssh话题: console话题: pexpect
进入EmergingNetworking版参与讨论
1 (共1页)
b***p
发帖数: 700
1
就是login router,给paswd,config啊,get output
先谢了
我想自己写个tool之类的,debug ios router之类的
c*a
发帖数: 806
2
pexpect?

【在 b***p 的大作中提到】
: 就是login router,给paswd,config啊,get output
: 先谢了
: 我想自己写个tool之类的,debug ios router之类的

b***p
发帖数: 700
3
谢谢,我试试

【在 c*a 的大作中提到】
: pexpect?
y*********n
发帖数: 95
4
http://www.shrubbery.net/rancid/

【在 b***p 的大作中提到】
: 就是login router,给paswd,config啊,get output
: 先谢了
: 我想自己写个tool之类的,debug ios router之类的

b***p
发帖数: 700
5
就是login router,给paswd,config啊,get output
先谢了
我想自己写个tool之类的,debug ios router之类的
c*a
发帖数: 806
6
pexpect?

【在 b***p 的大作中提到】
: 就是login router,给paswd,config啊,get output
: 先谢了
: 我想自己写个tool之类的,debug ios router之类的

b***p
发帖数: 700
7
谢谢,我试试

【在 c*a 的大作中提到】
: pexpect?
y*********n
发帖数: 95
8
http://www.shrubbery.net/rancid/

【在 b***p 的大作中提到】
: 就是login router,给paswd,config啊,get output
: 先谢了
: 我想自己写个tool之类的,debug ios router之类的

s*****g
发帖数: 1055
9
It is probably not a good idea to use raw "pexpect", you will end up
spending too much time to deal with low level expect buffering, exception
catching and pattern matching, especially when you have a mixed vendor
environment, python module "paramiko"/"netmiko" works much better, just
search github.

【在 b***p 的大作中提到】
: 谢谢,我试试
b***p
发帖数: 700
10
还真巧,上ing这个author Kirk online course

【在 s*****g 的大作中提到】
: It is probably not a good idea to use raw "pexpect", you will end up
: spending too much time to deal with low level expect buffering, exception
: catching and pattern matching, especially when you have a mixed vendor
: environment, python module "paramiko"/"netmiko" works much better, just
: search github.

相关主题
[合集] Cisco怎么想的?现在这么多种类IOS谁给推荐个multicast的基础读物啊
思科路由牛在什么地方?acorn在么?
J家的看过来,这个video有点意思问一个AAA认证的问题
进入EmergingNetworking版参与讨论
c*a
发帖数: 806
11
Good suggestion. But still like pexpect to have the flexibility, esp. with
jump host in between.

【在 s*****g 的大作中提到】
: It is probably not a good idea to use raw "pexpect", you will end up
: spending too much time to deal with low level expect buffering, exception
: catching and pattern matching, especially when you have a mixed vendor
: environment, python module "paramiko"/"netmiko" works much better, just
: search github.

z**r
发帖数: 17771
12
我以前都是用shell script,做一些简单的get output之类的活。也用TCL写过一些。

【在 b***p 的大作中提到】
: 就是login router,给paswd,config啊,get output
: 先谢了
: 我想自己写个tool之类的,debug ios router之类的

b***p
发帖数: 700
13
"paramiko"/"netmiko"
这个只support ssh,不支持telnet和console,的确是奇怪

【在 s*****g 的大作中提到】
: It is probably not a good idea to use raw "pexpect", you will end up
: spending too much time to deal with low level expect buffering, exception
: catching and pattern matching, especially when you have a mixed vendor
: environment, python module "paramiko"/"netmiko" works much better, just
: search github.

s*****g
发帖数: 1055
14
You have no reason to support telnet in your network, problem with console
is that you may need multiple authentications (first authenticate with
console server, second authentication with device itself), you should only
need console during rare situations, ie device bringup/software upgrade etc.
Production network device management should go through inband or outband
network connections via ssh, snmp, netconf etc.

【在 b***p 的大作中提到】
: "paramiko"/"netmiko"
: 这个只support ssh,不支持telnet和console,的确是奇怪

b***p
发帖数: 700
15
The world is not perfect. If you need to monitor standby management module,
or a glass room like route servers, or maybe a quick show command or testing
, you need telnet/console.
at least i know, in some tire-1 sp network, they still use telnet to access
routers.

etc.

【在 s*****g 的大作中提到】
: You have no reason to support telnet in your network, problem with console
: is that you may need multiple authentications (first authenticate with
: console server, second authentication with device itself), you should only
: need console during rare situations, ie device bringup/software upgrade etc.
: Production network device management should go through inband or outband
: network connections via ssh, snmp, netconf etc.

c*a
发帖数: 806
16
many countries do not allow ssh, after US decided not to export encryption
software

,
testing
access

【在 b***p 的大作中提到】
: The world is not perfect. If you need to monitor standby management module,
: or a glass room like route servers, or maybe a quick show command or testing
: , you need telnet/console.
: at least i know, in some tire-1 sp network, they still use telnet to access
: routers.
:
: etc.

n**********l
发帖数: 271
b***p
发帖数: 700
18
pyconsole
rtr1 = PyConsole(connection='ssh -l admin 192.168.1.54',
password='password', enable_password='password')
# Cisco IOS 12.2
rtr2 = PyConsole(connection='telnet 192.168.1.23',
user='admin', password='password', enable_password='
password')
# Linux Ubuntu 14.0
linux1 = PyConsole(connection='ssh -l super 192.168.1.102',
os='linux', password='PassWord')
output1 = rtr2.run_commands("show int brief | inc Up")
supports ssh/telnet/console
c*a
发帖数: 806
19
not bad, AOL?

【在 n**********l 的大作中提到】
: Trigger
: https://trigger.readthedocs.org/en/latest/

c*a
发帖数: 806
20
what's this?
Your own class extending pexpect?

【在 b***p 的大作中提到】
: pyconsole
: rtr1 = PyConsole(connection='ssh -l admin 192.168.1.54',
: password='password', enable_password='password')
: # Cisco IOS 12.2
: rtr2 = PyConsole(connection='telnet 192.168.1.23',
: user='admin', password='password', enable_password='
: password')
: # Linux Ubuntu 14.0
: linux1 = PyConsole(connection='ssh -l super 192.168.1.102',
: os='linux', password='PassWord')

相关主题
use xml to replace normal CLI?F5 trick
发一个NAT的配置,能帮我解释一下么?Please recommend a long range wireless router
问一个QOS的问题。extreme network还靠谱吗?
进入EmergingNetworking版参与讨论
I********x
发帖数: 858
21
In modern network telnet is banned because of security concerns. SSH is the
main method to access networking devices remotely.
For Cisco IOS, I am using Python Paramiko(SSH) to access CLI and get the txt
output.
Cisco IOS is not very native with Python and the output is purely txt. It is
very annoying to parse interested values from the output if you want to do
any further analysis.

【在 b***p 的大作中提到】
: 就是login router,给paswd,config啊,get output
: 先谢了
: 我想自己写个tool之类的,debug ios router之类的

P**a
发帖数: 1267
22
Pexpect只能在Linux下,win下面有好的解决方案吗?
长期以来都是用Tcl/Expect的。
P**a
发帖数: 1267
23
还有就是Python 的regexp用起来太不方便了。
n**********l
发帖数: 271
24
i had a hell of time getting rancid to work with different IOS devices
c*a
发帖数: 806
25
Juniper has PyEZ
https://techwiki.juniper.net/Automation_Scripting/010_Getting_Started_and_
Reference/Junos_PyEZ
Cisco 有没有类似的?

【在 n**********l 的大作中提到】
: i had a hell of time getting rancid to work with different IOS devices
1 (共1页)
进入EmergingNetworking版参与讨论
相关主题
Please recommend a long range wireless routerSW的section不能用啊。
extreme network还靠谱吗?[合集] Cisco怎么想的?现在这么多种类IOS
大家对CSCO告ARISTA这事怎么看?思科路由牛在什么地方?
Juniper也开始懂得做市场了J家的看过来,这个video有点意思
Cisco怎么想的?现在这么多种类IOS谁给推荐个multicast的基础读物啊
思科和Juniper的操作系统之争:一个还是多个?acorn在么?
Juniper Opens OS To Third-Party Developers问一个AAA认证的问题
Network Onionuse xml to replace normal CLI?
相关话题的讨论汇总
话题: password话题: telnet话题: ssh话题: console话题: pexpect