当前位置:文档之家› 思科2960交换机配置命令

思科2960交换机配置命令

思科2960交换机配置命令
思科2960交换机配置命令

交换机基本状态:

switch: ;ROM状态,路由器是rommon>

hostname>;用户模式

hostname# ;特权模式

hostname(config)# ;全局配置模式

hostname(config-if)# ;接口状态

交换机口令设置:

switch>enable ;进入特权模式

switch#config terminal ;进入全局配置模式

switch(config)#hostname xxx;设置交换机的主机名

switch(config)#enable secret xxx ;设置特权加密口令-----设置进入en特权模式的口令

switch(config)#enable password xxa;设置特权非密口令

enable secret 乱码显示

enable password 明文显示

设置完后用show run可以看出

当特权非加密口令和特权加密口令同时设置时,enable secret的级别高于enable password ,也即此时enable password自动失去效用,只有enable secret 起作用,在没有设置secret口令时,非加密口令才有效。

switch(config)#line console 0 ;进入控制台口

line console 0 可以设置控制台的一些状态,比如在line console 0可以设置exec-timeout和logging synchronous,前者可以设置不输入命令多长时间系统弹出,而后一个命令则可以设置在输入命令时不会被系统日志消息打断。

Switch(config-line)#password 123456 设置telnet时的登陆密码

Switch(config-line)#login 使登陆密码生效

Switch(config-line)#Ctrl+Z 退出到特权模式

switch(config-line)#line vty 0 4 ;进入虚拟终端

0和4为VTP接口的编号,0代表0号,4代表4号

vty 0 4表示下面是对VTY的0到4号端口(即0号、1号、2号、3号、4号)进行配置

vty线路指的是我们进行telnet的时候使用的线路。这里的0 4 指的是对从第一个telnet的到第五个telnet线路进行设置,因此同时进入虚拟终端的人数 0 4代表5个人 0 3 代表4个人以此类推。

line vty 0 0是只启用一个telnet会话的意思,也就是说只能有一个人进行telnet。

telnet密码虽然配置成功了,可是一想,IP还没配置啊,telnet登陆谁呢?~!所以这个时候需要开启交换机的管理vlan,给管理vlan配置Ip,一般交换机都有初始的默认vlan1,用他来做管理vlan吧【说说管理vlan的作用:管理VLAN是指设备的IP地址所在的VLAN ,主要用来远程连接这个设备进行管理使用如果不配置这个,你将无法通过网络管理这台设备,业务VLAN就是普通的接台式机的VLAN, 接业务使用...】,下面配置二层交换机的管理vlan的Ip:

switch#conf t 特权模式进入配置模式

Enter configuration commands, one per line. End with CNTL/Z.

switch(config)#int vlan 1 进入vlan1虚拟口

switch(config-if)#ip add 192.168.99.1 255.255.255.0 给vlan1设置IP地址

switch(config)#ip default-gateway 192.168.99.254设置switch的网关(为了提供从交换机连接到其它设备的路由)

switch(config-if)#no shutdown

vlan1%LINK-5-CHANGED: Interface Vlan1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Int erface Vlan1, changed state to up

switch(config-if)#^Z 由配置模式推出到特权模式;

%SYS-5-CONFIG_I: Configured from console by console

switch#cop r s 保存配置文件;

交换机VLAN设置:

switch#vlan database ;进入VLAN设置

switch(vlan)#vlan 2 ;建VLAN 2

switch(vlan)#no vlan 2 ;删vlan 2

switch(config)#int f0/1 ;进入端口1

switch(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模式

交换机设置IP地址:

switch(config)#interface vlan 1 ;进入vlan 1

switch(config-if)#ip address ;设置IP地址

switch(config)#ip default-gateway ;设置默认网关

switch#dir flash: ;查看闪存

交换机显示命令:

switch#write;保存配置信息

switch#showvtp;查看vtp配置信息

switch#show run ;查看当前配置信息

switch#showvlan;查看vlan配置信息

switch#showint (interface);查看端口信息(详细)

switch#showint f0/1详细;show inter fa0/1 status简明 ----查看指定端口信息

交换机命令总结

基本配置命令

Switch >enable 进入特权模式

Switch #config terminal 进入全局配置模式

Switch (config)#hostname 设置交换机的主机名

Switch(config)#enable password 进入特权模式的密码(明文形式保存)

Switch(config)#enable secret 加密密码(加密形式保存)(优先)

Switch(config)#ip default-gateway 配置交换机网关

Switch(config)#show mac-address-table 查看MAC地址

Switch(config)logging synchronous 阻止控制台信息覆盖命令行上的输入Switch(config)no ip domain-lookup 关闭DNS查找功能

Switch(config)exec-timeout 0 0 阻止会话退出

使用Telnet远程式管理

Switch (config)#line vty 0 4 进入虚拟终端

Switch (config-line)# password 设置登录口令

Switch (config-line)# login 要求口令验证

控制台口令

switch(config)#line console 0 进入控制台口

switch(config-line)# password xx

switch(config-line)# 设置登录口令login 允许登录

Cisco发现协议(CDP)

Switch(config)#show cdp 显示Cisco设备全局配置信息

Switch(config)#show cdp interface 端口查看CDP配置下端口信息

Switch(config)#show cdp neighbors 显示直连Cisco设备信息

Switch(config)#show cdp neighbors detail 查看邻居详细信息

恢复出厂配置

Switch(config)#erase startup-config

Switch(config)delete vlan.dat

配置接口标识接口标识用于区分路由器的各个接口。

switch(config)#interface fastethernet 0/1 以0/1 接口为例

switch(config-if)#shutdown ---关闭端口

switch(config-if)#no shutdown ---开启端口

switch(config)# description this is a fast Ethernet port used to connecting the company’s intranet!

Vtp配置

switch(config)#vtp domain 设置vtp域名

switch(config)#vtp password 设置vtp密码

switch(config)#vtp mode server /client/transparent 设置vtp服务器模式

switch(config)#vtp version 设置vtp版本

switch(config)#vtp pruning 启用vtp修解

注:要想从vtp中减少一台交换机只需将该交换机vtp域名更改

Vlan基本配置

Switch#vlan database 进去vlan配置模式

Switch(vlan)#vlan号码name 名称创建vlan及vlan名

Switch(vlan)#vlan号码mtu数值修改MTU大小

Switch(vlan)#exit 更新vlan数据并推出

Switch#showvlan 查看\验证

Switch#copy running-config startup-config 保存配置到交换机里

Switch#copy running-configtftp保存配置到电脑里

叫NO 删除VLAN

VLAN 中添加删除端口

Switch#config terminal 进入全局配置

Switch(config)#interface f0/1 g0/1 进入要分配的端口

Switch(config-if)#Switchport mode access 定义二层端口

Switch(config-if)#Switchportaccesvlan号把端口分给一个vlan

Switch(config-if)#switchport mode trunk 设置为干线

Switch(config-if)#switchport trunk encapsulation dot1q 设置vlan中继协议

Switch(config-if)#no switchport mode 或( switchport mode access) 禁用干线

Switch(config-if)#switchport trunk allowed vlan add 1,2 从Trunk中添加vlans

Switch(config-if)#switchport trunk allowed vlan remove 1,2 从Trunk中删除vlan

Switch(config-if)#switchport trunk pruning vlan remove 1,2 ;从Trunk中关闭局部修剪

查看vlan信息Switch#showvlan brief 所有vlan信息

查看vlan信息Switch#showvlan id 某个vlan信息

注:Switch#showint trunk 查看trunk协议

注:可以使用default interface interface-id 还原接口到默认配置状态

Trunk

开启(no)——将端口设置为永久中继模式

关闭(off)——将端口设置为永久非中继模式,并且将链路转变为非中继链路

企望(desirable)——让端口主动试图将链路转换成中继链路

自动(auto)——使该端口愿意将链路变成中继链路

配置接口为动态协商模式

Switch(config)#interface 接口号

Switch(config)#switchport mode dynamic desirable/auto

生成树stp:

Switch(config)#spanning-tree vlan 启用stp生成树(基于vlan)

Switch(config)#spanning-tree vlan root primary 指定根交换机(基于vlan)

Switch(config)#spanning-tree vlan root secondary 指定备用根交换机(基于vlan)

Switch(config)#spanning-tree vlan priority <0-65535>指定交换机优先级(基于vlan)Switch(config)#no spanning-tree vlan priority 将交换机的优先级恢复默认值(基于vlan)Switch(config-if)#spanning-tree vlan cost <0-200000000>指定端口成本(起用trunk的端口模式下)

Switch(config-if)#spanning-tree vlan port-prioty<0-255>指定交换机端口优先级(基于vlan)Switch(config-if)#spanning-tree portfast 配置速端口(连接终端设备的端口状态)如pc机

Switch(config)#spanning-tree uplinkfast 配置上行速端口

注:在配置上行速端口前要先将基于vlan上的网桥优先级,网桥成本恢复默认值。起用了该命令后在进行优先级更改,注:vlan为可选参数,当没有该参数时将修改所有vlan网桥的优先级\及所有的vlan端口成本

Switch#show spanning-tree summery 检测vlan生成树配置

Switch#show spanning-tree vlan detail 浏览详细生成树配置信息

Switch#show spanning-tree interface detail 浏览详细生成树端口配置信息

以太网通道配置

switch(config)#interface range fasternet0/1 - 2 将fasternet0/1和0/2 口捆绑

switch(config-if)#channel-group 1 mode on 配置以太通道模式

switch(config-if)#port-channel load-balance {dst-mac | src-mac}在链路间实现负载均衡

switch#showetherchannel 1 summary 查看通道信息

switch#showetherchannel load-balance 查看通道信息

交换机显示命令:

switch#showvtp status 查看vtp配置信息

switch#show running-config 查看当前配置信息 ---包括本机IP、登录密码、vlan所属

switch#showvlan 查看vlan配置信息

switch#show interface 查看端口信息

switch#showint f0/0 查看指定端口信息

switch#dir flash: 查看闪存

switch#show version 查看当前版本信息

switch#showcdp cisco设备发现协议(可以查看聆接设备)

switch#showcdp traffic 杳看接收和发送的cdp包统计信息

switch#showcdp neighbors 查看与该设备相邻的cisco设备

switch#show interface f0/1 switchport 查看有关switchport的配置

switch#showcdp neighbors 查看与该设备相邻的cisco设备

怎么一次打开交换机全部端口

进入配置模式(config),interface range F0/1 - 24(r ange表示命令用来绑定一组端口,并进入端口批量配置视图)

no shutdown 即可!

如何更改交换机的双工模式:

NO.1 进入config模式,进入端口配置状态interface f0/1

N0.2 speed 10/100/1000/auto/ 设置端口速率

N0.3 设置全双工或半双工duplex full/half/auto

N0.4 end 退出

SW1(config)#interface fa0/1

SW1(config-if)#speed {10 | 100 | auto}//10M/100M/自适应

SW1(config-if)#duplex {auto | full | half} //自适应/全双工/半双工

show ipintbri

可以很快查看到端口的启用状态,很简洁的命令

查看交换机哪个端口故障及原因:

switch#showint status err-disable

sh mac- dyint f0/6(二层交换机)-dy

显示第6个口的mac address与所属vlan 7427.ea28.e51c

接口产生err-disable的原因可以由以下的命令来查看,系统缺省的配置是所有列出的原因都能导致接口被置为err-disable。(下图所示)命令:sw1#show errdisable detect

关闭LINK-FLAP检测功能命令:

Sw#no errdisable detect cause link-flap

具体由什么原因导致当前接口err-disable可以由show interface status err-disable来查看:(下图所示)

在缺省配置下,若接口被置为err-disable,IOS将不会试图恢复接口。可以由show errdisable recovery来查看,timer status下面所有的值都是disable。下面的示例中,由于手工配置了link-flap恢复(命令为:SW#errdisable recovery cause Link-flap),所以timer status的值变为Enable。

调整err-disable的超时时间,可以使用以下命令:

sw1(config)#errdisable recovery interval 30 (set time 30sec)

<30-86400> timer-interval(sec)

要填的时间30 secs

链路振荡错误:

链路振荡(flap)是指短时间内端口不停的处于up/down状态,如果端口在10秒内连续振荡5次,端口将被设置为err-disabled状态,如:

%PM-4-ERR_DISABLE: link-flap error detected on Gi2/1, putting Gi2/1 in

err-disable state

可以使用如下命令查看不同的振荡的值:

SW#showerrdisable flap-values

引起链路震荡的常见因素,可能是物理层的问题,比如GBIC的硬件故障等等.因此解决这种问题通常先从物理层入手。

以下几行命令可以给VLAN内的主机自动分配IP地址。

Switch(config)#ipdhcp pool vlan16

Switch(dhcp-config)#network 172.21.38.254 255.255.255.0

Switch(dhcp-config)#default-router 172.21.38.254

Switch(dhcp-config)#exit

烽火汇聚交换机常用配置

一.缺省用户名和密码 admin 12345 二.创建VLAN config //进入配置模式后 vlan 10,12,17,20,30-416,579,601-700,801,921,1000-1050,1201-1224,1301-1324,1401-1424,3999 //批量创建VLAN interface vlan 4000 //单独创建VLAN ip address 172.31.20.237/24 //给vlan添加IP ip route-static 0.0.0.0 0.0.0.0 172.31.20.254 //config模式下缺省路由配置 write file //保存当前所有配置 三.端口配置 Interface gi 1/0/1 to gi 1/0/48 批量进入端口 S7800-08(config-eth1)#no shutdown //启用端口 S7800-08(config)#interface gigaethernet 6/0/1 //进入端口gigaethernet 6/0/1 S7800-08(config-ge6/0/1)#alias huangtan8220 //设置端口描述 1)access 模式:port link-type access;port default vlan 10 // access 模式 2)trunk 模式:port link-type trunk;port trunk allow-pass vlan 10,12 //trunk模式 3)hybrid 模式:port link-type hybrid;port hybrid vlan 30-416,1000-1050 tagged;port hybrid vlan 3999 untagged //hybird模式,内层标为tag,外层标untag(解标) 建议端口使用hybrid模式,端口默认为hybrid模式。 1.Port hybrid vlan 400 tag //更改端口为tag模式 2.Port hybrid vlan 399 untag //更改端口为untag模式,并在下一条中配置pvid Port hybrid pvid 399 四.启用QinQ S7800-08(config)#translation-vlan 1 outer-vlan 30/524 add outer 2008 //规则1:如果是内标为30-524的数据,添加外标2008 ,前提是端口必须先透传30/524VLAN,下行口 S7800-08(config-ge6/0/1)#join translation-vlan 1 in //在端口下应用 S7800-08(config-ge6/0/1)#port hybrid vlan 2008 untag S7800-08(config-ge6/0/1)#exit //退出至上一层配置界面 上行口: S7800-08(config-ge8/0/1)#port hybrid vlan 2008 tag //只透传2008VLAN -------------------------------------------------------------- ?基于接口的QinQ配置,对比中兴设备的配置比较案例: vlan qinq session-no 1 customer-port fei_1/13 uplink-port gei_2/1 in-vlan 2013 untag helper-vlan 3999 ----- translation-vlan 1 outer-vlan 2013 add outer 3999 //中兴设备和烽火设备的vlan翻译规则命令比较interface fei_1/13 --------- interface gigaethernet 6/0/1 //进入端口下 join translation-vlan 1 in //在端口下应用之前建立的翻译规则 description XSX_ShuiYueSi_DSLAM2_MA5600 ------- alias XSX_ShuiYueSi_DSLAM2_MA5600 //端口描述switchport mode hybrid --------- port link-type hybrid switchport hybrid native vlan 254 -------- port hybrid pvid 254

思科交换机命令大全

思科交换机命令大全集团文件发布号:(9816-UATWW-MWUB-WUNN-INNUL-DQQTY-

思科交换机常用命令大全 1.1 用户模式与特权模式 用户模式:可以使用一些基本的查询命令 特权模式:可以对交换机进行相关的配置 进入特权模式命令:Switch>enable 退出特权模式命令:Switch#exit 启用命令查询: 时间设置:Switch#clock set 时间(自选参数,参数必须符合交换机要求) 显示信息命令:Switch#show 可选参数 注意:可以用TAB键补齐命令,自选参数为用户自定义参数,可选参数为交换机设定参数 查看交换机配置: Switch#show running-config 保存交换机配置:Switch#copy running-config startup-config Switch#wr

查看端口信息:Switch#show interface 查看MAC地址表:Switch#show mac-address-table 查看交换机CPU的状态信息:Switch#show processes 1.2 全局配置模式 进入全局配置模式:Switch#configure terminal 主机名修改:Switch(config)#hostname 主机名(自选参数) 特权模式进入密码: Switch(config)#enable secret 密码(自选参数) 取消特权模式密码:Switch(config)#no enable secret 取消主机名设置: Switch(config)#no hostname 退出配置模式: Switch(config)#exit 需要特别注意的是在配置模式中无法使用show命令,如果要使用 的话show前必须加do和空格,例如:do show * 指定根交换机命令:Switch(config)#spanning-tree vlan 自选参数(VLAN号) root primary 例如: Switch(config)#spanning-tree vlan 1 root primary

CISCO命令全集

CISCO命令全集-思科命令汇总 视图模式介绍: 普通视图router> 特权视图router# /在普通模式下输入enable 全局视图router(config)# /在特权模式下输入config t 接口视图router(config-if)# /在全局模式下输入int 接口名称例如int s0或int e0 路由协议视图router(config-route)# /在全局模式下输入router 动态路由协议名称 1、基本配置: router>enable /进入特权模式 router#conf t /进入全局配置模式 router(config)# hostname xxx /设置设备名称就好像给我们的计算机起个名字 router(config)#enable password /设置特权口令 router(config)#no ip domain lookup /不允许路由器缺省使用DNS解析命令 router(config)# Service password-encrypt /对所有在路由器上输入的口令进行暗文加密 router(config)#line vty 0 4 /进入设置telnet服务模式 router(config-line)#password xxx /设置telnet的密码 router(config-line)#login /使能可以登陆 router(config)#line con 0 /进入控制口的服务模式 router(config-line)#password xxx /要设置console的密码 router(config-line)#login /使能可以登陆 2、接口配置: router(config)#int s0 /进入接口配置模式serial 0 端口配置(如果是模块化的路由器前面加上槽位编号,例如serial0/0 代表这个路由器的0槽位上的第一个接口) router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码

烽火交换机常用配置

二、烽火交换机配置: ?接入方式 通过Console口进行本地配置 带内/带外的telnet或ssh WEB页面 ?部分有关管理的缺省设置 带内ip:192.168.1.1/24 带外ip:192.168.2.1/24 本机登陆用户名、密码:admin,12345或guest,12345 SNMP的只读集合:public SNMP的读写集合:NETMAN ?Web页面配置 根据交换机配置的默认web管理地址通过IE浏览器进行配置 以烽火2008mfb为例 ?设备缺省的web网管IP地址为192.168.2.1; ?设备缺省的用户名为:admin ?密码为:12345 ?选择成员及类型时,可以通过单击代表相应端口类型的字符,选择合适的配置。其中“-”代表不是该VLAN的成员,“T”代表是该VLAN的成员输出数据包带标识符,“U” 代表是该VLAN的成员但输出数据包不带标识符,“T”“U”表示该接口的Pvid时该vlan。 ?查看及保存配置(特权模式下#) ?show running-config 显示当前系统配置 ?show startup-config 显示当前配置文件信息 ?show version 显示当前设备的版本信息 ?show system 显示系统配置 ?show interface [<1-64>] 显示端口信息 ?show vlan [<1-4094>] 显示vlan信息 ?show dynamic-mac AA:BB:CC:DD:EE:FF 已知某一mac地址,查找交换机连接端口号?show logging history 显示历史记录 ?show history 显示之前的输入命令 ?ls 显示文件系统 ?write file 保存配置文件 ?show cpu statistic 显示CPU统计信息。 ?1、设置时间 ?clock set HH:MM:SS <1-31> <1-12> <2000-2100> ?例:Fengine#clock set 14:28:30 10 9 2009 ?2、显示文件系统 ?dir ?例:Fengine#dir ?size date time name ?-------- ------ ------ -------- ?11387 JAN-01-2000 00:01:16 startcfg

cisco交换机配置口令大全

cisco交换机配置口令大全 1.在基于IOS的交换机上设置主机名/系统名: switch(config)# hostname hostname 在基于CLI的交换机上设置主机名/系统名: switch(enable) set system name name-string 2.在基于IOS的交换机上设置登录口令: switch(config)# enable password level 1 password 在基于CLI的交换机上设置登录口令: switch(enable) set password switch(enable) set enalbepass 3.在基于IOS的交换机上设置远程访问: switch(config)# interface vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于CLI的交换机上设置远程访问: switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlan switch(enable) set ip route default gateway 4.在基于IOS的交换机上启用和浏览CDP信息: switch(config-if)# cdp enable switch(config-if)# no cdp enable 为了查看Cisco邻接设备的CDP通告信息: switch# show cdp interface [type modle/port] switch# show cdp neighbors [type module/port] [detail] 在基于CLI的交换机上启用和浏览CDP信息: switch(enable) set cdp {enable|disable} module/port 为了查看Cisco邻接设备的CDP通告信息: switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交换机的端口描述: switch(config-if)# description description-string 基于CLI的交换机的端口描述: switch(enable)set port name module/number description-string 6.在基于IOS的交换机上设置端口速度: switch(config-if)# speed{10|100|auto} 在基于CLI的交换机上设置端口速度: switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 7.在基于IOS的交换机上设置以太网的链路模式: switch(config-if)# duplex {auto|full|half}

思科交换机命令大全

思科交换机常用命令大全 1.1 用户模式与特权模式 用户模式:可以使用一些基本的查询命令 特权模式:可以对交换机进行相关的配置 进入特权模式命令:Switch>enable 退出特权模式命令:Switch#exit 启用命令查询:? 时间设置:Switch#clock set 时间(自选参数,参数必须符合交换机要求) 显示信息命令:Switch#show 可选参数 注意:可以用TAB键补齐命令,自选参数为用户自定义参数,可选参数为交换机设定参数 查看交换机配置: Switch#show running-config 保存交换机配置:Switch#copy running-config startup-config Switch#wr 查看端口信息:Switch#show interface 查看MAC地址表:Switch#show mac-address-table 查看交换机CPU的状态信息:Switch#show processes 1.2 全局配置模式 进入全局配置模式:Switch#configure terminal

主机名修改:Switch(config)#hostname 主机名(自选参数) 特权模式进入密码: Switch(config)#enable secret 密码(自选参数) 取消特权模式密码:Switch(config)#no enable secret 取消主机名设置: Switch(config)#no hostname 退出配置模式: Switch(config)#exit 需要特别注意的是在配置模式中无法使用show命令,如果要使用 的话show前必须加do和空格,例如:do show * 指定根交换机命令:Switch(config)#spanning-tree vlan 自选参数(VLAN号)root primary 例如: Switch(config)#spanning-tree vlan 1 root primary 需要注意的是:设置根交换机是基于VLAN的 关闭生成树协议命令:Switch(config)#no spanning-tree vlan 自选参数(VLAN 号) 例如: Switch(config)#no spanning-tree vlan 1 1.3 接口配置模式 进入接口配置模式:Switch(config)#interface 端口名称(可选参数) 启用端口:Switch(config-if)#no shutdown 停用端口:Switch(config-if)#shutdown 进入同种类型多端口配置:Switch(config)# interface range fastethernet 0/1-5 进入不同类型多端口配置:Switch(config)#interface range fastethernet 0/1-5,gigabitethernet 0/1-2

烽火交换机配置命令

烽火交换机配置命令 The manuscript was revised on the evening of 2021

烽火交换机配置常用命令 一、连接方式: Eth网口链接:设置为地址段——开始——运行——telnet 带内ip:带外ip:二、登陆:Username:admin ------------ 使用着名称:admin Password :12345 ------------密码:12345 三、查看:S200mfb#show run ------------------查看系统运行★会看设备情况很重要show running-config 显示当前系统配置 show startup-config 显示当前配置文件信息 show version 显示当前设备的版本信息 show system 显示系统配置 show dynamic-mac AA:BB:CC:DD:EE:FF 已知某一mac地址,查找交换机连接端口号 show logging history 显示历史记录 show history 显示之前的输入命令 write file 保存配置文件 show cpu statistic 显示CPU统计信息。 1、设置时间 clock set HH:MM:SS <1-31> <1-12> <2000-2100> 例:Fengine#clock set 14:28:30 10 9 2009 2、显示文件系统 dir 例: Fengine#dir size date time name -------- ------ ------ -------- 11387 JAN-01-2000 00:01:16 startcfg 1 files, total space: 11387 bytes 0 directorys,available space: 2011136 bytes 3、清空交换机的配置文件 erase startup-config----------用于清空flash上保存的配置文件,但是以前的配置在系统上仍然生效,因此如果希望系统恢复到出厂状态,除了需要清空flash上的配置文件外,还需要重启设备 例: Fengine(config)#erase startup-config This will erase the configuration in the flash memory. Are you sure(y/n) [y] Erasing configuration....... [OK] 四、查看交换机端口情况: S200mfb#show interface-----------查看端口网速,在线情况。 3528#show interface staistics 查看端口流量(realtime rate) 3528#show vlan all 查看所以VLAN 3528#show vlan 151 查看VLAN信息 五、进入配置模式:S200mfb#configure------------进入命令模式可以更改系统数据 六、给交换机命名:S200mfb(config)#hostname dianwuduan ---------给交换机命名电务段no hostname 用于将设备系统名设为便于记忆和识别的名字,no命令将其恢复为缺省的域名Fengine。 注意,系统名字之间不要有空格,否则只有第一个空格前的字符有效。 例: Fengine(config)#hostname HostA HostA (config)#

Cisco的命令大全

Cisco的命令大全 序号/类别基于ios的交换机命令基于CLI的交换机命令 1.设置主机名/系统名 switch(config)# hostname "hostname" switch(enable) set sys tem name name-string 2.设置登录口令 switch(config)# enable password level 1 password switch(enable) set password switch(enable) set enalbepass 3.设置远程访问 switch(config)# inte***ce vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address switch(enable) set inte***ce s c0 ip-address netmask broadcast-address switch(enable) set inte***ce sc0 vlan switch(enable) set ip route default gateway 4.启用和浏览CDP信息 switch(config-if)# cdp enable switch(config-if)# no cdp enable switch(enable) set cdp {enable|disable} module /port 5.查看Cisco邻接设备的CDP通告 switch# show cdp inte***ce [type modle/port] switch# show cdp neighbors [type module/port] [detail] switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6.端口描述 switch(config-if)#description escription-string switch(enable)set p ort name module/number description-string 7.设置端口速度 switch(config-if)# speed{10|100|auto} switch(enable) set port s peed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 8.设置以太网的链路模式 switch(config-if)# duplex {auto|full|half} switch(enabl e) set port duplex module/number {full|half 9.配置静态VLAN switch# vlan database switch(vlan)# vlan vlan-num name vla switch(vlan)# exit switch# configure teriminal switch(config)#inte***ce inte***ce module/number switch(config-if)# switchport mode access switch(config-if)# switchport access vlan vlan-num switch(config-if)# end switch(enable) set vlan vlan-num [name name] switch(enable) set vlan vlan-num mod-num/port-list 10.配置VLAN中继线 switch(config)# inte***ce inte***ce mod/port

烽火交换机常用命令大全

求烽火交换机常用命令大全 q 接入方式 通过Console口进行本地配置 带内/带外的telnet或ssh WEB页面 q 部分有关管理的缺省设置 本机登陆用户名、密码:admin,12345或guest,12345 SNMP的只读集合:public SNMP的读写集合:NETMAN q Web页面配置 根据交换机配置的默认web管理地址通过IE浏览器进行配置 以烽火2008mfb为例 q q 设备缺省的用户名为:admin q 密码为:12345 q 选择成员及类型时,可以通过单击代表相应端口类型的字符,选择合适的配置。其中“-”代表不是该VLAN的成员,“T”代表是该VLAN的成员输出数据包带标识符,“U”代表是该VLAN的成员但输出数据包不带标识符,“T”“U”表示该接口的Pvid时该vlan。 q 查看及保存配置(特权模式下#) q show running-config 显示当前系统配置 q show startup-config 显示当前配置文件信息 q show version 显示当前设备的版本信息 q show system 显示系统配置 q show interface [<1-64>] 显示端口信息 q show vlan [<1-4094>] 显示vlan信息

q show dynamic-mac AA:BB:CC:DD:EE:FF 已知某一mac地址,查找交换机连接端口号 q show logging history 显示历史记录 q show history 显示之前的输入命令 q ls 显示文件系统 q write file 保存配置文件 q show cpu statistic 显示CPU统计信息。 q 1、设置时间 q clock set HH:MM:SS <1-31> <1-12> <2000-2100> q 例:Fengine#clock set 14:28:30 10 9 2009 q 2、显示文件系统 q dir q 例: Fengine#dir q size date time name q -------- ------ ------ -------- q 11387 JAN-01-2000 00:01:16 startcfg q 1 files, total space: 11387 bytes q 0 directorys,available space: 2011136 bytes q 3、清空交换机的配置文件 erase startup-config 用于清空flash上保存的配置文件,但是以前的配置在系统上仍然生效,因此如果希望系统恢复到出厂状态,除了需要清空flash上的配置文件外,还需要重启设备

思科交换机路由器命令大全

思科交换机路由器命令 大全 YUKI was compiled on the morning of December 16, 2020

1. 交换机支持的命令:交换机基本状态: 交换机口令设置: 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 ;返回命令 交换机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 2switch(config-if)#switchport mode trunk ;设置为干线switch(config- if)#switchport trunk allowed vlan 1,2 ;设置允许 的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp域名switch(config)#vtp password ;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式 交换机设置IP地址: 交换机显示命令:

烽火网络POE交换机开通配置说明

烽火POE交换机通过console线进行配置,把console线网线一头插到交换机CON配置口,一头接串口转USB线,再把USB线那头插电脑U口,打开windows系统开始菜单——附件——通讯——超级终端,在超级终端里新建一个连接,选择相应的com口,然后参数设置调为默认,如图:

点确定,就可以连接交换机了,输入用户名admin,密码12345,就登陆到交换机配置界面了,默认是在#号特权模式,然后输入以下命令进行配置: S2200ME-PAF# S2200ME-PAF#config (进入全局配置模式) S2200ME-PAF(config)# S2200ME-PAF(config)#hostname HEZJK-MS-WLAN-ZJKYD-HB001-FHPOE (给交换机命名,不同地点的根据需要修改名字) HEZJK-MS-WLAN-ZJKYD-HB001-FHPOE(config)#int vlan 602(创建POE交换机网管vlan602,进入vlan配置模式,网管vlan这个数据都是移动提供) HEZJK-MS-WLAN-ZJKYD-HB001-FHPOE(config-vlan-602)#member 25-26 tagged (将上行口加入到POE交换机网管vlan里,这样才能从上层设备管理到本交换机,25-26表示25到26口,这里是24口交换机,25、26口作为上联口,随便接哪个都可以上联,所以这里把两个口都配上,tagged表示此口只接收带有vlan标记的帧) HEZJK-MS-WLAN-ZJKYD-HB001-FHPOE(config-vlan-602)#q (quit退出vlan配置模式) HEZJK-MS-WLAN-ZJKYD-HB001-FHPOE(config)#int e 25 (进入上联口25口进行配置) HEZJK-MS-WLAN-ZJKYD-HB001-FHPOE(config-eth-25)#duplex full speed 100 (将接口设置为强制百兆全双工模式,以使能和汇聚交换机百兆光口协商起来) HEZJK-MS-WLAN-ZJKYD-HB001-FHPOE(config-eth-25)#q HEZJK-MS-WLAN-ZJKYD-HB001-FHPOE(config)#int e 26 (在26口上进行同样的配置) HEZJK-MS-WLAN-ZJKYD-HB001-FHPOE(config-eth-26)#duplex full speed 100 HEZJK-MS-WLAN-ZJKYD-HB001-FHPOE(config-eth-26)#q

思科交换机配置维护手册

思科交换机配置维护手册

目录

一、端口配置 1.1 配置一组端口 当使用interface range命令时有如下的规则: ?有效的组范围: o vlan从1 到4094 o fastethernet槽位/{first port} - {last port}, 槽位为0 o gigabitethernet槽位/{first port} - {last port},槽位为0 o port-channel port-channel-number - port-channel-number, port-channel号从1到64 ?端口号之间需要加入空格,如:interface range fastethernet 0/1 – 5是有效的,而interface range fastethernet 0/1-5是无效的. ?interface range命令只能配置已经存在的interface vlan ?所有在同一组的端口必须是相同类别的。

见以下例子: Switch# configure terminal Switch(config)# interface range fastethernet0/1 - 5 Switch(config-if-range)# no shutdown 以下的例子显示使用句号来配置不同类型端口的组: Switch# configure terminal Switch(config)# interface range fastethernet0/1 - 3, gigabitethernet0/1 - 2 Switch(config-if-range)# no shutdown 1.2 配置二层端口 1.2.1 配置端口速率及双工模式

思科路由器命令大全详解

一 switch> 用户模式 1:进入特权模式enable switch> enable switch# 2:进入全局配置模式configure terminal switch> enable switch#c onfigure terminal switch(conf)# 3:交换机命名hostname aptech2950 以aptech2950为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令enable password cisco 以cisco为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码enable secret ciscolab 以cicsolab为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab 6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface vlan 1 aptech2950(conf-if)#ip address 配置交换机端口ip和子网掩码 aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exit aptech2950(conf)#ip default-gateway 设置网关地址 7:进入交换机某一端口interface fastehernet 0/17 以17端口为例switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface fastehernet 0/17 aptech2950(conf-if)# 8:查看命令show switch> enable

烽火交换机最常用配置命令

烽火交换机配置常用命令 一、连接方式: 1.超级连接:开始——程序——附件——通讯——超级链接——命名——还原默认——回车 2.Eth网口链接:设置为192.168.2.*地址段——开始——运行——telnet 192.168.2.1 二、登陆: Username:admin ------------ 使用着名称:admin Password :12345 ------------密码:12345 三、查看:S200mfb#show run ------------------查看系统运行★会看设备情况很重要 四、查看交换机端口情况:S200mfb#show interface-----------查看端口网速,在线情况。 五、进入配置模式:S200mfb#configure------------进入命令模式可以更改系统数据 六、给交换机命名:S200mfb(config)#hostname dianwuduan ---------给交换机命名电务段 七、创建vlan:并把端口加入vlan Dianwuduan(config)#interface vlan 301--------------------创建VLAN301 Dianwuduan(config-vlan-301)#member 16 tagged -------------将端口16加入vlan301设为上联口Dianwuduan(config-vlan-301)#q --------------- 退出VLAN301 Dianwuduan(config)#interface vlan 2005 ----------------创建VLAN2005 Dianwuduan(config-vlan-2005)#member 16 tagged----------------将端口16加入vlan2005设为上联口Dianwuduan(config-vlan-2005)#member 1-15 untagged--------将端口1-15加入vlan2005并不标记Dianwuduan(config-vlan-2005)#q -------------------------退出VLAN2005 八、端口隔离: Dianwuduan(config)#pvlan 1 --------------------进入本地固定隔离vlan1 Dianwuduan(config-pvlan-1)#isolate-ports 1-15------将端口1-15相互隔离★注意上联口不能隔离Dianwuduan(config-pvlan-1)#q-------------------退出pvlan1 九、上网出口:★ Dianwuduan(config)#port 1-15 pvid 2005 ------------指定端口1-15通vlan2005进行业务通讯 十、指定管理: Dianwuduan(config)#system ---------------------进入系统配置 Dianwuduan(config-system)#management vlan 301 ----------------指定管理vlan301 Dianwuduan(config-system)#ip address 172.16.1.103255.255.255.0--------指定ip地址,子网掩码Dianwuduan(config-system)#gateway 172.16.1.1 -------------------指定网关 Dianwuduan(config-system)#q ----------------退出系统配置 十一、设置端口网速: Dianwuduan(config)#int e 16 -----------------------进入端口16 Dianwuduan(config-e-16)#duplex full speed 100 ----------------强制端口16网速为100M全双工Dianwuduan(config-e-16)#q-------------------退出端口16 Duanwuduan(config)#q ----------------------------------退出命令模式 十二、保存数据:Dianwuduan#write file-------------------写保存 This will recover the configuration in the flash memory, Are you sure ? (y/n) ---------------------------------------是否保存y/n Y ------------------------------------------Y 保存N 不保存 十三、删除系统配置:Duanwuduan(config)#eraser starup-congfig-------删除系统配置★重启生效十四、把端口1设为上联口: Duanwuduan(config)# int e 1 ------------------进入端1 Dianwuduan(config-e-1)#join vlan 2005 tagged ---------- 将端口1设为vlan2005上联口Dianwuduan(config-e-1)#join vlan 301 tagged ---------- 将端口1设为vlan301上联口

思科基本配置命令详解

思科交换机基本配置实例讲解

目录 1、基本概念介绍............................................... 2、密码、登陆等基本配置....................................... 3、CISCO设备端口配置详解...................................... 4、VLAN的规划及配置........................................... 4.1核心交换机的相关配置..................................... 4.2接入交换机的相关配置..................................... 5、配置交换机的路由功能....................................... 6、配置交换机的DHCP功能...................................... 7、常用排错命令...............................................

1、基本概念介绍 IOS: 互联网操作系统,也就是交换机和路由器中用的操作系统VLAN: 虚拟lan VTP: VLAN TRUNK PROTOCOL DHCP: 动态主机配置协议 ACL:访问控制列表 三层交换机:具有三层路由转发能力的交换机 本教程中“#”后的蓝色文字为注释内容。 2、密码、登陆等基本配置 本节介绍的内容为cisco路由器或者交换机的基本配置,在目前版本的cisco交换机或路由器上的这些命令是通用的。本教程用的是cisco的模拟器做的介绍,一些具体的端口显示或许与你们实际的设备不符,但这并不影响基本配置命令的执行。 Cisco 3640 (R4700) processor (revision 0xFF) with 124928K/6144K bytes of memory. Processor board ID 00000000 R4700 CPU at 100MHz, Implementation 33, Rev 1.2

相关主题
文本预览
相关文档 最新文档