華爲MSTP、VRRP與DHCP綜合項目詳解

本實驗重點考覈你們對MSTP、VRRP、DHCP掌握狀況,實驗要求以下:

實驗要求:
1.VLAN 10和vlan 20流量負載均衡;
2.SW1爲vlan 10的主網關,vlan 20的備份網關;
3.SW2爲vlan 20的主網關,vlan 10的備份網關;
4.DHCP服務器在vlan 66,網關在SW2上面;
5.PC一、PC2自動獲取ip地址且能夠互相ping通。服務器

實驗拓撲以下:

華爲MSTP、VRRP與DHCP綜合項目詳解

第一步,MSTP配置以下:

SW1
sysname SW1
vlan batch 10 20 66
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan all
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan all
stp region-configuration
region-name ntd
instance 10 vlan 10
instance 20 vlan 20
active region-configuration
quit
stp instance 10 priority 4096
stp instance 20 priority 8192
SW2
sysname SW2
vlan batch 10 20 66
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan all
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan all
stp region-configuration
interface GigabitEthernet0/0/10
port link-type access
port default vlan 66
quit
region-name ntd
instance 10 vlan 10
instance 20 vlan 20
active region-configuration
quit
stp instance 10 priority 4096
stp instance 20 priority 8192
SW3
sysname SW3
vlan batch 10 20 66
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan all
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan all
interface Ethernet0/0/11
port link-type access
port default vlan 10
interface Ethernet0/0/12
port link-type access
port default vlan 20
quit
stp region-configuration
region-name ntd
instance 10 vlan 10
instance 20 vlan 20
active region-configuration
quit
stp instance 10 priority 4096
stp instance 20 priority 8192負載均衡

第二步,VRRP配置以下:

SW1
interface Vlanif10
ip address 192.168.10.251 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.10.250
vrrp vrid 10 priority 200
interface Vlanif20
ip address 192.168.20.251 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.20.250
interface Vlanif66
ip address 192.168.66.251 255.255.255.0
SW2
interface Vlanif10
ip address 192.168.10.252 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.10.250
interface Vlanif20
ip address 192.168.20.252 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.20.250
vrrp vrid 10 priority 200
interface Vlanif66
ip address 192.168.66.252 255.255.255.0ide

第三步,DHCP配置如:

SW1
dhcp enable
interface Vlanif 10
dhcp select relay
dhcp relay server-ip 192.168.66.250
interface Vlanif 20
dhcp select relay
dhcp relay server-ip 192.168.66.250
SW2
dhcp enable
interface Vlanif 10
dhcp select relay
dhcp relay server-ip 192.168.66.250
interface Vlanif 20
dhcp select relay
dhcp relay server-ip 192.168.66.250
DHCP
sysname DHCP
interface g0/0/0
ip address 192.168.66.250 24
dhcp select global
quit
ip pool p1
gateway-list 192.168.10.250
network 192.168.10.0 mask 255.255.255.0
excluded-ip-address 192.168.10.251 192.168.10.252
lease day 7 hour 0 minute 0
dns-list 8.8.8.8
ip pool p2
gateway-list 192.168.20.250
network 192.168.20.0 mask 255.255.255.0
excluded-ip-address 192.168.20.251 192.168.20.252
lease day 7 hour 0 minute 0
dns-list 8.8.8.8
ip route-static 192.168.10.0 24 192.168.66.251
ip route-static 192.168.20.0 24 192.168.66.252
最後進行驗證測試:測試

分別在SW1和SW2上查看STP:
華爲MSTP、VRRP與DHCP綜合項目詳解
華爲MSTP、VRRP與DHCP綜合項目詳解
分別在在SW1和SW2上查看VRRP:
華爲MSTP、VRRP與DHCP綜合項目詳解
華爲MSTP、VRRP與DHCP綜合項目詳解
查看PC機IP地址獲取狀況以下:
華爲MSTP、VRRP與DHCP綜合項目詳解ui

均知足實驗要求,配置完成!!!
相關文章
相關標籤/搜索