一、任务描述
某公司有财务部、市场部等多个部门,其中在不同楼层都有财务部和市场部的员工的计算机,为了使公司的管理更加安全与便捷,公司的领导想让网络管理员组建公司局域网,使各个部门内部的主机之间的业务往来可以通信,但基于安全性的考虑,禁止不同部门之间互相访问。
二、任务分析
通过划分VLAN,财务部和市场部之间不可以自由访问,但部门内的计算机分布在不同楼层的交换机上,又要互相访问,这就需要使用802.1Q进行跨交换机的相同部门的访问,也就是在两台交换机之间开启Trunk进行通信。
三、实验拓扑
四、具体要求
五、任务实施
1.设置交换机的名称,创建VLAN,配置access并分配接口。对两台交换机进行相同的VLAN划分,下面是SWA配置过程,同理可实现SWB的配置。
(1)设置交换机名称,,创建VLAN10、20,并分别设置VLAN名称。
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SWA
[SWA]undo info-center enable
Info: Information center is disabled.
[SWA]vlan 10
[SWA-vlan10]des caiwubu
[SWA-vlan10]vlan 20
[SWA-vlan20]des shichangbu
[SWA-vlan20]quit
[SWA]
(2)创建端口组1,把e /0/1道到e 0/0/4放进端口组,设置端口模式为access模式,并划分至VLAN10 中。
[SWA]port-group 1
[SWA-port-group-1]group-member e0/0/1 to e0/0/4
[SWA-port-group-1]p l a
[SWA-Ethernet0/0/1]p l a
[SWA-Ethernet0/0/2]p l a
[SWA-Ethernet0/0/3]p l a
[SWA-Ethernet0/0/4]p l a
[SWA-port-group-1]p d v 10
[SWA-Ethernet0/0/1]p d v 10
[SWA-Ethernet0/0/2]p d v 10
[SWA-Ethernet0/0/3]p d v 10
[SWA-Ethernet0/0/4]p d v 10
[SWA-port-group-1]quit
[SWA]
可以看出SWA已经成功创建相应的vlan,但目前没有任何接口加入所创建的vlan 10和vlan 20中,在默认情况下,交换机上的所有接口都属于vlan1.
(3)创建端口组2把e /0/5到e 0/0/8进端口组,设置端口模式为access模式,并划分至VLAN20中。
[SWA]port-group 2
[SWA-port-group-2]group-member e0/0/5 to e0/0/8
[SWA-port-group-2]p l a
[SWA-Ethernet0/0/5]p l a
[SWA-Ethernet0/0/6]p l a
[SWA-Ethernet0/0/7]p l a
[SWA-Ethernet0/0/8]p l a
[SWA-port-group-2]p d v 20
[SWA-Ethernet0/0/5]p d v 20
[SWA-Ethernet0/0/6]p d v 20
[SWA-Ethernet0/0/7]p d v 20
[SWA-Ethernet0/0/8]p d v 20
[SWA-port-group-2]quit
[SWA]
(5)SWB交换机配置
配置交换机名称,创建VLAN。
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in e
Info: Information center is disabled.
[Huawei]sys SWA
[SWA]sys SWB
[SWB]
[SWB]vlan 10
[SWB-vlan10]des caiwubu
[SWB-vlan10]vlan 20
[SWB-vlan20]des shichangbu
[SWB-vlan20]quit
[SWB]
配置端口模式、VLAN。
[SWB]port-group 1
[SWB-port-group-1]group-member e0/0/1 to e0/0/4
[SWB-port-group-1]p l a
[SWB-Ethernet0/0/1]p l a
[SWB-Ethernet0/0/2]p l a
[SWB-Ethernet0/0/3]p l a
[SWB-Ethernet0/0/4]p l a
[SWB-port-group-1]p d v 10
[SWB-Ethernet0/0/1]p d v 10
[SWB-Ethernet0/0/2]p d v 10
[SWB-Ethernet0/0/3]p d v 10
[SWB-Ethernet0/0/4]p d v 10
[SWB-port-group-1]quit
[SWB]
端口组2配置
[SWB]port-group 2
[SWB-port-group-2]group-member e0/0/5 to e0/0/8
[SWB-port-group-