HCNA-39 VRRP多备份组
基本配置 <Huawei>system-view [Huawei]sysname sw1 [sw1]vlan batch 10 20 [sw1]interface Ethernet 0/0/1 [sw1-Ethernet0/0/1]portlink-type access [sw1-Ethernet0/0/1]portdefault vlan 10 [sw1-Ethernet0/0/1]interface Ethernet 0/0/2 [sw1-Ethernet0/0/2]portlink-type access [sw1-Ethernet0/0/2]portdefault vlan 20 [sw1-Ethernet0/0/2]port-groupgroup-member GigabitEthernet 0/0/1 GigabitEthernet 0/0/2 [sw1-port-group]portlink-type trunk [sw1-port-group]porttrunk allow-pass vlan all [sw1-port-group]quit <Huawei>system-view [Huawei]sysname r2 [r2]interface GigabitEthernet 0/0/0.1 [r2-GigabitEthernet0/0/0.1]ip address 192.168.10.224 [r2-GigabitEthernet0/0/0.1]dot1qtermination vid 10 //配置单臂路由末端对应VLAN [r2-GigabitEthernet0/0/0.1]arpbroadcast enable //ARP广播功能开启 [r2-GigabitEthernet0/0/0.1]interface GigabitEthernet0/0/0.2 [r2-GigabitEthernet0/0/0.2]ip address 192.168.20.224 [r2-GigabitEthernet0/0/0.2]dot1q termination vid 20 [r2-GigabitEthernet0/0/0.2]arp broadcast enable [r2-GigabitEthernet0/0/0.2]quit [r2]interface GigabitEthernet 0/0/1 [r2-GigabitEthernet0/0/1]ip address 172.16.12.2 24 [r2-GigabitEthernet0/0/1]quit [r2]display ip interface brief [r2]ospf 1 //创建OSPF协议进程1 [r2-ospf-1]area 0 //创建骨干区域0 [r2-ospf-1-area-0.0.0.0]authentication-modemd5 1 cipher admin1234 //配置身份认证模式为md5 密文显示密码 [r2-ospf-1-area-0.0.0.0]network192.168.10.0 0.0.0.255 //宣告参与网段 [r2-ospf-1-area-0.0.0.0]network192.168.20.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]sysname r3 [r3]interface GigabitEthernet 0/0/0.1 [r3-GigabitEthernet0/0/0.1]ip address 192.168.10.324 [r3-GigabitEthernet0/0/0.1]dot1q termination vid 10 [r3-GigabitEthernet0/0/0.1]arp broadcast enable [r3-GigabitEthernet0/0/0.1]interface GigabitEthernet0/0/0.2 [r3-GigabitEthernet0/0/0.2]ip address 192.168.20.324 [r3-GigabitEthernet0/0/0.2]dot1q termination vid 20 [r3-GigabitEthernet0/0/0.2]arp broadcast enable [r3-GigabitEthernet0/0/0.2]interface GigabitEthernet0/0/1 [r3-GigabitEthernet0/0/1]ip address 172.16.13.3 24 [r3-GigabitEthernet0/0/1]quit [r3]ospf 1 [r3-ospf-1]area 0 [r3-ospf-1-area-0.0.0.0]authentication-mode md5 1cipher admin1234 [r3-ospf-1-area-0.0.0.0]network 192.168.10.00.0.0.255 [r3-ospf-1-area-0.0.0.0]network 192.168.20.00.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 <Huawei>system-view [Huawei]sysname r1 [r1]interface GigabitEthernet 0/0/0 [r1-GigabitEthernet0/0/0]ip address 172.16.12.1 24 [r1-GigabitEthernet0/0/0]interface GigabitEthernet0/0/1 [r1-GigabitEthernet0/0/1]ip address 172.16.13.1 24 [r1-GigabitEthernet0/0/1]interface loopback 0 [r1-LoopBack0]ip address 100.100.100.100 32 [r1-LoopBack0]quit [r1]display ip interface brief [r1]ospf 1 [r1-ospf-1]area 0 [r1-ospf-1-area-0.0.0.0]authentication-mode md5 1cipher admin1234 [r1-ospf-1-area-0.0.0.0]network 172.16.12.00.0.0.255 [r1-ospf-1-area-0.0.0.0]network 172.16.13.00.0.0.255 [r1-ospf-1-area-0.0.0.0]network 100.100.100.1000.0.0.0 [r1-ospf-1-area-0.0.0.0]return <r1>display ospf 1 peer //查看邻居状态 OSPF Process 1 with Router ID 172.16.12.1 Neighbors Area 0.0.0.0interface 172.16.12.1(GigabitEthernet0/0/0)'s neighbors Router ID:192.168.10.2 Address:172.16.12.2 State:Full Mode:Nbr is Master Priority: 1 DR:172.16.12.2 BDR: 172.16.12.1 MTU: 0 Dead timerdue in 36 sec Retranstimer interval: 5 Neighbor isup for 00:00:44 Authentication Sequence: [ 2661] Neighbors Area 0.0.0.0interface 172.16.13.1(GigabitEthernet0/0/1)'s neighbors Router ID:192.168.10.3 Address:172.16.13.3 State:Full Mode:Nbr is Master Priority: 1 DR:172.16.13.3 BDR: 172.16.13.1 MTU: 0 Dead timerdue in 28 sec Retranstimer interval: 5 Neighbor isup for 00:00:31 Authentication Sequence: [ 692] 配置VRRP多备份组实现手工负载分担 [r2]interface GigabitEthernet 0/0/0.1 [r2-GigabitEthernet0/0/0.1]vrrpvrid 1 virtual-ip 192.168.10.1 //配置VRRP [r2-GigabitEthernet0/0/0.1]interface GigabitEthernet0/0/0.2 [r2-GigabitEthernet0/0/0.2]vrrp vrid 2 virtual-ip192.168.20.1 [r3]interface GigabitEthernet 0/0/0.1 [r3-GigabitEthernet0/0/0.1]vrrp vrid 1 vritual [r3-GigabitEthernet0/0/0.1]vrrp vrid 1 virtual-ip192.168.10.1 [r3-GigabitEthernet0/0/0.1]interface GigabitEthernet0/0/0.2 [r3-GigabitEthernet0/0/0.2]vrrp vrid 2 virtual-ip192.168.20.1 [r3-GigabitEthernet0/0/0.2]vrrpvrid 2 priority 200 //配置VRRP 主备优先级 [r2]displayvrrp brief //查看VRRP摘要信息 Total:2 Master:1 Backup:1 Non-active:0 VRID State Interface Type Virtual IP ---------------------------------------------------------------- 1 Master GE0/0/0.1 Normal 192.168.10.1 2 Backup GE0/0/0.2 Normal 192.168.20.1 [r3]display vrrp brief Total:2 Master:1 Backup:1 Non-active:0 VRID State Interface Type Virtual IP ---------------------------------------------------------------- 1 Backup GE0/0/0.1 Normal 192.168.10.1 2 Master GE0/0/0.2 Normal 192.168.20.1 traceroute to 100.100.100.100, 8 hops max //路由追踪 (ICMP), press Ctrl+C to stop 1 192.168.10.3 47 ms 31 ms 47 ms 2 100.100.100.100 47 ms 47 ms 31 ms traceroute to 100.100.100.100, 8 hops max (ICMP), press Ctrl+C to stop 1 192.168.20.3 31 ms 32 ms 47 ms 2 100.100.100.100 46 ms 63 ms 62 ms R2与R3两台路由器,链路实现了手工负载均衡。 R2与R3的位置使用三层交换机代替效果更佳。
|