文章目录
ensp华为配置VRRP
网络拓扑如图
任务目标:使用VRRP技术将汇聚层的两台三层交换机虚拟化为一台,虚拟地址为192.168.10.254
一、基础配置
1 配置PC1的IP地址、子网掩码和网关
- 略
2 配置接入交换机
2.1 重命名
- < Huawei>system-view
- [Huawei]sysname acsw
2.2 配置接口
配置下行接口
- [acsw]vlan 10
- [acsw-vlan10]quit
- [acsw]interface GigabitEthernet 0/0/3
- [acsw-GigabitEthernet0/0/3]port link-type access
- [acsw-GigabitEthernet0/0/3]port default vlan 100
- [acsw-GigabitEthernet0/0/3]qiut
配置两个上行接口
- [acsw]interface GigabitEthernet 0/0/1
- [acsw-GigabitEthernet0/0/1]port link-type trunk
- [acsw-GigabitEthernet0/0/1]port trunk allow-pass vlan all
- [acsw-GigabitEthernet0/0/1]quit
- [acsw]interface GigabitEthernet 0/0/2
- [acsw-GigabitEthernet0/0/2]port link-type trunk
- [acsw-GigabitEthernet0/0/2]port trunk allow-pass vlan all
- [acsw-GigabitEthernet0/0/2]quit
3 配置核心交换机
3.1 配置核心交换机1
重命名
- < Huawei>system-view
- [Huawei]system coresw1
配置三个接口
- [coresw1]interface GigabitEthernet 0/0/1
- [coresw1-GigabitEthernet0/0/1]port link-type trunk
- [coresw1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
- [coresw1-GigabitEthernet0/0/1]quit
- [coresw1]interface GigabitEthernet 0/0/3
- [coresw1-GigabitEthernet0/0/3]port link-type trunk
- [coresw1-GigabitEthernet0/0/3]port trunk allow-pass vlan all
- [coresw1-GigabitEthernet0/0/3]quit
- [coresw1]vlan 100
- [croesw1-vlan100]quit
- [coresw1]interface GigabitEthernet 0/0/2
- [coresw1-GigabitEthernet0/0/2]port link-type access
- [coresw1-GigabitEthernet0/0/2]port default vlan 100
- [coresw1-GigabitEthernet0/0/2]quit
配置vlan三层接口
- [croesw1]interdace vlanif 10
- [croesw1-vlanif10]ip address 192.168.10.252 24
- [croesw1-vlanif10]qiut
- [croesw1]interdace vlanif 100
- [croesw1-vlanif100]ip address 192.168.100.1 30
- [croesw1-vlanif100]qiut
3.2 配置核心交换机2
重命名
- < Huawei>system-view
- [Huawei]system coresw2
配置三个接口
- [coresw2]interface GigabitEthernet 0/0/1
- [coresw2-GigabitEthernet0/0/1]port link-type trunk
- [coresw2-GigabitEthernet0/0/1]port trunk allow-pass vlan all
- [coresw2-GigabitEthernet0/0/1]quit
- [coresw2]interface GigabitEthernet 0/0/3
- [coresw2-GigabitEthernet0/0/3]port link-type trunk
- [coresw2-GigabitEthernet0/0/3]port trunk allow-pass vlan all
- [coresw2-GigabitEthernet0/0/3]quit
- [coresw2]vlan 200
- [croesw2-vlan200]quit
- [coresw2]interface GigabitEthernet 0/0/2
- [coresw2-GigabitEthernet0/0/2]port link-type access
- [coresw2-GigabitEthernet0/0/2]port default vlan 200
- [coresw2-GigabitEthernet0/0/2]quit
配置vlan三层接口
- [croesw2]interdace vlanif 10
- [croesw2-vlanif10]ip address 192.168.10.253 24
- [croesw2-vlanif10]qiut
- [croesw2]interdace vlanif 200
- [croesw2-vlanif200]ip address 192.168.200.1 30
- [croesw2-vlanif200]qiut
3.3 核心交换机配置默认路由
为coresw1指定出口默认路由
- [crowsw1]ip route-static 0.0.0.0 0 192.168.100.2
为coresw2指定出口默认路由
- [crowsw2]ip route-static 0.0.0.0 0 192.168.200.2
4 出口路由配置
重命名
- < Huawei>system-view
- [Huawei]system AR1
进行接口配置
- [AR1]interface GigabitEthernet 0/0/1
- [AR1-GigabitEthernet0/0/1] ip address 192.168.100.2 30
- [AR1-GigabitEthernet0/0/1]interface GigabitEthernet 0/0/2
- [AR1-GigabitEthernet 0/0/2] ip address 192.168.200.2 30
- [AR1-GigabitEthernet 0/0/2]interface GigabitEthernet 0/0/0
- [AR1-GigabitEthernet 0/0/0] ip address 100.1.1.2 30
- [AR1-GigabitEthernet 0/0/0]quit
为出口路由器指定回程默认路由
- [AR1]ip route-static 192.168.10.0 24 192.168.100.1
- [AR1]ip route-static 192.168.10.0 24 192.168.200.1
5 互联网配置
配置互联网地址
- < Huawei>system-view
- [Huawei]interface GigabitEthernet 0/0/0
- [Huawei-GigabitEthernet0/0/0]ip address 100.1.1.1 30
- [Huawei-GigabitEthernet0/0/0]quit
配置互联网回程默认路由
- [Huawei]ip route-static 192.168.10.0 24 100.1.1.2
二、配置VRRP
1 配置下行链路的VRRP
1.1 配置核心交换机1
- [coresw1]interface vlanif 10
- [coresw1-Vlanif10]vrrp vrid 10 virtual-ip 196.168.10.254
- [coresw1-Vlanif10]vrrp vrid 10 priority 120
- [coresw1-Vlanif10]vrrp vrid 10 preempt-mode timer delay 20
- [coresw1-Vlanif10]quit
1.2 配置核心交换机2
- [coresw1]interface vlanif 10
- [coresw1-Vlanif10]vrrp vrid 10 virtual-ip 196.168.10.254
- [coresw1-Vlanif10]vrrp vrid 10 priority 100
- [coresw1-Vlanif10]vrrp vrid 10 preempt-mode timer delay 20
- [coresw1-Vlanif10]quit
2 跟踪上行接口
- [coresw1]interface vlanif 10
- [coresw1-Vlanif10]vrrp vrid 10 track interface g0/0/2 reduce 30 //如果上行接口挂了,优先级自动减30
版权归原作者 星河如雨落 所有, 如有侵权,请联系我们删除。