锐捷网络交换机的配置命令集
锐捷交换机配置命令
锐捷交换机配置命令交换机基本操作:1.进入特权模式Switch>enableSwitch#2.返回用户模式Switch#exitPress RETURN to get started!Switch>配置模式:全局配置模式[主机名(config)#]:配置交换机的整体参数子模式:1.线路配置模式[主机名(config-line)#]:配置交换机的线路参数2.接口配置模式[主机名(config-if)#]:配置交换机的接口参数1.进入、退出全局配置模式Switch#configure terminalSwitch(config)#exitSwitch#2.进入、退出线路配置模式Switch(config)#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+P)显示上一条命令,(Ctrl+N)显示下一条命令6.错误提示信息交换机显示命令:显示交换机硬件及软件的信息 Switch#show version显示当前运行的配置参数 Switch#show running-config显示保存的配置参数 Switch#show configure常用交换机EXEC命令:1.将当前运行的配置参数复制到flash:Switch#write memoryBuilding configuration...[OK]Switch#2.清空flash中的配置参数:Switch#delete flash:config.textSwitch#3.交换机重新启动:Switch#reloadSystem configuration has been modified. Save? [yes/no]:n Proceed with reload? [confirm]4.配置交换机主机名: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”表示输入的是明文形式的口令常用交换机配置命令:1、为交换机分配管理IP地址S2126G(config)#interface vlan 1S2126G(config-if)#ip address {IP address} {IP subnetmask}[secondary] 2、将接口启用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#show interface测定目的端的可达性:S2126G>ping {IP address}从TFTP服务器下载配置参数:S2126G#copy tftp startup-config管理交换机MAC地址表:1、查看MAC地址表S2126G#show mac-address-table2、配置MAC地址表记录的生存时间(缺省为300秒)S2126G(config)#mac-address-table aging-time <10-1000000>3、查看MAC地址表记录的生存时间S2126G#show mac-address-table aging-timeVLAN的配置:1.添加一个VLANS2126G(config)#vlan <1-4094>S2126G(config-vlan)#2.为VLAN命名S2126G(config-vlan)#name 名字将交换机端口分配到VLAN1.配置Port VLANSwitch(config-if)#switchport access vlan <1-4094>2.配置Tag VLANSwitch(config-if)#switchport mode trunk1)配置本地(native)VLANSwitch(config-if)#switchport trunk native vlan <1-4094>Native VLAN即PVID,默认情况下每个trunk口的native VLAN 是12)从主干链路中清除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-list VLAN的验证:1.显示全部的VLAN:Switch#show vlan2.显示单独的VLAN :Switch#show vlan id <1-4094>将VLAN信息保存到flash中:Switch#write memory从flash中清除VLAN信息:Switch#delete flash:vlan.datRSTP的配置:1.启用生成树:S2126G(config)#spanning-tree2.配置交换机优先级:S2126G(config)#spanning-tree priority <0-61440>“0”或“4096”的倍数(RSTP BPDU该值后12bit全0)3.配置交换机端口优先级:S2126G(config-if)#spanning-tree port-priority <0-240>“0”或“16”的倍数(RSTP BPDU该值后4bit全0)4、生成树hello时间的配置(由Root决定):S2126G(config)#spanning-tree hello-time <1-10>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-range)#port-group 1 将端口(端口组)划入聚合端口AG1中生成树:Switch(config)#spanning-tree 开启生成树协议Switch(config)#spanning-tree mode stp 指定生成树类型为stp可选模式stp , rstp , mstpSwitch(config)#spanning-tree priority 4096 设置交换机的优先级为4096 , 优先级值小为高。
(完整版)锐捷交换机命令大全
【第一部分】交换机支持的命令:1.交换机基本状态:switch: ;ROM状态,路由器是rommon>hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态2.交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#exit ;返回命令3.交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain;设置发vtp域名switch(config)#vtp password;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式4.交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address;设置IP地址switch(config)#ip default-gateway;设置默认网关switch#dir flash: ;查看闪存5.交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息【第二部分】路由器支持的命令:1.路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动2.路由器口令设置:router>enable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname;设置交换机的主机名router(config)#enable secret xxx ;设置特权加密口令router(config)#enable password xxb ;设置特权非密口令router(config)#line console 0 ;进入控制台口router(config-line)#line vty 0 4 ;进入虚拟终端router(config-line)#login ;要求口令验证router(config-line)#password xx ;设置登录口令xx router(config)#(Ctrl+z) ;返回特权模式router#exit ;返回命令3.路由器配置:router(config)#int s0/0 ;进入Serail接口router(config-if)#no shutdown ;激活当前接口router(config-if)#clock rate 64000 ;设置同步时钟router(config-if)#ip address;设置IP地址router(config-if)#ip address second ;设置第二个IProuter(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address;设置子接口IProuter(config-subif.1)#encapsulation dot1q;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导4.路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftprouter#copy startup-config tftp ;开机配置存到tftprouter#copy tftp flash: ;下传文件到flashrouter#copy tftp startup-config;下载配置文件ROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置文件rommon>confreg 0x2102 ;恢复配置文件rommon>reset;重新引导rommon>copy xmodem: flash: ;从console传输文件rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP rommon>TFTP_FILE=c2600.bin ;指定下载的文件rommon>tftpdnld ;从tftp下载rommon>dir flash: ;查看闪存内容rommon>boot ;引导IOS5.静态路由:ip route;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例6.动态路由:router(config)#ip routing ;启动路由转发router(config)#router rip ;启动RIP路由协议。
锐捷路由器配置命令大全
锐捷路由器配置命令大全1、网络设置1.1 WAN口配置用于配置WAN口连接的参数,包括IP地质、子网掩码、网关、DNS服务器等。
配置命令示例:set interface wan0 address 192.168.1.100/24set interface wan0 gateway 192.168.1.1set interface wan0 primary-dns 8.8.8.8:::1.2 LAN口配置用于配置LAN口连接的参数,包括IP地质、子网掩码、DHCP 服务器等。
配置命令示例:set interface lan1 address 192.168:0.1/24set interface lan1 dhcp enable:::1.3 VLAN配置用于配置VLAN,将不同的LAN口划分成不同的虚拟网络。
配置命令示例:set vlan vlan1 ports allset vlan vlan2 ports lan1,lan2:::2、安全设置2.1 密码设置用于设置路由器登录密码和特权密码。
配置命令示例:set system login user admin password encrypted 123456 set system login enable-password encrypted 654321:::2.2 ACL配置用于设置访问控制列表,限制某些IP地质或端口的访问。
配置命令示例:set access-list 1 permit ip 192.168:0:0/24 anyset access-list 2 deny tcp any any eq 22:::3、路由配置3.1 静态路由用于设置静态路由,手动指定下一跳地质。
配置命令示例:set static-route 0:0:0:0/0 next-hop 192.168.1.1:::3.2 动态路由用于配置动态路由协议,如RIP、OSPF、BGP等。
锐捷交换机配置命令
锐捷交换机配置命令交换机基本操作:1.进入特权模式Switch>enableSwitch#2.返回用户模式Switch#exitPress RETURN to get started!Switch>配置模式:全局配置模式[主机名(config)#]:配置交换机的整体参数子模式:1.线路配置模式[主机名(config-line)#]:配置交换机的线路参数2.接口配置模式[主机名(config-if)#]:配置交换机的接口参数1.进入、退出全局配置模式Switch#configure terminalSwitch(config)#exitSwitch#2.进入、退出线路配置模式Switch(config)#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+P)显示上一条命令,(Ctrl+N)显示下一条命令6.错误提示信息交换机显示命令:显示交换机硬件及软件的信息 Switch#show version显示当前运行的配置参数 Switch#show running-config显示保存的配置参数 Switch#show configure常用交换机EXEC命令:1.将当前运行的配置参数复制到flash:Switch#write memoryBuilding configuration...[OK]Switch#2.清空flash中的配置参数:Switch#delete flash:config.textSwitch#3.交换机重新启动:Switch#reloadSystem configuration has been modified. Save? [yes/no]:nProceed with reload? [confirm]4.配置交换机主机名: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”表示输入的是明文形式的口令常用交换机配置命令:1、为交换机分配管理IP地址S2126G(config)#interface vlan 1S2126G(config-if)#ip address {IP address} {IP subnetmask}[secondary] 2、将接口启用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#show interface测定目的端的可达性:S2126G>ping {IP address}从TFTP服务器下载配置参数:S2126G#copy tftp startup-config管理交换机MAC地址表:1、查看MAC地址表S2126G#show mac-address-table2、配置MAC地址表记录的生存时间(缺省为300秒)S2126G(config)#mac-address-table aging-time <10-1000000>3、查看MAC地址表记录的生存时间S2126G#show mac-address-table aging-timeVLAN的配置:1.添加一个VLANS2126G(config)#vlan <1-4094>S2126G(config-vlan)#2.为VLAN命名S2126G(config-vlan)#name 名字将交换机端口分配到VLAN1.配置Port VLANSwitch(config-if)#switchport access vlan <1-4094>2.配置Tag VLANSwitch(config-if)#switchport mode trunk1)配置本地(native)VLANSwitch(config-if)#switchport trunk native vlan <1-4094>Native VLAN即PVID,默认情况下每个trunk口的native VLAN 是12)从主干链路中清除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 <1-4094>将VLAN信息保存到flash中:Switch#write memory从flash中清除VLAN信息:Switch#delete flash:vlan.datRSTP的配置:1.启用生成树:S2126G(config)#spanning-tree2.配置交换机优先级:S2126G(config)#spanning-tree priority <0-61440>“0”或“4096”的倍数(RSTP BPDU该值后12bit全0)3.配置交换机端口优先级:S2126G(config-if)#spanning-tree port-priority <0-240>“0”或“16”的倍数(RSTP BPDU该值后4bit全0)4、生成树hello时间的配置(由Root决定):S2126G(config)#spanning-tree hello-time <1-10>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-range)#port-group 1 将端口(端口组)划入聚合端口AG1中生成树:Switch(config)#spanning-tree 开启生成树协议Switch(config)#spanning-tree mode stp 指定生成树类型为stp可选模式stp , rstp , mstpSwitch(config)#spanning-tree priority 4096 设置交换机的优先级为4096 , 优先级值小为高。
锐捷系列交换机常用配置的命令
锐捷常用命令交换机基本命令switch>enable !从用户模式进入特权模式switch # configure terminal !从特权模式进入全局配置模式switch (config)# hostname SwitchA !设置交换机名称为为“SwitchA”SwitchA (config)# enable secret level 1 0 star 设置交换机远程登陆telnet口令SwitchA (config)# enable secret level 15 0 star 将交换机特权模式口令配置为“star”SwitchA (config)# interface vlan 1 !进入交换机管理接口配置模式SwitchA (config-if)#ip address 172.16.0.1 255.255.255.0 配置交换机的IP地址SwitchA (config-if)# no shutdown ! 启用端口S2150G(config)#ip default-gateway 192.168.1.254 //配置网关地址为192.168.1.254S2150G(config)#interface range f 1/0/1-48,2/0/1-48S2150G(config-if) #spanning-tree bpdufilter enabled//将上联光纤口启动过滤Bpdu报文功能,提高网络的稳定性S2150G(config-if)#spanning-tree bpdufilter disabled //禁用Bpdu过滤功能S2150G(config) #snmp-server community public ro //给交换机启动SNMP协议,便于StarView网管工具发现SwitchA # show ip interface 显示三层IP接口的各个属性SwitchA #show mac-address-table 显示交换机MAC地址表的记录SwitchA# show running-config 查看交换机的当前配置SwitchA#show interface fastethernet 0/1 该命令查看接口设置和统计信息SwitchA# copy running-config startup-config 或SwitchA# write memory 保存配置Delete flash:config.text !清除配置文件Delete flash:vlan.dat !删除VLAN配置文件虚拟局域网VLAN配置S2126G(config)# vlan 10 !创建vlan 10S2126G(config-vlan)# name test10 !将Vlan 10命名为test10S2126G(config-vlan)# exit !返回交换机全局配置模式S2126G(config)# interface fastethernet 0/1 !进入F0/1的接口配置模式S2126G(config-if)# switch access vlan 10 !将F0/1端口加入vlan 10中S2126G(config-if)#exitS2126G(config)# interface range fastEthernet 0/2-3 , 0/5S3550(config-if-range)# switch access vlan 10S3550(config)# interface vlan 20 ! 创建虚拟接口vlan 20S3550(config-if)# ip address 172.16.10.254 255.255.255.0 配置虚拟接口vlan 20的IP地址S3550(config-if)# no shutdown !启用端口S2126# show vlan !该命令显示VLAN的成员端口等信息S3550# show vlan id 10 !验证配置配置交换机之间的Trunk连接:注意S3550和S2126均需配置S3550(config)# interface fastEthernet 0/1 !进入F0/1接口配置模式S3550(config-if)# switchport mode trunk !将F0/1设置为Trunk模式S3550# show interface fastEthernet 0/1 switchport链路聚合S3550(config)# interface range fastEthernet 0/1-2 !使用该命令同时配置多个接口S3550(config-if-range)#port-group 1 !配置F0/1和F0/2归属于AG1S3550(config-if-range)#endS3550# show aggregateport 1 summary !显示聚合端口AG1摘要信息S3550(config)# interface aggregatePort 1 !进入AG1接口模式S3550(config-if)# switchport mode trunk !将端口设为tag vlan模式S3550(config-if)# endS3550(config)# ip routing !启动路由功能生成树SwitchA(config)# spanning-tree ! 开启生成树协议SwitchA(config)# spanning-tree mode stp ! 设置生成树为STP(802.1D)SwitchA (config)# spanning-tree priority 4096 配置SwitchA为根交换机即将SwitchA的优先级设置为4096配置S3550A和S3550B间的F0/2连接为主链路:S3550A (config)# interface fastEthernet 0/2S3550A (config-if)# spanning-tree port-priority 0 !设置F0/2的端口优先级为0S2126A (config-if)# speed 10SwitchA(config)# endSwitchA# show spanning-tree !显示交换机的生成树模式及相关状态SwitchA# show spanning-tree interface fastEthernet 0/1 ! 显示Fa0/1接口STP状态快速生成树S3550A (config)# spanning-tree mode rstp ! 设置生成树为RSTP(802.1W)S3550A (config)# spanning-tree priority 0 配置S3550A为根交换机即设置SwitchA的优先级为0ACL配置Switch(config)#access-list 1 permit 172.16.0.0 0.0.255.255 靠近目的Switch(config)#interface ethernet 0Switch(config-if)#ip access-group 1 outSwitch(config)#access-list 101 deny tcp 192.168.1.0 0.0.0.255 host 192.168.10.100 eq 80Switch(config)#access-list 101 permit ip any anySwitch(config)#interface ethernet 1Switch(config-if)#ip access-group 101 outSwitch # show access-list 显示所有的ACLSwitch # show ip access-lists 1 显示IP ACL1Switch # show ip interface fastEthernet 1/1 显示f1/1接口的访问列表静态路由格式:router(config)# ip route [未直连的目的网段] [子网掩码] [转发路由器的IP地址/本地接口R1(config)# ip route 172.16.2.0 255.255.255.0 172.16.21.2 !配置静态路由R1# show ip route !查看路由表缺省路由:ip route 0.0.0.0 0.0.0.0 [转发路由器的IP地址/本地接口RIP协议R1(config)# router rip !启用RIP进程R1(config-router)# network 172.16.1.0 !公布直连网络R1(config-router)# network 172.16.21.0 !公布直连网络router# show ip protocols !验证RIP的配置R1# show ip interface brief !显示接口的摘要信息router# debug ip rip !在控制台显示RIP的工作状态PPP协议R1(config)# interface serial 1/2R1(config-if)# ip address 172.16.10.1 255.255.255.0R1(config-if)# encapsulation ppp !配置接口封装为PPP;两端均需配置R1(config-if)# no shutdownR1(config-if)# clock rate 64000NAT让内部主机在公网地址缺乏的情况下可以访问外部网络(主要命令)R1(config)# ip route 0.0.0.0 0.0.0.0 serial 1/2 先做缺省路由R1(config-if)#ip nat inside 进入F0/1,定义为内网接口R1(config-if)#ip nat outside 进入S1/2,定义为外网接口R1(config)#ip nat pool internet 200.1.8.7 200.2.8.7 netmask 255.255.255.0 定义内部全局地址池R1(config)#access-list 10 permit 172.16.1.0 0.0.0.255 定义允许转换的地址R1(config)#ip nat inside source list 10 pool internet overload 为内部本地调用转换地址池NAT发布主机R1(config)# ip route 0.0.0.0 0.0.0.0 serial 1/2 先做缺省路由R1(config)#int fa0/1R1(config-if)#ip nat insideR1(config-if)#exitR1(config)#int s1/2R1(config-if)#ip nat outsideR1(config-if)#exitR1(config)#ip nat pool webserver 172.16.8.5 172.16.8.5 netmask 255.255.255.0 定义内网服务器地址池R1(config)#access-list 3 permit host 200.1.8.7 定义外网的公网IPR1(config)#ip nat inside destination list 3 pool webserver 将外网的公网IP地址转换为web服务器地址R1(config)#ip nat inside source static tcp 172.16.8.5 80 200.1.8.7 80 定义访问外网IP的80端口时转换为内网的服务器IP 的80端口。
锐捷交换机配置命令
锐捷交换机配置命令交换机基本操作:1.进入特权模式Switch>enableSwitch#2.返回用户模式Switch#exitPress RETURN to get started!Switch>配置模式:全局配置模式[主机名(config)#]:配置交换机的整体参数子模式:1.线路配置模式[主机名(config-line)#]:配置交换机的线路参数2.接口配置模式[主机名(config-if)#]:配置交换机的接口参数1.进入、退出全局配置模式Switch#configure terminalSwitch(config)#exitSwitch#2.进入、退出线路配置模式Switch(config)#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+P)显示上一条命令,(Ctrl+N)显示下一条命令6.错误提示信息交换机显示命令:显示交换机硬件及软件的信息 Switch#show version显示当前运行的配置参数 Switch#show running-config显示保存的配置参数 Switch#show configure常用交换机EXEC命令:1.将当前运行的配置参数复制到flash:Switch#write memoryBuilding configuration...[OK]Switch#2.清空flash中的配置参数:Switch#delete flash:Switch#3.交换机重新启动:Switch#reloadSystem configuration has been modified. Save? [yes/no]:n Proceed with reload? [confirm]4.配置交换机主机名: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”表示输入的是明文形式的口令常用交换机配置命令:1、为交换机分配管理IP地址S2126G(config)#interface vlan 1S2126G(config-if)#ip address {IP address} {IP subnetmask}[secondary] 2、将接口启用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#show interface测定目的端的可达性:S2126G>ping {IP address}从TFTP服务器下载配置参数:S2126G#copy tftp startup-config管理交换机MAC地址表:1、查看MAC地址表S2126G#show mac-address-table2、配置MAC地址表记录的生存时间(缺省为300秒)S2126G(config)#mac-address-table aging-time <10-1000000>3、查看MAC地址表记录的生存时间S2126G#show mac-address-table aging-timeVLAN的配置:1.添加一个VLANS2126G(config)#vlan <1-4094>S2126G(config-vlan)#2.为VLAN命名S2126G(config-vlan)#name 名字将交换机端口分配到VLAN1.配置Port VLANSwitch(config-if)#switchport access vlan <1-4094>2.配置Tag VLANSwitch(config-if)#switchport mode trunk1)配置本地(native)VLANSwitch(config-if)#switchport trunk native vlan <1-4094>Native VLAN即PVID,默认情况下每个trunk口的native VLAN 是12)从主干链路中清除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-list VLAN的验证:1.显示全部的VLAN:Switch#show vlan2.显示单独的VLAN :Switch#show vlan id <1-4094>将VLAN信息保存到flash中:Switch#write memory从flash中清除VLAN信息:Switch#delete flash:RSTP的配置:1.启用生成树:S2126G(config)#spanning-tree2.配置交换机优先级:S2126G(config)#spanning-tree priority <0-61440>“0”或“4096”的倍数(RSTP BPDU该值后12bit全0)3.配置交换机端口优先级:S2126G(config-if)#spanning-tree port-priority <0-240>“0”或“16”的倍数(RSTP BPDU该值后4bit全0)4、生成树hello时间的配置(由Root决定):S2126G(config)#spanning-tree hello-time <1-10>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-range)#port-group 1 将端口(端口组)划入聚合端口AG1中生成树:Switch(config)#spanning-tree 开启生成树协议Switch(config)#spanning-tree mode stp 指定生成树类型为stp 可选模式stp , rstp , mstpSwitch(config)#spanning-tree priority 4096 设置交换机的优先级为4096 , 优先级值小为高。
锐捷交换机命令大全
【第一部分】交换机支持的命令:1.交换机基本状态:switch: ;ROM状态,路由器是rommon>hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态2.交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#exit ;返回命令3.交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain;设置发vtp域名switch(config)#vtp password;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式4.交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address;设置IP地址switch(config)#ip default-gateway;设置默认网关switch#dir flash: ;查看闪存5.交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息【第二部分】路由器支持的命令:1.路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动2.路由器口令设置:router>enable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname;设置交换机的主机名router(config)#enable secret xxx ;设置特权加密口令router(config)#enable password xxb ;设置特权非密口令router(config)#line console 0 ;进入控制台口router(config-line)#line vty 0 4 ;进入虚拟终端router(config-line)#login ;要求口令验证router(config-line)#password xx ;设置登录口令xx router(config)#(Ctrl+z) ;返回特权模式router#exit ;返回命令3.路由器配置:router(config)#int s0/0 ;进入Serail接口router(config-if)#no shutdown ;激活当前接口router(config-if)#clock rate 64000 ;设置同步时钟router(config-if)#ip address;设置IP地址router(config-if)#ip address second ;设置第二个IProuter(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address;设置子接口IProuter(config-subif.1)#encapsulation dot1q;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导4.路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftprouter#copy startup-config tftp ;开机配置存到tftprouter#copy tftp flash: ;下传文件到flashrouter#copy tftp startup-config;下载配置文件ROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置文件rommon>confreg 0x2102 ;恢复配置文件rommon>reset ;重新引导rommon>copy xmodem: flash: ;从console传输文件rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP rommon>TFTP_FILE=c2600.bin ;指定下载的文件rommon>tftpdnld ;从tftp下载rommon>dir flash: ;查看闪存内容rommon>boot ;引导IOS5.静态路由:ip route;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例6.动态路由:router(config)#ip routing ;启动路由转发router(config)#router rip ;启动RIP路由协议。
锐捷交换机命令大全
【第一部分】交换机支持的命令:1.交换机基本状态:switch: ;ROM状态,路由器是rommon>hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态2.交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#exit ;返回命令3.交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain;设置发vtp域名switch(config)#vtp password;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式4.交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address;设置IP地址switch(config)#ip default-gateway;设置默认网关switch#dir flash: ;查看闪存5.交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息【第二部分】路由器支持的命令:1.路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动2.路由器口令设置:router>enable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname;设置交换机的主机名router(config)#enable secret xxx ;设置特权加密口令router(config)#enable password xxb ;设置特权非密口令router(config)#line console 0 ;进入控制台口router(config-line)#line vty 0 4 ;进入虚拟终端router(config-line)#login ;要求口令验证router(config-line)#password xx ;设置登录口令xx router(config)#(Ctrl+z) ;返回特权模式router#exit ;返回命令3.路由器配置:router(config)#int s0/0 ;进入Serail接口router(config-if)#no shutdown ;激活当前接口router(config-if)#clock rate 64000 ;设置同步时钟router(config-if)#ip address;设置IP地址router(config-if)#ip address second ;设置第二个IProuter(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address;设置子接口IProuter(config-subif.1)#encapsulation dot1q;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导4.路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftprouter#copy startup-config tftp ;开机配置存到tftprouter#copy tftp flash: ;下传文件到flashrouter#copy tftp startup-config;下载配置文件ROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置文件rommon>confreg 0x2102 ;恢复配置文件rommon>reset ;重新引导rommon>copy xmodem: flash: ;从console传输文件rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IPrommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IPrommon>TFTP_FILE=c2600.bin ;指定下载的文件rommon>tftpdnld ;从tftp下载rommon>dir flash: ;查看闪存内容rommon>boot ;引导IOS5.静态路由:ip route;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例6.动态路由:router(config)#ip routing ;启动路由转发router(config)#router rip ;启动RIP路由协议。
锐捷交换机配置命令
锐捷交换机配置命令交换机基本操作:1.进入特权模式Switch>enableSwitch#2.返回用户模式Switch#exitPress RETURN to get started!Switch>配置模式:全局配置模式[主机名(config)#]:配置交换机的整体参数子模式:1.线路配置模式[主机名(config-line)#]:配置交换机的线路参数2.接口配置模式[主机名(config-if)#]:配置交换机的接口参数1.进入、退出全局配置模式Switch#configure terminalSwitch(config)#exitSwitch#2.进入、退出线路配置模式Switch(config)#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+P)显示上一条命令,(Ctrl+N)显示下一条命令6.错误提示信息交换机显示命令:显示交换机硬件及软件的信息 Switch#show version显示当前运行的配置参数 Switch#show running-config显示保存的配置参数 Switch#show configure常用交换机EXEC命令:1.将当前运行的配置参数复制到flash:Switch#write memoryBuilding configuration...[OK]Switch#2.清空flash中的配置参数:Switch#delete flash:config.textSwitch#3.交换机重新启动:Switch#reloadSystem configuration has been modified. Save? [yes/no]:n Proceed with reload? [confirm]4.配置交换机主机名: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”表示输入的是明文形式的口令常用交换机配置命令:1、为交换机分配管理IP地址S2126G(config)#interface vlan 1S2126G(config-if)#ip address {IP address} {IP subnetmask}[secondary] 2、将接口启用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#show interface测定目的端的可达性:S2126G>ping {IP address}从TFTP服务器下载配置参数:S2126G#copy t管理交换机MAC地址表:1、查看MAC地址表S2126G#show mac-address-table2、配置MAC地址表记录的生存时间(缺省为300秒)S2126G(config)#mac-address-table aging-time <10-1000000>3、查看MAC地址表记录的生存时间S2126G#show mac-address-table aging-timeVLAN的配置:1.添加一个VLANS2126G(config)#vlan <1-4094>S2126G(config-vlan)#2.为VLAN命名S2126G(config-vlan)#name 名字将交换机端口分配到VLAN1.配置Port VLANSwitch(config-if)#switchport access vlan <1-4094>2.配置Tag VLANSwitch(config-if)#switchport mode trunk1)配置本地(native)VLANSwitch(config-if)#switchport trunk native vlan <1-4094>Native VLAN即PVID,默认情况下每个trunk口的native VLAN 是12)从主干链路中清除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-list VLAN的验证:1.显示全部的VLAN:Switch#show vlan2.显示单独的VLAN :Switch#show vlan id <1-4094>将VLAN信息保存到flash中:Switch#write memory从flash中清除VLAN信息:Switch#delete flash:vlan.datRSTP的配置:1.启用生成树:S2126G(config)#spanning-tree2.配置交换机优先级:S2126G(config)#spanning-tree priority <0-61440>“0”或“4096”的倍数(RSTP BPDU该值后12bit全0)3.配置交换机端口优先级:S2126G(config-if)#spanning-tree port-priority <0-240>“0”或“16”的倍数(RSTP BPDU该值后4bit全0)4、生成树hello时间的配置(由Root决定):S2126G(config)#spanning-tree hello-time <1-10>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-range)#port-group 1 将端口(端口组)划入聚合端口AG1中生成树:Switch(config)#spanning-tree 开启生成树协议Switch(config)#spanning-tree mode stp 指定生成树类型为stp可选模式stp , rstp , mstpSwitch(config)#spanning-tree priority 4096 设置交换机的优先级为4096 , 优先级值小为高。
锐捷交换机配置命令
#del flash:vlan.dat 删除Vlan配置信息(交换机)
#Configure terminal 进入全局配置模式
(config)# hostname switchA 配置设备名称为switchA
Level 1为普通用户级别,可选为1~15,15为最高权限级别;0表示密码不加密
(config)#enable services web-server 开启交换机WEB管理功能
Services 可选以下:web-server(WEB管理)、telnet-server(远程登陆)等
从TFTP服务器下载配置参数:S2126G#copy tftp startup-config
管理交换机MAC地址表:
1、查看MAC地址表
S2126G#show mac-address-table
2、配置MAC地址表记录的生存时间(缺省为300秒)
S2126G(config)#mac-address-table aging-time <10-1000000>
S2126G(config-vlan)#name
将交换机端口分配到VLAN
1.配置Port VLAN
Switch(config-if)#switchport access vlan <1-4094>
2.配置Tag VLAN
Switch(config-if)#switchport mode trunk
1).配置本地(native)VLAN
Switch(config-if)#switchport trunk native vlan <1-4094>
锐捷交换机配置命令
锐捷交换机配置命令交换机基本操作:1.进入特权模式Switch>enableSwitch#2.返回用户模式Switch#exit子模式1.2.1.2.3.Switch(config-if)#exitSwitch(config)#从子模式下直接返回特权模式Switch(config-if)#endSwitch#交换机操作帮助:1.支持命令简写(按TAB键将命令补充完整)2.在每种操作模式下直接输入“?”显示该模式下所有的命令3.命令空格“?”显示命令参数并对其解释说明4.“字符?”显示以该字符开头的命令5.命令历史缓存:(Ctrl+P)显示上一条命令,(Ctrl+N)显示下一条命令6.错误提示信息交换机显示命令:显示交换机硬件及软件的信息Switch#showversion1.[OK]2.清空3.4.S2126G-1(config)#5.配置交换机口令:1)配置交换机的登陆密码S2126G(config)#enablesecretlevel10star“0”表示输入的是明文形式的口令2)配置交换机的特权密码S2126G(config)#enablesecretlevel150star“0”表示输入的是明文形式的口令常用交换机配置命令:1、为交换机分配管理IP地址S2126G(config)#interfacevlan1S2126G(config-if)#ipaddress{IPaddress}{IPsubnetmask}[secondary] 2、将接口启用S2126G(config-if)#noshutdown345从TFTP1、查看2、配置3、查看MAC地址表记录的生存时间S2126G#showmac-address-tableaging-timeVLAN的配置:1.添加一个VLANS2126G(config)#vlan<1-4094>S2126G(config-vlan)#2.为VLAN命名S2126G(config-vlan)#name名字将交换机端口分配到VLAN1.配置PortVLANSwitch(config-if)#switchportaccessvlan<1-4094>2.配置TagVLANSwitch(config-if)#switchportmodetrunk1)配置本地(native)VLAN2注34VLAN1.2.将VLAN从RSTP1.启用生成树:S2126G(config)#spanning-tree2.配置交换机优先级:S2126G(config)#spanning-treepriority<0-61440>“0”或“4096”的倍数(RSTPBPDU该值后12bit全0)3.配置交换机端口优先级:S2126G(config-if)#spanning-treeport-priority<0-240>“0”或“16”的倍数(RSTPBPDU该值后4bit全0)4、生成树hello时间的配置(由Root决定):S2126G(config)#spanning-treehello-time<1-10>5、生成树的验证:Switch#showspanning-treeSwitch#showspanning-treeinterface<接口名称><接口编号>聚合端口的创建:Switch(config)#interfaceaggregateport1创建聚合接口AG1优先SVIIP,此IP1)配置最大连接数限制Switch(config-if)#switchportport-secruitymaxmum1配置端口的最大连接数为1,最大连接数为128Switch(config-if)#switchportport-secruityviolationshutdown配置安全违例的处理方式为shutdown,可选为protect(当安全地址数满后,将未知名地址丢弃)、restrict(当违例时,发送一个Trap通知)、shutdown(当违例时将端口关闭,并发送Trap通知,可在全局模式下用errdisablerecovery来恢复)2)IP和MAC地址绑定Switch(config-if)#switchportport-securitymac-addressip-address 与IP地址十六进制a-f用小写字母)三层交换机路由功能:1)开启三层交换机的路由功能Switch(config)#iprouting2)开启端口的三层路由功能。
锐捷网络交换机的配置命令集
锐捷网络交换机的配置命令集交换机>Enable 进入特权模式#Exit 返回上一级操作模式#End 返回到特权模式#write memory 或copy running-config startup-config 保存配置文件#del flash:config.text 删除配置文件(交换机及1700系列路由器)#erase startup-config 删除配置文件(2500系列路由器)#del flash:vlan.dat 删除Vlan配置信息(交换机)#Configure terminal 进入全局配置模式(config)# hostname switchA配置设备名称为switchA(config)#banner motd & 配置每日提示信息&为终止符(config)#enable secret level 1 0 star 配置远程登陆密码为star(config)#enable secret level 15 0 star 配置特权密码为starLevel 1为普通用户级别,可选为1~15,15为最高权限级别;0表示密码不加密(config)#enable services web-server 开启交换机WEB管理功能Services 可选以下:web-server(WEB管理)、telnet-server(远程登陆)等查看信息#show running-config 查看当前生效的配置信息#show interface fastethernet 0/3 查看F0/3端口信息#show interface serial 1/2 查看S1/2端口信息#show interface 查看所有端口信息#show ip interface brief 以简洁方式汇总查看所有端口信息#show ip interface 查看所有端口信息#show version 查看版本信息#show mac-address-table 查看交换机当前MAC地址表信息#show running-config 查看当前生效的配置信息#show vlan 查看所有VLAN信息#show vlan id 10 查看某一VLAN (如VLAN10)的信息#show interface fastethernet 0/1 switchport 查看某一端口模式(如F 0/1)#show aggregateport 1 summary 查看聚合端口AG1的信息#show spanning-tree 查看生成树配置信息#show spanning-tree interface fastethernet 0/1 查看该端口的生成树状态#show port-security 查看交换机的端口安全配置信息#show port-security address 查看地址安全绑定配置信息#show ip access-lists listname 查看名为listname的列表的配置信息#show access-lists端口的基本配置(config)#Interface fastethernet 0/3 进入F0/3的端口配置模式(config)#interface range fa 0/1-2,0/5,0/7-9 进入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的端口配置模式(config-if)#speed 10 配置端口速率为10M,可选10,100,auto(config-if)#duplex full 配置端口为全双工模式,可选full(全双工),half(半双式),auto(自适应)(config-if)#no shutdown 开启该端口(config-if)#switchport access vlan 10 将该端口划入VLAN10中,用于VLAN(config-if)#switchport mode trunk 将该端口设为trunk模式,用于Tag vlan可选模式为access , trunk(config-if)#port-group 1 将该端口划入聚合端口AG1中,用于聚合端口聚合端口的创建(config)# interface aggregateport 1 创建聚合接口AG1(config-if)# switchport mode trunk 配置并保证AG1为trunk 模式(config)#int f0/23-24(config-if-range)#port-group 1 将端口(端口组)划入聚合端口AG1中生成树(config)#spanning-tree 开启生成树协议(config)#spanning-tree mode stp 指定生成树类型为stp可选模式stp , rstp , mstp(config)#spanning-tree priority 4096 设置交换机的优先级为4096 , 优先级值小为高。
锐捷交换机配置命令
锐捷交换机配置命令 Last updated on the afternoon of January 3, 2021锐捷交换机配置命令交换机基本操作:1.进入特权模式Switch>enableSwitch#2.返回用户模式Switch#exitPress RETURN to get started!Switch>配置模式:全局配置模式[主机名(config)#]:配置交换机的整体参数子模式:1.线路配置模式[主机名(config-line)#]:配置交换机的线路参数2.接口配置模式[主机名(config-if)#]:配置交换机的接口参数1.进入、退出全局配置模式Switch#configure terminalSwitch(config)#exitSwitch#2.进入、退出线路配置模式Switch(config)#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+P)显示上一条命令,(Ctrl+N)显示下一条命令6.错误提示信息交换机显示命令:显示交换机硬件及软件的信息 Switch#show version显示当前运行的配置参数 Switch#show running-config显示保存的配置参数 Switch#show configure常用交换机EXEC命令:1.将当前运行的配置参数复制到flash:Switch#write memoryBuilding configuration...[OK]Switch#2.清空flash中的配置参数:Switch#delete flash:Switch#3.交换机重新启动:Switch#reloadSystem configuration has been modified. Save [yes/no]:n Proceed with reload [confirm]4.配置交换机主机名: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”表示输入的是明文形式的口令常用交换机配置命令:1、为交换机分配管理IP地址S2126G(config)#interface vlan 1S2126G(config-if)#ip address {IP address} {IP subnetmask}[secondary] 2、将接口启用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#show interface测定目的端的可达性:S2126G>ping {IP address}从TFTP服务器下载配置参数:S2126G#copy tftp startup-config管理交换机MAC地址表:1、查看MAC地址表S2126G#show mac-address-table2、配置MAC地址表记录的生存时间(缺省为300秒)S2126G(config)#mac-address-table aging-time <10-1000000>3、查看MAC地址表记录的生存时间S2126G#show mac-address-table aging-timeVLAN的配置:1.添加一个VLANS2126G(config)#vlan <1-4094>S2126G(config-vlan)#2.为VLAN命名S2126G(config-vlan)#name 名字将交换机端口分配到VLAN1.配置Port VLANSwitch(config-if)#switchport access vlan <1-4094>2.配置Tag VLANSwitch(config-if)#switchport mode trunk1)配置本地(native)VLANSwitch(config-if)#switchport trunk native vlan <1-4094>Native VLAN即PVID,默认情况下每个trunk口的native VLAN 是12)从主干链路中清除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-list VLAN的验证:1.显示全部的VLAN:Switch#show vlan2.显示单独的VLAN :Switch#show vlan id <1-4094>将VLAN信息保存到flash中:Switch#write memory从flash中清除VLAN信息:Switch#delete flash:RSTP的配置:1.启用生成树:S2126G(config)#spanning-tree2.配置交换机优先级:S2126G(config)#spanning-tree priority <0-61440>“0”或“4096”的倍数(RSTP BPDU该值后12bit全0)3.配置交换机端口优先级:S2126G(config-if)#spanning-tree port-priority <0-240>“0”或“16”的倍数(RSTP BPDU该值后4bit全0)4、生成树hello时间的配置(由Root决定):S2126G(config)#spanning-tree hello-time <1-10>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-range)#port-group 1 将端口(端口组)划入聚合端口AG1中生成树:Switch(config)#spanning-tree 开启生成树协议Switch(config)#spanning-tree mode stp 指定生成树类型为stp 可选模式stp , rstp , mstpSwitch(config)#spanning-tree priority 4096 设置交换机的优先级为4096 , 优先级值小为高。
锐捷设备命令最全大合集(2024新版)
安全区域配置
定义安全区域 security-zone name Trust: 定义安全区域名为Trust
security-zone name Untrust: 定义安全区域名为Untrust
ቤተ መጻሕፍቲ ባይዱ
安全区域配置
安全区域配置
01
设置接口加入安全区域
02 interface GigabitEthernet0/0: 进入指定接口视 图
AP分组与配置
包括AP分组的创建、修改和删除,以及分组内AP的 配置下发等。
AP状态监控
包括AP的在线状态、信号强度、用户数量等实时监 控。
无线用户接入配置
SSID配置
包括SSID名称设置、加密方式选择(WEP、WPA-PSK、 WPA2-PSK等)、密钥设置等。
用户认证配置
包括本地认证(用户名/密码方式)、Radius服务器认证(对接 Radius服务器实现用户认证)等。
查看设备版本信息,包括设备型号、硬件版本、软件版本等。
display current-configuration
查看设备当前配置信息,包括接口配置、路由配置、用户配置等。
display interface
查看设备接口状态信息,包括接口速率、工作模式、物理状态等。
文件操作命令
dir
查看设备上的文件目录和文件信息。
03
attack defense enable: 开启攻 击防范功能
攻击防范配置
配置防ARP攻击
arp defense enable: 开启ARP防攻击功能
arp static 192.168.1.1 00e0-fc011d1d: 配置静态ARP条目,防止 ARP欺骗攻击
锐捷交换机配置命令
锐捷交换机配置命令交换机基本操作:1.进入特权模式Switch>enableSwitch#2.返回用户模式Switch#exitPress RETURN to get started!Switch>配置模式:全局配置模式[主机名(config)#]:配置交换机的整体参数子模式:1.线路配置模式[主机名(config-line)#]:配置交换机的线路参数2.接口配置模式[主机名(config-if)#]:配置交换机的接口参数1.进入、退出全局配置模式Switch#configure terminalSwitch(config)#exitSwitch#2.进入、退出线路配置模式Switch(config)#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+P)显示上一条命令,(Ctrl+N)显示下一条命令6.错误提示信息交换机显示命令:显示交换机硬件及软件的信息 Switch#show version显示当前运行的配置参数 Switch#show running-config显示保存的配置参数 Switch#show configure常用交换机EXEC命令:1.将当前运行的配置参数复制到flash:Switch#write memoryBuilding configuration...[OK]Switch#2.清空flash中的配置参数:Switch#delete flash:config.textSwitch#3.交换机重新启动:Switch#reloadSystem configuration has been modified. Save? [yes/no]:nProceed with reload? [confirm]4.配置交换机主机名: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”表示输入的是明文形式的口令常用交换机配置命令:1、为交换机分配管理IP地址S2126G(config)#interface vlan 1S2126G(config-if)#ip address {IP address} {IP subnetmask}[secondary] 2、将接口启用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#show interface测定目的端的可达性:S2126G>ping {IP address}从TFTP服务器下载配置参数:S2126G#copy tftp startup-config管理交换机MAC地址表:1、查看MAC地址表S2126G#show mac-address-table2、配置MAC地址表记录的生存时间(缺省为300秒)S2126G(config)#mac-address-table aging-time <10-1000000>3、查看MAC地址表记录的生存时间S2126G#show mac-address-table aging-timeVLAN的配置:1.添加一个VLANS2126G(config)#vlan <1-4094>S2126G(config-vlan)#2.为VLAN命名S2126G(config-vlan)#name 名字将交换机端口分配到VLAN1.配置Port VLANSwitch(config-if)#switchport access vlan <1-4094>2.配置Tag VLANSwitch(config-if)#switchport mode trunk1)配置本地(native)VLANSwitch(config-if)#switchport trunk native vlan <1-4094>Native VLAN即PVID,默认情况下每个trunk口的native VLAN 是12)从主干链路中清除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 <1-4094>将VLAN信息保存到flash中:Switch#write memory从flash中清除VLAN信息:Switch#delete flash:vlan.datRSTP的配置:1.启用生成树:S2126G(config)#spanning-tree2.配置交换机优先级:S2126G(config)#spanning-tree priority <0-61440>“0”或“4096”的倍数(RSTP BPDU该值后12bit全0)3.配置交换机端口优先级:S2126G(config-if)#spanning-tree port-priority <0-240>“0”或“16”的倍数(RSTP BPDU该值后4bit全0)4、生成树hello时间的配置(由Root决定):S2126G(config)#spanning-tree hello-time <1-10>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-range)#port-group 1 将端口(端口组)划入聚合端口AG1中生成树:Switch(config)#spanning-tree 开启生成树协议Switch(config)#spanning-tree mode stp 指定生成树类型为stp可选模式stp , rstp , mstpSwitch(config)#spanning-tree priority 4096 设置交换机的优先级为4096 , 优先级值小为高。
锐捷交换机配置命令
锐捷互换机配置命令互换机基本操作:1.进入特权模式Switch>enableSwitch#2.返回用户模式Switch#exitPress RETURN to get started!Switch>配置模式:全局配置模式 [主机名 (config)#]:配置互换机的整体参数xx:1.线路配置模式 [主机名 (config-line)#]:配置互换机的线路参数2.接口配置模式 [主机名 (config-if)#]:配置互换机的接口参数1.进入、退出全局配置模式Switch#configure terminalSwitch(config)#exitSwitch#2.进入、退出线路配置模式Switch(config)#line console 0Switch(config-line)#exitSwitch(config)#3.进入、退出接口配置模式Switch(config)#interface fastEthernet 0/1Switch(config-if)#exitSwitch(config)#从 xx 下直接返回特权模式Switch(config-if)#endSwitch#互换机操作帮助:1.支持命令简写 (按 TAB键将命令增补完好 )2.在每种操作模式下直接输入“ ?显”示该模式下所有的命令3.命令空格“ ?显”示命令参数并对其解说说明4.字“符 ?”显示以该字符开头的命令5.命令历史缓存 : (Ctrl+P)显示上一条命令 ,(Ctrl+N)显示下一条命令6.错误提示信息互换机显示命令:显示互换机硬件及软件的信息Switch#show version显示目前运转的配置参数Switch#show running-config显示保留的配置参数Switch#show configure常用互换机 EXEC命令:1.将目前运转的配置参数复制到flash:Switch#writeBuilding configuration...[OK]Switch#2.清空 flash 中的配置参数:Switch#delete flash:config.textSwitch#3.互换机从头启动:Switch#reloadSystem configuration has been modified. Save? [yes/no]:n Proceed with reload? [confirm]4.配置互换机主机名:Switch(config)#hostname S-1S-1(config)#5.配置互换机口令:1)配置互换机的登岸密码S(config)#enable secret level 1 0star“表示输入的是xx 形式的口令2)配置互换机的特权密码S(config)#enable secret level 15 0star“表示输入的是xx 形式的口令常用互换机配置命令:1、为互换机分派管理IP 地点S(config)#interface vlan 1S(config-if)#ip address {IP address} {IP subnetmask}[secondary] 2、将接口启用S(config-if)#no shutdown3、将接口封闭S(config-if)#shutdown4、配置接口速率S(config-if)#speed [10|100|auto]5、配置接口双工模式S(config-if)#duplex [auto|full|half]显示接口状态:S#show interface测定目的端的可达性:S>ping {IP address}从 TFTP服务器下载配置参数:S#copy tftp startup-config管理互换机 MAC 地点表:1、查察 MAC 地点表S#show mac-address-table2、配置 MAC 地点表记录的生计时间 (缺省为 300 秒)S(config)#mac-address-table aging-time <10-1000000>3、查察 MAC 地点表记录的生计时间S#show mac-address-table aging-timeVLAN的配置:1.增添一个 VLANS(config)#vlan <1-4094>S(config-vlan)#2.为 VLAN命名S(config-vlan)#name名字将互换机端口分派到VLAN1.配置 Port VLANSwitch(config-if)#switchport access vlan <1-4094>2.配置 Tag VLANSwitch(config-if)#switchport mode trunk1)配置当地 (native)VLANSwitch(config-if)#switchport trunk native vlan <1-4094>Native VLAN即 PVID,默认状况下每个trunk 口的 native VLAN 是 1 2)从骨干链路中消除VLANSwitch(config-if)#switchport trunk allowed vlan except vlan-list注 :VLAN1不行被消除3)在骨干链路中同意所有 VLAN Switch(config-if)#switchport trunk allowed vlan all4)向骨干链路中加入VLANSwitch(config-if)#switchport trunk allowed vlan add vlan-list VLAN的考证:1.显示所有的 VLAN:Switch#show vlan2.显示独自的 VLAN :Switch#show vlan id <1-4094>将 VLAN信息保留到 flashxx:Switch#write memory从 flashxx 消除 VLAN信息:Switch#delete flash:vlan.datRSTP的配置:1.启用生成树:S(config)#spanning-tree2.配置互换机优先级:S(config)#spanning-tree priority <0-61440>“或“的倍数 (RSTP BPDU该值后 12bit 全 0)3.配置互换机端口优先级:S(config-if)#spanning-tree port-priority <0-240>“或“的倍数 (RSTP BPDU该值后 4bit 全 0)4、生成树 hello 时间的配置 (由 Root 决定 ):S(config)#spanning-tree hello-time <1-10>5、生成的: Switch#show spanning-treeSwitch#show spanning-tree interface <接口名称 > <接口号 >聚合端口的建:Switch(config)# interface aggregateport 1建聚合接口AG1Switch(config-if)# switchport mode trunk配置并保AG1trunk 模式Switch(config)#int range f0/23-24Switch(config-if-range)#port-group 1 将端口(端口)划入聚合端口 AG1xx 生成:Switch(config)#spanning-tree 开启生成Switch(config)#spanning-tree mode stp 指定生成型stp可模式 stp , rstp , mstpSwitch(config)#spanning-tree priority 4096 置交机的先 4096 , 先小高。
锐捷交换机命令大全
锐捷交换机命令大全【第一部分】交换机支持的命令:1.交换机基本状态:switch: ;ROM状态,路由器是rommon>hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态2.交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#exit ;返回命令3.交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain;设置发vtp域名switch(config)#vtp password;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式4.交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address;设置IP地址switch(config)#ip default-gateway;设置默认网关switch#dir flash: ;查看闪存5.交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息【第二部分】路由器支持的命令:1.路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动2.路由器口令设置:router>enable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname;设置交换机的主机名router(config)#enable secret xxx ;设置特权加密口令router(config)#enable password xxb ;设置特权非密口令router(config)#line console 0 ;进入控制台口router(config-line)#line vty 0 4 ;进入虚拟终端router(config-line)#login ;要求口令验证router(config-line)#password xx ;设置登录口令xx router(config)#(Ctrl+z) ;返回特权模式router#exit ;返回命令3.路由器配置:router(config)#int s0/0 ;进入Serail接口router(config-if)#no shutdown ;激活当前接口router(config-if)#clock rate 64000 ;设置同步时钟router(config-if)#ip address;设置IP地址router(config-if)#ip address second ;设置第二个IProuter(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address;设置子接口IProuter(config-subif.1)#encapsulation dot1q;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导4.路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftprouter#copy startup-config tftp ;开机配置存到tftprouter#copy tftp flash: ;下传文件到flashrouter#copy tftp startup-config;下载配置文件ROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置文件rommon>confreg 0x2102 ;恢复配置文件rommon>reset;重新引导rommon>copy xmodem: flash: ;从console传输文件rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IPrommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP rommon>TFTP_FILE=c2600.bin ;指定下载的文件rommon>tftpdnld ;从tftp下载rommon>dir flash: ;查看闪存内容rommon>boot ;引导IOS5.静态路由:ip route;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例6.动态路由:router(config)#ip routing ;启动路由转发router(config)#router rip ;启动RIP路由协议。
锐捷交换机命令大全
【第一部分】交换机支持的命令:1.交换机基本状态:s w i t c h:;R O M状态,路由器是r o m m o n> h o s t n a m e>;用户模式h o s t n a m e#;特权模式h o s t n a m e(c o n f i g)#;全局配置模式h o s t n a m e(c o n f i g-i f)#;接口状态2.交换机口令设置:s w i t c h>e n a b l e;进入特权模式s w i t c h#c o n f i g t e r m i n a l;进入全局配置模式s w i t c h(c o n f i g)#h o s t n a m e;设置交换机的主机名s w i t c h(c o n f i g)#e n a b l e s e c r e t x x x;设置特权加密口令s w i t c h(c o n f i g)#e n a b l e p a s s w o r d x x a;设置特权非密口令s w i t c h(c o n f i g)#l i n e c o n s o l e0;进入控制台口s w i t c h(c o n f i g-l i n e)#l i n e v t y04;进入虚拟终端s w i t c h(c o n f i g-l i n e)#l o g i n;允许登录s w i t c h(c o n f i g-l i n e)#p a s s w o r d x x;设置登录口令x x s w i t c h#e x i t;返回命令3.交换机V L A N设置:s w i t c h#v l a n d a t a b a s e;进入V L A N设置s w i t c h(v l a n)#v l a n2;建V L A N 2 s w i t c h(v l a n)#n o v l a n2;删v l a n 2 s w i t c h(c o n f i g)#i n t f0/1;进入端口 1 s w i t c h(c o n f i g-i f)#s w i t c h p o r t a c c e s s v l a n2;当前端口加入v l a n2 s w i t c h(c o n f i g-i f)#s w i t c h p o r t m o d e t r u n k;设置为干线s w i t c h(c o n f i g-i f)#s w i t c h p o r t t r u n k a l l o w e d v l a n1,2;设置允许的v l a n s w i t c h(c o n f i g-i f)#s w i t c h p o r t t r u n k e n c a p d o t1q;设置v l a n中继s w i t c h(c o n f i g)#v t p d o m a i n;设置发v t p域名s w i t c h(c o n f i g)#v t p p a s s w o r d;设置发v t p密码s w i t c h(c o n f i g)#v t p m o d e s e r v e r;设置发v t p模式s w i t c h(c o n f i g)#v t p m o d e c l i e n t;设置发v t p模式4.交换机设置I P地址:s w i t c h(c o n f i g)#i n t e r f a c e v l a n1;进入v l a n 1 s w i t c h(c o n f i g-i f)#i p a d d r e s s;设置I P地址s w i t c h(c o n f i g)#i p d e f a u l t-g a t e w a y;设置默认网关s w i t c h#d i r f l a s h:;查看闪存5.交换机显示命令:s w i t c h#w r i t e;保存配置信息s w i t c h#s h o w v t p;查看v t p配置信息s w i t c h#s h o w r u n;查看当前配置信息s w i t c h#s h o w v l a n;查看v l a n配置信息s w i t c h#s h o w i n t e r f a c e;查看端口信息s w i t c h#s h o w i n t f0/0;查看指定端口信息【第二部分】路由器支持的命令:1.路由器显示命令:router#showrun;显示配置信息router#showinterface;显示接口信息router#showiproute;显示路由信息router#showcdpnei;显示邻居信息router#reload;重新起动2.路由器口令设置:router>enable;进入特权模式router#configterminal;进入全局配置模式router(config)#hostname;设置交换机的主机名router(config)#enablesecretxxx;设置特权加密口令router(config)#enablepasswordxxb;设置特权非密口令router(config)#lineconsole0;进入控制台口router(config-line)#linevty04;进入虚拟终端router(config-line)#login;要求口令验证router(config-line)#passwordxx;设置登录口令xxrouter(config)#(Ctrl+z);返回特权模式router#exit;返回命令3.路由器配置:router(config)#ints0/0;进入Serail接口router(config-if)#noshutdown;激活当前接口router(config-if)#clockrate64000;设置同步时钟router(config-if)#ipaddress;设置IP地址router(config-if)#ipaddresssecond;设置第二个IProuter(config-if)#intf0/0.1;进入子接口router(config-subif.1)#ipaddress;设置子接口IProuter(config-subif.1)#encapsulationdot1q;绑定vlan中继协议router(config)#config-register0x2142;跳过配置文件router(config)#config-register0x2102;正常使用配置文件router#reload;重新引导4.路由器文件操作:router#copyrunning-configstartup-config;保存配置router#copyrunning-configtftp;保存配置到tftprouter#copystartup-configtftp;开机配置存到tftprouter#copytftpflash:;下传文件到flashrouter#copytftpstartup-config;下载配置文件ROM状态:Ctrl+Break;进入ROM监控状态rommon>confreg0x2142;跳过配置文件rommon>confreg0x2102;恢复配置文件rommon>reset;重新引导rommon>copyxmodem:flash:;从console传输文件;设置路由器IP;设置路由器掩码rommon>T;指定TFTP服务器IPrommon>TFTP_FILE=c2600.bin;指定下载的文件rommon>tftpdnld;从tftp下载rommon>dirflash:;查看闪存内容rommon>boot;引导IOS5.静态路由:iproute;命令格式;静态路由举例;默认路由举例6.动态路由:router(config)#iprouting;启动路由转发router(config)#routerrip;启动RIP路由协议。
锐捷交换机命令
锐捷交换机命令锐捷交换机配置命令交换机基本操作1.进入特权模式Switch>enableSwitch#2.返回用户模式Switch#exitPress RETURN to get started!Switch>配置模式:全局配置模式[主机名(config)#]:配置交换机的整体参数子模式:1.线路配置模式[主机名(config-line)#]:配置交换机的线路参数2.接口配置模式[主机名(config-if)#]:配置交换机的接口参数1.进入全局配置模式下Switch#configure terminalSwitch(config)#exitSwitch#2.进入线路配置模式Switch(config)#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+P)显示上一条命令,(Ctrl+N)显示下一条命令6.错误提示信息交换机显示命令:显示交换机硬件及软件的信息 Switch#show version显示当前运行的配置参数 Switch#show running-config显示保存的配置参数 Switch#show configure常用交换机EXEC命令将当前运行的配置参数复制到flash:Switch#write memory Building configuration...[OK]#show ip interface brief 以简洁方式汇总查看所有端口信息#show ip interface 查看所有端口信息#show version 查看版本信息#show mac-address-table 查看交换机当前MAC地址表信息#show running-config 查看当前生效的配置信息#show vlan 查看所有VLAN信息#show vlan id 10 查看某一VLAN (如VLAN10)的信息#show interface fastethernet 0/1 switchport 查看某一端口模式(如F 0/1) #show aggregateport 1 summary 查看聚合端口AG1的信息#show spanning-tree 查看生成树配置信息#show spanning-tree interface fastethernet 0/1 查看该端口的生成树状态#show port-security 查看交换机的端口安全配置信息#show port-security address 查看地址安全绑定配置信息#show ip access-lists listname 查看名为listname的列表的配置信息#show access-lists端口的基本配置(config)#Interface fastethernet 0/3 进入F0/3的端口配置模式(config)#interface range fa 0/1-2,0/5,0/7-9 进入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的端口配置模式(config-if)#speed 10 配置端口速率为10M,可选10,100,auto (config-if)#duplex full 配置端口为全双工模式,可选full(全双工),half(半双式),auto(自适应)(config-if)#no shutdown 开启该端口(config-if)#switchport access vlan 10 将该端口划入VLAN10中,用于VLAN (config-if)#switchport mode trunk 将该端口设为trunk模式,用于Tag vlan可选模式为access , trunk(config-if)#port-group 1 将该端口划入聚合端口AG1中,用于聚合端口聚合端口的创建(config)# interface aggregateport 1 创建聚合接口AG1(config-if)# switchport mode trunk 配置并保证AG1为 trunk 模式(config)#int f0/23-24(config-if-range)#port-group 1 将端口(端口组)划入聚合端口AG1中生成树(config)#spanning-tree 开启生成树协议(config)#spanning-tree mode stp 指定生成树类型为stp 可选模式stp , rstp , mstp(config)#spanning-tree priority 4096 设置交换机的优先级为4096 , 优先级值小为高。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
锐捷网络交换机的配置命令集交换机>Enable 进入特权模式#Exit 返回上一级操作模式#End 返回到特权模式#write memory 或copy running-config startup-config 保存配置文件#del flash:config.text 删除配置文件(交换机及1700系列路由器)#erase startup-config 删除配置文件(2500系列路由器)#del flash:vlan.dat 删除Vlan配置信息(交换机)#Configure terminal 进入全局配置模式(config)# hostname switchA 配置设备名称为switchA(config)#banner motd & 配置每日提示信息&为终止符(config)#enable secret level 1 0 star 配置远程登陆密码为star(config)#enable secret level 15 0 star 配置特权密码为starLevel 1为普通用户级别,可选为1~15,15为最高权限级别;0表示密码不加密(config)#enable services web-server 开启交换机WEB管理功能Services 可选以下:web-server(WEB管理)、telnet-server(远程登陆)等查看信息#show running-config 查看当前生效的配置信息#show interface fastethernet 0/3 查看F0/3端口信息#show interface serial 1/2 查看S1/2端口信息#show interface 查看所有端口信息#show ip interface brief 以简洁方式汇总查看所有端口信息#show ip interface 查看所有端口信息#show version 查看版本信息#show mac-address-table 查看交换机当前MAC地址表信息#show running-config 查看当前生效的配置信息#show vlan 查看所有VLAN信息#show vlan id 10 查看某一VLAN (如VLAN10)的信息#show interface fastethernet 0/1 switchport 查看某一端口模式(如F 0/1)#show aggregateport 1 summary 查看聚合端口AG1的信息#show spanning-tree 查看生成树配置信息#show spanning-tree interface fastethernet 0/1 查看该端口的生成树状态#show port-security 查看交换机的端口安全配置信息#show port-security address 查看地址安全绑定配置信息#show ip access-lists listname 查看名为listname的列表的配置信息#show access-lists端口的基本配置(config)#Interface fastethernet 0/3 进入F0/3的端口配置模式(config)#interface range fa 0/1-2,0/5,0/7-9 进入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的端口配置模式(config-if)#speed 10 配置端口速率为10M,可选10,100,auto(config-if)#duplex full 配置端口为全双工模式,可选full(全双工),half(半双式),auto(自适应)(config-if)#no shutdown 开启该端口(config-if)#switchport access vlan 10 将该端口划入VLAN10中,用于VLAN(config-if)#switchport mode trunk 将该端口设为trunk模式,用于Tag vlan可选模式为access , trunk(config-if)#port-group 1 将该端口划入聚合端口AG1中,用于聚合端口聚合端口的创建(config)# interface aggregateport 1 创建聚合接口AG1(config-if)# switchport mode trunk 配置并保证AG1为trunk 模式(config)#int f0/23-24(config-if-range)#port-group 1 将端口(端口组)划入聚合端口AG1中生成树(config)#spanning-tree 开启生成树协议(config)#spanning-tree mode stp 指定生成树类型为stp可选模式stp , rstp , mstp(config)#spanning-tree priority 4096 设置交换机的优先级为4096 , 优先级值小为高。
优先级可选值为0,4096,8192,……,为4096的倍数。
交换机默认值为32768VLAN的基本配置(config)#vlan 10 创建VLAN10(config-vlan)#name vlanname 命名VLAN为vlanname(config-if)#switchport access vlan 10 将该端口划入VLAN10中某端口的接口配置模式下进行(config)#interface vlan 10 进入VLAN 10的虚拟端口配置模式(config-if)# ip address 192.168.1.1 255.255.255.0 为VLAN10的虚拟端口配置IP及掩码,二层交换机只能配置一个IP,此IP是作为管理IP使用,例如,使用Telnet的方式登录的IP 地址(config-if)# no shutdown 启用该端口端口安全(config)# interface fastethernet 0/1 进入一个端口(config-if)# switchport port-security 开启该端口的安全功能1.配置最大连接数限制(config-if)# switchport port-secruity maxmum 1 配置端口的最大连接数为1,最大连接数为128(config-if)# switchport port-secruity violation shutdown配置安全违例的处理方式为shutdown,可选为protect (当安全地址数满后,将未知名地址丢弃)、restrict(当违例时,发送一个Trap通知)、shutdown(当违例时将端口关闭,并发送Trap通知,可在全局模式下用errdisable recovery来恢复)2.IP和MAC地址绑定(config-if)#switchport port-security mac-address xxxx.xxxx.xxxx ip-address 172.16.1.1接口配置模式下配置MAC地址xxxx.xxxx.xxxx和IP172.16.1.1进行绑定(MAC地址注意用小写)三层路由功能(针对三层交换机)(config)# ip routing 开启三层交换机的路由功能(config)# interface fastethernet 0/1(config-if)# no switchport 开启端口的三层路由功能(这样就可以为某一端口配置IP)(config-if)# ip address 192.168.1.1 255.255.255.0(config-if)# no shutdown三层交换机路由协议(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.1 配置静态路由注:172.16.1.0 255.255.255.0 为目标网络的网络号及子网掩码172.16.2.1 为下一跳的地址,也可用接口表示,如ip route 172.16.1.0 255.255.255.0 serial 1/2(172.16.2.0所接的端口)(config)# router rip 开启RIP协议进程(config-router)# network 172.16.1.0 申明本设备的直连网段信息(config-router)# version 2 开启RIP V2,可选为version 1(RIPV1)、version 2(RIPV2)(config-router)# no auto-summary 关闭路由信息的自动汇总功能(只有在RIPV2支持)(config)# router ospf 开启OSPF路由协议进程(针对1762,无需使用进程ID)(config)# router ospf 1 开启OSPF路由协议进程(针对2501,需要加OSPF进程ID)(config-router)# network 192.168.1.0 0.0.0.255 area 0申明直连网段信息,并分配区域号(area0为骨干区域)IP ACL:交换机采用命名的访问控制列表;分标准(stand)和扩展(extended)两种1.标准ACL(config)#ip access-list stand listname 定义命名标准列表,命名为listname,stand为标准列表(config-std-nacl)#deny 192.168.30.0 0.0.0.255 拒绝来自192.168.30.0网段的IP流量通过注:deny:拒绝通过;可选:deny(拒绝通过)、permit(允许通过)192.168.30.0 0.0.0.255:源地址及源地址通配符;可使用any表示任何IP(config-std-nacl)#permit any(config-std-nacl)#end 返回2.扩展ACL(config)#ip access-list extended listname定义命名扩展列表,命名为listname,extended为扩展(config-ext-nacl)#deny tcp 192.168.30.0 0.0.0.255 192.168.10.0 0.0.0.255 eq www 拒绝源地址为192.168.30.0网段的IP访问目的地址为192.168.10.0网段的WWW服务注:deny:拒绝通过,可选:deny(拒绝通过)、permit(允许通过)tcp: 协议名称,协议可以是udp, ip,eigrp, gre, icmp, igmp, igrp等等。