6509交换机双引擎冗余切换命令(精)
交换机常用命令

交换机常⽤命令使⽤config terminal 进⼊全局模式,show ip route 显⽰路由信息username+⽤户 password+密码设置⽤户及密码enable secret +密码或者 enable password+密码设置特权密码第⼆种以明⽂存储hostname+名称设置设备名称ip routing 启动IP路由特权模式下write命令保存运⾏配置⽂件SW2-1# erase startup-config //清除SW2-1上的所有配置例⼦:(config)# interface vlan 1 //进⼊vlan 1 接⼝配置模式(config-if)# ip address 192.168.1.20 255.255.255.0 设置IP和掩码(config)# ip default-gateway 192.168.1.1 设置默认⽹关为控制台配置⼝令:(config)# line 控制台(console 0) // 0表⽰只有⼀个控制台端⼝若是vty将控制台改为vty即可(config-line)# password +密码 //设置密码(config-line)# login //使密码⽣效最后exit退出设置交换机地址:(config)# vlan 100 //创建id为100的vlan(config)# interface fastethernet 0/1 //进⼊接⼝配置模式 0/1表⽰0个插槽中的第⼀个接⼝(config-if)# switchport access vlan 100 //将fastethernet 0/1端⼝加⼊vlan 100(config)# interface vlan 100 //进⼊vlan配置模式(config-if)# encapsulation dot1q 10 //封装格式为802.1q帧 vlan 为10(config-if)# ip address 192.168.10.100 255.255.255.0 //配置交换机管理地址最后exit退出查看交换机地址表#show mac-address-table //显⽰mac地址表中所有的mac地址#show mac-address-table dynamic //显⽰从各个端⼝动态学习到的mac地址#show mac-address--table static //显⽰交换机静态指定的mac地址#show mac-address-table dynamic interface fa 0/15 //显⽰交换机的快速以太⽹端⼝15动态学习到的mac地址#show mac-address-table static interface fa 0/15 //显⽰交换机快速以太⽹端⼝15静态指定的mac地址#mac-address-table static 001.42e1.0702 vlan 1 interface fa 0/17 //指定交换机快速以太⽹端⼝17静态指定的mac地址#mac-address-table aging-time [0|10-1000000] //设置地址⽼化时间(config)# interface range fastethernet 0/1-24 //选择交换机的第1~24⼝的快速以太⽹端⼝(config)# interface fastethernet 0/1 //选择配置的端⼝(config-if)# description "___trunk port___" //为端⼝备注⽂字说明(config)# interface fastethernet 0/10 //选择端⼝(config-if)# duplex full //设置此端⼝为全双⼯模式 half为半双⼯ auto为⾃动检测(config-if)# speed 100 //设置此端⼝的速度为100Mbps 10为10Mbps auto为⾃动检测(config-vlan)# name vlan 10 //给vlan10命名(config)# no vlan 40 //删除vlan 40(config)# interface range fastethernet 0/5-7 //选中5-7号⼝(config-if-range)# switchport access vlan 10 //划⼊vlan10中# show vlan 10 //显⽰vlan10 的信息#show vlan //显⽰所有vlan信息(config)# interface fastethernet 0/1 //选端⼝(config-if)# switchport mode trunk //将端⼝设置为trunk模式(config-if)# switchport trunk encapsulation dot1q //将中继封装为dot1q(config-if)# switchport mode access //将端⼝设置为access模式(config-if)# no shutdown //开启该接⼝(config-if)# no switchport //转换为三层路由接⼝(config-if)# switchport trunk allowed vlan remove 30 //将vlan30从trunk的许可vlan列表中移除 all 表⽰许可vlan列表包含所有⽀持的vlan add 表⽰指定vlan列表加⼊许可vlan列表 remove 表⽰指定vlan列表从许可vlan列表中移除 except表⽰将列出vlan列表外的所有vlan加⼊许可vlan列表。
浪潮以太网交换机命令手册

浪潮以太网交换机命令手册系统分册前言.............................................................................................................................................................. 1配置基础命令......................................................................................................................................1.1访问命令行接口命令.............................................................................................................................................1.1.1clearscrn............................................................................................................................................................1.1.2telnet..................................................................................................................................................................1.1.3terminal length ...............................................................................................................................................1.1.4terminal monitor............................................................................................................................................1.2使用命令行接口命令.............................................................................................................................................1.2.1config.................................................................................................................................................................1.2.2exit ......................................................................................................................................................................1.2.3help.....................................................................................................................................................................1.2.4history................................................................................................................................................................1.2.5interface ............................................................................................................................................................1.3基本配置命令...........................................................................................................................................................1.3.1banner motd ...................................................................................................................................................1.3.2clock set ............................................................................................................................................................1.3.3timezone...........................................................................................................................................................1.3.4disable ...............................................................................................................................................................1.3.5enable................................................................................................................................................................1.3.6enable password............................................................................................................................................1.3.7hostname..........................................................................................................................................................1.3.8line ......................................................................................................................................................................1.3.9login ...................................................................................................................................................................【缺省情况】..................................................................................................................................................password...........................................................................................................................................................show privilege.................................................................................................................................................timeout..............................................................................................................................................................username privilege........................................................................................................................................who.....................................................................................................................................................................max-session..................................................................................................................................................... 2系统管理命令......................................................................................................................................2.1文件管理命令...........................................................................................................................................................2.1.1COPY..................................................................................................................................................................2.1.2delete.................................................................................................................................................................2.1.3dir........................................................................................................................................................................2.1.4erase...................................................................................................................................................................2.1.7rename ..............................................................................................................................................................2.1.8show running-config....................................................................................................................................2.1.9show startup-config .....................................................................................................................................verify...................................................................................................................................................................write....................................................................................................................................................................2.2系统维护命令...........................................................................................................................................................2.2.1debug ................................................................................................................................................................2.2.2logging..............................................................................................................................................................2.2.3logging buffered............................................................................................................................................2.2.4logging cli.........................................................................................................................................................2.2.5logging facility ................................................................................................................................................2.2.6logging filed ....................................................................................................................................................2.2.7logging monitor.............................................................................................................................................2.2.8logging on........................................................................................................................................................2.2.9logging rate-limit ..........................................................................................................................................logging trap.....................................................................................................................................................ping ....................................................................................................................................................................service sequence-numbers........................................................................................................................service timestamps........................................................................................................................................show debugging............................................................................................................................................show clock........................................................................................................................................................show logging...................................................................................................................................................show logging filed.........................................................................................................................................show memory .................................................................................................................................................show slab..........................................................................................................................................................show process...................................................................................................................................................show version....................................................................................................................................................show chassis....................................................................................................................................................traceroute.........................................................................................................................................................2.3SNMP命令................................................................................................................................................................2.3.1debug snmp ....................................................................................................................................................2.3.2set snmp access..............................................................................................................................................2.3.3set snmp context............................................................................................................................................2.3.4set snmp group..............................................................................................................................................2.3.5set snmp ip-filter enable.............................................................................................................................2.3.6set snmp ip-filter host..................................................................................................................................2.3.7set snmp notify enable ................................................................................................................................2.3.8set snmp notify trap......................................................................................................................................2.3.9set snmp sys-info ..........................................................................................................................................set snmp user..................................................................................................................................................set snmp view .................................................................................................................................................show snmp.......................................................................................................................................................show snmp access.........................................................................................................................................show snmp engineID....................................................................................................................................show snmp groups........................................................................................................................................show snmp ip-filter.......................................................................................................................................show snmp notify-target ............................................................................................................................show snmp sys-info......................................................................................................................................show snmp trap-target................................................................................................................................show snmp user .............................................................................................................................................show snmp view.............................................................................................................................................snmp-server community.............................................................................................................................snmp-server enable v1v2 ...........................................................................................................................snmp-server traps enable...........................................................................................................................snmp-server traps host ...............................................................................................................................snmp-server trap-source loopback........................................................................................................ 3接口命令..............................................................................................................................................3.1概述部分命令...........................................................................................................................................................3.1.1rate-limit...........................................................................................................................................................3.1.2clear counters..................................................................................................................................................3.1.3description .......................................................................................................................................................3.1.4show interfaces...............................................................................................................................................3.1.5show rate-limit ...............................................................................................................................................3.1.6shutdown..........................................................................................................................................................3.1.7flow-control.....................................................................................................................................................3.2以太网接口配置命令.............................................................................................................................................3.2.1duplex................................................................................................................................................................3.2.2medium.............................................................................................................................................................3.2.3speed .................................................................................................................................................................3.2.4auto-negotiation ...........................................................................................................................................3.3Loopback接口配置命令 ......................................................................................................................................3.3.1interface loopback......................................................................................................................................... 4IP寻址与服务命令.............................................................................................................................4.1IP基本配置命令......................................................................................................................................................4.1.1clear host..........................................................................................................................................................4.1.2ip address.........................................................................................................................................................4.1.3ip unnumbered...............................................................................................................................................4.1.4ip host................................................................................................................................................................4.1.5show hosts .......................................................................................................................................................4.1.6show ip route ..................................................................................................................................................4.1.7show ip route summary...............................................................................................................................4.1.8show ip-statistics ...........................................................................................................................................4.1.9show net-memory.........................................................................................................................................4.2ARP配置命令...........................................................................................................................................................4.2.3arpreq period time........................................................................................................................................4.2.4clear arp-cache...............................................................................................................................................4.2.5ip arp time-out...............................................................................................................................................4.2.6ip proxy-arp.....................................................................................................................................................4.2.7show arp ...........................................................................................................................................................4.2.8show ip arp ......................................................................................................................................................4.3DHCP配置命令.......................................................................................................................................................4.3.1DHCP服务端命令 .........................................................................................................................................4.3.2DHCP中继命令..............................................................................................................................................4.3.3DHCP其他命令..............................................................................................................................................4.4DNS命令 ...................................................................................................................................................................4.4.1ip dns server....................................................................................................................................................4.4.2ip dns transparent-proxy............................................................................................................................4.4.3ip dns transparent-proxy enable..............................................................................................................4.4.4ip domain lookup ..........................................................................................................................................4.4.5ip domain name.............................................................................................................................................4.4.6ip domain retry...............................................................................................................................................4.4.7ip domain timeout.........................................................................................................................................4.4.8ip name-server...............................................................................................................................................4.4.9show ip dns config ........................................................................................................................................show ip dns querying...................................................................................................................................show ip dns statistics....................................................................................................................................debug ipcls debug-level dns.....................................................................................................................4.5IP SLA配置命令.......................................................................................................................................................4.5.1IP SLA ENTRY的配置命令 ..........................................................................................................................4.5.2IP SLA RESPONDER的配置命令...............................................................................................................4.5.3IP SLA SCHEDULE的配置命令..................................................................................................................4.5.4IP SLA UDP-ECHO的配置命令.................................................................................................................4.5.5IP SLA UDP-JITTER的配置命令................................................................................................................4.5.6IP SLA其他命令 ............................................................................................................................................. 5IP路由协议命令.................................................................................................................................5.1静态路由命令...........................................................................................................................................................5.1.1ip default-network ........................................................................................................................................5.1.2ip route..............................................................................................................................................................5.1.3ip route vrf .......................................................................................................................................................5.2RIP路由协议命令 ...................................................................................................................................................5.2.1debug ip rip.....................................................................................................................................................5.2.2default-metric.................................................................................................................................................5.2.3ip rip poison-reverse....................................................................................................................................5.2.4ip rip authentication-key.............................................................................................................................5.2.5ip rip message-digest-key .........................................................................................................................5.2.6ip rip receive version.....................................................................................................................................5.2.9network .............................................................................................................................................................passive-interface............................................................................................................................................redistribute.......................................................................................................................................................router rip...........................................................................................................................................................show ip rip........................................................................................................................................................timer basic........................................................................................................................................................version...............................................................................................................................................................5.3OSPF路由协议命令...............................................................................................................................................5.3.1area authentication.......................................................................................................................................5.3.2area default-cost ...........................................................................................................................................5.3.3area filter-list prefix.......................................................................................................................................5.3.4area nssa...........................................................................................................................................................5.3.5area range........................................................................................................................................................5.3.6area sham-link................................................................................................................................................5.3.7area stub...........................................................................................................................................................5.3.8area virtual-link ..............................................................................................................................................5.3.9auto-cost reference-bandwidth...............................................................................................................clear ip ospf .....................................................................................................................................................debug ip ospf..................................................................................................................................................default-information ......................................................................................................................................default-metric.................................................................................................................................................distance.............................................................................................................................................................distance ospf ...................................................................................................................................................distribute-list...................................................................................................................................................domain-id ........................................................................................................................................................domain-tag......................................................................................................................................................fast-spf-calculate...........................................................................................................................................graceful-restart...............................................................................................................................................graceful-restart help.....................................................................................................................................ip ospf authentication ..................................................................................................................................ip ospf authentication-key .........................................................................................................................ip ospf cost.......................................................................................................................................................ip ospf database-filter..................................................................................................................................ip ospf demand-circuit................................................................................................................................ip ospf dead-interval....................................................................................................................................ip ospf hello-interval ....................................................................................................................................ip ospf message-digest-key......................................................................................................................ip ospf mtu-ignore........................................................................................................................................ip ospf priority.................................................................................................................................................ip ospf network...............................................................................................................................................ip ospf retransmit-interval..........................................................................................................................ip ospf transmit-delay..................................................................................................................................log-adjacency-changes...............................................................................................................................。
交换机调试命令对照表(思科和H3C)

交换机调试命令对照表(思科和H3C和华为)
H3C dis int brief sys int e1/0/* display mac-addres ****-****-**** dis lldp nei int e1/0/* port access vlan * shutdown undo shutdown vlan * port e1/0/* port e1/0/* to e1/0/* save quit 查看端口状态 进入配置模式 进入端口命令 通过mac地址查看端口状态 查看级联交换机状态 调试端口 关闭端口 打开端口 创建vlan 把*口添加到vlan*中 把*口到*口批量添加到*段 保存配置 退出
华为)
华为 dis int brief 查看端口状态 sys 进入配置模式 int ethernet 0/0/* 进入端口命令 display mac-addres ****-****-**** 通过mac地址查看端口状态 dis lldp nei int ethernet 0/0/* 查看级联交换机状态 port hybrid pvid vlan * 调试端口 port hybrid untagged vlan * 调试端口 shutdown 关闭端口 undo shutdown 打开端口 vlan batch * 创建vlan save(需退出到>此模式下才能保存) 保存配置 quit 退出
交换机调试命令对照表(思科和
思科 show int statu conf t int f0/* show mac add add ****.****.**** show cdp nei f0/* de sw a v * shutdown no shutdown write memory/wr m exit int range f0/* - * 查看端口状态 进入配置模式 进入端口命令 通过mac地址查看端口状态 查看级联交换机状态 调试端口 关闭端口 打开端口 保存配置 退出 批量进入端口
华为交换机常用命令

华为交换机常用命令 Hessen was revised in January 2021
1、通过AC telnet到交换机(交换机管理IP为:),需要输入交换机的用户名和密码,
下图中用户名为:smxyd,密码为:smxyd;
2、进入交换机特权模式:sys
3、查看交换机端口信息:display interface brief
4、查看交换机各端口连接AP的MAC地址:display mac-address
5、显示当前交换机信息:display current-configuration
6、进交换机端口命令:interface ethernet0/0/28
7、关交换机某个端口,要先进入到某个端口下:shutdown
8、开交换机某个端口,要先进入到某个端口下:undo shutdown
9、开交换机某个端口poe供电功能,要先进入到某个端口下:poe enable
10、关交换机某个端口poe供电功能,要先进入到某个端口下:undo poe enable
11、看交换机所有端口poe供电功能是开还是关:display poe power-state
12、地址解析协议,AP MAC对应的AP ip地址:dis arp
13、返回:quit
14、保存设置:save
15、删除某条命令,一般使用命令: undo。
华为、H3C、锐捷三家交换机配置命令详解

华为、H3C、锐捷三家交换机配置命令详解一、华为交换机基础配置命令1<Quidway> //用户视图,也就是在Quidway模式下运行命令。
<Quidway>system-view //进入配置视图[Quidway] vlan 10 //创建vlan 10,并进入vlan10配置视图,如果vlan10存在就直接进入vlan10配置视图[Quidway-vlan10] quit //回到配置视图[Quidway] vlan 100 //创建vlan 100,并进入vlan100配置视图,如果vlan10存在就直接进入vlan100配置视图[Quidway-vlan100] quit //回到配置视图2[Quidway] interface GigabitEthernet2/0/1 (10G光口)[Quidway- GigabitEthernet2/0/1] port link-type access //定义端口传输模式[Quidway- GigabitEthernet2/0/1] port default vlan 100 //将端口加入vlan100 [Quidway- GigabitEthernet2/0/1] quit //回到配置视图[Quidway] interface GigabitEthernet1/0/0 //进入1号插槽上的第一个千兆网口配置视图中。
0代表1号口[Quidway- GigabitEthernet1/0/0] port link-type access //定义端口传输模式[Quidway- GigabitEthernet2/0/1] port default vlan 10 //将这个端口加入到vlan10中[Quidway- GigabitEthernet2/0/1] quit3<Quidway>system-view[Quidway]vlan 10[Quidway-vlan10]port GigabitEthernet 1/0/0 to 1/0/29 //将0到29号口加入到vlan10中[Quidway-vlan10]quit4[Quidway] interface Vlanif100 // 进入vlan100接口视图与vlan 100命令进入的地方不同[Quidway-Vlanif100] ip address 119.167.200.90 255.255.255.252 // 定义vlan100管理IP三层交换网关路由[Quidway-Vlanif100] quit //返回视图[Quidway] interface Vlanif10 // 进入vlan10接口视图与vlan 10命令进入的地方不同[Quidway-Vlanif10] ip address 119.167.206.129 255.255.255.128 // 定义vlan10管理IP三层交换网关路由[Quidway-Vlanif10] quit5[Quidway]ip route-static 0.0.0.0 0.0.0.0 119.167.200.89 //配置默认网关。
锐捷交换机常用配置命令

一、交换机配置模式介绍交换机配置模式主要有:用户模式:此模式只可以简单的查看一些交换机的配置和一些简单的修改。
Switch>特权模式:此模式可以查看一些交换机的配置,后面讲述的很多show命令便是在此模式下进行的,还可以对一些简单的设置配置,例如时间。
Switch> enable 1F1000M2126G50G2150G2150G2150G800.073c800.073c800.073c800.073c800.073c2126G0.0.00.0.01.1.10.0.00.0.0S* 0.0.0Switch#S代表是静态路由,C代表是直连路由。
三、交换机常用查看命令show cpu //查看CPU利用率switch #show cpuCPU utilization for five seconds: 3%CPU utilization for one minute : 6%CPU utilization for five minutes: 6%如果CPU利用率偏高,就要考虑网络中是否有攻击或者网络设备是否能胜任当前的网络负载。
一般来说,CPU超过30%就不正常了。
show clock //查看交换机时钟switch #show clockSystem clock : 2007-3-18 10:29:14 Sundayshow logging //查看交换机日志switch #show loggingSyslog logging: EnabledConsole logging: Enabled(debugging)Monitor logging: DisabledBuffer logging: Enabled(debugging)Server logging severity: debuggingFile logging: Disabled注意,日志前面都有时间,但交换机的时钟往往和生活中的时钟对不上,这时需要我们使用show clock 查看交换机时钟,进而推断日志发生的时间,便于发现问题。
交换机常用操作指令华为
华为交换机常用指令一、交换机设备登陆及配置:1、设备登陆配置我中心维护汇聚和热点交换机,交换机类型为5300、2300和GPON,交换机使用secure CRT软件登录。
交换机使用之前需要刷机,使用secureCRT配置:协议是serial,端口com12,波特流9600,流控制不配置。
刷交换机所需要的信息:在3a模式下用户名和密码;snmp为网络管理协议,配置网管所需的指令,固定不变; telnet配置——远程登陆配置信息。
登陆汇聚和热点交换机首先93-5交换机(核心交换机),登录协议选择ssh登录,登陆其它交换机在93-5上使用telnet(远程登陆)命令跳转,只能单向。
核心交换机登陆用户名:hanxu69309,密码:Hx#9309。
华为汇聚和热点交换机的登陆用户名和密码都为huaweitest。
其他核心交换机的登录地址:(交换机型号为9312)(交换机型号为6500)(交换机型号为6500)(交换机型号为8500)(交换机型号为8500)(交换机型号为9306)2、交换机配置思路:➢配置设备名称。
➢管理AP所需要配置的信息➢管理交换机配置的信息➢在3a模式下配置,配置以下用户名和密码。
(配置固定)➢snmp为网络管理协议,下面为加入网管所配置的指令,固定不变。
➢telnet配置——远程登陆配置信息3、数据准备:➢管理VLAN的ID。
➢交换机的管理IP。
➢交换机连接其他交换机的接口号。
➢验证方式、用户名和密码。
二、5300交换机开站指令1、交换机简介5300系列交换机,包括5328和5324等,不能给AP供电。
下面介绍的指令为5328,是5300系列的一种,共有28个端口。
532853242、开站指令➢配置设备名称。
System //进入配置模式sysname SDJN-WLAN-SW-ZRSJGC-1-S5328 //给交换机命名vlan 1 2001 2101 2126 to 2127 2218 2501 //创建vlanbpdu-tunnel reserved03 group-mac 0100-5e99-9999 //交换机支持sim认证使用,网维提供的。
DELL交换机常用命令
DELL交换机常用基本命令登陆方式:超级终端-com1-还原默认值创建一个新VLAN:vlan2console>console> enconsole# configureconsole(config)# vlan databaseconsole(config-vlan)# vlan 2console(config-vlan)# exit把该交换机的1到10端口加入新创建的vlan 2中console(config)# interface range ethernet g(1-10)console(config-if)# switchport mode accessconsole(config-if)# switchport access vlan 2console(config-if)# exit创建一个端口汇聚组:ID是10,把该交换机的21到24口捆绑到一起做级联用console>console> enconsole# configureconsole(config)# interface range ethernet g(21-24)console(config-if)# channel-group 10 mode onconsole(config-if)# exit如果是IPSAN网络,做如下操作对交换机进行优化:console#console# configureconsole(config)# interface range Ethernet g(1-24)console(config-if)# spaningtree portfast onconsole(config-if)# exitconsole(config)# iscsi enableconsole(config)# iscsi cos remark dscp 7console(config)# iscsi aging-time 1000console(config)# end如果要升级交换机firmware,为该交换机设定一个最高级权限的用户名和密码,然后通过web界面访问改交换机,设定用户名和密码操作如下:console# configureconsole(config)# username admin password password level 15console(config)# exit更改交换机IP地址:console# configureconsole(config) ipaddress 192.168.100.123 255.255.255.0保存配置:console# copy running-config startup-configconsole# yes以上就是DELL交换机的一些基本命令,大体上跟CISCO差不多,个别命令略有区别,希望能给大家提供一点帮助。
锐捷交换机常用配置命令
交换机基本操作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 memoryBuilding configuration...[OK]Switch#清空flash中的配置参数:Switch#delete flash:config.textSwitch#交换机重新启动:Switch#reloadSystem configuration has been modified. Save? [yes/no]:nProceed with reload? [confirm]配置交换机主机名:Switch(config)#hostname S2126GS2126G(config)#配置交换机口令: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 shutdown | undo shutdown3、将接口关闭S2126G(config-if)#shutdown4、配置接口速率S2126G(config-if)#speed [10|100|auto]5、配置接口双工模式S2126G(config-if)#duplex [auto|full|half显示接口状态:S2126G#show interfaces测定目的端的可达性: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 computer department将交换机端口分配到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>2).从主干链路中清除VLANSwitch(config-if)#switchport trunk allowed vlan except <vlan> 5 注:VLAN1不可被清除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 <接口名称> <接口编号>以上用于锐捷交换机的。
交换机管理性IP地址配置
CISCO及H3C交换机设置管理性IP地址试验拓扑图:分析:为什么跨网段交换机之间管理需要设置默认网关呢?在交换机中可以给vlan 1配置一个IP地址,即为交换机的管理性IP,使用配置的管理性IP地址可以让网络管理员使用telnet或网络管理软件等方式远程的来管理该交换机;例如:可以在交换机上做如下配置Switch01# conf tSwitch01(config) # interface vlan 1Switch01(config-if)# no shutSwitch01(config-if)# ip address 192.168.0.253Switch01(config)#enable password 123abc!在交换机所在网段内的工作站pc-01可以使用telnet方式远程管理该交换机telnet 192.168.0.253如果现在用户登录到switch-01中,想利用网络远程管理另一个网段的交换机switch-02就需要在双方交换机设置一个默认网管,表示交换机无法转发的数据帧就交给该IP地址(网关IP地址)的设备处理以便能完成数据帧的转发过程;发送的过程如下图:例如:可以在交换机上做如下配置:Switch02#conf tSwitch03(config)#ip default-gateway 192.168.0.254 (给交换机设置默认网关命令)在工作站pc-01可以使用telnet方式远程管理不同网段的交换机telnet 192.168.1.253总结:一般来说对于同网段的交换机管理时对交换机配置一个管理性IP地址就可以了,当要从一个交换机跨网段管理另一个交换机时需要给交换机配置默认网管补充说明:交换机的VLAN虚接口承载在物理端口之上,即某VLAN所包含的物理端口UP之后,该VLAN虚接口才会UP.对于三层交换机,可以为多个VLAN接口配置IP地址,而且默认情况下各个VLAN接口之间可以访问;对于二层交换机来说,为VLAN接口配置的IP地址只能用于管理华为交换机:在华为的设备中,默认的管理VLAN是VLAN1.在二层交换机中,只允许一个管理VLAN的存在。