VRRP配置

作者: admin 分类: 网络 发布时间: 2019-04-29 00:25 浏览:1,238 次    

%title插图%num

1、SW1配置

en

vlan data

vtp domain 2014  

vtp server             

vlan 2

vlan 3

exit

conf t

int  f1/1

switch mode trunk

int f1/15

switch mode trunk

int f1/0

no switch

ip add 192.168.1.1 255.255.255.0

no sh

int vlan 2

ip add  192.168.2.1 255.255.255.0

no sh

int vlan 3

ip add 192.168.3.1 255.255.255.0

no sh

exit

track 2 int f1/0 line-protocol         //配置需要跟踪的端口

exit

int vlan 2

vrrp 2 ip 192.168.2.254     

vrrp 2 pri 150                          

vrrp 2 pree                              

vrrp 2 track 2 decrement 100              

int vlan 3

vrrp 3 ip 192.168.3.254

vrrp 3 pree

exit

spanning-tree vlan 2 root primary    

span vlan 3 root secondary          

ip route 0.0.0.0 0.0.0.0 192.168.1.2

do show vrrp br                                                       //查看vrrp配置

2、SW2配置

en

vlan data

vtp domain 2014  

vtp server             

exit

conf t

int  f1/2

switch mode trunk

int f1/15

switch mode trunk

int f1/0

no switch

ip add 192.168.4.1 255.255.255.0

no sh

int vlan 2

ip add  192.168.2.2 255.255.255.0

no sh

int vlan 3

ip add 192.168.3.2 255.255.255.0

no sh

int vlan 3

vrrp 3 ip 192.168.3.254     

vrrp 3 pri 150                          

vrrp 3 pree                              

vrrp 3 track 3 decrement 100              

int vlan 2

vrrp 2 ip 192.168.2.254

vrrp 2 pree

exit

track 3 int f1/0 line-protocol

spanning-tree vlan 3 root primary    

span vlan 2 root secondary          

ip route 0.0.0.0 0.0.0.0 192.168.4.2

3、SW3配置

en

vlan data

vtp domain 2014

vtp client

exit

conf t

int rang f1/1 - 2

sw mode trunk

int f1/3

sw acc vlan 2

int f1/4

sw ac vl 3

4、R1配置

en

conf t

int f0/1

ip add 192.168.1.2 255.255.255.0

no sh

int f0/0

ip add 192.168.4.2 255.255.255.0

no sh

int loop0

ip add 192.168.10.1 255.255.255.0

no sh

exit

ip route 192.168.2.0 255.255.255.0 192.168.1.1

ip route 192.168.2.0 255.255.255.0 192.168.4.1  50

ip route 192.168.3.0 255.255.255.0 192.168.4.1

ip route 192.168.3.0 255.255.255.0  192.168.1.1 50

5、PC配置

C1:192.168.2.3/24 GW:192.168.2.254

C2:192.168.3.3/24 GW:192.168.3.254

6、测试

%title插图%num

把SW2的f1/0口shutdown 后测试并跟踪

%title插图%num

%title插图%num

说明已经成功!


温馨提示:如无特殊说明,本站文章均为作者原创,转载时请注明出处及相应链接!

发表评论