项目描述:
熟悉交换机上VLAN的创建及相关配置,给公司各部门划分相应的VLAN进行广播风暴的隔离控制并进行相关测试。
项目实施拓扑图:
项目实施基本要求:
(1)正确选择设备并使用线缆连接;
(2)正确给各个PC配置相关IP地址及子网掩码等参数;
(3)在SW1上配置相关VLAN,并把交换机相应的端口添加到VLAN中。用相关显示命令查看配置结果。
(4)在SW2上配置相关VLAN,并把交换机相应的端口添加到VLAN中。用相关显示命令查看配置结果。
(5)在SW3上配置相关VLAN,并把交换机相应的端口添加到VLAN中。用相关显示命令查看配置结果。
(6)在SW4上进行相关配置,使得不同交换机上的相同部门PC(如销售部PC1和销售部PC3)可以相互访问。
项目拓展要求(选做):
如何配置下面网络拓扑图中的两个交换机,使得两个不同VLAN中的PC能相互访问。
Switch>en
Switch>conf
Switch>en
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#in
Switch(config)#VLAN 10
Switch(config-vlan)#exit
Switch(config)#in
Switch(config)#interface ra
Switch(config)#interface range f0/5
Switch(config-if-range)#sw
Switch(config-if-range)#switchport ac
Switch(config-if-range)#switchport access vlan 10
Switch(config-if-range)#exit
Switch(config)#exit
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#in
Switch(config)#interface ra
Switch(config)#interface range f0/5
Switch(config-if-range)#sw
Switch(config-if-range)#switchport mode ?
access Set trunking mode to ACCESS unconditionally
dynamic Set trunking mode to dynamically negotiate access or trunk mode
trunk Set trunking mode to TRUNK unconditionally
Switch(config-if-range)#switchport mode
% Incomplete command.
Switch(config-if-range)#?
cdp Global CDP configuration subcommands
channel-group Etherchannel/port bundling configuration
channel-protocol Select the channel protocol (LACP, PAgP)
description Interface specific description
duplex Configure duplex operation.
exit Exit from interface configuration mode
mdix Set Media Dependent Interface with Crossover
mls mls interface commands
no Negate a command or set its defaults
shutdown Shutdown the selected interface
spanning-tree Spanning Tree Subsystem
speed Configure speed operation.
storm-control storm configuration
switchport Set switching mode characteristics
tx-ring-limit Configure PA level transmit ring limit
Switch(config-if-range)#sw
Switch(config-if-range)#switchport ?
access Set access mode characteristics of the interface
mode Set trunking mode of the interface
native Set trunking native characteristics when interface is in
trunking mode
nonegotiate Device will not engage in negotiation protocol on this
interface
port-security Security related command
priority Set appliance 802.1p priority
trunk Set trunking characteristics of the interface
voice Voice appliance attributes
Switch(config-if-range)#switchport ?
access Set access mode characteristics of the interface
mode Set trunking mode of the interface
native Set trunking native characteristics when interface is in
trunking mode
nonegotiate Device will not engage in negotiation protocol on this
interface
port-security Security related command
priority Set appliance 802.1p priority
trunk Set trunking characteristics of the interface
voice Voice appliance attributes
Switch(config-if-range)#switchport mode?
mode
Switch(config-if-range)#exit
Switch(config)#in
Switch(config)#interface f0/5
Switch(config-if)#sw
Switch(config-if)#switchport mode
Switch(config-if)#switchport mode ?
access Set trunking mode to ACCESS unconditionally
dynamic Set trunking mode to dynamically negotiate access or trunk mode
trunk Set trunking mode to TRUNK unconditionally
Switch(config-if)#switchport mode tr
Switch(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to up
Switch(config-if)#exit
项目实施过程及测试结果:
1、销售部PC1、人事部PC1、销售部PC3、研发部PC1、研发部PC2、财务部PC等配置相关IP地址及子网掩码等参数截图
2、交换机配置信息(show running结果)
一楼交换机SW1的配置:
SW1>en
SW1#show run
SW1#show running-config
Building configuration...
Current configuration : 1276 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW1
!
!
!
interface FastEthernet0/1
switchport access vlan 10
!
interface FastEthernet0/2
switchport access vlan 10
!
interface FastEthernet0/3
switchport access vlan 10
!
--More--
二楼交换机SW2的配置
SW1>en
SW1#show run
SW1#show running-config
Building configuration...
Current configuration : 1276 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW1
!
!
!
interface FastEthernet0/1
switchport access vlan 10
!
interface FastEthernet0/2
switchport access vlan 10
!
interface FastEthernet0/3
switchport access vlan 10
!
--More--
三楼交换SW3的配置
SW1>en
SW1#show run
SW1#show running-config
Building configuration...
Current configuration : 1276 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW1
!
!
!
interface FastEthernet0/1
switchport access vlan 10
!
interface FastEthernet0/2
switchport access vlan 10
!
interface FastEthernet0/3
switchport access vlan 10
!
--More--
网络中心交换机SW4配置
SW1>en
SW1#show run
SW1#show running-config
Building configuration...
Current configuration : 1276 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW1
!
!
!
interface FastEthernet0/1
switchport access vlan 10
!
interface FastEthernet0/2
switchport access vlan 10
!
interface FastEthernet0/3
switchport access vlan 10
!
--More--
3、相关测试截图
销售部PC1 ping 销售部PC3结果截图
研发部PC1 ping 研发部PC2结果截图
人事部PC1 ping 财务部PC结果截图