python自动化管理和zabbix监控网络设备(有线网络配置部分)

目录

一、拓扑图

二、core-sw1

三、core-sw2

四、sum-sw1

五、sum-sw2


一、拓扑图

二、core-sw1

sys
sysname core-sw1
vlan batch 10 20 30 40 50 60 100 
vlan batch 200 210 220 230 240 250 stp region-configuration 
region-name huawei
revision-level 1
instance 1 vlan 10 20 30
instance 2 vlan 40 50 60
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
qstp instance 1 root primary
stp instance 3 root primary
stp instance 5 root primarystp instance 2 root secondary
stp instance 4 root secondaryinter gi0/0/1
port link trunk
port trunk all vlan allinter gi0/0/2
port link trunk
port trunk all vlan allinterface Eth-Trunk 1p l tp t a v allinter gi0/0/3eth-trunk 1inter gi0/0/4eth-trunk 1interface Vlanif 10
ip address 172.16.0.252 23
vrrp vrid 10 virtual-ip 172.16.1.254
vrrp vrid 10 priority 120interface Vlanif 20
ip address 172.16.2.252 23
vrrp vrid 10 virtual-ip 172.16.3.254
vrrp vrid 10 priority 120interface Vlanif 30
ip address 172.16.4.252 23
vrrp vrid 10 virtual-ip 172.16.5.254
vrrp vrid 10 priority 120interface Vlanif 40
ip address 172.16.6.252 23
vrrp vrid 10 virtual-ip 172.16.7.254
vrrp vrid 10 priority 100interface Vlanif 50
ip address 172.16.8.252 23
vrrp vrid 10 virtual-ip 172.16.9.254
vrrp vrid 10 priority 100interface Vlanif 60
ip address 172.16.10.252 23
vrrp vrid 10 virtual-ip 172.16.11.254
vrrp vrid 10 priority 100dhcp enable
ip pool vlan10
network 172.16.0.0 mask 23
gateway-list 172.16.1.254
dns-list 192.168.150.1
excluded-ip-address 172.16.1.1 172.16.1.253
excluded-ip-address 172.16.0.252 172.16.0.253
qinterface Vlanif 10 
dhcp select global
qip pool vlan20
network 172.16.2.0 mask 23
gateway-list 172.16.3.254
dns-list 192.168.150.1
excluded-ip-address 172.16.3.1 172.16.3.253
excluded-ip-address 172.16.2.252 172.16.2.253
qinterface Vlanif 20
dhcp select global
qip pool vlan30
network 172.16.4.0 mask 23
gateway-list 172.16.5.254
dns-list 192.168.150.1
excluded-ip-address 172.16.5.1 172.16.5.253
excluded-ip-address 172.16.4.252 172.16.4.253
qinterface Vlanif 30 
dhcp select global
qip pool vlan40
network 172.16.6.0 mask 23
gateway-list 172.16.7.254
dns-list 192.168.150.1
excluded-ip-address 172.16.7.1 172.16.7.253
excluded-ip-address 172.16.6.252 172.16.6.253
qinterface Vlanif 40
dhcp select global
qip pool vlan50
network 172.16.8.0 mask 23
gateway-list 172.16.9.254
dns-list 192.168.150.1
excluded-ip-address 172.16.9.1 172.16.9.253
excluded-ip-address 172.16.8.252 172.16.8.253
qinterface Vlanif 50
dhcp select global
qip pool vlan60
network 172.16.10.0 mask 23
gateway-list 172.16.11.254
dns-list 192.168.150.1
excluded-ip-address 172.16.11.1 172.16.11.253
excluded-ip-address 172.16.10.252 172.16.10.253
qinterface Vlanif 60
dhcp select global
q

三、core-sw2

sys
sysname core-sw2
vlan batch 10 20 30 40 50 60 100 
vlan batch 200 210 220 230 240 250 stp region-configuration 
region-name huawei
revision-level 1
instance 1 vlan 10 20 30
instance 2 vlan 40 50 60
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
qstp instance 1 root secondary
stp instance 3 root secondary
stp instance 5 root secondarystp instance 2 root primary
stp instance 4 root primaryinter gi0/0/1
port link trunk
port trunk all vlan allinter gi0/0/2
port link trunk
port trunk all vlan allinterface Eth-Trunk 1p l tp t a v allinter gi0/0/3eth-trunk 1inter gi0/0/4eth-trunk 1sys
sysname core-sw1
vlan batch 10 20 30 40 50 60 100 
vlan batch 200 210 220 230 240 250 stp region-configuration 
region-name huawei
revision-level 1
instance 1 vlan 10 20 30
instance 2 vlan 40 50 60
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
qstp instance 1 root primary
stp instance 3 root primary
stp instance 5 root primarystp instance 2 root secondary
stp instance 4 root secondaryinter gi0/0/1
port link trunk
port trunk all vlan allinter gi0/0/2
port link trunk
port trunk all vlan allinterface Eth-Trunk 1p l tp t a v allinter gi0/0/3eth-trunk 1inter gi0/0/4eth-trunk 1interface Vlanif 10
ip address 172.16.0.253 23
vrrp vrid 10 virtual-ip 172.16.1.254
vrrp vrid 10 priority 100interface Vlanif 20
ip address 172.16.2.253 23
vrrp vrid 10 virtual-ip 172.16.3.254
vrrp vrid 10 priority 100interface Vlanif 30
ip address 172.16.4.253 23
vrrp vrid 10 virtual-ip 172.16.5.254
vrrp vrid 10 priority 100interface Vlanif 40
ip address 172.16.6.253 23
vrrp vrid 10 virtual-ip 172.16.7.254
vrrp vrid 10 priority 120interface Vlanif 50
ip address 172.16.8.253 23
vrrp vrid 10 virtual-ip 172.16.9.254
vrrp vrid 10 priority 120interface Vlanif 60
ip address 172.16.10.253 23
vrrp vrid 10 virtual-ip 172.16.11.254
vrrp vrid 10 priority 120dhcp enable
ip pool vlan10
network 172.16.0.0 mask 23
gateway-list 172.16.1.254
dns-list 192.168.150.1
excluded-ip-address 172.16.0.1 172.16.0.254
qinterface Vlanif 10 
dhcp select global
qip pool vlan20
network 172.16.2.0 mask 23
gateway-list 172.16.3.254
dns-list 192.168.150.1
excluded-ip-address 172.16.2.1 172.16.2.254
qinterface Vlanif 20
dhcp select global
qip pool vlan30
network 172.16.4.0 mask 23
gateway-list 172.16.5.254
dns-list 192.168.150.1
excluded-ip-address 172.16.4.1 172.16.4.254
qinterface Vlanif 30 
dhcp select global
qip pool vlan40
network 172.16.6.0 mask 23
gateway-list 172.16.7.254
dns-list 192.168.150.1
excluded-ip-address 172.16.6.1 172.16.6.254
qinterface Vlanif 40
dhcp select global
qip pool vlan50
network 172.16.8.0 mask 23
gateway-list 172.16.9.254
dns-list 192.168.150.1
excluded-ip-address 172.16.8.1 172.16.8.254
qinterface Vlanif 50
dhcp select global
qip pool vlan60
network 172.16.10.0 mask 23
gateway-list 172.16.11.254
dns-list 192.168.150.1
excluded-ip-address 172.16.10.1 172.16.10.254
qinterface Vlanif 60
dhcp select global
q

四、sum-sw1

sys
sysname sum-sw1vlan batch 10 20 30 40 50 60 100 
vlan batch 200 210 220 230 240 250 port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/9
port link-type trunk
port trunk allow-pass vlan all
qstp region-configuration 
region-name huawei
revision-level 1
instance 1 vlan 10 20 30
instance 2 vlan 40 50 60
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
q

五、sum-sw2

sys
sysname sum-sw2vlan batch 10 20 30 40 50 60 100 
vlan batch 200 210 220 230 240 250 
port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/9
port link-type trunk
port trunk allow-pass vlan all
qstp region-configuration 
region-name huawei
revision-level 1
instance 1 vlan 10 20 30
instance 2 vlan 40 50 60
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
q

六、sw1-6

system-view
sysname SW1
vlan batch 10 100 200inter gi0/0/1port link-type trunkport trunk allow-pass vlan 10 100 200quitinter gi0/0/2port link-type trunkport trunk allow-pass vlan 10 100 200quitinter gi0/0/3port link-type accessport default vlan 10quitinter gi0/0/4
system-view
sysname SW2
vlan batch 20 100 210inter gi0/0/1port link-type trunkport trunk allow-pass vlan 20 100 210quitinter gi0/0/2port link-type trunkport trunk allow-pass vlan 20 100 210quitinter gi0/0/3port link-type accessport default vlan 20quit
system-view
sysname SW3
vlan batch 30 100 220inter gi0/0/1port link-type trunkport trunk allow-pass vlan 30 100 220quitinter gi0/0/2port link-type trunkport trunk allow-pass vlan 30 100 220quitinter gi0/0/3port link-type accessport default vlan 30quit
system-view
sysname SW4
vlan batch 40 100 230inter gi0/0/1port link-type trunkport trunk allow-pass vlan 40 100 230quitinter gi0/0/2port link-type trunkport trunk allow-pass vlan 40 100 230quitinter gi0/0/3port link-type accessport default vlan 40quit
system-view
sysname SW5
vlan batch 50 100 240inter gi0/0/1port link-type trunkport trunk allow-pass vlan 50 100 240quitinter gi0/0/2port link-type trunkport trunk allow-pass vlan 50 100 240quitinter gi0/0/3port link-type accessport default vlan 50quit
system-view
sysname SW6
vlan batch 60 100 250inter gi0/0/1port link-type trunkport trunk allow-pass vlan 60 100 250quitinter gi0/0/2port link-type trunkport trunk allow-pass vlan 60 100 250quitinter gi0/0/3port link-type accessport default vlan 60quit

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/491769.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Go Run - Go 语言中的简洁指令

原文:breadchris - 2024.02.21 也许听起来有些傻,但go run是我最喜欢的 Go 语言特性。想要运行你的代码?只需go run main.go。它是如此简单,我可以告诉母亲这个命令,她会立即理解。就像 Go 语言的大部分功能一样&…

荣耀手机如何开启地震预警功能

1、打开荣耀手机,进入“设置”,在搜素栏输入“地震”。 2、进入“安全-应急预警通知”功能栏。 3、开启“地震预警”。 4、查看“预警演示教程”。 ![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/e207e356bb634c11adf926c6a53e48cc.png…

第6.3章:StarRocks查询加速——Bucket Shuffle Join

目录 一、StarRocks数据划分 1.1 分区 1.2 分桶 二、Bucket Shuffle Join实现原理 2.1 Bucket Shuffle Join概述 2.2 Bucket Shuffle Join工作原理 2.3 Bucket Shuffle Join规划规则 三、应用案例 注:本篇文章阐述的是StarRocks-3.2版本的Bucket Shuffle Jo…

2024年ODE(云端集成开发环境)排行榜

✍️作者简介:小北编程(专注于HarmonyOS、Android、Java、Web、TCP/IP等技术方向) 🐳博客主页: 开源中国、稀土掘金、51cto博客、博客园、知乎、简书、慕课网、CSDN 🔔如果文章对您些帮助请👉关…

132 Linux 系统编程9 ,IO操作,lseek 函数,truncate函数,查看文件的表示形式

一 lseek 函数 函数说明:此函数用于文件偏移 Linux中可使用系统函数lseek来修改文件偏移量(读写位置) 每个打开的文件都记录着当前读写位置,打开文件时读写位置是0,表示文件开头,通常读写多少个字节就会将读写位置往后移多少个字…

【Python从入门到进阶】49、当当网Scrapy项目实战(二)

接上篇《48、当当网Scrapy项目实战(一)》 上一篇我们正式开启了一个Scrapy爬虫项目的实战,对当当网进行剖析和抓取。本篇我们继续编写该当当网的项目,讲解刚刚编写的Spider与item之间的关系,以及如何使用item&#xff…

leetcode hot100 买卖股票最佳时机3

本题中,依旧可以采用动态规划来进行解决,之前的两个题我们都是用二维数组dp[i][2]来表示的,其中i表示第i天,2表示长度为2,其中0表示不持有,1表示持有。 本题中,说至多完成两笔交易,也…

linux centos7部署前后端分离项目

linux centos7部署前后端分离项目 1.安装nginx,并且设置开机自启动1.1一键安装4个依赖1.2下载并解压安装包1.3安装nginx1.4启动 nginx 服务1.5设置开机自启动 2.tomcat负载均衡2.1先复制出另一个tomcat2.2修改tomcat的配置文件2.3测试8080和8081端口2.4nginx文件配置…

密码学及其应用(应用篇15)——0/1背包问题

1 问题背景 背包问题是一个经典的优化问题,在计算机科学和运筹学中有着广泛的应用。具体到你提到的这个问题,它是背包问题中的一个特例,通常被称为0/1背包问题。这里,我们有一系列的正整数 ,以及一个正整数&#xff0c…

Pyglet综合应用|推箱子游戏地图编辑器之图片跟随鼠标

目录 推箱子游戏 升级一:鼠标操作 升级二:增加网格 升级三:模拟按钮 综合应用:地图编辑器 关卡地图洗数 推箱子游戏 本篇为之前写的博客《Pyglet综合应用|推箱子游戏之关卡图片载入内存》的续篇,内容…

JAVA工程师面试专题-《Redis》篇

目录 一、基础 1、Redis 是什么 2、说一下你对redis的理解 3、Redis 为什么这么快? 4、项目中如何使用缓存? 5、为什么使用缓存? 6、Redis key 和value 可以存储最大值分别多是多少? 7、Redis和memcache有什么区别&#xf…

emoji选择器

emoji表情 功能描述 这款聊天对话时选择表情的UI插件,是为了提升用户在聊天过程中的互动体验而设计的。它提供了一个直观且易于操作的界面,使用户能够快速地选择并插入各种表情符号,从而丰富他们的聊天内容,增加情感表达的多样性…