频道栏目
首页 > 网络 > 其他 > 正文

VRRP在三层交换机上的虚拟网关设置与链路的负载均衡,浮动路由教程

2019-01-26 14:17:42           
收藏   我要投稿

VRRP在三层交换机上的虚拟网关设置与链路的负载均衡,浮动路由VRRP在三层交换机上的虚拟网关设置与链路的负载均衡,浮动路由VRRP在三层交换机上的虚拟网关设置与链路的负载均衡,浮动路由VRRP在三层交换机上的虚拟网关设置与链路的负载均衡,浮动路由VRRP在三层交换机上的虚拟网关设置与链路的负载均衡,浮动路由一:创建VLAN10 20 30 40 100 200 并将PC机加入不同的vLan。[sw1]vlan batch 10 20 30 40 100 200[sw1]int g0/0/1 [sw1-GigabitEthernet0/0/1]port link-type access [sw1-GigabitEthernet0/0/1]port default vlan 10[sw1-GigabitEthernet0/0/1]int g0/0/2[sw1-GigabitEthernet0/0/2]port link-type access[sw1-GigabitEthernet0/0/2]port default vlan 20[sw1-GigabitEthernet0/0/2]int g0/0/3[sw1-GigabitEthernet0/0/3]port link-type access[sw1-GigabitEthernet0/0/3]port default vlan 30[sw1-GigabitEthernet0/0/3]int g0/0/4[sw1-GigabitEthernet0/0/4]port link-type access[sw1-GigabitEthernet0/0/4]port default vlan 40[sw1-GigabitEthernet0/0/4]int g0/0/13[sw1-GigabitEthernet0/0/13]port link-type trunk [sw1-GigabitEthernet0/0/13]port trunk allow-pass vlan all[sw1-GigabitEthernet0/0/13]int g0/0/12[sw1-GigabitEthernet0/0/12]port link-type trunk[sw1-GigabitEthernet0/0/12]port trunk allow-pass vlan all

二:设置SW2(vlan),设置虚拟IP并设置优先级[sw2]vlan batch 10 20 30 40 100 200[sw2]int g0/0/12[sw2-GigabitEthernet0/0/12]port link-type trunk [sw2-GigabitEthernet0/0/12]port trunk allow-pass vlan all[sw2]int Vlanif 10[sw2-Vlanif10]ip address 192.168.10.252 24[sw2-Vlanif10]int Vlanif 20[sw2-Vlanif20]ip address 192.168.20.252 24[sw2-Vlanif20]int Vlanif 30[sw2-Vlanif30]ip address 192.168.30.252 24[sw2-Vlanif30]int Vlanif 40[sw2-Vlanif40]ip address 192.168.40.252 24[sw2]int g0/0/1[sw2-GigabitEthernet0/0/1]port link-type access [sw2-GigabitEthernet0/0/1]port default vlan 100[sw2]int Vlanif 100[sw2-Vlanif100]ip address 192.168.100.1 24三:设置SW2路由表条目[sw2]ip route-static 192.168.50.0 24 192.168.100.2三:设置SW2虚拟IP并设置优先级(默认100选大于100的)[sw2]int Vlanif 10[sw2-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254[sw2-Vlanif10]int Vlanif 20[sw2-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254[sw2]int Vlanif 30[sw2-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254[sw2-Vlanif30]int Vlanif 40[sw2-Vlanif40]vrrp vrid 40 virtual-ip 192.168.40.254[sw2]int Vlanif 10[sw2-Vlanif10]vrrp vrid 10 priority 200[sw2-Vlanif10]int Vlanif 30[sw2-Vlanif30]vrrp vrid 30 priority 200

[sw2]int Vlanif 10[sw2-Vlanif10]vrrp vrid 10track interface g0/0/1 reduced 150[sw2]int Vlanif 30[sw2-Vlanif30]vrrp vrid 30 track interface g0/0/1 reduced 150四:设置SW3(vlan),设置虚拟IP并设置优先级[sw3]vlan batch 10 20 30 40 100 200[sw3]int g0/0/13[sw3-GigabitEthernet0/0/13]port link-type trunk [sw3-GigabitEthernet0/0/13]port trunk allow-pass vlan all[sw3]int Vlanif 10[sw3-Vlanif10]ip address 192.168.10.253 24[sw3-Vlanif10]int Vlanif 20[sw3-Vlanif20]ip address 192.168.20.253 24[sw3-Vlanif20]int Vlanif 30[sw3-Vlanif30]ip address 192.168.30.253 24[sw3-Vlanif30]int Vlanif 40[sw3-Vlanif40]ip address 192.168.40.253 24[sw3]int g0/0/1[sw3-GigabitEthernet0/0/1]port link-type access [sw3-GigabitEthernet0/0/1]port default vlan 200[sw3]int Vlanif 200[sw3-Vlanif200]ip address 192.168.200.1 24五.SW3上设置路由表[sw3]ip route-static 192.168.50.0 24 192.168.200.2

[sw3]int Vlanif 10[sw3-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254[sw3-Vlanif10]int Vlanif 20[sw3-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254[sw3]int Vlanif 30[sw3-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254[sw3-Vlanif30]int Vlanif 40[sw3-Vlanif40]vrrp vrid 40 virtual-ip 192.168.40.254[sw3]int Vlanif 20[sw3-Vlanif20]vrrp vrid 20 priority 200[sw3-Vlanif20]int Vlanif 40[sw3-Vlanif40]vrrp vrid 40 priority 200[sw3]int Vlanif 20[sw3-Vlanif20]vrrp vrid 20 track interface g0/0/1 reduced 150[sw3]int Vlanif 40[sw3-Vlanif40]vrrp vrid 40 track interface g0/0/1 reduced 150

设置路由器[r1]int g0/0/0[r1-GigabitEthernet0/0/0]ip address 192.168.100.2 24[r1-GigabitEthernet0/0/0]int g0/0/1[r1-GigabitEthernet0/0/1]ip address 192.168.200.2 24[r1-GigabitEthernet0/0/1]int g2/0/0[r1-GigabitEthernet2/0/0]ip address 192.168.50.1 24[r1]ip route-static 192.168.10.0 24 192.168.100.1[r1]ip route-static 192.168.30.0 24 192.168.100.1[r1]ip route-static 192.168.20.0 24 192.168.200.1[r1]ip route-static 192.168.40.0 24 192.168.200.1[r1]ip route-static 192.168.10.0 24 192.168.200.1 preference 80[r1]ip route-static 192.168.30.0 24 192.168.200.1 preference 80[r1]ip route-static 192.168.20.0 24 192.168.100.1 preference 80[r1]ip route-static 192.168.40.0 24 192.168.100.1 preference 80验证VRRP在三层交换机上的虚拟网关设置与链路的负载均衡,浮动路由VRRP在三层交换机上的虚拟网关设置与链路的负载均衡,浮动路由VRRP在三层交换机上的虚拟网关设置与链路的负载均衡,浮动路由VRRP在三层交换机上的虚拟网关设置与链路的负载均衡,浮动路由

上一篇:ACL流量控制 公司访问外网时限制与控制教程
下一篇:kubernetes之使用docker快速部署harbor教程
相关文章
图文推荐
文章
推荐
热门新闻

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站