使用ensp模拟器中的三层交换机配置vrrp(基于vlan的)

使用ensp模拟器中的三层交换机配置vrrp

关于vrrp的介绍、相关术语、状态及使用路由器配置vrrp请参考:

使用ensp模拟器中的路由器配置vrrp详解

这次只讲解使用三层交换机配置vrrp

拓扑图

在这里插入图片描述

配置

电脑终端:
如图配置好相应的ip地址、子网掩码和网关。

LSW1:
[lsw1]vlan batch 10 20
[lsw1]interface Ethernet0/0/1
[lsw1-Ethernet0/0/1]port link-type access
[lsw1-Ethernet0/0/1]port default vlan 10
[lsw1-Ethernet0/0/1]quit
[lsw1]interface Ethernet0/0/2
[lsw1-Ethernet0/0/2]port link-type access
[lsw1-Ethernet0/0/2]port default vlan 20
[lsw1-Ethernet0/0/2]quit
[lsw1]interface Ethernet0/0/3
[lsw1-Ethernet0/0/3]port link-type trunk
[lsw1-Ethernet0/0/3]port trunk allow-pass vlan 10 20
[lsw1-Ethernet0/0/3]quit
[lsw1]quit
save

LSW2:
[lsw2]vlan batch 30 40
[lsw2]interface Ethernet0/0/1
[lsw2-Ethernet0/0/1]port link-type access
[lsw2-Ethernet0/0/1]port default vlan 30
[lsw2-Ethernet0/0/1]quit
[lsw2]interface Ethernet0/0/2
[lsw2-Ethernet0/0/2]port link-type access
[lsw2-Ethernet0/0/2]port default vlan 40
[lsw2-Ethernet0/0/2]quit
[lsw2]interface Ethernet0/0/3
[lsw2-Ethernet0/0/3]port link-type trunk
[lsw2-Ethernet0/0/3]port trunk allow-pass vlan 30 40
[lsw2-Ethernet0/0/3]quit
[lsw2]quit
save

LSW3:
[lsw3]vlan batch 10 20 30 40
[lsw3]interface GigabitEthernet 0/0/1
[lsw3-GigabitEthernet0/0/1]port link-type trunk
[lsw3-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[lsw3-GigabitEthernet0/0/1]quit
[lsw3]interface GigabitEthernet 0/0/2
[lsw3-GigabitEthernet0/0/2]port link-type trunk
[lsw3-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20 30 40
[lsw3-GigabitEthernet0/0/2]quit
[lsw3]interface Vlanif 10
[lsw3-Vlanif10]ip address 192.168.10.252 255.255.255.0
[lsw3-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
[lsw3-Vlanif10]quit
[lsw3]interface Vlanif 20
[lsw3-Vlanif20]ip address 192.168.20.252 255.255.255.0
[lsw3-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254
[lsw3-Vlanif20]quit
[lsw3]interface Vlanif 30
[lsw3-Vlanif30]ip address 192.168.30.252 255.255.255.0
[lsw3-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254
[lsw3-Vlanif30]quit
[lsw3]interface Vlanif 40
[lsw3-Vlanif40]ip address 192.168.40.252 255.255.255.0
[lsw3-Vlanif40]vrrp vrid 40 virtual-ip 192.168.40.254
[lsw3-Vlanif40]quit
[lsw3]quit
save

LSW4:
[lsw4]vlan batch 10 20 30 40
[lsw4]interface GigabitEthernet 0/0/1
[lsw4-GigabitEthernet0/0/1]port link-type trunk
[lsw4-GigabitEthernet0/0/1]port trunk allow-pass vlan 30 40
[lsw4-GigabitEthernet0/0/1]quit
[lsw4]interface GigabitEthernet 0/0/2
[lsw4-GigabitEthernet0/0/2]port link-type trunk
[lsw4-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20 30 40
[lsw4-GigabitEthernet0/0/2]quit
[lsw4]interface Vlanif 10
[lsw4-Vlanif10]ip address 192.168.10.253 255.255.255.0
[lsw4-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
[lsw4-Vlanif10]quit
[lsw4]interface Vlanif 20
[lsw4-Vlanif20]ip address 192.168.20.253 255.255.255.0
[lsw4-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254
[lsw4-Vlanif20]quit
[lsw4]interface Vlanif 30
[lsw4-Vlanif30]ip address 192.168.30.253 255.255.255.0
[lsw4-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254
[lsw4-Vlanif30]quit
[lsw4]interface Vlanif 40
[lsw4-Vlanif40]ip address 192.168.40.253 255.255.255.0
[lsw4-Vlanif40]vrrp vrid 40 virtual-ip 192.168.40.254
[lsw4-Vlanif40]quit
[lsw4]quit
save

验证

分别查看两个三层交换机上的vrrp状态,并随机找几台电脑终端进行互ping,并查看路径信息。(使用tracert命令)
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 28
    点赞
  • 145
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 6
    评论
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

西瓜~

你的鼓励将是我创作的最大动力。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值