




免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
思科2960交换机配置通过Console口登录交换机第一步:如图1-1所示,建立本地配置环境,只需将PC机(或终端)的串口通过配置电缆与以太网交换机的Console口连接。通过Console口搭建本地配置环境 1-1(若用笔记本配置,可买一根串口转USB线,安装驱动,可方便移动配置)第二步:在PC机上运行终端仿真程序超级终端,选择与交换机相连的串口,设置终端通信参数:传输速率为9600bit/s、8位数据位、1位停止位、无校验和无流控,如图1-2至图1-4所示。 新建连接1-2连接端口设置1-3端口通信参数设置1-4第三步:以太网交换机上电,终端上显示设备自检信息,自检结束后提示用户键入回车,之后将出现命令行提示符(如),如图1-5所示。 第四步:键入命令,配置以太网交换机或查看以太网交换机运行状态。需要帮助可以随时键入“?”,具体的配置命令请参考相关部分的内容。1、进入系统视图模式SwitchSwitch enable(简写en)特权模式Switch#Switch# configure terminal (简写conf t)(中间空格) 全局模式Switch(config)#2、为设备命名Switch(config)#hostname cisco2960 交换机命名 cisco2960cisco2960 (config) # 3、配置特权使能密码cisco2960 (config)#enable password cisco 配置使能口令ciscocisco2960 (config) # cisco2960(config)#enable secret cisco2960 配置使能密码cisco2960cisco2960 (config) # 4、设置虚拟局域网(配置VLAN)/*switch enable 特权模式switchconf t 全局模式switch (conf) #hostname cisco2960*/ 设备名 cisco2960cisco2960 (config) #vlan 10 创建/进入vlancisco2960 (config-vlan) #name vlan10 命名为vlan10Switch(config-vlan)#vlan 11 创建/进入vlanSwitch(config-vlan)#name vlan11 命名为vlan11/*cisco2960 (config-vlan) #no vlan11 */ 删除vlan11cisco2960 (config-vlan) # interface vlan 10 进入配置vlan10 cisco2960 (conf-if) #ip address 192.168.10.1 255.255.255.0 /*vlan10配置192.168.10.1/24的ip地址*/cisco2960 (config-vlan) # interface vlan 11 配置vlan11cisco2960 (conf-if) #ip address 192.168.11.1 255.255.255.0 /*vlan11配置192.168.11.1/24的ip地址*/cisco2960(conf-if)#no shut 使配置处于运行中cisco2960 (conf-if) #exit 返回上一级配置cisco2960(conf)#ip default-gateway 192.168.10.254 设置网关地址cisco2960(conf) #end 返回cisco2960#write 保存配置5、进入交换机某一端口 interface fastethernet 0/1 以1 端口为例/*switch enable 特权模式switchconfigure terminal 全局模式switch (conf) #hostname cisco2960*/ 设备名 cisco2960cisco2960 (conf) # interface fastethernet 0/1 进入网络1 端口/*cisco2960 (conf) # interface range f0/1-10*/ 选择多个端口cisco2960 (config-if)#switchport mode access 将此端口设置接入模式cisco2960 (config-if)#switchport access vlan 10端口1设置为vlan 10接入模式/*cisco2960 (conf) # interface fastethernet 0/11 进入网络11 端口cisco2960 (config-if)#switchport access vlan 11端口11设置为vlan 11接入模式*/cisco2960 (conf-if) #end 返回cisco2960#copy running-config startup-config 保存当前设置6、设置端口速率:(一般默认不用配置)/*switch enableswitchconfigure terminalswitch (conf) #hostname cisco2960switch (config)# interface range f0/1, f0/3, f0/5 - 10 选择端口范围端口1、3、5、6、7、8、9、10*/cisco2960 (conf) # interface range f0/1- 24*/ 设置端口1-24/*10 Force 10 Mbps operation 100 Force 100 Mbps operation 1000 Force 1000 Mbps operation auto Enable AUTO speed configuration*/ 速率可选方式 cisco2960 (config-if) #speed auto 端口速率设为自动侦测cisco2960 (config-if) #7、设置双工模式:(一般默认不用配置)/*switch enableswitchconfigure terminalswitch (conf) #hostname cisco2960/*cisco2960 (conf) # interface range f0/1- 24*/ 设置端口1-24cisco2960 (config-if) #duplex auto | full | half 设置端口为-自动/全双工/半双工cisco2960 (config-if) # 8、设置各Vlan相互访问连接/*switch enableswitchconfigure terminalswitch (conf) #hostname cisco2960cisco2960 (config)#int giga0/1 */进入汇聚千兆口1cisco2960 (config-if)#switchport mode trunk ; 当前端口设置为汇聚口注:将某端口分给vlan后是不能再设置trunk的,中继链路不属于任何vlan当一个端口允许多个vlan通过时,trunk allowed vlan中要添加各条vlan信息 cisco2960 (config-if) # switchport trunk allowed vlan all 允许所有VLAN 通过Trunk口cisco2960 (config-if) #switchport trunk allowed vlan 10, 13, 允许10,13 vlan通过cisco2960 (config-if)#switchport trunk allowed vlan add 11 添加vlan11/*cisco2960 (config-if)#switchport trunk allowed vlan remove 11 删除vlan11*/cisco2960 (config-if) #switchport trunk allowed vlan add 12添加vlan12cisco2960 (config-if) #no shutdown 使配置处于运行中cisco2960 (config-if) #end cisco2960#copy running-config startup-config 保存当前设置9、交换机telnet 远程登录设置:switchenswitchconfigure terminalswitch (conf) #hostname cisco2960cisco2960(conf)#enable password cisco 以cisco 为特权模式密码cisco2960(conf)#interface fastethernet 0/1 以1 端口为telnet 远程登录端口cisco2960 (conf-if) #ip address 192.168.10.1 255.255.255.0cisco2960 (conf-if) #no shutcisco2960 (conf-if) #exitcisco2960(conf)line vty 0 4 设置0-4 个 用户可以telnet 远程登陆cisco2960 (conf-line) #logincisco2960(conf-line)#password cisco 以cisco 为远程登录的用户密码主机设置:ip 192.168.10.123主机的ip 必须和交换机端口的地址在同一网络段netmask 255.255.255.0gate-way 192.168.10.1 网关地址是交换机端口地址运行:telnet 192.168.10.1进入telnet 远程登录界面password: ciscocisco2960enpassword: cisco10、交换机恢复出厂默认 恢复命令switch enableswitch# erase startup-configureswitch# reload11、光端口配置 switch (config) #interface gigabitEthernet 0/25 switch (config-if) # switchport mode access switch (config-if) #switchport access vlan 10 switch (config-if) #no shutdown switch (config-if) #end switch#copy running-config startup-config 注意: 由于思科的交换机只自动识别自己品牌的光模块,所以如果用其他品牌的光模块,需在配置模式下输入一下两条命令,开启兼容性。 switch (config) #service unsupported-transceiver no errdisable detect cause gbic-invalid 命令输入完成后保存设置重启设备 12、查看命令showswitch enableswitch# show version 察看系统中的所有版本信息switch#show interface vlan 1 查看交换机有关ip 协议的配置信息switch#show running-configure 查看交换机当前起作用的配置信息show interface fastehernet 0/1 查看交换机1 端口具体配置和统计信息show mac-address-table 查看mac 地址表show mac-address-table aging-time 查看mac 地址表自动老化时间invalid input detected at marker13、配置DHCP侦测配置DHCP侦测,可防止网内DHCP Server的冒充Switch(config)#ip dhcp snooping /打开DHCP Snooping功能Switch(config)#ip dhcp snooping vlan 10 /设置DHCP Snooping功能将作用于哪些VLANSwitch(config)#ip dhcp snooping verify mac-address /检测非信任端口收到的DHCP请求报文的源MAC和CHADDR字段是否相同,以防止DHCP耗竭攻击,该功能默认即为开启将上级汇聚口设置为信任端口Switch (config)#int giga0/1Switch(config-if)#ip dhcp snooping trust /配置接口为DHCP监听特性的信任接口,所有接口默认为非信任接口Switch(config-if)#ip dhcp snooping limit rate 15 /限制非信任端口的DHCP报文速率为每秒15个包(默认即为每秒15个包)如果不配该语句,则show ip dhcp snooping的结果里将不列出没有该语句的端口,可选速率范围为1-2048建议:在配置了端口的DHCP报文限速之后,最
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 索引动态更新算法-洞察及研究
- 慢镜头技术的情感传递研究-洞察及研究
- 碳中和国际合作路径-洞察及研究
- 人民法院建筑方案设计
- 零延迟交互技术-洞察及研究
- 化肥厂化肥渠道开发规定
- 河北省张家口市蔚县2025-2026学年上学期九年级历史第一次月考质量检测题(无答案)
- 物联感知技术和智慧城市建设-洞察及研究
- 安徽省安庆市九一六学校2024-2025学年高三下学期第七次强化训练物理试题(含答案)
- 北京市文汇中学2024-2025学年八年级下学期4月期中道德与法治试题
- 大学英语四级冲刺需牢记的700核心词
- 设备管理的风险评估和应对策略
- 研学导师培训课件模板
- 人教版小学数学五年级上册 4 可能性 全国获奖
- 人教版小学数学四年级上册《第二单元练习题》
- 养殖场走访方案
- 上海西门妇孺医院研究(1884-1952)
- 劳动创造美好生活课件 第二课 璀璨的星空
- 《新纲要云南省实验教材 信息技术 四年级第3册(第2版)》教案(全)
- 单元12 市场营销计划、组织、执行与控制
- 使用林地可行性研究报告
评论
0/150
提交评论