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
q


stp instance 1 root primary
stp instance 3 root primary
stp instance 5 root primary

stp instance 2 root secondary
stp instance 4 root secondary


inter gi0/0/1
port link trunk
port trunk all vlan all

inter gi0/0/2
port link trunk
port trunk all vlan all

  interface Eth-Trunk 1
  p l t
  p t a v all
  inter gi0/0/3
  eth-trunk 1
  inter gi0/0/4
  eth-trunk 1



interface Vlanif 10
ip address 172.16.0.252 23
vrrp vrid 10 virtual-ip 172.16.1.254
vrrp vrid 10 priority 120

interface Vlanif 20
ip address 172.16.2.252 23
vrrp vrid 10 virtual-ip 172.16.3.254
vrrp vrid 10 priority 120

interface Vlanif 30
ip address 172.16.4.252 23
vrrp vrid 10 virtual-ip 172.16.5.254
vrrp vrid 10 priority 120

interface Vlanif 40
ip address 172.16.6.252 23
vrrp vrid 10 virtual-ip 172.16.7.254
vrrp vrid 10 priority 100

interface Vlanif 50
ip address 172.16.8.252 23
vrrp vrid 10 virtual-ip 172.16.9.254
vrrp vrid 10 priority 100

interface Vlanif 60
ip address 172.16.10.252 23
vrrp vrid 10 virtual-ip 172.16.11.254
vrrp vrid 10 priority 100


dhcp 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
q

interface Vlanif 10 
dhcp select global
q

ip 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
q

interface Vlanif 20
dhcp select global
q

ip 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
q

interface Vlanif 30 
dhcp select global
q

ip 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
q

interface Vlanif 40
dhcp select global
q

ip 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
q

interface Vlanif 50
dhcp select global
q

ip 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
q

interface 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
q


stp instance 1 root secondary
stp instance 3 root secondary
stp instance 5 root secondary

stp instance 2 root primary
stp instance 4 root primary



inter gi0/0/1
port link trunk
port trunk all vlan all

inter gi0/0/2
port link trunk
port trunk all vlan all

  interface Eth-Trunk 1
  p l t
  p t a v all
  inter gi0/0/3
  eth-trunk 1
  inter gi0/0/4
  eth-trunk 1



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
q


stp instance 1 root primary
stp instance 3 root primary
stp instance 5 root primary

stp instance 2 root secondary
stp instance 4 root secondary


inter gi0/0/1
port link trunk
port trunk all vlan all

inter gi0/0/2
port link trunk
port trunk all vlan all

  interface Eth-Trunk 1
  p l t
  p t a v all
  inter gi0/0/3
  eth-trunk 1
  inter gi0/0/4
  eth-trunk 1



interface Vlanif 10
ip address 172.16.0.253 23
vrrp vrid 10 virtual-ip 172.16.1.254
vrrp vrid 10 priority 100

interface Vlanif 20
ip address 172.16.2.253 23
vrrp vrid 10 virtual-ip 172.16.3.254
vrrp vrid 10 priority 100

interface Vlanif 30
ip address 172.16.4.253 23
vrrp vrid 10 virtual-ip 172.16.5.254
vrrp vrid 10 priority 100

interface Vlanif 40
ip address 172.16.6.253 23
vrrp vrid 10 virtual-ip 172.16.7.254
vrrp vrid 10 priority 120

interface Vlanif 50
ip address 172.16.8.253 23
vrrp vrid 10 virtual-ip 172.16.9.254
vrrp vrid 10 priority 120

interface Vlanif 60
ip address 172.16.10.253 23
vrrp vrid 10 virtual-ip 172.16.11.254
vrrp vrid 10 priority 120


dhcp 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
q

interface Vlanif 10 
dhcp select global
q

ip 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
q

interface Vlanif 20
dhcp select global
q

ip 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
q

interface Vlanif 30 
dhcp select global
q

ip 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
q

interface Vlanif 40
dhcp select global
q

ip 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
q

interface Vlanif 50
dhcp select global
q

ip 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
q

interface Vlanif 60
dhcp select global
q

四、sum-sw1

sys
sysname sum-sw1

vlan 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
q

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
q

五、sum-sw2

sys
sysname sum-sw2

vlan 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
q


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
q


六、sw1-6

system-view
sysname SW1
vlan batch 10 100 200

  inter gi0/0/1
  port link-type trunk
  port trunk allow-pass vlan 10 100 200
  quit

  inter gi0/0/2
  port link-type trunk
  port trunk allow-pass vlan 10 100 200
  quit

  inter gi0/0/3
  port link-type access
  port default vlan 10
  quit

  inter gi0/0/4
system-view
sysname SW2
vlan batch 20 100 210

  inter gi0/0/1
  port link-type trunk
  port trunk allow-pass vlan 20 100 210
  quit

  inter gi0/0/2
  port link-type trunk
  port trunk allow-pass vlan 20 100 210
  quit

  inter gi0/0/3
  port link-type access
  port default vlan 20
  quit
system-view
sysname SW3
vlan batch 30 100 220

  inter gi0/0/1
  port link-type trunk
  port trunk allow-pass vlan 30 100 220
  quit

  inter gi0/0/2
  port link-type trunk
  port trunk allow-pass vlan 30 100 220
  quit

  inter gi0/0/3
  port link-type access
  port default vlan 30
  quit
system-view
sysname SW4
vlan batch 40 100 230

  inter gi0/0/1
  port link-type trunk
  port trunk allow-pass vlan 40 100 230
  quit

  inter gi0/0/2
  port link-type trunk
  port trunk allow-pass vlan 40 100 230
  quit

  inter gi0/0/3
  port link-type access
  port default vlan 40
  quit
system-view
sysname SW5
vlan batch 50 100 240

  inter gi0/0/1
  port link-type trunk
  port trunk allow-pass vlan 50 100 240
  quit

  inter gi0/0/2
  port link-type trunk
  port trunk allow-pass vlan 50 100 240
  quit

  inter gi0/0/3
  port link-type access
  port default vlan 50
  quit
system-view
sysname SW6
vlan batch 60 100 250

  inter gi0/0/1
  port link-type trunk
  port trunk allow-pass vlan 60 100 250
  quit

  inter gi0/0/2
  port link-type trunk
  port trunk allow-pass vlan 60 100 250
  quit

  inter gi0/0/3
  port link-type access
  port default vlan 60
  quit

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

vue2和vue3 setup beforecreate create生命周期时间比较

创建一个vue程序&#xff0c;vue3可以兼容Vue2的写法&#xff0c;很流畅完全没问题 写了一个vue3组件 <template><div></div> </template><script lang"ts"> import {onMounted} from vue export default{data(){return {}},beforeCr…

深入理解JS的执行上下文、词法作用域和闭包(中)

&#x1f90d; 前端开发工程师、技术日更博主、已过CET6 &#x1f368; 阿珊和她的猫_CSDN博客专家、23年度博客之星前端领域TOP1 &#x1f560; 牛客高级专题作者、打造专栏《前端面试必备》 、《2024面试高频手撕题》 &#x1f35a; 蓝桥云课签约作者、上架课程《Vue.js 和 E…

现在学Oracle是49年入国军么?

今天周末&#xff0c;不聊技术&#xff0c;聊聊大家说的最多的一个话题 先说明一下&#xff0c;防止挨喷&#x1f606; 本人并不是职业dba&#xff0c;对数据库就是爱好&#xff0c;偶尔兼职&#xff0c;以下仅个人观点分析&#xff0c;如有不同观点请轻喷&#xff0c;哈哈&…

万字长文带你由浅入深夯实ARM汇编基础——汇编指令及寻址方式最全梳理(附示例)!

《嵌入式工程师自我修养/C语言》系列——由浅入深夯实ARM汇编基础&#xff0c;汇编指令及寻址方式梳理&#xff08;附示例&#xff09;&#xff01; 一、引言二、ARM汇编语言2.1 ARM汇编的特点2.2 ARM指令集格式标准2.2.1 机器指令格式2.2.2 汇编指令格式 三、ARM寻址方式3.1 立…

【Android安全】Windows 环境下载 AOSP 源码

准备环境 安装 git 安装 Python 硬盘剩余容量最好大于 100G 打开 Git Bash&#xff0c;用 git 克隆源代码仓库 git clone https://android.googlesource.com/platform/manifest.git //没有梯子使用清华源 git clone https://aosp.tuna.tsinghua.edu.cn/platform/manifest.git…

174基于matlab的雷达数字信号处理

基于matlab的雷达数字信号处理。该程序具备对雷达目标回波的处理能力&#xff0c;能够从噪声中将目标检测出来&#xff0c;并提取目标的距离、速度、角度信息。有相应的试验文档。程序已调通&#xff0c;可直接运行。 174 雷达数字信号处理 目标检测出来 (xiaohongshu.com)

半导体物理基础-笔记(续)

源内容参考&#xff1a;https://www.bilibili.com/video/BV11U4y1k7zn/?spm_id_from333.337.search-card.all.click&vd_source61654d4a6e8d7941436149dd99026962 掺杂半导体的费米能级与温度及杂质浓度的关系图 在温度一定的条件下&#xff0c;施主杂质浓度越高&#xff0…

字符串(算法竞赛)--字典树Trie与最大异或对

1、B站视频链接&#xff1a;F06 字典树(Trie)_哔哩哔哩_bilibili 题目链接&#xff1a;【模板】字典树 - 洛谷 #include <bits/stdc.h> using namespace std; const int N100010; int n; char s[N]; int ch[N][26];//ch[0][2]1表示0号节点通过c边走到了节点1 int cnt[…

Java语言实现学生管理系统

目录 题目 代码展示 学生类 方法类 main类 运行展示​编辑 题目 学生管理 设计一个学生信息管理系统,有添加学生,查询学生,删除学生等功能. 要求:1.设计一个类学生类,学生属性有学号,姓名,性别(属性私有权限) 用来存储学生的信息 要求2:实现对学生信息的增删查操作 要求…

API攻防-接口安全SOAPOpenAPIRESTful分类特征导入项目联动检测

知识点 1、API分类特征-SOAP&OpenAPI&RESTful 2、API检测项目-Postman&APIKit&XRAY 部分项目下载&#xff1a; https://github.com/API-Security/APIKit https://github.com/lijiejie/swagger-exp https://github.com/jayus0821/swagger-hack 靶场和资源总结&…

限流算法

下面对常见的限流算法进行讨论。目前&#xff0c;常用的限流算法主要有三种&#xff1a;计数器法、滑动窗口算法、漏桶算法和令牌桶算法。下面分别介绍其原理。 1. 计数器法 计数器法是通过计数对到来的请求进行选择性处理。如系统限制一秒内最多有X个请求&#xff0c;则在该…

飞天使-k8s知识点23-kubernetes实操8-数据存储1

文章目录 持久化存储的必要EmptyDirHostPathNFS 持久化存储的必要 Volume是Pod中能够被多个容器访问的共享目录&#xff0c;它被定义在Pod上&#xff0c;然后被一个Pod里的多个容器挂载到具体的文件目录下&#xff0c;kubernetes通过Volume实现同一个Pod中不同容器之间的数据共…

Nest创建神经元,并显示电压变化曲线

nest 安装与介绍 NEST&#xff08;神经模拟工具&#xff09;最初是在 1990 年代后期开发的。它的主要目标是作为计算神经科学模拟器。它支持具有不同生物学细节水平的各种神经元和突触模型。例如&#xff0c;NEST 的神经元模型范围从泄漏积分和激发模型到详细的 Hodgkin-Huxle…

深度学习手写字符识别:推理过程

说明 本篇博客主要是跟着B站中国计量大学杨老师的视频实战深度学习手写字符识别。 第一个深度学习实例手写字符识别 深度学习环境配置 可以参考下篇博客&#xff0c;网上也有很多教程&#xff0c;很容易搭建好深度学习的环境。 Windows11搭建GPU版本PyTorch环境详细过程 数…

抖音视频提取软件使用功能|抖音视频下载工具

我们的抖音视频提取软件是一款功能强大、易于操作的工具&#xff0c;旨在解决用户在获取抖音视频时需要逐个复制链接、下载的繁琐问题。我们的软件支持通过关键词搜索和分享链接两种方式获取抖音视频&#xff0c;方便用户快速找到自己感兴趣的内容。 主要功能模块&#xff1a;…

论文阅读:Ground-Fusion: A Low-cost Ground SLAM System Robust to Corner Cases

前言 最近看到一篇ICRA2024上的新文章&#xff0c;是关于多传感器融合SLAM的&#xff0c;好像使用了最近几年文章中较火的轮式里程计。感觉这篇文章成果不错&#xff0c;代码和数据集都是开源的&#xff0c;今天仔细读并且翻译一下&#xff0c;理解创新点、感悟研究方向、指导…

PX4FMU和PX4IO最底层启动过程分析(上)

PX4FMU和PX4IO最底层启动过程分析&#xff08;上&#xff09; 主处理器和协处理器的固件烧写和运行过程 PX4FMU&#xff1a;各种传感器数据读取、姿态解算、PWM控制量的计算、与PX4IO通信。负责飞控最主要的工作。 PX4IO&#xff08;STM32F103&#xff09;&#xff1a;为PIXHA…

查看仓库版本记录

打开命令行窗口 输入git log即可。 若发现分支不对&#xff0c;方法如下 查看项目目录&#xff0c;命令行输入dir可以查看 多个moudel&#xff0c;进入到需要查版本记录的moudel下 命令行输入cd .\文件名如wowo-win-server\ 切换到wowo-win-server文件夹下后&#xff0c;再输入…

C语言第三十弹---自定义类型:结构体(上)

✨个人主页&#xff1a; 熬夜学编程的小林 &#x1f497;系列专栏&#xff1a; 【C语言详解】 【数据结构详解】 结构体 1、结构体类型的声明 1.1、结构体回顾 1.1.1、结构的声明 1.1.2、结构体变量的创建和初始化 1.2、结构的特殊声明 1.3、结构的自引用 2、结构体内存…

【Java多线程】对线程池的理解并模拟实现线程池

目录 1、池 1.1、线程池 2、ThreadPoolExecutor 线程池类 3、Executors 工厂类 4、模拟实现线程池 1、池 “池”这个概念见到非常多&#xff0c;例如常量池、数据库连接池、线程池、进程池、内存池。 所谓“池”的概念就是&#xff1a;&#xff08;提高效率&#xff09; 1…
最新文章