VRRP 虚拟冗余链路

两台交换机建立虚拟网关  由VLAN 来进行建立。

1、配置SWL 1  创建vlan   配置vlanif 

    interface vlanif ID  

   ip add 192.168.0.253 24

   Interface g0/0/2

   port link-type trunk

   Port trunk allow-mode  vlan all

   Vrrp vrid 1 vritual-ip 192.168.0.254

   Vrrp vrid 1 priority 120

2、配置SWL2 创建vlan  配置vlanif  ip add 192.168.0.152 24

   Interface g0/0/1

   Port link-type trunk

   Port trunk allow-mode  vlan all

   Vrrp vrid 1 vritual-ip 192.168.0.254

   Vrrp vrid 1 priority 110

3、配置SWL3 创建vlan 配置接口

  Interface e0/0/1

   Port link-type access

  Port default vlan id

  Interface e0/0/2

  Port link-type access

  Port default vlan id

注意: 如果端口删除trunk? 

第一步,先输入 undo port trunk allow-mode vlan  2 to 4094;

第二步  输入port trunk allow-mode vlan 1

第三步 undo port link-type.

VLAN 负载均衡:

SW1配置(VRRP)

[SW1]interface Vlanif 10

[SW1-Vlanif10]ip ad

[SW1-Vlanif10]ip address 192.168.1.251 24

[SW1-Vlanif10]vrrp vrid 1 virtual-ip 192.168.1.254

[SW1-Vlanif10]vrrp vrid 1 priority 200

[SW1-Vlanif10]vrrp vrid 1 preempt-mode timer delay 20

[SW1-Vlanif10]vrrp vrid 1 track interface g0/0/1 reduced 100    注意:g0/0/1为出口监控

[SW1]interface Vlanif 20

[SW1-Vlanif20]ip address 192.168.2.251 24

[SW1-Vlanif20]vrrp vrid 1 virtual-ip 192.168.2.254

[SW1-Vlanif20]vrrp vrid 1 priority 150

SW2配置(VRRP)

[SW2]interface vla

[SW2]interface Vlanif 10

[SW2-Vlanif10]ip address 192.168.1.252 24

[SW2-Vlanif10]vrrp vrid 1 virtual-ip 192.168.1.254

[SW2-Vlanif10]vrrp vrid 1 priority 150

[SW2]interface Vlanif 20

[SW2-Vlanif20]ip address 192.168.2.252 24

[SW2-Vlanif20]vrrp vrid 1 virtual-ip 192.168.2.254

[SW2-Vlanif20]vrrp vrid 1 priority 200

[SW2-Vlanif20]vrrp vrid 1 track interface g0/0/2 reduced 100  注意:g0/0/2为出口监控

[SW2-Vlanif20]vrrp vrid 1 preempt-mode timer delay 20

 

更多推荐