7389新编锐捷交换机配置命令

上传人:w****7 文档编号:146343968 上传时间:2020-09-30 格式:DOCX 页数:7 大小:47.50KB
返回 下载 相关 举报
7389新编锐捷交换机配置命令_第1页
第1页 / 共7页
7389新编锐捷交换机配置命令_第2页
第2页 / 共7页
亲,该文档总共7页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《7389新编锐捷交换机配置命令》由会员分享,可在线阅读,更多相关《7389新编锐捷交换机配置命令(7页珍藏版)》请在金锄头文库上搜索。

1、锐捷交换机配置命令交换机基本操作:1.进入特权模式SwitchenableSwitch#2.返回用户模式Switch#exitPress RETURN to get started! Switch 配置模式:全局配置模式主机名(config)#:配置交换机的整体参数子模式: 1.线路配置模式主机名(config-line)#:配置交换机的线路参数2.接口配置模式主机名(config-if)#:配置交换机的接口参数1.进入、退出全局配置模式Switch#configure terminalSwitch(config)#exitSwitch#2.进入、退出线路配置模式Switch(config)#

2、line console 0Switch(config-line)#exitSwitch(config)#3.进入、退出接口配置模式Switch(config)#interface fastEthernet 0/1Switch(config-if)#exitSwitch(config)#从子模式下直接返回特权模式Switch(config-if)#endSwitch#交换机操作帮助:1.支持命令简写(按TAB键将命令补充完整)2.在每种操作模式下直接输入“?”显示该模式下所有的命令3.命令空格 “?”显示命令参数并对其解释说明4. “字符?”显示以该字符开头的命令5.命令历史缓存: (Ctrl

3、+P)显示上一条命令,(Ctrl+N)显示下一条命令6.错误提示信息交换机显示命令:显示交换机硬件及软件的信息 Switch#show version 显示当前运行的配置参数 Switch#show running-config 显示保存的配置参数 Switch#show configure常用交换机EXEC命令:1.将当前运行的配置参数复制到flash:Switch#write memory Building configuration.OKSwitch#2.清空flash中的配置参数:Switch#delete flash:config.textSwitch#3.交换机重新启动:Switc

4、h#reload System configuration has been modified. Save? yes/no:nProceed with reload? confirm4.配置交换机主机名:Switch(config)#hostname S2126G-1S2126G-1(config)#5.配置交换机口令:1) 配置交换机的登陆密码S2126G(config)#enable secret level 1 0 star“0”表示输入的是明文形式的口令2) 配置交换机的特权密码S2126G(config)#enable secret level 15 0 star“0”表示输入的是明

5、文形式的口令常用交换机配置命令:1、为交换机分配管理IP地址S2126G(config)#interface vlan 1S2126G(config-if)#ip address IP address IP subnetmasksecondary2、将接口启用S2126G(config-if)#no shutdown3、将接口关闭S2126G(config-if)#shutdown4、配置接口速率S2126G(config-if)#speed 10|100|auto 5、配置接口双工模式S2126G(config-if)#duplex auto|full|half显示接口状态:S2126G#s

6、how interface 测定目的端的可达性:S2126Gping IP address 从TFTP服务器下载配置参数:S2126G#copy tftp startup-config管理交换机MAC地址表:1、查看MAC地址表S2126G#show mac-address-table 2、配置MAC地址表记录的生存时间(缺省为300秒) S2126G(config)#mac-address-table aging-time 3、查看MAC地址表记录的生存时间S2126G#show mac-address-table aging-time VLAN的配置:1.添加一个VLAN S2126G(c

7、onfig)#vlan S2126G(config-vlan)#2.为VLAN命名S2126G(config-vlan)#name 名字将交换机端口分配到VLAN1.配置Port VLANSwitch(config-if)#switchport access vlan 2.配置Tag VLANSwitch(config-if)#switchport mode trunk1)配置本地(native)VLANSwitch(config-if)#switchport trunk native vlan Native VLAN即PVID,默认情况下每个trunk口的native VLAN 是12)从主

8、干链路中清除VLANSwitch(config-if)#switchport trunk allowed vlan except vlan-list注:VLAN1不可被清除3)在主干链路中允许所有VLANSwitch(config-if)#switchport trunk allowed vlan all4)向主干链路中加入VLANSwitch(config-if)#switchport trunk allowed vlan add vlan-listVLAN的验证:1.显示全部的VLAN:Switch#show vlan2.显示单独的VLAN :Switch#show vlan id 将VL

9、AN信息保存到flash中:Switch#write memory从flash中清除VLAN信息:Switch#delete flash:vlan.datRSTP的配置:1.启用生成树:S2126G(config)#spanning-tree 2.配置交换机优先级:S2126G(config)#spanning-tree priority “0”或“4096”的倍数(RSTP BPDU该值后12bit全0)3.配置交换机端口优先级:S2126G(config-if)#spanning-tree port-priority “0”或“16”的倍数(RSTP BPDU该值后4bit全0)4、生成树

10、hello时间的配置(由Root决定):S2126G(config)#spanning-tree hello-time 5、生成树的验证:Switch#show spanning-treeSwitch#show spanning-tree interface 聚合端口的创建:Switch(config)# interface aggregateport 1 创建聚合接口AG1Switch(config-if)# switchport mode trunk 配置并保证AG1为 trunk 模式Switch(config)#int range f0/23-24Switch(config-if-ra

11、nge)#port-group 1 将端口(端口组)划入聚合端口AG1中生成树:Switch(config)#spanning-tree 开启生成树协议Switch(config)#spanning-tree mode stp 指定生成树类型为stp 可选模式stp , rstp , mstpSwitch(config)#spanning-tree priority 4096 设置交换机的优先级为4096 , 优先级值小为高。优先级可选值为0,4096,8192,为4096的倍数。交换机默认值为32768SVI接口配置:Switch(config)#interface vlan 10 进入VL

12、AN 10的虚拟端口配置模式Switch(config-if)# ip address 192.168.1.1 255.255.255.0 为VLAN10的虚拟端口配置IP及掩码,二层交换机只能配置一个IP,此IP是作为管理IP使用,例如,使用Telnet的方式登录该IP地址Switch(config-if)# no shutdown 启用该端口端口安全:Switch(config)# interface fastethernet 0/1 进入一个端口Switch(config-if)# switchport port-security 开启该端口的安全功能1)配置最大连接数限制Switch(

13、config-if)# switchport port-secruity maxmum 1 配置端口的最大连接数为1,最大连接数为128Switch(config-if)# switchport port-secruity violation shutdown配置安全违例的处理方式为shutdown,可选为protect (当安全地址数满后,将未知名地址丢弃)、restrict(当违例时,发送一个Trap通知)、shutdown(当违例时将端口关闭,并发送Trap通知,可在全局模式下用errdisable recovery来恢复)2)IP和MAC地址绑定Switch(config-if)#sw

14、itchport port-security mac-address xxxx.xxxx.xxxx ip-address 172.16.1.1接口配置模式下配置MAC地址xxxx.xxxx.xxxx与IP地址172.16.1.1进行绑定(MAC地址十六进制af用小写字母)三层交换机路由功能:1) 开启三层交换机的路由功能Switch(config)# ip routing2) 开启端口的三层路由功能Switch(config)# interface fastethernet 0/1Switch(config-if)# no switchport (这样就可以为某一端口配置IP)Switch(config-if)# ip address 192.168.1.1 255.255.255.0Switch(config-if)# no shutdown

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

当前位置:首页 > 办公文档 > 其它办公文档

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