


全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
交换机配置命令(常用)一、电缆连接及终端配置:PC机的串口1(COM1)-Console端口Console端口默认参数:端口速率(9600b/s);数据位(8);奇偶检验(无);停止位(1);流控(无)。二、交换机的基本配置:1、配置enable口令和主机名switchenable /进入特权模式switch# /特权模式提示符switch#config terminal /进入全局配置模式switch(config)#enable password xxa /设置特权非密口令switch(config)#enable secret xxx /设置特权加密口令switch(config)#hostname switch /设置交换机的主机名switch (config)#end /返回到特权模式switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#exit ;返回命令2、配置交换机IP地址、默认网关、域名、域名服务器switch (config)#ip address /设置交换机IP地址switch (config)#ip default-gateway 54 /设置默认网关switch (config)#ip domain-name /设置域名switch (config)#ip name-server /设置域名服务器3、配置交换机的端口属性switch (config) # interface fastethernet0/1 /进入接口0/1的配置模式switch (config-if)# speed ? /查看speed命令的子命令switch (config-if)# speed 100 /设置该端口速率为100Mb/sswitch (config-if)# dulplex full/half/auto /设置该端口为全双工 switch (config-if)# description TO_PC1 /设置该端口描述为TO_PC1switch (config-if)#Z /返回特权模式,同endswitch # show interface fastethernet0/1 /查看端口0/1的配置结果switch # show interface fastethernet0/1 status /查看端口0/1的状态3、配置和查看MAC地址表:switch (config)# mac-address-table? /查看MAC地址表的子命令switch (config)# mac-address-table aging-time 100 /设置超时是时间为100sswitch (config)# mac-address-table permanent 0000.0c01.cc f0/3 /加入永久地址switch (config)# mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 /加入静态地址switch #show mac-address-table 查看整个MAC地址表switch #clear mac-address-table restricted static 清除限定性地址三、配置和管理VLAN1、配置VTP(VLAN Trunking中继 Protocol)协议switch # vlan database /进入VLAN配置子模式switch(vlan) # vtp? /查看和VTP配合任用的命令switch (vlan)# vtp server/client /设置本交换机为server/client模式(选择一种,如果是client模式可用设置域名和启动修剪功能)switch (vlan)# vtp domain vtpserver /设置域名switch (vlan)# vtp pruning /启动修剪功能switch (vlan)# exit /退出VLAN配置模式switch# show vtp status /查看VTP设置信息2、配置VLAN Trunk端口Switch(config)#interface f0/24 /进入端口24配置模式Switch(config-if)#switchport mode trunk /设置当前端口为Trunk模式Switch(config-if)#switchport trunk allowed vlan all /设置允许从该端口交换数据的VLANSwitch (config)# exit /退出配置模式2950(config-if)#switchport trunk encapsulation dot1q | isl | negotiate (设置TRUNK封装)3、创建VLANswitch # vlan database /进入VLAN配置子模式switch(vlan) # vlan 2 /创建VLAN2,系统将自动命名switch(vlan) # vlan 3 name vlan3 /创建VLAN3,并命名为vlan34、将端口加入到某个VLAN中Switch(config)#interface f0/9 /进入端口9的配置模式Switch(config-if)# switchport /mode access /设置端口为静态VLAN访问模式Switch(config-if)# switchport /access vlan2 /将端口9分配该VLAN2Switch(config-if)# exitSwitch (config)# exitSwitch# show vlan /查看VLAN配置信息四、生成树协议STP配置1、使用STP端口权值实现负载均衡Switch(config)#interface f0/23Switch(config-if)# spanning-tree vlan 1 port-priority 10 /将VLAN 1的端口权值设为10Switch(config-if)# spanning-tree vlan 2 port-priority 10 Switch(config-if)# exitSwitch(config)#interface f0/24Switch(config-if)# spanning-tree vlan 3 port-priority 10 /将VLAN 3的端口权值设为10Switch(config-if)# spanning-tree vlan 4 port-priority 10 Switch(config-if)# spanning-tree vlan 5 port-priority 10 Switch(config-if)# endSwitch # copy running-config startup-config /保存配置文件Switch (config-if)# spanning-tree vlan 1 2 port-priority 102、配置STP路径值的负载均衡Switch(config)#interface f0/23Switch(config-if)# spanning-tree vlan 3 cost 30 /设置VLAN 3生成树路径值为30Switch(config-if)# spanning-tree vlan 4 cost 30 Switch(config-if)# spanning-tree vlan 5 cost 30 Switch(config-if)# exitSwitch(config)#interface f0/24Switch(config-if)# spanning-tree vlan 1 cost 30 /设置VLAN 1生成树路径值为30Switch(config-if)# spanning-tree vlan 2 cost 30 Switch(config-if)# endSwitch_1(config-if)# spanning-tree vlan 3 4 5 cost 30五、其它1.在基于IOS的交换机上设置远程访问: switch(config)# interface vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address2.在基于IOS的交换机上启用和浏览CDP信息: switch(config-if)# cdp enable switch(config-if)# no cdp enable 为了查看Cisco邻接设备的CDP通告信息: switch# show c
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025版公共安全风险评估咨询服务合同汇编
- 2025年汽车抵押贷款抵押权解除合同协议
- 2025版企业员工借调与员工晋升发展协议
- 2025版互联网金融服务投标合同范本
- 诸暨股票知识培训课件
- 说课课件时间安排方案
- 红色电影影视鉴赏课件
- 2025工程技术服务合同模板
- 客户服务满意度调研问卷工具
- 项目风险管理与应对方案工具箱
- 2024-2034年中国女式情趣内衣市场发展现状及战略咨询报告
- 配电网自动化终端典型缺陷处理
- 五星级酒店总投资估算表及其投资占比
- 兼职市场总监合同
- 湘教版小学信息技术三年级上册教案(打印)
- 个人能力展示
- 尿红细胞形态分析报告
- 网络产品行业报告
- 中药热奄包在皮肤瘙痒中的临床应用观察
- 2023年佛山市招聘警务辅助人员考试真题及答案
- 疾控中心培训课件:《白喉的采样及实验室检测技术》
评论
0/150
提交评论