怎么更改机型配置python

更新时间:02-10 教程 由 趁年轻 分享

怎么更改机型配置python?

搭建,桥接,初始化配置。

给每台路由器做好初始化配置,即配置修改设备默认名称、配置管理IP地址、配置SSH及登录用户名和密码。

以R2为例(小白,其他设备参考R2配置),修改设备名、配置IP地址:

[Huawei]SYS R2

[R2]

[R2]int g0/0/0

[R2-GigabitEthernet0/0/0]ip add 192.168.56.20 24

[R2-GigabitEthernet0/0/0]

[R2-GigabitEthernet0/0/0]qu

[R2]

以R2为例,配置SSH,其他设备参考如下即可:

[R2]rsa local-key-pair create

The key name will be: Host

% RSA keys defined for Host already exist.

Confirm to replace them? (y/n)[n]:y

The range of public key size is (512 ~ 2048).

NOTES: If the key modulus is greater than 512,

It will take a few minutes.

Input the bits in the modulus[default = 512]:2048

Generating keys...

.......+++

..............+++

.....++++++++

...............++++++++

[R2]user-interface vty 0 4

[R2-ui-vty0-4]authentication-mode aaa

[R2-ui-vty0-4]protocol inbound ssh

[R2]aaa

[R2-aaa]local-user along password cipher along123

[R2-aaa]local-user along privilege level 15

[R2-aaa]local-user along service-type ssh

[R2-aaa]ssh user along authentication-type password

[R2]

[R2]stelnet server enable

[R2]

上述配置完,建议用secureCRT先登录一下各个设备,验证网络连通性、ssh连通性是否ok?

这里以R1为例,验证一下。测试时,你们可以每台都验证一下。

这样验证的好处,假如待会我们写的python脚本如果有问题,那跟网络、ssh配置就没关了,便于后续排错就对啦!

声明:关于《怎么更改机型配置python》以上内容仅供参考,若您的权利被侵害,请联系13825271@qq.com
本文网址:http://www.25820.com/tutorial/14_2180549.html