華為MSTP、VRRPとDHCPの総合プロジェクトの詳しい解
3134 ワード
MSTP、VRRP、DHCP , :
実験要求:1.VLAN 10とvlan 20の流量負荷は均衡している.2.SW 1はvlan 10のメインゲートウェイ、vlan 20のバックアップゲートウェイである.3.SW 2はvlan 20のメインゲートウェイ、vlan 10のバックアップゲートウェイである.4.DHCPサーバーはvlan 66にあり、ゲートウェイはSW 2の上にある.5.PC 1、PC 2はipアドレスを自動的に取得し、互いにpingすることができる.
:
,MSTP :
SW1sysname SW1vlan batch 10 20 66interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan allinterface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan all stp region-configuration region-name ntdinstance 10 vlan 10instance 20 vlan 20active region-configurationquitstp instance 10 priority 4096stp instance 20 priority 8192SW2sysname SW2vlan batch 10 20 66interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan allinterface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan all stp region-configurationinterface GigabitEthernet0/0/10port link-type accessport default vlan 66quitregion-name ntdinstance 10 vlan 10instance 20 vlan 20active region-configurationquitstp instance 10 priority 4096stp instance 20 priority 8192SW3sysname SW3vlan batch 10 20 66interface Ethernet0/0/1port link-type trunkport trunk allow-pass vlan allinterface Ethernet0/0/2port link-type trunkport trunk allow-pass vlan allinterface Ethernet0/0/11port link-type accessport default vlan 10interface Ethernet0/0/12port link-type accessport default vlan 20quitstp region-configuration region-name ntdinstance 10 vlan 10instance 20 vlan 20active region-configurationquitstp instance 10 priority 4096stp instance 20 priority 8192
,VRRP :
SW1interface Vlanif10ip address 192.168.10.251 255.255.255.0vrrp vrid 10 virtual-ip 192.168.10.250vrrp vrid 10 priority 200interface Vlanif20ip address 192.168.20.251 255.255.255.0vrrp vrid 10 virtual-ip 192.168.20.250SW2interface Vlanif10ip address 192.168.10.252 255.255.255.0vrrp vrid 10 virtual-ip 192.168.10.250interface Vlanif20ip address 192.168.20.252 255.255.255.0vrrp vrid 20 virtual-ip 192.168.20.250vrrp vrid 10 priority 200
,DHCP :
SW1dhcp enable interface Vlanif 10dhcp select relay dhcp relay server-ip 192.168.66.250interface Vlanif 20dhcp select relay dhcp relay server-ip 192.168.66.250SW2dhcp enable interface Vlanif 10dhcp select relay dhcp relay server-ip 192.168.66.250interface Vlanif 20dhcp select relay dhcp relay server-ip 192.168.66.250DHCPsysname DHCPinterface g0/0/0ip address 192.168.66.250 24dhcp select global quitip route-static 0.0.0.0 0.0.0.0 192.168.66.252ip route-static 0.0.0.0 0.0.0.0 192.168.66.251ip pool p1gateway-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 p2gateway-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最後に検証テストを行います:
STPをSW 1とSW 2でそれぞれ表示:VRRPをSW 1とSW 2でそれぞれ表示:PC機IPアドレス取得状況を以下のように表示する:
, !!!
転載先:https://blog.51cto.com/11806823/2407434