当前位置:首页 > wifi设置知识 > 正文内容

核心交换机配置VRRP,首先要找出源头

秋天2024年01月14日 06:01:21wifi设置知识121
在学习核心交换机配置VRRP 的过程中,您可能会遇到一些困难,例如(常见问题)。本文将为您解答这些问题,并帮助您更好地应对学习过程中的挑战。

本文配置目标:华为防火墙双机热备,电信和联通双运营商、固定IP接入,华为核心交换机配置VRRP。

为保护客户隐私,电信和联通的IP地址为虚构,如有雷同,纯属巧合。

真实拓扑图如下所示,电信和联通给的掩码都是29,如果掩码都是30,恐怕不能这么连接。



回来用模拟器还原了配置,注意AR3以及下面的两台交换机,是用来模拟运营商接入的,实际环境中只是两个光猫而已。


一、配置模拟运营商接入的设备

1、路由器的配置:

配置各接口IP,并且宣告进OSPF

interface GigabitEthernet0/0/0

ip address 33.1.1.3 255.255.255.0

#

interface GigabitEthernet0/0/1

ip address 34.1.1.3 255.255.255.0

#

interface LoopBack0

ip address 3.3.3.3 255.255.255.255

#

ospf 1 router-id 3.3.3.3

area 0.0.0.0

network 3.3.3.3 0.0.0.0

network 33.1.1.3 0.0.0.0

network 34.1.1.3 0.0.0.0

#

2、交换机SW3的配置:

创建VLAN,配置IP,并且宣告进OSPF

vlan batch 33 130 222

#

interface Vlanif33

ip address 33.1.1.1 255.255.255.0

#

interface Vlanif222

ip address 222.92.76.1 255.255.255.0

#

interface GigabitEthernet0/0/1

port link-type access

port default vlan 222

#

interface GigabitEthernet0/0/2

port link-type access

port default vlan 222

#

interface GigabitEthernet0/0/3

port link-type access

port default vlan 33

#

ospf 1 router-id 1.1.1.1

area 0.0.0.0

network 222.92.76.1 0.0.0.0

network 33.1.1.1 0.0.0.0

#

3、交换机SW4的配置:

vlan batch 34 130

#

interface Vlanif34

ip address 34.1.1.4 255.255.255.0

#

interface Vlanif130

ip address 130.1.1.1 255.255.255.0

#

interface GigabitEthernet0/0/1

port link-type access

port default vlan 130

#

interface GigabitEthernet0/0/2

port link-type access

port default vlan 130

#

interface GigabitEthernet0/0/3

port link-type access

port default vlan 34

#

ospf 1 router-id 4.4.4.4

area 0.0.0.0

network 130.1.1.1 0.0.0.0

network 34.1.1.4 0.0.0.0

#

二、防火墙的配置

以FW1的配置为例说明

1、配置各接口IP



2、配置NAT策略

电信的NAT策略:



联通的NAT策略:



3、配置上网案例策略:



4、配置IP-LINK,也可以在创建默认的路由顺便创建



5、配置默认路由

电信和联通各有一条默认路由



6、配置通向局域网的回程路由


7、配置FW2,过程略,方法同上;

8、在FW1上配置双机热备(主)



9、在FW2上配置双机热备(备)


三、核心交换机和接入交换机的配置

1、核心交换机CE1的配置

vlan batch 9 to 10

#

stp enable

Stp mode mstp

#

stp region-configuration

region-name test

revision-level 1

instance 1 vlan 9 to 10

#

stp instance 1 root primary

#

interface Vlanif9

description ith

ip address 192.168.9.1 255.255.255.0

vrrp vrid 1 virtual-ip 192.168.9.254

vrrp vrid 1 priority 120

vrrp vrid 1 preempt timer delay 15

vrrp vrid 1 track interface GE1/0/0 reduce 40

#

interface Vlanif10

ip address 192.168.10.1 255.255.255.0

vrrp vrid 2 virtual-ip 192.168.10.254

vrrp vrid 2 priority 120

vrrp vrid 2 track interface GE1/0/0 reduce 40

#

interface GE1/0/0

undo portswitch

undo shutdown

ip address 11.1.1.1 255.255.255.248

#

interface GE1/0/1

undo shutdown

port link-type trunk

port trunk allow-pass vlan all

#

interface GE1/0/2

undo shutdown

port link-type trunk

port trunk allow-pass vlan 9 to 10

#

interface GE1/0/3

undo shutdown

port link-type trunk

port trunk allow-pass vlan 9 to 10

#

ip route-static 0.0.0.0 0.0.0.0 11.1.1.2 preference 50

ip route-static 0.0.0.0 0.0.0.0 13.1.1.2 preference 70

#

2、核心交换机CE2的配置

vlan batch 9 to 10

#

stp enable

Stp mode mstp

#

stp region-configuration

region-name test

revision-level 1

instance 1 vlan 9 to 10

#

stp instance 1 root secondary

#

interface Vlanif9

ip address 192.168.9.2 255.255.255.0

vrrp vrid 1 virtual-ip 192.168.9.254

#

interface Vlanif10

ip address 192.168.10.2 255.255.255.0

vrrp vrid 2 virtual-ip 192.168.10.254

#

interface MEth0/0/0

undo shutdown

#

interface GE1/0/0

undo shutdown

port link-type trunk

port trunk allow-pass vlan 9 to 10

#

interface GE1/0/1

undo shutdown

port link-type trunk

port trunk allow-pass vlan 9 to 10

#

interface GE1/0/2

undo shutdown

port link-type trunk

port trunk allow-pass vlan 9 to 10

#

interface GE1/0/3

undo portswitch

undo shutdown

ip address 13.1.1.1 255.255.255.248

#

ip route-static 0.0.0.0 0.0.0.0 11.1.1.2 preference 70

ip route-static 0.0.0.0 0.0.0.0 13.1.1.2 preference 50

#

3、接入交换机SW1的配置:

vlan batch 9 to 10

#

stp region-configuration

region-name test

revision-level 1

instance 1 vlan 9 to 10

active region-configuration

#

interface Ethernet0/0/1

port link-type trunk

port trunk allow-pass vlan 9 to 10

#

interface Ethernet0/0/2

port link-type trunk

port trunk allow-pass vlan 9 to 10

#

interface Ethernet0/0/3

port link-type access

port default vlan 9

stp edged-port enable

#

interface Ethernet0/0/4

port link-type access

port default vlan 10

stp edged-port enable

#

4、接入交换机SW2的配置

和SW1的配置非常接近,就不再重复贴出来了。

四、灾难测试

1、模拟VRRP Master交换机故障



如上图所示,停止CE1交换机后,上网流量切换到右边了;

2、模拟防火墙FW1故障



关停防火墙FW1之后,HRP状态切换了,右侧备机切换为激活状态,上网流量切换到FW2上面了,说明配置正确。

#网络安全##网络工程师##IT# #华为#

~在理解这些技巧和方法后,您应该可以更好地控制您的网络,保持更稳定和高效的连接。

扫描二维码推送至手机访问。

版权声明:本文由路由设置网发布,如需转载请注明出处。

本文链接:https://www.shoulian.org/luyou/post/138341.html

分享给朋友:

“核心交换机配置VRRP,首先要找出源头” 的相关文章

腾达路由器怎么查mac

腾达路由器怎么查mac

当朋友们看到这个文章时想必是想要了解腾达路由器怎么查mac相关的知识,这里同时多从个角度为大家介绍腾达路由器怎么查蹭网相应的内容。 本文内容目录一览: 1、腾达W302R无线路由器MAC看不清了怎么办 2、腾达路由器mac地址在哪里写着 3、腾达路由器pin码,mac地址:c8:3a:35:...

路由器副的怎么设置

路由器副的怎么设置

当朋友们看到这个文章时想必是想要了解路由器副的怎么设置相关的知识,这里同时多从个角度为大家介绍路由器怎么设置主副路由?相应的内容。 本文内容目录一览: 1、主副路由器怎么设置 2、一主一副(无线)路由器,副路由器怎样设置 3、怎么设置副路由器 4、一主一副(无线)路由器,副路由器怎样设置...

不拔路由器怎么关宽带

不拔路由器怎么关宽带

当朋友们看到这个文章时想必是想要了解不拔路由器怎么关宽带相关的知识,这里同时多从个角度为大家介绍把路由器关了电源拔了还能连上网了相应的内容。 本文内容目录一览: 1、路由器如何设置在不需要的时候宽带退出 2、如何把家里的WiFi关闭? 3、三台电脑共用一个宽带怎么不经过路由器关掉一台的宽带啊...

移动路由器怎么换ip

移动路由器怎么换ip

有很多朋友不知道移动路由器怎么换ip要如何操作,今天为大家整理了很多移动路由器怎么换别的路由器相关的答案,组成一篇内容丰富的文章,希望能到您 本文内容目录一览: 1、路由器换ip怎么设置 2、怎么样修改wifi的IP地址或IP地址 3、移动宽带怎么设置无线路由器ip地址怎么修改 4、cm...

哪些路由器可以做桥接模块

哪些路由器可以做桥接模块

今天和朋友们分享哪些路由器可以做桥接模块相关的知识,相信大家通过本文介绍也能对哪些路由器可以做桥接模块的有自已的收获和理解。自己轻松搞问题。本文内容目录一览: 1、这个型号的路由器有无线桥接吗 2、什么路由器支持桥接 3、不同牌子的路由器可以桥接吗 4、做桥接副路由器那个牌子好? 这个...

华为路由器怎么管理后台

华为路由器怎么管理后台

当朋友们看到这个文章时想必是想要了解华为路由器怎么管理后台相关的知识,这里同时多从个角度为大家介绍如何管理华为路由器相应的内容。 本文内容目录一览: 1、怎么进入华为路由器的管理页面 2、不是华为手机怎么管理华为路由器 3、华为路由器怎么进入管理界面? 4、华为无线路由器hg532e怎么...