三层交换技术配置.docx
《三层交换技术配置.docx》由会员分享,可在线阅读,更多相关《三层交换技术配置.docx(14页珍藏版)》请在冰豆网上搜索。
三层交换技术配置
三层交换技术实训一
2950(二层交换机)的配置:
2950#shrun
!
Version12.1
servicetimestampsdebuguptime
servicetimestampsloguptime
noservicepassword-encryption
!
hostname2950--------------------命名主机
!
!
!
ipsubnet-zero
spanning-treeextendsystem-id
!
!
!
!
!
!
!
!
interfaceFastEthernet0/1
switchportaccessvlan2------------------------------将端口添加到vlan中
!
interfaceFastEthernet0/2
switchportaccessvlan3------------------------------将端口添加到vlan中
!
interfaceFastEthernet0/3
switchportmodetrunk---------------------配置接口为TRUNK口
switchporttrunkencapsulationdot1q---------------------封装接口为了802.1q
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
vtpdomainbigdomain
!
interfaceVlan1
noipaddress
noiproute-cache
!
vlan2nameVLAN0002----------------------创建vlan
vlan3nameVLAN0003----------------------创建vlan
!
ipclassless
noiphttpserver
!
!
!
!
linecon0
transportinputnone
lineaux0
linevty015
!
noschedulerallocate
end
3550(二层交换机)的配置:
3550#shrun
!
Version12.1
servicetimestampsdebuguptime
servicetimestampsloguptime
noservicepassword-encryption
!
hostname3550--------------------命名主机
!
!
!
ipsubnet-zero
iprouting------------------------------启用路由功能
spanning-treeextendsystem-id
!
!
!
!
!
!
!
!
interfaceFastEthernet0/1
!
interfaceFastEthernet0/2
!
interfaceFastEthernet0/3
switchportmodetrunk---------------------配置接口为TRUNK口
switchporttrunkencapsulationdot1q---------------------封装接口为了802.1q
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceGigabitEthernet0/1
!
interfaceGigabitEthernet0/2
!
vtpdomainbigdomain
!
interfaceVlan1
noipaddress
noiproute-cache
!
interfaceVlan0002
ipaddress192.168.2.1255.255.255.0------------------配置vlan2网关地址
noiproute-cache
!
interfaceVlan0003
ipaddress192.168.3.1255.255.255.0------------------配置vlan3网关地址
noiproute-cache
!
vlan2nameVLAN0002----------------------------创建vlan2
vlan3nameVLAN0003----------------------------创建vlan3
!
ipclassless
noiphttpserver
!
!
!
!
linecon0
transportinputnone
lineaux0
linevty04
!
noschedulerallocate
end
三层交换技术实训二
2950交换机配置:
2950#shrun
!
Version12.1
servicetimestampsdebuguptime
servicetimestampsloguptime
noservicepassword-encryption
!
hostname2950-----------------------命名主机
enablepasswordcisco-----------------------------配置登录密码
!
!
!
ipsubnet-zero
spanning-treeextendsystem-id
!
!
!
!
!
!
!
ipdefault-gateway192.168.1.1------------------配置默认网关
!
interfaceFastEthernet0/1
switchportaccessvlan2-------------------------将接口添加到指定VLAN
!
interfaceFastEthernet0/2
switchportaccessvlan3-------------------------将接口添加到指定VLAN
!
interfaceFastEthernet0/3
switchportmodetrunk-------------------------------配置接口为TRUNK模式
switchporttrunkencapsulationdot1q----------------------接口封装为802.1q
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
vtpdomainbigdomain
!
interfaceVlan1
ipaddress192.168.1.10255.255.255.0-----------------配置交换机管理地址
noiproute-cache
!
vlan2nameVLAN0002-----------------------创建VLAN2
vlan3nameVLAN0003------------------------创建VLAN3
!
ipclassless
noiphttpserver
!
!
!
!
linecon0
transportinputnone
lineaux0
linevty015
login
3550交换机配置:
3550#shrun
!
Version12.1
servicetimestampsdebuguptime
servicetimestampsloguptime
noservicepassword-encryption
!
hostname3550-----------------------命名主机
enablepasswordcisco-----------------------------配置登录密码
!
!
!
ipsubnet-zero
iprouting-------------------启用路由功能
spanning-treeextendsystem-id
!
!
!
!
!
!
!
!
interfaceFastEthernet0/1
!
interfaceFastEthernet0/2
!
interfaceFastEthernet0/3
switchportmodetrunk------------------------配置接口为TRUNK模式
switchporttrunkencapsulationdot1q---------------配置接口封装方式为802.1q
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
noswitchport-----------------------------------将接交换机接口转化为路由口
ipaddress192.168.10.2255.255.255.252-----------------配置接口IP地址
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceGigabitEthernet0/1
!
interfaceGigabitEthernet0/2
!
vtpdomainbigdomain
!
interfaceVlan1
ipaddress192.168.1.1255.255.255.0-------------------配置vlan网关地址
noiproute-cache
!
interfaceVlan0002
ipaddress192.168.2.1255.255.255.0-------------------配置vlan网关地址
noiproute-cache
!
interfaceVlan0003
ipaddress192.168.3.1255.255.255.0-------------------配置vlan网关地址
noiproute-cache
!
vlan2nameVLAN0002----------------------创建VLAN2
vlan3nameVLAN0003-------------------------创建VLAN3
!
ipclassless
noiphttpserver
!
!
!
!
linecon0
transportinputnone
lineaux0
linevty04
passwordcisco配置远程登录密码
!
noschedulerallocate
end
2600路由器的配置:
2600#shrun
Buildingconfiguration...
!
Version12.1
servicetimestampsdebuguptime
servicetimestampsloguptime
noservicepassword-encryption
!
hostname2600-----------------配置主机名
enablepasswordcisco------------------配置密码
!
!
!
ipsubnet-zero
spanning-treevlan1priority
!
!
!
!
!
!
!
!
interfaceSerial0
noipaddress
noipdirected-broadcast
shutdown
!
interfaceFastEthernet0/0
ipaddress192.168.10.1255.255.255.252------------配置路由器接口IP地址
noipdirected-broadcast
bandwidth100000
!
!
ipclassless
noiphttpserver
!
iproute192.168.0.0255.255.0.0192.168.10.2------------------配置静态路由
!
!
!
linecon0
transportinputnone
lineaux0
linevty04
login
passwordcisco---------------------配置远程登录密码
!
noschedulerallocate
end