神州数码路由器及交换机配置命令

上传人:re****.1 文档编号:511807648 上传时间:2022-09-22 格式:DOCX 页数:7 大小:19.39KB
返回 下载 相关 举报
神州数码路由器及交换机配置命令_第1页
第1页 / 共7页
神州数码路由器及交换机配置命令_第2页
第2页 / 共7页
神州数码路由器及交换机配置命令_第3页
第3页 / 共7页
神州数码路由器及交换机配置命令_第4页
第4页 / 共7页
神州数码路由器及交换机配置命令_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《神州数码路由器及交换机配置命令》由会员分享,可在线阅读,更多相关《神州数码路由器及交换机配置命令(7页珍藏版)》请在金锄头文库上搜索。

1、神州数码交换机配置吩咐交换机基本状态:hostname ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态交换机口令设置:switchenable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line c

2、onsole 0 ;进入限制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#exit ;返回吩咐交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchpo

3、rt access vlan 2 ;当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp域名switch(config)#vtp password ;设置发vtp密码switch(config)#vtp mode server ;设

4、置发vtp模式switch(config)#vtp mode client ;设置发vtp模式交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address ;设置IP地址switch(config)#ip default-gateway ;设置默认网关switch#dir Flash: ;查看闪存交换机显示吩咐:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vla

5、n配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息完了最最要的一步。要记得保存设置俄,保存吩咐:switch(config)#copy running-config startup-config解决交换机无法远程管理的经典三招1、检查线路连接状态2、检查端口工作状态:“display cpu” 假如发觉某块板卡的CPU消耗率达到50%以上,那么对应板卡上的某个交换端口可能不停地受到大容量数据的冲击3、检查病毒攻击状态接着在交换机后台管理系统的DOS吩咐行状态下,执行字符串吩咐“dis dia”,来对交换机系统的各个交

6、换端口进行全面扫描,扫描结束后这些结果信息会被自动捕获保存到从前设置的文本文件中;打开目标文本文件,细致检查其中是否存在地址冲突的提示信息,要是发觉有这样的提示信息时,那就说明局域网中存在ARP病毒。为了找到ARP病毒源头,我们可以在交换机的吩咐行状态下执行“dis mac”字符串吩咐,从其后的结果界面中找到发生地址冲突的MAC地址对应的交换端口以及所在子交换机的IP地址;下面以系统管理员权限登录进入目标子交换机系统,将该系统切换进入全局配置状态,之后再进入目标交换端口的视图配置状态,在该状态下执行“shutdown”吩咐,将目标交换端口短暂关闭,以便禁止ARP病毒通过该交换端口影响整个局域网

7、;最终,我们可以查看网管记录,找到连接到故障交换端口的客户端计算机,要求该计算机用户必需刚好杀毒,确保能够将ARP病毒刚好清除干净;在清除干净ARP病毒后,再在对应交换端口的视图模式配置状态下,执行“undo shutdown”字符串吩咐,将目标交换端口重新启用起来,这么一来我们就能胜利解决由ARP病毒引起的无法远程管理交换机故障现象了第一部分:交换机配置:1.基本配置:开启SSH服务:debug ssh-server设置特权模式密码:enable password 8 注释:8为加密的密码设置退出特权模式超时时间:exec-timeout Switch(config)#exec-timeou

8、t 5 30(退出时间为5分30秒)更改主机名:hostname主机名设置主机名与IP地址的映射关系:Switch(config)#ip host beijing(beijing为主机)开启web配置服务:Switch(config)#ip serve显示帮户信息的语言类型:language chinese|english运用密码验证:login运用本地用户密码验证:Switch(config)#login local设置用户在console上进入一般用户配置模式时的口令:Switch(config)#password 8 test热启动交换机:reload加密系统密码:service pas

9、sword-encryption复原交换机出厂配置:set default保存当前配置:write配置交换机作为Telnet服务器允许登录的Telnet客户端的平安IP地址:Switch(config)#telnet-server securityip设置Telnet客户端的用户名及口令:Switch(config)#telnet-user Antony password 0 switch打开交换机的SSH服务器功能:Switch(config)#ssh-server enable设置SSH客户端的用户名及口令:Switch(config)#ssh-user switch password 0

10、 switch通过DHCP方式获得IP地址。Switch(config)#interface vlan 1Switch(Config-if-Vlan1)#ip dhcp-client enableSwitch(Config-if-Vlan1)#exit交换机Switch1端口1同交换机Switch2端口1用线相连,将该两个端口设置为强制100Mbit/s速率,半双工模式。Switch1(config)#interface ethernet1/1Switch1(Config-If-Ethernet1/1)#speed-duplex force100-halfSwitch2(config)#int

11、erface ethernet1/1Switch2(Config-If-Ethernet1/1)#speed-duplex force100-half配置名称为test的隔离组。SwitchenableSwitch#configSwitch(config)#isolate-port group test打开LACP调试开关。Switch#debug lacp新建一个port group,并且采纳默认的流量分担方式。Switch (config)#port-group 1删除一个port groupSwitch (config)#no port-group 1在Ethernet1/1端口模式下,

12、将本端口以active模式加入port-group 1。Switch (Config-If-Ethernet1/1)#port-group 1 mode active删除端口1动态MAC。Switch#clear port-security dynamic interface Ethernet 1/1使能端口1的MAC地址绑定功能。Switch(config)#interface Ethernet 1/1Switch(Config-If-Ethernet1/1)#switchport port-security将端口1的MAC地址转化为静态平安MAC地址。Switch(config)#inte

13、rface Ethernet 1/1Switch(Config-If-Ethernet1/1)#switchport port-security convert添加MAC 00-03-0F-FE-2E-D3到端口1Switch(config)#interface Ethernet 1/1Switch(Config-If-Ethernet1/1)#switchport port-security mac-address 00-03-0F-FE-2E-D3设置端口1平安MAC地址上限为4。Switch(config)#interface Ethernet 1/1Switch(Config-If-E

14、thernet1/1)#switchport port-security maximum 4设置端口1的违反模式为shutdown。Switch(config)#interface Ethernet 1/1Switch(Config-If-Ethernet1/1)#switchport port-security violation shutdown生成树配置:配置VLAN1-10;100-110与Instance 1的映射关系。Switch(config)#spanning-tree mst configurationSwitch(Config-Mstp-Region)#instance 1

15、 vlan 1-10;100-110配置修正数值为2000。Switch(config)#spanning-tree mst configurationSwitch(Config-Mstp-Region)# revision-level 2000开启和关闭生成树Switch(config)#spanning-treeSwitch(config)#interface ethernet 1/2Switch(Config-If-Ethernet1/2)#no spanning-tree设置交换机运行STP模式。Switch(config)#spanning-tree mode stp在端口1/2设置实例1的端口优先级为32。Switch(config)#interface ethernet 1/2Switc

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 活动策划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号