华为设备VRRP配置
双核心冗余结构下的网络架构中,HSRP,VRRP,STP都是最常用的几种技术。Cisco命名为HSRP(热备份路由协议),华为与H3C等国内的厂商称为虚拟路由冗余协议。名称不同但配置过程与作用却是类似的。典型的网络结构如下图所示此处我以client 1作为内网,ip地址段192.168.1.0/24 ,属于vlan3.lsw1与ar1连接处使用10.10.10.0/30,Lsw2与ar1连接处使用20.20.20.0/30,client2作为目标网段,使用30.30.30.0/24.路由器与交换机上跑OSPF协议,LSW1作为活跃路由器。配置前的准备工作例如IP地址,主要是看VRRP的配置。LSW3配置vlan 3quitint e0/0/3port link-type accessport default vlan 3quitint e0/0/1port link-type trunkport trunk allow-pass vlan allquitint e0/0/2port link-type trunkport trunk allow-pass vlan allquitLSW1上的配置vlan 20quitint vlan 20ip add 10.10.10.1 30quitint e0/0/1port link-type trunkport trunk allow-pass vlan allquitint e0/0/2port link-type accessport default vlan 20quit
ospf 1are 0network 192.168.1.0 0.0.0.255network 10.10.10.0 0.0.0.3quitvlan 3quitint vlan 3ip address 192.168.1.100 24quitvrrp vrid 1 virtual-ip 192.168.1.1//虚拟ipvrrp vrid 1 priority 200 //优先级vrrp vrid 1 preempt-mode timer delay 5 //在5s后进行抢占vrrp vrid 1 track interface Ethernet 0/0/2 reduced 100 //当发现端口down掉后优先级降低100,LSW2vlan 20quitint vlan 20ip add 20.20.20.1 30quitint e0/0/1port link-type trunkport trunk allow-pass vlan allint e0/0/2port link-type accessport default vlan 20quitospf 1area 0network 192.168.1.0 0.0.0.255network 20.20.20.0 0.0.0.3quitvlan 3quitint vlan 3ip add 192.168.1.200 24vrrp vrid 1 virtual-ip 192.168.1.1vrrp vrid 1 priority 120vrrp vrid 1 preempt-mode timer delay 5 AR1<AR1>sysEnter system view, return user view with Ctrl+Z.int g0/0/0ip add 10.10.10.2 30quitint g0/0/1quitint g0/0/2ip add 30.30.30.1 24quitarea 0network 10.10.10.0 0.0.0.3network 20.20.20.0 0.0.0.3network 30.30.30.0 0.0.0.255 配置完毕后在CLIENT1上PING CLIENT2
查看VRRP组的状态display vrrp 1Vlanif3 | Virtual Router 1 State : Master Virtual IP : 192.168.1.1 Master IP : 192.168.1.100 PriorityRun : 200 PriorityConfig : 200 MasterPriority : 200 Preempt : YES Delay Time : 5 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Track IF : Ethernet0/0/2 Priority reduced : 100 IF state : UP Create time : 2013-04-27 18:13:50 UTC-08:00 Last change time : 2013-04-27 18:30:33 UTC-08:00disp vrrp 1Vlanif3 | Virtual Router 1 State : Backup Virtual IP : 192.168.1.1 Master IP : 192.168.1.100 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 200 Preempt : YES Delay Time : 5 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Create time : 2013-04-27 18:17:01 UTC-08:00Last change time : 2013-04-27 18:55:32 UTC-08:00 将LSW1连接路由器的接口关闭再观察vrrp状态disp vrrp 1Vlanif3 | Virtual Router 1 State : Backup Virtual IP : 192.168.1.1 Master IP : 192.168.1.200 PriorityRun : 100 PriorityConfig : 200 MasterPriority : 120 Preempt : YES Delay Time : 5 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Track IF : Ethernet0/0/2 Priority reduced : 100 IF state : DOWN Create time : 2013-04-27 18:13:50 UTC-08:00 Last change time : 2013-04-27 19:03:03 UTC-08:00 disp vrrp 1Vlanif3 | Virtual Router 1 State : Master Virtual IP : 192.168.1.1 Master IP : 192.168.1.200 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 5 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Create time : 2013-04-27 18:17:01 UTC-08:00 Last change time : 2013-04-27 19:03:02 UTC-08:00 切换期间客户端之间的通信丢了一个数据包
我不在江湖,但江湖中有我的传说。 我不在江湖,但江湖中有我的传说。 禽兽尚且有半点怜悯之心,而我一点也没有,所以我不是禽兽。 长得真有创意,活得真有勇气! 锻炼肌肉,防止挨揍! 相当不错,感谢无私分享精神!
页:
[1]