博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
VRRP在三层交换机上的虚拟网关设置与链路的负载均衡,浮动路由
阅读量:6214 次
发布时间:2019-06-21

本文共 4249 字,大约阅读时间需要 14 分钟。

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在三层交换机上的虚拟网关设置与链路的负载均衡,浮动路由

转载于:https://blog.51cto.com/14159400/2344786

你可能感兴趣的文章
RMQ 问题及解决算法
查看>>
NFS存储服务器的部署流程
查看>>
SQL函数大全
查看>>
Django中@login_required用法简介
查看>>
python 装饰器
查看>>
Shell运算符:Shell算数运算符、关系运算符、布尔运算符、字符串运算符等
查看>>
ImageIO 操作图片
查看>>
项目总结
查看>>
AngularJs过滤器
查看>>
苏格拉底的名言警句
查看>>
在Excel中插入Flash及解决不能自动播放问题
查看>>
为Dreamweaver写的扩展—jQuery自动提示.
查看>>
BZOJ3786: 星系探索 Splay+DFS序
查看>>
【C#】datetimepicker初始为空值的方法
查看>>
计算机专业的一个四年工作的总结
查看>>
ANT的安装和配置(windows)
查看>>
(转载)Windows 7 Ultimate(旗舰版)SP1 32/64位官方原版下载(2011年5月12日更新版)...
查看>>
django MVC模式 数据库的操作mysql
查看>>
创建私有maven服务器
查看>>
JVM垃圾回收算法
查看>>