怎么配置華為路由交換VRRP
華為的產(chǎn)品主要涉及通信網(wǎng)絡(luò)中的交換網(wǎng)絡(luò)、傳輸網(wǎng)絡(luò)、無線及有線固定接入網(wǎng)絡(luò)和數(shù)據(jù)通信網(wǎng)絡(luò)及無線終端產(chǎn)品,那么你知道怎么配置華為路由交換VRRP嗎?下面是學(xué)習(xí)啦小編整理的一些關(guān)于怎么配置華為路由交換VRRP的相關(guān)資料,供你參考。
配置華為路由交換VRRP的案例:
例如你是公司的網(wǎng)絡(luò)管理員。當(dāng)前的網(wǎng)絡(luò)中有兩個(gè)用戶。用R2、R3標(biāo)注為公司用戶。R1使用回環(huán)口模擬為Internet服務(wù)器。此時(shí)網(wǎng)絡(luò)中有兩個(gè)網(wǎng)關(guān),為實(shí)現(xiàn)冗余。現(xiàn)在使用VRRP來實(shí)現(xiàn)冗余。
步驟一.基本配置與IP編址
在實(shí)驗(yàn)之前,需要關(guān)閉部分設(shè)備接口,避免影響本次實(shí)驗(yàn)。
本次實(shí)驗(yàn)需要關(guān)閉S1的G0/0/9、G0/0/13和G0/0/14接口。關(guān)閉這些接口之后,開始實(shí)驗(yàn)配置。
用戶網(wǎng)絡(luò)使用vlan1,S1使用vlan2與R1相連,S2使用vlan3與R1相連,R1配置loopback接口;R2、R3作為客戶,配置IP、缺省網(wǎng)關(guān)。
路由器R1模擬為廣域網(wǎng),它的回環(huán)模擬為廣域網(wǎng)中的一臺服務(wù)器。
[Huawei]sysname R1
[R1]interface loopback0
[R1-LoopBack0]ip add 10.0.1.1 24
[R1-LoopBack0]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip add 10.0.11.224
[R1-GigabitEthernet0/0/1]desc this portconnect to S1-G0/0/1
[R1-GigabitEthernet0/0/1]interface g0/0/2
[R1-GigabitEthernet0/0/2]ip add 10.0.12.224
[R1-GigabitEthernet0/0/2]desc this portconnect to S2-G0/0/2
[R1-GigabitEthernet0/0/2]q
R2是局域網(wǎng)中的一臺PC設(shè)備,使用網(wǎng)段10.0.123.0/24,網(wǎng)關(guān)為10.0.123.1.
R3是局域網(wǎng)中的另一臺PC設(shè)備,使用網(wǎng)段為10.0.123.0/24,網(wǎng)關(guān)為10.0.123.1.
交換機(jī)S1配置vlan1、2、3,接口模式為hybird模式。將接口G0/0/10配置為Trunk接口,允許所有vlan通過,G0/0/1配置為access類型接口,屬于vlan2,G0/0/2配置為access類型接口,屬于vlan1.配置vlanif1,為vlan1提供網(wǎng)關(guān)服務(wù),IP地址為10.0.123.2/24;配置vlanif2,作為與R1連接的三層接口,ip地址為10.0.11.1/24.
[Huawei]sysname S1
[S1]vlan batch 1 to 3
[S1]interface g0/0/10
[S1-GigabitEthernet0/0/10]port link-typetrunk
[S1-GigabitEthernet0/0/10]port trunkallow-pass vlan all
[S1-GigabitEthernet0/0/10]interface g0/0/1
[S1-GigabitEthernet0/0/1]port link-typeaccess
[S1-GigabitEthernet0/0/1]port default vlan2
[S1-GigabitEthernet0/0/1]interface g0/0/2
[S1-GigabitEthernet0/0/2]port link-typeaccess
[S1-GigabitEthernet0/0/2]port default vlan1
[S1-GigabitEthernet0/0/2]interface vlanif 1
[S1-Vlanif1]ip add 10.0.123.2 24
[S1-Vlanif1]interface vlanif 2
[S1-Vlanif2]ip add 10.0.11.1 24
交換機(jī)S2配置vlan1、2、3.接口默認(rèn)為hybired模式。將接口G0/0/10配置成trunk接口,允許所有vlan通過,G0/0/2配置為access類型接口,屬于vlan3,G0/0/3配置為access類型接口,屬于vlan1.配置vlanif1,為vlan1提供網(wǎng)關(guān)服務(wù),IP地址為10.0.123.3/24,配置vlanif3,作為與R1連接的三層接口,IP地址為10.0.12.1/24.
[Huawei]sysname S2
[S2]vlan batch 1 to 3
[S2]interface g0/0/10
[S2-GigabitEthernet0/0/10]port link-typetrunk
[S2-GigabitEthernet0/0/10]port trunkallow-pass vlan all
[S2-GigabitEthernet0/0/10]interface g0/0/2
[S2-GigabitEthernet0/0/2]port link-typeaccess
[S2-GigabitEthernet0/0/2]port default vlan3
[S2-GigabitEthernet0/0/2]interface g0/0/3
[S2-GigabitEthernet0/0/3]port link-typeaccess
[S2-GigabitEthernet0/0/3]port default vlan1
[S2-GigabitEthernet0/0/3]interface vlanif 1
[S2-Vlanif1]ip add 10.0.123.3 24
[S2-Vlanif1]interface vlanif 3
[S2-Vlanif3]ip add 10.0.12.1 24
配置完成后,測試直連鏈路的連通性,在S2上測試其于S1、R1、R2、R3之間的聯(lián)通行。(使用ping命令測試,加上參數(shù)“-c 1”代表一個(gè)ping包進(jìn)行測試。默認(rèn)連續(xù)發(fā)送5個(gè))。
[S2]ping -c 1 10.0.12.2
PING 10.0.12.2: 56 data bytes,press CTRL_C to break
Reply from 10.0.12.2: bytes=56 Sequence=1 ttl=255 time=90 ms
---10.0.12.2 ping statistics ---
1packet(s) transmitted
1packet(s) received
0.00% packet loss
round-trip min/avg/max = 90/90/90 ms
[S2]ping -c 1 10.0.123.2
PING 10.0.123.2: 56 data bytes,press CTRL_C to break
Reply from 10.0.123.2: bytes=56 Sequence=1 ttl=255 time=50 ms
---10.0.123.2 ping statistics ---
1packet(s) transmitted
1packet(s) received
0.00% packet loss
round-trip min/avg/max = 50/50/50 ms
[S2]ping -c 1 10.0.123.4
PING 10.0.123.4: 56 data bytes,press CTRL_C to break
Reply from 10.0.123.4: bytes=56 Sequence=1 ttl=128 time=70 ms
---10.0.123.4 ping statistics ---
1packet(s) transmitted
1packet(s) received
0.00% packet loss
round-trip min/avg/max = 70/70/70 ms
[S2]ping -c 1 10.0.123.5
PING 10.0.123.5: 56 data bytes,press CTRL_C to break
Reply from 10.0.123.5: bytes=56 Sequence=1 ttl=128 time=10 ms
---10.0.123.5 ping statistics ---
1packet(s) transmitted
1packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/10/10 ms
步驟二.配置OSPF路由協(xié)議,實(shí)現(xiàn)s1、S2、R1之間的路由聯(lián)通
[S1]ospf 1.
[S1-ospf-1]area 0
[S1-ospf-1-area-0.0.0.0]network 10.0.0.00.255.255.255
[S1-ospf-1-area-0.0.0.0]q
[S1-ospf-1]silent-interface vlanif 1
[S2]ospf 1
[S2-ospf-1]area 0
[S2-ospf-1-area-0.0.0.0]network 10.0.0.00.255.255.255
[S2-ospf-1-area-0.0.0.0]q
[S2-ospf-1]silent-interface vlanif 1
[R1]ospf 1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 10.0.0.00.255.255.255
配置完成后,稍等片刻,等待網(wǎng)絡(luò)收斂后,測試網(wǎng)絡(luò)的連通性。