HCNA-38 VRRP基本配置
基本配置及搭建OSPF网络 <Huawei>system-view [Huawei]sysnamer2 [r2]interfaceGigabitEthernet 0/0/0 [r2-GigabitEthernet0/0/0]ipaddress 192.168.100.2 24 [r2-GigabitEthernet0/0/0]interfaceGigabitEthernet 0/0/1 [r2-GigabitEthernet0/0/1]ipaddress 172.16.12.2 24 [r2-GigabitEthernet0/0/1]quit [r2]ospf1 [r2-ospf-1]area0 [r2-ospf-1-area-0.0.0.0]authentication-modemd5 1 cipher admin1234 [r2-ospf-1-area-0.0.0.0]network192.168.100.0 0.0.0.255 [r2-ospf-1-area-0.0.0.0]network172.16.12.0 0.0.0.255 [r2-ospf-1-area-0.0.0.0]return <Huawei>system-view [Huawei]sysnamer1 [r1]interfaceGigabitEthernet 0/0/0 [r1-GigabitEthernet0/0/0]ipaddress 172.16.12.1 24 [r1-GigabitEthernet0/0/0]interfaceGigabitEthernet 0/0/1 [r1-GigabitEthernet0/0/1]ipaddress 172.16.13.1 24 [r1-GigabitEthernet0/0/1]quit [r1]ospf1 [r1-ospf-1]area0 [r1-ospf-1-area-0.0.0.0]authentication-modemd5 1 cipher admin1234 [r1-ospf-1-area-0.0.0.0]network172.16.12.0 0.0.0.255 [r1-ospf-1-area-0.0.0.0]network172.16.13.0 0.0.0.255 [r1-ospf-1-area-0.0.0.0]return <Huawei>system-view [Huawei]sysnamer3 [r3]interfaceGigabitEthernet 0/0/0 [r3-GigabitEthernet0/0/0]ipaddress 192.168.100.3 24 [r3-GigabitEthernet0/0/0]interfaceGigabitEthernet 0/0/1 [r3-GigabitEthernet0/0/1]ipaddress 172.16.13.3 24 [r3-GigabitEthernet0/0/1]quit [r3]ospf1 [r3-ospf-1]area0 [r3-ospf-1-area-0.0.0.0]authentication-modemd5 1 cipher admin1234 [r3-ospf-1-area-0.0.0.0]network192.168.100.0 0.0.0.255 [r3-ospf-1-area-0.0.0.0]network 172.16.13.00.0.0.255 [r3-ospf-1-area-0.0.0.0]return <r3>displayospf peer OSPFProcess 1 with Router ID 192.168.100.3 Neighbors Area 0.0.0.0 interface192.168.100.3(GigabitEthernet0/0/0)'s neighbors Router ID: 192.168.100.2 Address: 192.168.100.2 State: Full Mode:Nbr is Slave Priority: 1 DR: 192.168.100.2 BDR: 192.168.100.3 MTU: 0 Dead timer due in 40 sec Retrans timer interval: 5 Neighbor is up for 00:00:20 Authentication Sequence: [ 1609] Neighbors Area 0.0.0.0 interface172.16.13.3(GigabitEthernet0/0/1)'s neighbors Router ID: 172.16.12.1 Address: 172.16.13.1 State: Full Mode:Nbr is Slave Priority: 1 DR: 172.16.13.1 BDR: None MTU: 0 Dead timer due in 37 sec Retrans timer interval: 5 Neighbor is up for 00:00:04 Authentication Sequence: [ 1601] 配置VRRP协议 [r2]interfaceGigabitEthernet 0/0/0 [r2-GigabitEthernet0/0/0]vrrpvrid 1 virtual-ip 192.168.100.1 //配置VRRP 备份组1 虚拟IP [r3]interfaceGigabitEthernet 0/0/0 [r3-GigabitEthernet0/0/0]vrrpvrid 1 virtual-ip 192.168.100.1 [r2]displayvrrp GigabitEthernet0/0/0 | Virtual Router 1 State : Master //状态为主路由 Virtual IP : 192.168.100.1 Master IP : 192.168.100.2 PriorityRun : 100 PriorityConfig : 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 : 2020-07-22 23:40:37 UTC-08:00 Lastchange time : 2020-07-22 23:40:40 UTC-08:00 [r3]displayvrrp GigabitEthernet0/0/0 | Virtual Router 1 State : Backup //状态为备份路由 Virtual IP : 192.168.100.1 Master IP : 192.168.100.2 PriorityRun : 100 PriorityConfig : 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 : 2020-07-22 23:42:10 UTC-08:00 Last change time : 2020-07-22 23:42:10 UTC-08:00 配置VRRP优先级 [r3]interfaceGigabitEthernet 0/0/0 [r3-GigabitEthernet0/0/0]vrrpvrid 1 priority 120 //配置VRRP 优先级 [r3]displayvrrp GigabitEthernet0/0/0 | Virtual Router 1 State : Master Virtual IP : 192.168.100.1 Master IP : 192.168.100.3 PriorityRun : 120 PriorityConfig : 120 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 : 2020-07-22 23:42:10 UTC-08:00 Last change time : 2020-07-22 23:54:38UTC-08:00 <r2>displayvrrp brief //查看VRRP摘要信息 Total:1 Master:0 Backup:1 Non-active:0 VRID State Interface Type Virtual IP ---------------------------------------------------------------- 1 Backup GE0/0/0 Normal 192.168.100.1 <r2>displayvrrp interface GigabitEthernet 0/0/0 //查看VRRP接口信息 GigabitEthernet0/0/0 | Virtual Router 1 State : Backup Virtual IP : 192.168.100.1 Master IP : 192.168.100.3 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 : 2020-07-22 23:40:37 UTC-08:00 Last change time : 2020-07-22 23:54:39 UTC-08:00 PC>ping172.16.12.1 Ping172.16.12.1: 32 data bytes, Press Ctrl_C to break From172.16.12.1: bytes=32 seq=1 ttl=254 time=47 ms From172.16.12.1: bytes=32 seq=2 ttl=254 time=31 ms From172.16.12.1: bytes=32 seq=3 ttl=254 time=31 ms From172.16.12.1: bytes=32 seq=4 ttl=254 time=47 ms From172.16.12.1: bytes=32 seq=5 ttl=254 time=31 ms ---172.16.12.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 31/37/47 ms
|