当前位置: 首页 > news >正文

华为mstp、vrrp、ospf、isis、bgp等综合一起排错

在这里插入图片描述

最终实现左边私网和右边私网全部ping通

SW1

vlan batch 12 34

stp region-configuration //mstp配置
region-name test
instance 12 vlan 12
instance 34 vlan 34
active region-configuration

interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 12 34

interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 12 34

interface GigabitEthernet0/0/10
port link-type access
port default vlan 12

interface GigabitEthernet0/0/11
port link-type access
port default vlan 12

SW2

vlan batch 12 34
stp region-configuration
region-name test
instance 12 vlan 12
instance 34 vlan 34
active region-configuration

interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 12 34

interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 12 34

interface GigabitEthernet0/0/10
port link-type access
port default vlan 34

interface GigabitEthernet0/0/11
port link-type access
port default vlan 34

SW3

vlan batch 12 to 13 34

stp instance 12 root primary //设置为主根
stp instance 34 root secondary //设置为备根

stp region-configuration
region-name test
instance 12 vlan 12
instance 34 vlan 34
active region-configuration

interface Vlanif12
ip address 192.168.12.3 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.12.254 //vrrp配置
vrrp vrid 1 priority 150

interface Vlanif13
ip address 10.0.13.3 255.255.255.0

interface Vlanif34
ip address 192.168.34.3 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.34.254

interface MEth0/0/1

interface GigabitEthernet0/0/1
port link-type access
port default vlan 13

interface GigabitEthernet0/0/2

interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 12 34

interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 12 34

ip route-static 0.0.0.0 0.0.0.0 10.0.13.1

SW4

vlan batch 12 14 34

stp instance 12 root secondary
stp instance 34 root primary

stp region-configuration
region-name test
instance 12 vlan 12
instance 34 vlan 34
active region-configuration

interface Vlanif12
ip address 192.168.12.4 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.12.254

interface Vlanif14
ip address 10.0.14.4 255.255.255.0

interface Vlanif34
ip address 192.168.34.4 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.34.254
vrrp vrid 2 priority 150

interface MEth0/0/1

interface GigabitEthernet0/0/1

interface GigabitEthernet0/0/2
port link-type access
port default vlan 14

interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 12 34

interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 12 34

ip route-static 0.0.0.0 0.0.0.0 10.0.14.1

R1

interface GigabitEthernet0/0/0
ip address 10.0.12.1 255.255.255.0

interface GigabitEthernet0/0/1
ip address 10.0.13.1 255.255.255.0

interface GigabitEthernet0/0/2
ip address 10.0.14.1 255.255.255.0

interface LoopBack0
ip address 10.0.1.1 255.255.255.255

bgp 100
router-id 10.0.1.1
peer 10.0.2.2 as-number 100
peer 10.0.2.2 connect-interface LoopBack0

ipv4-family unicast
undo synchronization
import-route static //导入静态,刚好静态通过ip route-static查看只有12、34段
peer 10.0.2.2 enable
peer 10.0.2.2 next-hop-local

ospf 1 router-id 10.0.1.1
area 0.0.0.0
network 10.0.1.1 0.0.0.0
network 10.0.12.1 0.0.0.0

ip route-static 192.168.12.0 255.255.255.0 10.0.13.3
ip route-static 192.168.12.0 255.255.255.0 10.0.14.4 preference 70
ip route-static 192.168.34.0 255.255.255.0 10.0.13.3 preference 70
ip route-static 192.168.34.0 255.255.255.0 10.0.14.4
//让12和34段的回去的包走原来出去的路径回包,源进源出

R2

isis 1
cost-style wide
network-entity 49.0001.0000.0000.0002.00
import-route ospf 1 level-1 //右边和r3建立的是级别1,这里导入ospf必须选择级别1

interface GigabitEthernet0/0/0
ip address 10.0.12.2 255.255.255.0

interface GigabitEthernet0/0/1
ip address 10.0.23.2 255.255.255.0
isis enable 1
isis circuit-level level-1 //只和右边r3建立的是级别1,所以不让这个口发级别2的包出

interface LoopBack0
ip address 10.0.2.2 255.255.255.255
isis enable 1

bgp 100
router-id 10.0.2.2
peer 10.0.1.1 as-number 100
peer 10.0.1.1 connect-interface LoopBack0
peer 10.0.3.3 as-number 100
peer 10.0.3.3 connect-interface LoopBack0

ipv4-family unicast
undo synchronization
peer 10.0.1.1 enable
peer 10.0.1.1 reflect-client
peer 10.0.3.3 enable
peer 10.0.3.3 reflect-client

ospf 1 router-id 10.0.2.2
import-route isis 1
area 0.0.0.0
network 10.0.2.2 0.0.0.0
network 10.0.12.2 0.0.0.0

R3

dhcp enable

ip pool test
gateway-list 192.168.56.254
network 192.168.56.0 mask 255.255.255.0
excluded-ip-address 192.168.56.6
dns-list 192.168.1.1

isis 1
is-level level-1
cost-style wide
network-entity 49.0001.0000.0000.0003.00

firewall zone Local
priority 15

interface GigabitEthernet0/0/0

interface GigabitEthernet0/0/1
ip address 10.0.23.3 255.255.255.0
isis enable 1

interface GigabitEthernet0/0/2.35 //用子接口
dot1q termination vid 35
ip address 10.0.35.3 255.255.255.0
arp broadcast enable
dhcp select global

interface LoopBack0
ip address 10.0.3.3 255.255.255.255
isis enable 1

bgp 100
router-id 10.0.3.3
peer 10.0.2.2 as-number 100
peer 10.0.2.2 connect-interface LoopBack0

ipv4-family unicast
undo synchronization
import-route static //导入静态,刚好静态通过ip route-static查看只有56段
peer 10.0.2.2 enable
peer 10.0.2.2 next-hop-local

ip route-static 192.168.56.0 255.255.255.0 10.0.35.5

SW5

vlan batch 35 56

dhcp enable

interface Vlanif35
ip address 10.0.35.5 255.255.255.0

interface Vlanif56
ip address 192.168.56.254 255.255.255.0
dhcp select relay //中继R3上面的dhcp地址池
dhcp relay server-ip 10.0.35.3

interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 35

interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 56

ip route-static 0.0.0.0 0.0.0.0 10.0.35.3

SW6

vlan batch 56

interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 56

interface GigabitEthernet0/0/10
port link-type access
port default vlan 56

interface GigabitEthernet0/0/11
port link-type access
port default vlan 56

相关文章:

  • Git | tag相关命令
  • nginx下upstream模块详解
  • laravel-admin之 浏览器自动填充密码(如果需要渲染数据库密码的话,首先确认数据库密码是否可以逆向解密)
  • 在MySQL中使用VARCHAR字段进行日期筛选
  • 【DevOps-01]】DevOps介绍
  • 【HarmonyOS】装饰器下的状态管理与页面路由跳转实现
  • MYSQL 视图
  • 华为HCIE课堂笔记第十二章 ICMPv6和NDP协议
  • 云计算:OpenStack 分布式架构部署(单控制节点与多计算节点)
  • Visual Studio调试模式下无法使用右键菜单将ppt转换到pdf
  • React 实现 Step组件
  • 少儿编程 中国电子学会图形化编程2022年3月等级考试Scratch二级真题解析(选择题、判断题)
  • 一个可以用于生产环境得PHP上传函数
  • YoloV5改进策略:基于频域多轴表示学习模块|全网首发|高效涨点|代码注释详解
  • 基于多反应堆的高并发服务器【C/C++/Reactor】(中)子线程 WorkerThread的实现 和 线程池ThreadPool的初始化
  • #Java异常处理
  • .pyc 想到的一些问题
  • 【译】React性能工程(下) -- 深入研究React性能调试
  • 2018一半小结一波
  • HTTP 简介
  • isset在php5.6-和php7.0+的一些差异
  • Koa2 之文件上传下载
  • Mac转Windows的拯救指南
  • mongo索引构建
  • Python学习之路16-使用API
  • React as a UI Runtime(五、列表)
  • SegmentFault 社区上线小程序开发频道,助力小程序开发者生态
  • 订阅Forge Viewer所有的事件
  • 互联网大裁员:Java程序员失工作,焉知不能进ali?
  • 深度解析利用ES6进行Promise封装总结
  • 使用Tinker来调试Laravel应用程序的数据以及使用Tinker一些总结
  • 算法-图和图算法
  • 小程序button引导用户授权
  • 继 XDL 之后,阿里妈妈开源大规模分布式图表征学习框架 Euler ...
  • 我们雇佣了一只大猴子...
  • ###51单片机学习(1)-----单片机烧录软件的使用,以及如何建立一个工程项目
  • #我与Java虚拟机的故事#连载11: JVM学习之路
  • #我与Java虚拟机的故事#连载16:打开Java世界大门的钥匙
  • (LNMP) How To Install Linux, nginx, MySQL, PHP
  • (MonoGame从入门到放弃-1) MonoGame环境搭建
  • (独孤九剑)--文件系统
  • (六)库存超卖案例实战——使用mysql分布式锁解决“超卖”问题
  • (转)http协议
  • (转)淘淘商城系列——使用Spring来管理Redis单机版和集群版
  • .NET 5种线程安全集合
  • .NET 6 Mysql Canal (CDC 增量同步,捕获变更数据) 案例版
  • .NET CORE 2.0发布后没有 VIEWS视图页面文件
  • .NET HttpWebRequest、WebClient、HttpClient
  • .Net Remoting(分离服务程序实现) - Part.3
  • .Net Web窗口页属性
  • .NET 同步与异步 之 原子操作和自旋锁(Interlocked、SpinLock)(九)
  • .NET/C# 项目如何优雅地设置条件编译符号?
  • .pyc文件是什么?
  • @font-face 用字体画图标
  • @kafkalistener消费不到消息_消息队列对战之RabbitMq 大战 kafka