VLAN间通信(单臂路由法、三层交换法)、负载均衡

一、单臂路由

1.Switch与Router间链路要配成trunk
2.Router主接口f0/0不配IP,要no shut
3.子接口(即PC网关)配置:int f0/0.2
4.接口封装,对应VLAN2:encapsulation dot1q 2
5.子接口配置IP:ip addr 192.168.2.254 255.255.255.0

二、三层交换

1.开启三层交换机路由function:ip routing
2.选择端口:int f0/1
3.封装:swi trunk encapsulation dot1q
4.配置为trunk:swi mode trunk
5.SVI接口(即PC网关):int vlan 2
6.给SVI接口配IP:ip addr 192.168.2.254 255.255.255.0

三、VLAN负载均衡

1.两台交换机SW1、SW2间链路配置为trunk:swi mode trunk
2.配置快速STP:spanning-tree mode rapid-pvst
3.配置根桥负载均衡:
SW1:spanning-tree vlan 1 root primary
SW1:spanning-tree vlan 2 root secondary
SW2:spanning-tree vlan 1 root secondary
SW2:spanning-tree vlan 2 root primary

除非注明,肉饼博客文章均为原创,转载请以链接形式标明本文地址   
本文地址:http://roubin.me/post/vlan-communication/

你可能感兴趣的:(VLAN间通信(单臂路由法、三层交换法)、负载均衡)