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

步骤一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

#

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

猜你喜欢

转载自blog.csdn.net/qq_42966610/article/details/130084077