当前位置:网站首页>华为路由交换
华为路由交换
2022-08-02 14:04:00 【H2223】
园区网拓扑:
接入层:
port-group group-member g0/0/1 to g0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
port-group group-member g0/0/3 to g0/0/10
port link-type access
port default vlan 2
stp edged-port enable //端口加速
port-group group-member g0/0/11 to g0/0/19
port link-type access
port default vlan 3
stp edged-port enable
stp:
stp region-configuration
region-name a1
instance 1 vlan 2 to 4
instance 2 vlan 5 to 7
active region-configuration
其他接入层设备配置基本相同
汇聚层-1:
vlan batch 2 to 7 12 17 to 18 20 28 //创建vlan
stp instance 0 root secondary
stp instance 1 root primary
stp instance 2 root secondary //定义组1 为根,组2为备份根
stp region-configuration
region-name a1
instance 1 vlan 2 to 4
instance 2 vlan 5 to 7
active region-configuration
interface Vlanif2
ip address 10.0.1.1 255.255.255.0 //设置svi的ip地址
vrrp vrid 1 virtual-ip 10.0.1.2 //设置vrrp的虚拟地址
vrrp vrid 1 priority 120
vrrp vrid 1 track interface GigabitEthernet0/0/6 reduced 15
vrrp vrid 1 track interface GigabitEthernet0/0/7 reduced 15 //上行链路追踪
dhcp select global
interface Vlanif5
ip address 10.0.2.1 255.255.255.0
vrrp vrid 1 virtual-ip 10.0.2.2
vrrp vrid 1 priority 120
vrrp vrid 1 track interface GigabitEthernet0/0/6 reduced 15
vrrp vrid 1 track interface GigabitEthernet0/0/7 reduced 15
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 7
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 7
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 7
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 2 to 7 //下行链路配置
ospf配置:
ospf 1 router-id 3.3.3.3
bfd all-interfaces enable
bfd all-interfaces min-tx-interval 100 min-rx-interval 100
silent-interface Vlanif2
silent-interface Vlanif5
spf-schedule-interval intelligent-timer 5000 500 1000
lsa-originate-interval intelligent-timer 5000 200 1000
area 0.0.0.0
area 0.0.0.1
stub
interface Vlanif12
ip address 10.0.12.1 255.255.255.0
ospf network-type p2p
ospf timer hello 1
ospf enable 1 area 0.0.0.1
#
interface Vlanif17
ip address 10.0.17.1 255.255.255.0
ospf network-type p2p
ospf timer hello 1
ospf enable 1 area 0.0.0.1
#
interface Vlanif18
ip address 10.0.18.1 255.255.255.0
ospf network-type p2p
ospf timer hello 1
ospf enable 1 area 0.0.0.1 //配置三层接口
interface Eth-Trunk12
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 7 12
interface GigabitEthernet0/0/6
port link-type access
port default vlan 17
#
interface GigabitEthernet0/0/7
port link-type access
port default vlan 18
将svi划入物理接口
DHCP配置:
ip pool vlan2
gateway-list 10.0.1.2
network 10.0.1.0 mask 255.255.255.0
excluded-ip-address 10.0.1.1
excluded-ip-address 10.0.1.3
excluded-ip-address 10.0.1.128 10.0.1.254 //排除地址
dns-list 8.8.8.8
汇聚层-2
stp instance 0 root secondary
stp instance 1 root secondary
stp instance 2 root primary
stp region-configuration
region-name a1
instance 1 vlan 2 to 4
instance 2 vlan 5 to 7
active region-configuration
interface Vlanif2
ip address 10.0.1.3 255.255.255.0
vrrp vrid 1 virtual-ip 10.0.1.2
vrrp vrid 1 priority 120
vrrp vrid 1 track interface GigabitEthernet0/0/6 reduced 15
vrrp vrid 1 track interface GigabitEthernet0/0/7 reduced 15
dhcp select global
#
interface Vlanif5
ip address 10.0.2.3 255.255.255.0
vrrp vrid 1 virtual-ip 10.0.2.2
vrrp vrid 1 priority 120
vrrp vrid 1 track interface GigabitEthernet0/0/6 reduced 15
vrrp vrid 1 track interface GigabitEthernet0/0/7 reduced 15
dhcp select global
interface Vlanif12
ip address 10.0.12.2 255.255.255.0
ospf network-type p2p
ospf timer hello 1
ospf enable 1 area 0.0.0.1
#
interface Vlanif27
ip address 10.0.27.2 255.255.255.0
ospf network-type p2p
ospf timer hello 1
ospf enable 1 area 0.0.0.1
#
interface Vlanif28
ip address 10.0.28.2 255.255.255.0
ospf network-type p2p
ospf timer hello 1
ospf enable 1 area 0.0.0.1
#
interface MEth0/0/1
#
interface Eth-Trunk12
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 7 12
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 7
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 7
#
interface GigabitEthernet0/0/3
eth-trunk 12
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 7
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 2 to 7
#
interface GigabitEthernet0/0/6
port link-type access
port default vlan 28
#
interface GigabitEthernet0/0/7
port link-type access
port default vlan 27
ospf 1 router-id 4.4.4.4
bfd all-interfaces enable
bfd all-interfaces min-tx-interval 100 min-rx-interval 100
silent-interface Vlanif2
silent-interface Vlanif5
spf-schedule-interval intelligent-timer 5000 500 1000
lsa-originate-interval intelligent-timer 5000 200 1000
area 0.0.0.1
stub
结果:
核心层-1:
interface Vlanif17
ip address 10.0.17.7 255.255.255.0
ospf network-type p2p
ospf timer hello 1
ospf enable 1 area 0.0.0.1
#
interface Vlanif27
ip address 10.0.27.7 255.255.255.0
ospf network-type p2p
ospf timer hello 1
ospf enable 1 area 0.0.0.1
#
interface Vlanif78
ip address 10.0.78.7 255.255.255.0
ospf network-type p2p
ospf timer hello 1
#
interface MEth0/0/1
#
interface Eth-Trunk12
port link-type access
port default vlan 78
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 17
#
interface GigabitEthernet0/0/2
eth-trunk 12
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 27
#
interface GigabitEthernet0/0/4
eth-trunk 12
ospf 1 router-id 2.2.2.2
bfd all-interfaces enable
bfd all-interfaces min-tx-interval 100 min-rx-interval 100
spf-schedule-interval intelligent-timer 5000 500 1000
lsa-originate-interval intelligent-timer 5000 200 1000
area 0.0.0.0
network 10.0.78.0 0.0.0.255
area 0.0.0.1
stub no-summary
#
user-interface con 0
user-interface vty 0 4
核心层-2::
interface Vlanif18
ip address 10.0.18.8 255.255.255.0
ospf network-type p2p
ospf timer hello 1
ospf enable 1 area 0.0.0.1
#
interface Vlanif28
ip address 10.0.28.8 255.255.255.0
ospf network-type p2p
ospf timer hello 1
ospf enable 1 area 0.0.0.1
#
interface Vlanif78
ip address 10.0.78.8 255.255.255.0
ospf network-type p2p
ospf timer hello 1
#
interface MEth0/0/1
#
interface Eth-Trunk12
port link-type access
port default vlan 78
#
interface GigabitEthernet0/0/1
eth-trunk 12
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 18
#
interface GigabitEthernet0/0/4
eth-trunk 12
ospf 1 router-id 1.1.1.1
bfd all-interfaces enable
bfd all-interfaces min-tx-interval 100 min-rx-interval 100
spf-schedule-interval intelligent-timer 5000 500 1000
lsa-originate-interval intelligent-timer 5000 200 1000
area 0.0.0.0
network 10.0.78.0 0.0.0.255
area 0.0.0.1
stub no-summary
边栏推荐
- uniapp小程序禁止遮罩弹窗下的页面滚动的完美解决办法
- [ROS] Introduction to common tools in ROS (to be continued)
- window10 lower semi-automatic labeling
- c语言三子棋详解!!! (电脑智能下棋)(附上完整代码)
- 8580 Merge linked list
- 使用云GPU+pycharm训练模型实现后台跑程序、自动保存训练结果、服务器自动关机
- 宝塔搭建DM企业建站系统源码实测
- 浏览器报错数字代表的大概意思
- Deep learning framework pytorch rapid development and actual combat chapter4
- HBuilderX 核心插件安装提示:“插件XXX下载失败,请检查网络”问题的解决办法
猜你喜欢
window10 lower semi-automatic labeling
Chapter6 visualization (don't want to see the version)
宝塔搭建DM企业建站系统源码实测
[ROS] (06) ROS Communication - Topic Communication
VS Code远程开发及免密配置
C语言日记 4 变量
Using the cloud GPU + pycharm training model to realize automatic background run programs, save training results, the server automatically power off
STM32 (F407) - stack
8581 线性链表逆置
C语言初级—水仙花数
随机推荐
十分钟带你入门Nodejs
C语言待解决
Basic operations of 8583 sequential stack
yolov5 improvement (1) Add attention focus mechanism
Raj delivery notes - separation 第08 speak, speaking, reading and writing
Chapter6 visualization (don't want to see the version)
C语言日记 3 常量
HBuilderX 核心插件安装提示:“插件XXX下载失败,请检查网络”问题的解决办法
主存储器(二)
Flask request application context source code analysis
标签加id 和 加号 两个文本框 和一个var 赋值
paddleocr window10 first experience
YOLOv7 uses cloud GPU to train its own dataset
[ROS]roscd和cd的区别
VS Code远程开发及免密配置
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id ‘c
原码、反码、补码和移码
PHP版本切换:5.x到7.3
C语言日记 2 标识符
Deep learning framework pytorch rapid development and actual combat chapter4