華為交換機VRRP配置_第1頁
華為交換機VRRP配置_第2頁
華為交換機VRRP配置_第3頁
華為交換機VRRP配置_第4頁
華為交換機VRRP配置_第5頁
已閱讀5頁,還剩4頁未讀 繼續免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、精選文檔圖3-128  配置VRRP主備備份組網圖 配置思路接受VRRP主備備份實現網關冗余備份,配置思路如下:1. 配置各設備接口IP地址及路由協議,使各設備間網絡層連通。2. 在SwitchA和SwitchB上配置VRRP備份組。其中,SwitchA上配置較高優先級和20秒搶占延時,作為Master設備擔當流量轉發;SwitchB上配置較低優先級,作為備用交換機,實現網關冗余備份。操作步驟1. 配置設備間的網絡互連# 配置設備各接口的IP地址,以SwitchA為例。SwitchB和SwitchC的配置與SwitchA類似,詳見配置文件。<HUAWEI&g

2、t; system-viewHUAWEI sysname SwitchASwitchA vlan batch 100 300SwitchA interface gigabitethernet 1/0/1SwitchA-GigabitEthernet1/0/1 port link-type hybridSwitchA-GigabitEthernet1/0/1 port hybrid pvid vlan 300SwitchA-GigabitEthernet1/0/1 port hybrid untagged vlan 300SwitchA-GigabitEthernet1/0/1 quitSwit

3、chA interface gigabitethernet 1/0/2SwitchA-GigabitEthernet1/0/2 port link-type hybridSwitchA-GigabitEthernet1/0/2 port hybrid pvid vlan 100SwitchA-GigabitEthernet1/0/2 port hybrid untagged vlan 100SwitchA-GigabitEthernet1/0/2 quitSwitchA interface vlanif 100SwitchA-Vlanif100 ip address 10.1.1.1 24Sw

4、itchA-Vlanif100 quitSwitchA interface vlanif 300SwitchA-Vlanif300 ip address 192.168.1.1 24SwitchA-Vlanif300 quit# 配置Switch的二層轉發功能。<HUAWEI> system-viewHUAWEI sysname SwitchSwitch vlan 100Switch-vlan100 quitSwitch interface gigabitethernet 1/0/1Switch-GigabitEthernet1/0/1 port link-type hybridS

5、witch-GigabitEthernet1/0/1 port hybrid pvid vlan 100Switch-GigabitEthernet1/0/1 port hybrid untagged vlan 100Switch-GigabitEthernet1/0/1 quitSwitch interface gigabitethernet 1/0/2Switch-GigabitEthernet1/0/2 port link-type hybridSwitch-GigabitEthernet1/0/2 port hybrid pvid vlan 100Switch-GigabitEther

6、net1/0/2 port hybrid untagged vlan 100Switch-GigabitEthernet1/0/2 quit# 配置SwitchA、SwitchB和SwitchC間接受OSPF協議進行互連。以SwitchA為例,SwitchB和SwitchC的配置與SwitchA類似,詳見配置文件。SwitchA ospf 1SwitchA-ospf-1 area 0SwitchA-ospf-1-area-0.0.0.0 network 10.1.1.0 0.0.0.255SwitchA-ospf-1-area-0.0.0.0 network 192.168.1.0 0.0.0

7、.255SwitchA-ospf-1-area-0.0.0.0 quitSwitchA-ospf-1 quit2. 配置VRRP備份組# 在SwitchA上創建VRRP備份組1,配置SwitchA在該備份組中的優先級為120,并配置搶占時間為20秒。SwitchA interface vlanif 100SwitchA-Vlanif100 vrrp vrid 1 virtual-ip 10.1.1.111SwitchA-Vlanif100 vrrp vrid 1 priority 120 /設備在VRRP備份組中的優先級缺省為100,修改Master設備的優先級大于Backup設備Switch

8、A-Vlanif100 vrrp vrid 1 preempt-mode timer delay 20 /設備在VRRP備份組中缺省接受馬上搶占方式。修改Master設備的延遲搶占時間,以避開在網絡環境不穩定時,由于雙方頻繁搶占而導致流量中斷的問題SwitchA-Vlanif100 quit# 在SwitchB上創建VRRP備份組1,其在該備份組中的優先級接受缺省值100(不需要配置)。SwitchB interface vlanif 100SwitchB-Vlanif100 vrrp vrid 1 virtual-ip 10.1.1.111SwitchB-Vlanif100 quit3. 驗

9、證配置結果# 完成上述配置以后,在SwitchA和SwitchB上分別執行display vrrp命令,可以看到SwitchA在備份組中的狀態為Master,SwitchB在備份組中的狀態為Backup。SwitchA display vrrp Vlanif100 | Virtual Router 1 State : Master Virtual IP : 10.1.1.111 Master IP : 10.1.1.1 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 2

10、0 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Backup-forward : disabled Create time : 2012-01-12 20:15:46 Last change time : 2012-01-12 20:15:46SwitchB display vrrp Vlanif100 | Virtual Router 1 State : Backup Virtual IP :

11、 10.1.1.111 Master IP : 10.1.1.1 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 120 Preempt : YES Delay Time : 0 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Backup-forward : disabled Create time : 2012-01-12 20:1

12、5:46 Last change time : 2012-01-12 20:15:46# 在SwitchA和SwitchB上執行display ip routing-table命令,SwitchA上可以看到路由表中有一條目的地址為虛擬IP地址的直連路由,而SwitchB上該路由為OSPF路由。SwitchA和SwitchB上的顯示信息如下。SwitchA display ip routing-tableRoute Flags: R - relay, D - download to fib- Routing Tables: Public Destinations : 9 Routes : 10

13、Destination/Mask Proto Pre Cost Flags NextHop Interface 10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif100 10.1.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif100 10.1.1.111/32 Direct 0 0 D 127.0.0.1 Vlanif100 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 172.16.1.0/24

14、 OSPF 10 2 D 192.168.1.2 Vlanif300 192.168.1.0/24 Direct 0 0 D 192.168.1.1 Vlanif300 192.168.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif300 192.168.2.0/24 OSPF 10 2 D 10.1.1.2 Vlanif100 OSPF 10 2 D 192.168.1.2 Vlanif300SwitchB display ip routing-tableRoute Flags: R - relay, D - download to fib- Routing Tab

15、les: Public Destinations : 9 Routes : 10 Destination/Mask Proto Pre Cost Flags NextHop Interface 10.1.1.0/24 Direct 0 0 D 10.1.1.2 Vlanif100 10.1.1.2/32 Direct 0 0 D 127.0.0.1 Vlanif100 10.1.1.111/32 OSPF 10 2 D 10.1.1.1 Vlanif100 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0

16、0 D 127.0.0.1 InLoopBack0 172.16.1.0/24 OSPF 10 2 D 192.168.2.2 Vlanif200 192.168.1.0/24 OSPF 10 2 D 10.1.1.1 Vlanif100 OSPF 10 2 D 192.168.2.2 Vlanif200 192.168.2.0/24 Direct 0 0 D 192.168.2.1 Vlanif200 192.168.2.1/32 Direct 0 0 D 127.0.0.1 Vlanif200# 在SwitchA的接口GE1/0/2上執行shutdown命令,模擬SwitchA消滅故障。S

17、witchA interface gigabitethernet 1/0/2SwitchA-GigabitEthernet1/0/2 shutdownSwitchA-GigabitEthernet1/0/2 quit# 在SwitchB上執行display vrrp命令查看VRRP狀態信息,可以看到SwitchB的狀態是Master。SwitchB display vrrp Vlanif100 | Virtual Router 1 State : Master Virtual IP : 10.1.1.111 Master IP : 10.1.1.2 PriorityRun : 100 Prio

18、rityConfig : 100 MasterPriority : 100 Preempt : YES Delay Time : 0 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Backup-forward : disabled Create time : 2012-01-12 20:15:46 Last change time : 2012-01-12 20:18:40# 在SwitchA的接

19、口GE1/0/2上執行undo shutdown命令。SwitchA interface gigabitethernet 1/0/2SwitchA-GigabitEthernet1/0/2 undo shutdownSwitchA-GigabitEthernet1/0/2 quit# 等待20秒后,在SwitchA上執行display vrrp命令查看VRRP狀態信息,可以看到SwitchA的狀態恢復成Master。SwitchA display vrrp Vlanif100 | Virtual Router 1 State : Master Virtual IP : 10.1.1.111 M

20、aster IP : 10.1.1.1 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 20 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Backup-forward : disabled Create time : 2012-01-12 20:15:46 Last ch

21、ange time : 2012-01-12 20:20:56配置文件· SwitchA的配置文件· #· sysname SwitchA· #· vlan batch 100 300· #· interface Vlanif100· ip address 10.1.1.1 255.255.255.0· vrrp vrid 1 virtual-ip 10.1.1.111· vrrp vrid 1 priority 120· vrrp vrid 1 preempt-mode timer

22、delay 20· #· interface Vlanif300· ip address 192.168.1.1 255.255.255.0· #· interface GigabitEthernet1/0/1· port link-type hybrid· port hybrid pvid vlan 300· port hybrid untagged vlan 300· #· interface GigabitEthernet1/0/2· port link-type hybrid&

23、#183; port hybrid pvid vlan 100· port hybrid untagged vlan 100· #· ospf 1· area 0.0.0.0· network 10.1.1.0 0.0.0.255· network 192.168.1.0 0.0.0.255· #return· SwitchB的配置文件· #· sysname SwitchB· #· vlan batch 100 200· #· interface Vla

24、nif100· ip address 10.1.1.2 255.255.255.0· vrrp vrid 1 virtual-ip 10.1.1.111· #· interface Vlanif200· ip address 192.168.2.1 255.255.255.0· #· interface GigabitEthernet1/0/1· port link-type hybrid· port hybrid pvid vlan 200· port hybrid untagged vlan

25、 200· #· interface GigabitEthernet1/0/2· port link-type hybrid· port hybrid pvid vlan 100· port hybrid untagged vlan 100· #· ospf 1· area 0.0.0.0· network 10.1.1.0 0.0.0.255· network 192.168.2.0 0.0.0.255· #return· SwitchC的配置文件· #·

26、; sysname SwitchC· #· vlan batch 200 300 400· #· interface Vlanif200· ip address 192.168.2.2 255.255.255.0· #· interface Vlanif300· ip address 192.168.1.2 255.255.255.0· #· interface Vlanif400· ip address 172.16.1.1 255.255.255.0· #· interface GigabitEthernet1/0/1· port link-type hybrid· port hybri

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論