利用VLAN技术简单规划,优化公司内部局域网络性能学习总结
利用VLAN技术简单规划,优化配置公司内部网络的学习总结
描述:
1.应用场景:企业比较大,分在各个楼层,各管理与执行分在各不同楼层,实现必要的数据共享;并分隔广播域,提升公司整体网络性能。
2.将整个企业网络规划三层:路由或防火墙, 核心交换机和子交换机(做聚合,本例题未做链路聚合),各工作站为一层;
思路:
1.通过VLAN技术,控制各部门相互访问,防止在这方面出现数据泄密问题:本例题划分3个VLAN:10 20 30
2.核心聚合交换机与子交换机link-type:采用trunk模式连接;
3.子交换机与工作站link-type:采用access模式连接;
4.VLAN 10: 接口2-9;VLAN 20:接口10-15; VLAN 30:16-20
操作:
1.按上图,先把各个工作站的IP地址进行配置;
2.Sub-sw1:
[Sub-SW1] vlan batch 10 20 30 //批量建立Vlan 10 20 30 三个vlan
[Sub-SW1] port-group 10 //建立接口组 10
[Sub-SW1-port-group-10] group-member GigabitEthernet 0/0/2 to GigabitEthernet 0/0/9 //将接口2-9归入接口组10
[Sub-SW1-port-group-10] port link-type access //将整个接口组里所属成员的连接模式设为access
[Sub-SW1-port-group-10] port default vlan 10 //整个接口组里所属成员归入vlan10
[Sub-SW1] port-group 20 //建立接口组 20
[Sub-SW1-port-group-20] group-member GigabitEthernet 0/0/10 to GigabitEthernet 0/0/15 //将接口10-15归入接口组10
[Sub-SW1-port-group-20] port link-type access //将整个接口组里所属成员的连接模式设为access
[Sub-SW1-port-group-20] port default vlan 20 //整个接口组里所属成员归入vlan20
[Sub-SW1] port-group 30 //建立接口组 30
[Sub-SW1-port-group-30] group-member GigabitEthernet 0/0/16 to GigabitEthernet 0/0/20 //将接口16-20归入接口组30
[Sub-SW1-port-group-30] port link-type access //将整个接口组里所属成员的连接模式设为access
[Sub-SW1-port-group-30] port default vlan 30 //整个接口组里所属成员归入vlan30
[Sub-SW1] interface GigabitEthernet 0/0/1 //进入用于聚合的接口
[Sub-SW1-GigabitEthernet0/0/1] port link-type trunk //将聚合接口连接模式设为trunk
[Sub-SW1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 20 30 //将聚合接口允许通过vlan10 20 30 三种数据帧
3.Sub-sw2:
[Sub-SW2] vlan batch 10 20 30 //批量建立Vlan 10 20 30 三个vlan
[Sub-SW2] port-group 10 //建立接口组 10
[Sub-SW2-port-group-10] group-member GigabitEthernet 0/0/2 to GigabitEthernet 0/0/9 //将接口2-9归入接口组10
[Sub-SW2-port-group-10] port link-type access //将整个接口组里所属成员的连接模式设为access
[Sub-SW2-port-group-10] port default vlan 10 //整个接口组里所属成员归入vlan10
[Sub-SW2] port-group 20 //建立接口组 20
[Sub-SW2-port-group-20] group-member GigabitEthernet 0/0/10 to GigabitEthernet 0/0/15 //将接口10-15归入接口组10
[Sub-SW2-port-group-20] port link-type access //将整个接口组里所属成员的连接模式设为access
[Sub-SW2-port-group-20] port default vlan 20 //整个接口组里所属成员归入vlan20
[Sub-SW2] port-group 30 //建立接口组 30
[Sub-SW2-port-group-30] group-member GigabitEthernet 0/0/16 to GigabitEthernet 0/0/20 //将接口16-20归入接口组30
[Sub-SW2-port-group-30] port link-type access //将整个接口组里所属成员的连接模式设为access
[Sub-SW2-port-group-30] port default vlan 30 //整个接口组里所属成员归入vlan30
[Sub-SW2] interface GigabitEthernet 0/0/1 //进入用于聚合的接口
[Sub-SW2-GigabitEthernet0/0/1] port link-type trunk //将聚合接口连接模式设为trunk
[Sub-SW2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 20 30 //将聚合接口允许通过vlan10 20 30 三种数据帧
4.Sub-sw3:
[Sub-SW3] vlan batch 10 20 30 //批量建立Vlan 10 20 30 三个vlan
[Sub-SW3] port-group 10 //建立接口组 10
[Sub-SW3-port-group-10] group-member GigabitEthernet 0/0/2 to GigabitEthernet 0/0/9 //将接口2-9归入接口组10
[Sub-SW3-port-group-10] port link-type access //将整个接口组里所属成员的连接模式设为access
[Sub-SW3-port-group-10] port default vlan 10 //整个接口组里所属成员归入vlan10
[Sub-SW3] port-group 20 //建立接口组 20
[Sub-SW3-port-group-20] group-member GigabitEthernet 0/0/10 to GigabitEthernet 0/0/15 //将接口10-15归入接口组10
[Sub-SW3-port-group-20] port link-type access //将整个接口组里所属成员的连接模式设为access
[Sub-SW3-port-group-20] port default vlan 20 //整个接口组里所属成员归入vlan20
[Sub-SW3] port-group 30 //建立接口组 30
[Sub-SW3-port-group-30] group-member GigabitEthernet 0/0/16 to GigabitEthernet 0/0/20 //将接口16-20归入接口组30
[Sub-SW3-port-group-30] port link-type access //将整个接口组里所属成员的连接模式设为access
[Sub-SW3-port-group-30] port default vlan 30 //整个接口组里所属成员归入vlan30
[Sub-SW3] interface GigabitEthernet 0/0/1 //进入用于聚合的接口
[Sub-SW3-GigabitEthernet0/0/1] port link-type trunk //将聚合接口连接模式设为trunk
[Sub-SW3-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 20 30 //将聚合接口允许通过vlan10 20 30 三种数据帧
5.Core-SW //核心聚合交换机配置,各接口都为trunk连接模式;各接口都允许通过vlan 10 20 30 的数据帧
[Core-sw] interface GigabitEthernet 0/0/2
[Core-sw-GigabitEthernet0/0/2] port link-type trunk
[Core-sw-GigabitEthernet0/0/2] port trunk allow-pass vlan 10 20 30
[Core-sw] interface GigabitEthernet 0/0/4
[Core-sw-GigabitEthernet0/0/4] port link-type trunk
[Core-sw-GigabitEthernet0/0/4] port trunk allow-pass vlan 10 20 30
[Core-sw] interface GigabitEthernet 0/0/3
[Core-sw-GigabitEthernet0/0/3] port link-type trunk
[Core-sw-GigabitEthernet0/0/3] port trunk allow-pass vlan 10 20 30