交换机配置步骤.docx
- 文档编号:26269498
- 上传时间:2023-06-17
- 格式:DOCX
- 页数:26
- 大小:18.11KB
交换机配置步骤.docx
《交换机配置步骤.docx》由会员分享,可在线阅读,更多相关《交换机配置步骤.docx(26页珍藏版)》请在冰豆网上搜索。
交换机配置步骤
交换机配置步骤:
******************************************************************
一、s3750
1、配置vtp域
vtpdomain
vtpmodeserver(此处为默认,无需配置)
2、配置vlan
vlan10(创建vlan10,其余类似)
3、配置vlan间路由
iprouting(启用三层路由功能)
interfacevlan10
ipaddress10.0.1.254255.255.255.0
noshutdown
.
.
.
4、配置端口类型(trunk)
interfaceGigabitEthernet1/0/11
switchporttrunkencapsulationdot1q
switchportmodetrunk
5、配置远程登陆(telnet)
enablepasswordcisco
linevty04
passwordcisco
6、配置访问控制列表并应用到指定接口
access-list101denyipany10.0.1.00.0.0.255
access-list101denyipany10.0.3.00.0.0.255
access-list101denyipany10.0.0.00.0.0.255
access-list101permitipanyany
access-list102denyipany10.0.2.00.0.0.255
access-list102denyipany10.0.4.00.0.0.255
access-list102denyipany10.0.0.00.0.0.255
access-list102denyipany172.16.0.00.0.0.255
access-list102permitipanyany
interfaceVlan10
ipaddress10.0.1.254255.255.255.0
ipaccess-group102in
!
interfaceVlan20
ipaddress10.0.2.254255.255.255.0
ipaccess-group101in
!
interfaceVlan30
ipaddress10.0.3.254255.255.255.0
ipaccess-group102in
!
interfaceVlan40
ipaddress10.0.4.254255.255.255.0
ipaccess-group101in
7、配置到防火墙的缺省路由
iproute0.0.0.00.0.0.0172.16.0.1
8、设备密码均为cisco
二、s2950
1、配置vtp域
vtpdomain
vtpmodeclient(必须配置,否则会影响vtp域)
2、配置管理地址
interfacevlan60
ipaddress10.0.0.(x)255.255.255.0
noshutdown
3、配置端口类型
进入接口配置模式
interfacefastethernet0/1
将端口配置为trunk
switchportmodetrunk
将端口加入指定vlan
switchportmodeaccess
switchportaccessvlan20
4、配置远程登陆(telnet)
enablepasswordcisco
linevty04
passwordcisco
配置文件
********************************************************************
s3750-1#shrun
Buildingconfiguration...
Currentconfiguration:
3381bytes
!
version12.1
noservicepad
servicetimestampsdebuguptime
servicetimestampsloguptime
noservicepassword-encryption
!
hostnames3750-1
!
enablepasswordcisco
!
ipsubnet-zero
iprouting
!
noipdomain-lookup
!
spanning-treemodepvst
nospanning-treeoptimizebpdutransmission
spanning-treeextendsystem-id
!
!
interfaceGigabitEthernet1/0/1
switchportaccessvlan90
switchportmodeaccess
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/2
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/3
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/4
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/5
switchporttrunkencapsulationdot1q
switchportmodetrunk
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/6
switchporttrunkencapsulationdot1q
switchportmodetrunk
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/7
switchporttrunkencapsulationdot1q
switchportmodetrunk
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/8
switchporttrunkencapsulationdot1q
switchportmodetrunk
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/9
switchporttrunkencapsulationdot1q
switchportmodetrunk
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/10
switchporttrunkencapsulationdot1q
switchportmodetrunk
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/11
switchporttrunkencapsulationdot1q
switchportmodetrunk
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/12
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/13
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/14
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/15
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/16
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/17
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/18
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/19
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/20
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/21
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/22
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/23
noipaddress
nomdixauto
!
interfaceGigabitEthernet1/0/24
noipaddress
nomdixauto
!
interfaceVlan1
noipaddress
!
interfaceVlan10
ipaddress10.0.1.254255.255.255.0
ipaccess-group102in
!
interfaceVlan20
ipaddress10.0.2.254255.255.255.0
ipaccess-group101in
!
interfaceVlan30
ipaddress10.0.3.254255.255.255.0
ipaccess-group102in
!
interfaceVlan40
ipaddress10.0.4.254255.255.255.0
ipaccess-group101in
!
interfaceVlan50
ipaddress10.0.5.254255.255.255.0
!
interfaceVlan60
ipaddress10.0.0.254255.255.255.0
!
interfaceVlan90
ipaddress172.16.0.254255.255.255.0
!
ipclassless
iproute0.0.0.00.0.0.0172.16.0.1
iphttpserver
!
access-list101denyipany10.0.1.00.0.0.255
access-list101denyipany10.0.3.00.0.0.255
access-list101denyipany10.0.0.00.0.0.255
access-list101permitipanyany
access-list102denyipany10.0.2.00.0.0.255
access-list102denyipany10.0.4.00.0.0.255
access-list102denyipany10.0.0.00.0.0.255
access-list102denyipany172.16.0.00.0.0.255
access-list102permitipanyany
!
linecon0
linevty04
passwordcisco
login
linevty515
login
!
end
s3750-1#shvlan
VLANNameStatusPorts
----------------------------------------------------------------------------
1defaultactiveGi1/0/2,Gi1/0/3,Gi1/0/4
Gi1/0/12,Gi1/0/13,Gi1/0/14
Gi1/0/15,Gi1/0/16,Gi1/0/17
Gi1/0/18,Gi1/0/19,Gi1/0/20
Gi1/0/21,Gi1/0/22,Gi1/0/23
Gi1/0/24
10yw_serveractive
20oa_serveractive
30yw_clientactive
40oa_clientactive
50managementactive
60switchactive
90to_pixactiveGi1/0/1
1002fddi-defaultact/unsup
1003token-ring-defaultact/unsup
1004fddinet-defaultact/unsup
1005trnet-defaultact/unsup
VLANTypeSAIDMTUParentRingNoBridgeNoStpBrdgModeTrans1Trans2
--------------------------------------------------------------------
VLANTypeSAIDMTUParentRingNoBridgeNoStpBrdgModeTrans1Trans2
--------------------------------------------------------------------
1enet1000011500-----00
10enet1000101500-----00
20enet1000201500-----00
30enet1000301500-----00
40enet1000401500-----00
50enet1000501500-----00
60enet1000601500-----00
90enet1000901500-----00
1002fddi1010021500-----00
1003tr1010031500-----00
1004fdnet1010041500---ieee-00
1005trnet1010051500---ibm-00
RemoteSPANVLANs
------------------------------------------------------------------------------
PrimarySecondaryTypePorts
---------------------------------------------------------------------------
s3750-1#shvtpsta
s3750-1#shvtpstatus
VTPVersion:
2
ConfigurationRevision:
10
MaximumVLANssupportedlocally:
1005
NumberofexistingVLANs:
12
VTPOperatingMode:
Server
VTPDomainName:
VTPPruningMode:
Disabled
VTPV2Mode:
Disabled
VTPTrapsGeneration:
Disabled
MD5digest:
0xB40xA20x400xF30x0A0x7D0xD70x32
Configurationlastmodifiedby10.0.0.254at3-11-9302:
28:
58
LocalupdaterIDis10.0.1.254oninterfaceVl10(lowestnumberedVLANinterfacefound)
s3750-1#shtrun
s3750-1#shtrunk
s3750-1#shintertrun
PortModeEncapsulationStatusNativevlan
Gi1/0/5on802.1qtrunking1
Gi1/0/6on802.1qtrunking1
Gi1/0/7on802.1qtrunking1
Gi1/0/8on802.1qtrunking1
Gi1/0/9on802.1qtrunking1
Gi1/0/10on802.1qtrunking1
Gi1/0/11on802.1qtrunking1
PortVlansallowedontrunk
Gi1/0/51-4094
Gi1/0/61-4094
Gi1/0/71-4094
Gi1/0/81-4094
Gi1/0/91-4094
Gi1/0/101-4094
Gi1/0/111-4094
PortVlansallowedandactiveinmanagementdomain
Gi1/0/51,10,20,30,40,50,60,90
Gi1/0/61,10,20,30,40,50,60,90
Gi1/0/71,10,20,30,40,50,60,90
PortVlansallowedandactiveinmanagementdomain
Gi1/0/81,10,20,30,40,50,60,90
Gi1/0/91,10,20,30,40,50,60,90
Gi1/0/101,10,20,30,40,50,60,90
Gi1/0/111,10,20,30,40,50,60,90
PortVlansinspanningtreeforwardingstateandnotpruned
Gi1/0/51,10,20,30,40,50,60,90
Gi1/0/61,10,20,30,40,50,60,90
Gi1/0/71,10,20,30,40,50,60,90
Gi1/0/81,10,20,30,40,50,60,90
Gi1/0/91,10,20,30,40,50,60,90
Gi1/0/101,10,20,30,40,50,60,90
Gi1/0/111,10,20,30,40,50,60,90
s3750-1#
***********************************
s2950-1#shrun
Buildingconfiguration...
Currentconfiguration:
1319bytes
!
version12.1
noservicepad
servicetimestampsdebuguptime
servicetimestampsloguptime
noservicepassword-encryption
!
hostnames2950-1
!
enablepasswordcisco
!
ipsubnet-zero
!
noipdomain-lookup
!
spanning-treemodepvst
nospanning-treeoptimizebpdutransmission
spanning-treeextendsystem-id
!
!
!
!
interfaceFastEthernet0/1
!
interfaceFastEthernet0/2
!
interfaceFastEthernet0/3
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceFastEthernet0/16
!
interfaceFastEthernet0/17
!
interfaceFastEthernet0/18
!
interfaceFastEthernet0/19
!
interfaceFastEthernet0/20
!
interfaceFastEthernet0/21
!
interfaceFastEthernet0/22
!
interfaceFastEthernet0/23
!
interfaceFastEthernet0/24
switchportaccessvlan10
!
interfaceGigabitEthernet0/1
!
interfaceGigabitEthernet0/2
!
interfaceVlan1
noipaddress
noiproute-cache
shutdown
!
interfaceVlan60
ipaddress10.0.0.1
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 交换机 配置 步骤