华为dhcp stp vrrp nat acl 各种路由协议

2024-02-24 19:50

本文主要是介绍华为dhcp stp vrrp nat acl 各种路由协议,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

 

本次实验的所有的前提是将IP地址配置好,其次是stp生成树,热备

然后向上配置,各种动态路由协议以及不同路由协议之间的重分发

其次是左上角area1的搭建虚链路以及右边的DHCP部署

最后就是服务器的部署和主机IP地址的配置

 

[Huawei]vl b  10 20 30 40

Info: This operation may take a few seconds. Please wait for a moment...done.

[Huawei]int e0/0/1

[Huawei-Ethernet0/0/1]port  link-type  ac

[Huawei-Ethernet0/0/1]port  default  vl 10

[Huawei-Ethernet0/0/1]int e0/0/2

[Huawei-Ethernet0/0/2]port link-type  ac

[Huawei-Ethernet0/0/2]port de vl 20

[Huawei]int e0/0/3

[Huawei-Ethernet0/0/3]port link-type tr

[Huawei-Ethernet0/0/3]port  tr all vl all

[Huawei-Ethernet0/0/3]int e0/0/4

[Huawei-Ethernet0/0/4]port link-type  tr

[Huawei-Ethernet0/0/4]port tr all vl all

[Huawei-Ethernet0/0/4]q

[Huawei]stp  region-configuration

[Huawei-mst-region]region-name  1

[Huawei-mst-region]instance 1 vl 10 to 20

[Huawei-mst-region]instance 2 vl 30 to 40

[Huawei-mst-region]active region-configuration

Info: This operation may take a few seconds. Please wait for a moment...done.

[Huawei-mst-region]stp enable

[Huawei]stp pathcost-standard legacy

Warning: The path cost of the current process will be set to the default value b

ecause the path cost standard is changed.

[Huawei]int e0/0/4

[Huawei-Ethernet0/0/4]stp instance 2 cost 20000

[Huawei-Ethernet0/0/4]int e0/0/1

[Huawei-Ethernet0/0/1]stp dis

[Huawei-Ethernet0/0/1]int e0/0/2

[Huawei-Ethernet0/0/2]stp dis

[Huawei]vl b 10 20 30 40

Info: This operation may take a few seconds. Please wait for a moment...done.

[Huawei]int vl 10

[Huawei-Vlanif10]q

[Huawei]int e0/0/1

[Huawei-Ethernet0/0/1]port link-type  ac

[Huawei-Ethernet0/0/1]port de vl 30

[Huawei-Ethernet0/0/1]int e0/0/2

[Huawei-Ethernet0/0/2]port link-type  ac

[Huawei-Ethernet0/0/2]port de vl 40

[Huawei-Ethernet0/0/2]int e0/0/3

[Huawei-Ethernet0/0/3]port link-type tr

[Huawei-Ethernet0/0/3]port  tr all  vl all

[Huawei]int e0/0/4

[Huawei-Ethernet0/0/4]port link-type  tr

[Huawei-Ethernet0/0/4]port tr all vl all

[Huawei-Ethernet0/0/4]q

[Huawei]stp region-configuration

[Huawei-mst-region]region-name 1

[Huawei-mst-region]instance 1 vl 10 to 20

[Huawei-mst-region]instance 2 vl 30 to 40

[Huawei-mst-region]active  region-configuration

Info: This operation may take a few seconds. Please wait for a moment...done.

[Huawei-mst-region]stp en

[Huawei]stp pathcost-standard legacy

Warning: The path cost of the current process will be set to the default value b

ecause the path cost standard is changed.

[Huawei]int e0/0/4

[Huawei-Ethernet0/0/4]stp instance 1  cost 2000

[Huawei-Ethernet0/0/4]int e0/0/1

[Huawei-Ethernet0/0/1]stp dis

[Huawei-Ethernet0/0/1]int e0/0/2

[Huawei-Ethernet0/0/2]stp dis

 

 

[Huawei]vl b 10 20 30 40

Info: This operation may take a few seconds. Please wait for a moment...done.

[Huawei]int vl 10

[Huawei-Vlanif10]ip add 1.1.1.1  24

[Huawei-Vlanif10]un sh

Info: Interface Vlanif10 is not shutdown.

[Huawei-Vlanif10]q

[Huawei]int vl 20

[Huawei-Vlanif20]ip add 1.1.2.1  24

[Huawei-Vlanif20]un sh

Info: Interface Vlanif20 is not shutdown.

[Huawei-Vlanif20]q

[Huawei]int vl 30

[Huawei-Vlanif30]ip add 1.1.3.1  24

[Huawei-Vlanif30]un sh

Info: Interface Vlanif30 is not shutdown.

[Huawei-Vlanif30]q

[Huawei]int vl 40

[Huawei-Vlanif40]ip add 1.1.4.1 24

[Huawei-Vlanif40]un sh

Info: Interface Vlanif40 is not shutdown.

[Huawei-Vlanif40]q

[Huawei]int g0/0/1

[Huawei-GigabitEthernet0/0/1]port link-type tr

[Huawei-GigabitEthernet0/0/1]port tr all vl all

[Huawei-GigabitEthernet0/0/1]int g0/0/2

[Huawei-GigabitEthernet0/0/2]port link-type  tr

[Huawei-GigabitEthernet0/0/2]port tr all vl all

[Huawei-GigabitEthernet0/0/2]int g0/0/3

[Huawei-GigabitEthernet0/0/3]port link-type  tr

[Huawei-GigabitEthernet0/0/3]port tr all vl all

[Huawei-GigabitEthernet0/0/3]un sh

Info: Interface GigabitEthernet0/0/3 is not shutdown.

[Huawei-GigabitEthernet0/0/3]q

[Huawei]stp region-configuration

[Huawei-mst-region]region-name 1

[Huawei-mst-region]instance 1 vl 10 to 20

[Huawei-mst-region]instance 2 vl 30 to 40

[Huawei-mst-region]active  region-configuration

Info: This operation may take a few seconds. Please wait for a moment...done.

[Huawei-mst-region]stp en

[Huawei]stp pathcost-standard legacy

[Huawei]stp instance 1 root primary

[Huawei]stp instance 2 root se

[Huawei]int vl 10

[Huawei-Vlanif10]vrrp  vrid 10 virtual-ip 1.1.1.100

[Huawei-Vlanif10]vrrp  vrid 10  priority 120

[Huawei-Vlanif10]vrrp  vrid  10 preempt-mode  timer delay 10

[Huawei-Vlanif10]int vl 20

[Huawei-Vlanif20]vrrp  vrid 20 virtual-ip  1.1.2.100

[Huawei-Vlanif20]vrrp  vrid 20 priority  120

[Huawei-Vlanif20]vrrp  vrid 20 preempt-mode  timer delay 0

[Huawei-Vlanif20]int vl 30

[Huawei-Vlanif30]vrrp vrid 30 virtual-ip 1.1.3.100

[Huawei-Vlanif30]int vl 40

[Huawei-Vlanif40]vrrp  vrid 40 virtual-ip  1.1.4.100

[Huawei-Vlanif40]q

 

[Huawei]ospf router-id 8.8.8.8

[Huawei-ospf-1]area 3

[Huawei-ospf-1-area-0.0.0.3]net 192.168.13.0  0.0.0.255

[Huawei]ospf

[Huawei-ospf-1]import-route  static

[Huawei-ospf-1]q

[Huawei]ip route-static 1.1.0.0 255.255.128.0 1.1.5.1 preference 2

[Huawei]ip route-static 1.1.0.0 255.255.128.0 1.1.6.1 preference 3

 

bgp 1

 router-id 1.1.1.1

 peer 192.168.9.2 as-number 2

  import-route ospf 1

  import-route rip 1

#

ospf 1 router-id 2.2.2.2

 import-route rip 1

 import-route bgp cost 10

 area 0.0.0.0

  network 192.168.5.0 0.0.0.255

  network 192.168.8.0 0.0.0.255

 area 0.0.0.3

  network 192.168.13.0 0.0.0.255

#

rip 1

 network 192.168.11.0

 import-route ospf 1

 import-route bgp cost 10

 

[Huawei]bgp 2

[Huawei-bgp]router-id 5.5.5.5

[Huawei-bgp]peer 192.168.9.1 as-number 1

[Huawei-bgp]ipv4-family  unicast

[Huawei-bgp-af-ipv4]network 192.168.10.0 24

[Huawei-bgp]import-route ospf 1

[Huawei-bgp]

 

[Huawei]rip

[Huawei-rip-1]net 192.168.11.0

[Huawei-rip-1]net 192.168.12.0

[Huawei-rip-1]

[Huawei]acl 2000

[Huawei-acl-basic-2000]rule 1 permit source 192.168.12.0  0.0.0.255

[Huawei]int g0/0/0

[Huawei-GigabitEthernet0/0/0]nat server protocol tcp global 192.168.11.111  8080

  inside 192.168.12.2  80

[Huawei]rip

[Huawei-rip-1]import-route ospf 1

 

[Huawei]ospf router-id 3.3.3.3

[Huawei-ospf-1]area 0

[Huawei-ospf-1-area-0.0.0.0]net 192.168.8.0 0.0.0.255

[Huawei-ospf-1-area-0.0.0.0]q

[Huawei-ospf-1]area 1

[Huawei-ospf-1-area-0.0.0.1]net 192.168.3.0  0.0.0.255

[Huawei-ospf-1-area-0.0.0.1]q

[Huawei-ospf-1]q

[Huawei]ip route-static 192.168.7.0  24  192.168.6.2

[Huawei]isis 1

[Huawei-isis-1]is-level level-2

[Huawei-isis-1]network-entity 10.0000.0000.0001.00

[Huawei-isis-1]q

[Huawei]int g0/0/2

[Huawei-GigabitEthernet0/0/2]isis enable 1

[Huawei]ospf

[Huawei-ospf-1]import-route isis cost 10

[Huawei-ospf-1]import-route static

[Huawei-ospf-1]q

[Huawei]isis 1

[Huawei-isis-1]import-route ospf 1

[Huawei-isis-1]q

[Huawei]ospf

[Huawei-ospf-1]area 1

[Huawei-ospf-1-area-0.0.0.1]v

[Huawei-ospf-1-area-0.0.0.1]vlink-peer 4.4.4.4

[Huawei]ospf r

[Huawei]ospf router-id 4.4.4.4

[Huawei-ospf-1]area 1

[Huawei-ospf-1-area-0.0.0.1]net 192.168.3.0  0.0.0.255

[Huawei-ospf-1-area-0.0.0.1]q

[Huawei-ospf-1]area 2

[Huawei-ospf-1-area-0.0.0.2]net 192.168.2.0  0.0.0.255

[Huawei-ospf-1-area-0.0.0.2]

 

 

[Huawei]ospf r

[Huawei]ospf router-id 6.6.6.6

[Huawei-ospf-1]area 2

[Huawei-ospf-1-area-0.0.0.2]net 192.168.2.0 0.0.0.255

[Huawei-ospf-1-area-0.0.0.2]net 192.168.1.0 0.0.0.255

[Huawei-ospf-1-area-0.0.0.2]

 

[Huawei]isis 1

[Huawei-isis-1]is-level level-2

[Huawei-isis-1]network-entity 10.0000.0000.0002.00

[Huawei-isis-1]q

[Huawei]int g0/0/0

[Huawei-GigabitEthernet0/0/0]isis en 1

[Huawei-GigabitEthernet0/0/0]int g0/0/1

[Huawei-GigabitEthernet0/0/1]isis en 1

[Huawei-GigabitEthernet0/0/1]

 

[Huawei]ip route-static 0.0.0.0  0  192.168.6.1

[Huawei]dhcp enable

Info: The operation may take a few seconds. Please wait for a moment.done.

[Huawei]int g0/0/0

[Huawei-GigabitEthernet0/0/0]dhcp select global

[Huawei-GigabitEthernet0/0/0]q

[Huawei]ip  pool  1

Info: It's successful to create an IP address pool.

[Huawei-ip-pool-1]network  192.168.7.0 mask 24

[Huawei-ip-pool-1]gateway-list 192.168.7.1

[Huawei-ip-pool-1]static-bind ip-address 192.168.7.100 mac-address 5489-9820-756

4

 

 最后实现主机与主机之间都能ping通,而服务器则是访问转换后的网页IP地址加虚假端口号

这篇关于华为dhcp stp vrrp nat acl 各种路由协议的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/743182

相关文章

HTTP 与 SpringBoot 参数提交与接收协议方式

《HTTP与SpringBoot参数提交与接收协议方式》HTTP参数提交方式包括URL查询、表单、JSON/XML、路径变量、头部、Cookie、GraphQL、WebSocket和SSE,依据... 目录HTTP 协议支持多种参数提交方式,主要取决于请求方法(Method)和内容类型(Content-Ty

Go语言使用Gin处理路由参数和查询参数

《Go语言使用Gin处理路由参数和查询参数》在WebAPI开发中,处理路由参数(PathParameter)和查询参数(QueryParameter)是非常常见的需求,下面我们就来看看Go语言... 目录一、路由参数 vs 查询参数二、Gin 获取路由参数和查询参数三、示例代码四、运行与测试1. 测试编程路

Java对接MQTT协议的完整实现示例代码

《Java对接MQTT协议的完整实现示例代码》MQTT是一个基于客户端-服务器的消息发布/订阅传输协议,MQTT协议是轻量、简单、开放和易于实现的,这些特点使它适用范围非常广泛,:本文主要介绍Ja... 目录前言前置依赖1. MQTT配置类代码解析1.1 MQTT客户端工厂1.2 MQTT消息订阅适配器1.

Linux中的自定义协议+序列反序列化用法

《Linux中的自定义协议+序列反序列化用法》文章探讨网络程序在应用层的实现,涉及TCP协议的数据传输机制、结构化数据的序列化与反序列化方法,以及通过JSON和自定义协议构建网络计算器的思路,强调分层... 目录一,再次理解协议二,序列化和反序列化三,实现网络计算器3.1 日志文件3.2Socket.hpp

Linux中的HTTPS协议原理分析

《Linux中的HTTPS协议原理分析》文章解释了HTTPS的必要性:HTTP明文传输易被篡改和劫持,HTTPS通过非对称加密协商对称密钥、CA证书认证和混合加密机制,有效防范中间人攻击,保障通信安全... 目录一、什么是加密和解密?二、为什么需要加密?三、常见的加密方式3.1 对称加密3.2非对称加密四、

Linux权限管理与ACL访问控制详解

《Linux权限管理与ACL访问控制详解》Linux权限管理涵盖基本rwx权限(通过chmod设置)、特殊权限(SUID/SGID/StickyBit)及ACL精细授权,由umask决定默认权限,需合... 目录一、基本权限概述1. 基本权限与数字对应关系二、权限管理命令(chmod)1. 字符模式语法2.

Django中的函数视图和类视图以及路由的定义方式

《Django中的函数视图和类视图以及路由的定义方式》Django视图分函数视图和类视图,前者用函数处理请求,后者继承View类定义方法,路由使用path()、re_path()或url(),通过in... 目录函数视图类视图路由总路由函数视图的路由类视图定义路由总结Django允许接收的请求方法http

如何在Spring Boot项目中集成MQTT协议

《如何在SpringBoot项目中集成MQTT协议》本文介绍在SpringBoot中集成MQTT的步骤,包括安装Broker、添加EclipsePaho依赖、配置连接参数、实现消息发布订阅、测试接口... 目录1. 准备工作2. 引入依赖3. 配置MQTT连接4. 创建MQTT配置类5. 实现消息发布与订阅

使用Python进行GRPC和Dubbo协议的高级测试

《使用Python进行GRPC和Dubbo协议的高级测试》GRPC(GoogleRemoteProcedureCall)是一种高性能、开源的远程过程调用(RPC)框架,Dubbo是一种高性能的分布式服... 目录01 GRPC测试安装gRPC编写.proto文件实现服务02 Dubbo测试1. 安装Dubb

华为鸿蒙HarmonyOS 5.1官宣7月开启升级! 首批支持名单公布

《华为鸿蒙HarmonyOS5.1官宣7月开启升级!首批支持名单公布》在刚刚结束的华为Pura80系列及全场景新品发布会上,除了众多新品的发布,还有一个消息也点燃了所有鸿蒙用户的期待,那就是Ha... 在今日的华为 Pura 80 系列及全场景新品发布会上,华为宣布鸿蒙 HarmonyOS 5.1 将于 7