华为交换设备-企业网络冗余设计

步骤一Vlan、Trunk、Eth-Trunk配置

步骤二 MSTP配置

步骤三VRRP配置

步骤四BFD与VRRP联动配置

步骤五ospf配置

步骤六DHCP中继配置

步骤七telnet 远程配置

华为、华三、思科模拟器分享给大家,方便大家一起学习。

链接:https://pan.baidu.com/s/1M4HJeOoCJfbaN7eem5PogA

提取码:faty

步骤一Vlan、Trunk、Eth-Trunk配置

HX_SW1配置

system-view

vlan batch 10 20 30 40 50 200 800

interface Eth-Trunk2

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

 mode lacp-static

#

interface GigabitEthernet0/0/1

 port link-type access

 port default vlan 800

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 50 200

#

interface GigabitEthernet0/0/3

 port link-type trunk

 port trunk allow-pass vlan 10 20 200

#

interface GigabitEthernet0/0/4

 port link-type trunk

 port trunk allow-pass vlan 30 40 200

#

interface GigabitEthernet0/0/5

 eth-trunk 2

#

interface GigabitEthernet0/0/6

 eth-trunk 2

HX_SW2配置

system-view

vlan batch 10 20 30 40 50 200 801

#

interface Eth-Trunk2

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

 mode lacp-static

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 50 200

#

interface GigabitEthernet0/0/2

 port link-type access

 port default vlan 801

#

interface GigabitEthernet0/0/3

 port link-type trunk

 port trunk allow-pass vlan 10 20 200

#

interface GigabitEthernet0/0/4

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/5

 eth-trunk 2

#

interface GigabitEthernet0/0/6

 eth-trunk 2

HJ_SW3配置

system-view

vlan batch 10 20 30 40 50 200

#

interface Eth-Trunk1

 port link-type trunk

 port trunk allow-pass vlan 20 200

 mode lacp-static

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 10 200

#

interface GigabitEthernet0/0/2

 eth-trunk 1

#

interface GigabitEthernet0/0/3

 port link-type trunk

port trunk allow-pass vlan 10 20 200

#

interface GigabitEthernet0/0/4

 port link-type trunk

port trunk allow-pass vlan 10 20 200

#

interface GigabitEthernet0/0/5

 eth-trunk 1

#

HJ_SW4配置:

system-view

vlan batch 10 20 30 40 50 200

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 30 200

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 40 200

#

interface GigabitEthernet0/0/3

 port link-type trunk

port trunk allow-pass vlan 30 40 200

#

interface GigabitEthernet0/0/4

 port link-type trunk

port trunk allow-pass vlan 30 40 200

JR_SW5配置:

system-view

vlan batch 10 20 30 40 50 200

#

interface Ethernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 10 200

#

interface Ethernet0/0/2

 port link-type access

 port default vlan 10

#

JR_SW6配置:

system-view

vlan batch 10 20 30 40 50 200

#

interface Eth-Trunk1

 port link-type trunk

 port trunk allow-pass vlan 20 200

 mode lacp-static

#

interface Ethernet0/0/1

 port link-type access

 port default vlan 20

#

interface Ethernet0/0/2

 eth-trunk 1

#

interface Ethernet0/0/3

 eth-trunk 1

JR_SW7配置

system-view

vlan batch 10 20 30 40 50 200

#

interface Ethernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 30 200

#

interface Ethernet0/0/2

 port link-type access

 port default vlan 30

JR_SW8配置:

system-view

vlan batch 10 20 30 40 50 200

#

#

interface Ethernet0/0/1

 port link-type access

 port default vlan 40

#

interface Ethernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 40 200

JR_SW9配置:

system-view

vlan batch 10 20 30 40 50 200

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 50 200

#

interface GigabitEthernet0/0/3

 port link-type access

 port default vlan 50

#

interface GigabitEthernet0/0/4

 port link-type access

 port default vlan 50

(这个交换机的接口是一个路由器,这里这个路由器充当的角色是DHCP服务器,所以这个接口模式是access模式,配置的时候一定要注意)

步骤二 MSTP配置

只需要配置与核心相连的网络设备即:HX_SW1,HX_SW2,HJ_SW3,HJ

-SW4,JR_SW9配置都是相同的

#

stp region-configuration

 region-name faty

 revision-level 1

 instance 1 vlan 10 20 50

 instance 2 vlan 30 40

 active region-configuration

#

HX_SW1配置

stp instance 1 root primary

stp instance 2 root secondary

HX_SW2配置:

stp instance 1 root secondary

stp instance 2 root primary

步骤三VRRP配置(配置vrrp的时候直接把核心交换机其它的vlan配置完毕)

HX_SW1配置

interface Vlanif10

 ip address 192.168.10.253 255.255.255.0

 vrrp vrid 10 virtual-ip 192.168.10.1

 vrrp vrid 10 priority 120

#

interface Vlanif20

 ip address 192.168.20.253 255.255.255.0

 vrrp vrid 20 virtual-ip 192.168.20.1

 vrrp vrid 20 priority 120

#

interface Vlanif30

 ip address 192.168.30.253 255.255.255.0

 vrrp vrid 30 virtual-ip 192.168.30.1

 #

interface Vlanif40

 ip address 192.168.40.253 255.255.255.0

 vrrp vrid 40 virtual-ip 192.168.40.1

 #

interface Vlanif50

 ip address 192.168.50.253 255.255.255.0

 vrrp vrid 50 virtual-ip 192.168.50.1

 vrrp vrid 50 priority 120

#

interface Vlanif200

 ip address 192.168.200.253 255.255.255.0

#

interface Vlanif800

 ip address 192.168.12.2 255.255.255.0

HX_SW2配置

#

interface Vlanif10

 ip address 192.168.10.254 255.255.255.0

 vrrp vrid 10 virtual-ip 192.168.10.1

#

interface Vlanif20

 ip address 192.168.20.254 255.255.255.0

 vrrp vrid 20 virtual-ip 192.168.20.1

#

interface Vlanif30

 ip address 192.168.30.254 255.255.255.0

 vrrp vrid 30 virtual-ip 192.168.30.1

 vrrp vrid 30 priority 120

#

interface Vlanif40

 ip address 192.168.40.254 255.255.255.0

 vrrp vrid 40 virtual-ip 192.168.40.1

 vrrp vrid 40 priority 120

#

interface Vlanif50

 ip address 192.168.50.254 255.255.255.0

 vrrp vrid 50 virtual-ip 192.168.50.1

#

interface Vlanif200

 ip address 192.168.200.254 255.255.255.0

#

interface Vlanif801

 ip address 192.168.23.2 255.255.255.0

步骤四BFD与VRRP联动配置(把下联接口也做配置)

HX_SW1配置:

bfd

qu

#

bfd 1 bind peer-ip 192.168.12.1 source-ip 192.168.12.2 auto

 commit

#

#

interface Vlanif10

vrrp vrid 10 track interface GigabitEthernet0/0/3

 vrrp vrid 10 track bfd-session session-name 1

#

interface Vlanif20

vrrp vrid 20 track interface GigabitEthernet0/0/3

 vrrp vrid 20 track bfd-session session-name 1

#

interface Vlanif50

vrrp vrid 50 track interface GigabitEthernet0/0/2

 vrrp vrid 50 track bfd-session session-name 1

HX_SW2配置:

bfd

qu

bfd 2 bind peer-ip 192.168.23.1 source-ip 192.168.23.2 auto

 commit

#

interface Vlanif30

vrrp vrid 30 track interface GigabitEthernet0/0/4

 vrrp vrid 30 track bfd-session session-name 2

#

interface Vlanif40

vrrp vrid 40 track interface GigabitEthernet0/0/4

 vrrp vrid 40 track bfd-session session-name 2

#

AR1配置:

bfd

qu

bfd 1 bind peer-ip 192.168.12.2 source-ip 192.168.12.1 auto

 commit

#

bfd 2 bind peer-ip 192.168.23.2 source-ip 192.168.23.1 auto

 commit

#

interface GigabitEthernet0/0/0

 ip address 14.1.1.1 255.255.255.0

#

interface GigabitEthernet0/0/1

 ip address 192.168.12.1 255.255.255.0

#

interface GigabitEthernet0/0/2

 ip address 192.168.23.1 255.255.255.0

#

步骤五ospf配置

HX_SW1配置

ospf 1

 area 0.0.0.0

  network 192.168.10.0 0.0.0.255

  network 192.168.20.0 0.0.0.255

  network 192.168.30.0 0.0.0.255

  network 192.168.40.0 0.0.0.255

  network 192.168.50.0 0.0.0.255

  network 192.168.12.0 0.0.0.255

  network 192.168.200.0 0.0.0.255

HX_SW2配置:

#

ospf 1

 area 0.0.0.0

  network 192.168.10.0 0.0.0.255

  network 192.168.20.0 0.0.0.255

  network 192.168.30.0 0.0.0.255

  network 192.168.40.0 0.0.0.255

  network 192.168.50.0 0.0.0.255

  network 192.168.23.0 0.0.0.255

  network 192.168.200.0 0.0.0.255

#

AR1配置

#

ospf 1

 area 0.0.0.0

  network 14.1.1.0 0.0.0.255

  network 192.168.12.0 0.0.0.255

  network 192.168.23.0 0.0.0.255

#

分支AR4配置

#

ospf 1

 area 0.0.0.0

  network 14.1.1.0 0.0.0.255

  network 192.168.100.0 0.0.0.255

#

步骤六DHCP中继配置

AR2(dhcp服务器)配置:

dhcp enable

#

ip route-static 0.0.0.0 0.0.0.0 192.168.50.1

#

interface GigabitEthernet0/0/0

 ip address 192.168.50.100 255.255.255.0

 dhcp select global

ip pool vlan10

 gateway-list 192.168.10.1

 network 192.168.10.0 mask 255.255.255.0

 excluded-ip-address 192.168.10.250 192.168.10.254

 lease day 0 hour 8 minute 0

 dns-list 114.114.114.114

#

ip pool vlan20

 gateway-list 192.168.20.1

 network 192.168.20.0 mask 255.255.255.0

 excluded-ip-address 192.168.20.250 192.168.20.254

 lease day 0 hour 8 minute 0

 dns-list 114.114.114.114

#

ip pool vlan30

 gateway-list 192.168.30.1

 network 192.168.30.0 mask 255.255.255.0

 excluded-ip-address 192.168.30.250 192.168.30.254

 lease day 0 hour 8 minute 0

 dns-list 114.114.114.114

#

ip pool vlan40

 gateway-list 192.168.40.1

 network 192.168.40.0 mask 255.255.255.0

 excluded-ip-address 192.168.40.250 192.168.40.254

 lease day 0 hour 8 minute 0

 dns-list 114.114.114.114

#

ip pool vlan50

 gateway-list 192.168.50.1

 network 192.168.50.0 mask 255.255.255.0

 excluded-ip-address 192.168.50.250 192.168.50.254

 lease day 0 hour 8 minute 0

 dns-list 114.114.114.114

HX_SW1HX_SW2配置:

interface Vlanif10

dhcp select relay

 dhcp relay server-ip 192.168.50.100

#

interface Vlanif20

dhcp select relay

 dhcp relay server-ip 192.168.50.100

#

interface Vlanif30

dhcp select relay

 dhcp relay server-ip 192.168.50.100

#

interface Vlanif40

dhcp select relay

 dhcp relay server-ip 192.168.50.100

#

interface Vlanif50

dhcp select relay

 dhcp relay server-ip 192.168.50.100

步骤七telnet 远程配置

所有网络设备都配置(除vlan)都一样,vlan已经在图上标注,只配置一个

user-interface vty 0 4

 authentication-mode aaa

 user privilege level 15

aaa

local-user admin password cipher 123.com

 local-user admin privilege level 15

 local-user admin service-type telnet

#

#

interface Vlanif200

 ip address 192.168.200.253 255.255.255.0

#

已经全部配置完了,如果有问题,欢迎大家评论区交流

  • 4
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
华为交换机M-LAG(Multi-Chassis Link Aggregation Group)是一种基于链路聚合的技术,可实现网络设备冗余、负载均衡和高可用性。下面将介绍如何配置华为交换机M-LAG。 首先需要注意的是,M-LAG技术要求交换机要至少有两台,并且每台交换机必须有至少两个可用的物理接口,用于组成M-LAG群组。 1.创建M-LAG群组:在交换机配置界面中输入以下命令:创建M-LAG群组,并指定群组中主节点的优先级。 [Switch] m-lag configuration [Switch-m-lag-configuration] peer entity 1 [Switch-m-lag-configuration-peer-1] priority 50 [Switch-m-lag-configuration-peer-1] quit [Switch-m-lag-configuration] peer entity 2 [Switch-m-lag-configuration-peer-2] priority 40 [Switch-m-lag-configuration-peer-2] quit 在以上命令中,我们创建了两个M-LAG群组,每个群组包含一台交换机,主节点的优先级分别为50和40。 2.创建M-LAG接口:在交换机配置界面中输入以下命令:创建M-LAG接口,并将该接口绑定到M-LAG群组。 [Switch]interface m-lag 1 [Switch-M-LAG1] port GigabitEthernet 0/0/1 [Switch-M-LAG1] port GigabitEthernet 0/0/2 [Switch-M-LAG1] quit 在以上命令中,我们创建了一个M-LAG接口,并将接口绑定到M-LAG群组1上。该接口由GigabitEthernet 0/0/1和GigabitEthernet 0/0/2两个物理接口组成。 3.为M-LAG接口绑定Tag类型IP地址:在交换机配置界面中输入以下命令:为M-LAG接口绑定Tag类型IP地址。 [Switch]interface m-lag 1.1 [Switch-M-LAG1/1] ip address 192.168.1.1 24 [Switch-M-LAG1/1] quit 在以上命令中,我们为M-LAG接口绑定了一个Tag类型的IP地址,该IP地址为192.168.1.1。 以上就是华为交换机M-LAG配置的基本步骤。通过M-LAG技术,交换机间可以实现冗余备份和负载均衡,提高网络可用性和稳定性。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

爱学习的小任

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值