華爲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.PC1、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
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

第三步,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 route-static 0.0.0.0 0.0.0.0 192.168.66.252
ip route-static 0.0.0.0 0.0.0.0 192.168.66.251
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
最後進行驗證測試:

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

均滿足實驗要求,配置完成!!!
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章