交换机的配置命令

作者&投稿:彤阎 (若有异议请与网页底部的电邮联系)
交换机的基本命令~

  a、更改远程TELNNET密码
  Switch#configure terminal
  Switch(config)#line vty 0 4
  Switch(config-line)#password qycx123
  Switch(config-line)#login
  Switch(config-line)#exit
  b、更改进入全局配置模式时的密码
  Switch#configure terminal
  Switch(config)#enable secret qycx123
  思科交换机常用命令——创建并划分VLAN
  a、创建VLAN
  Switch#vlan database
  Switch(vlan)#vlan 99 name office (创建vlan 99 并命名为office)
  b、将端口划分至vlan
  Switch(config)#interface fastEthernet 0/8
  Switch(config-if)#switchport mode access
  Switch(config-if)#switchport access vlan 99 (将8号快速以太口划分至vlan 99)
  思科交换机常用命令——调试命令
  a、显示所有配置命令:Switch#show run
  b、显示所有接口状态:Switch#show ip int brief
  c、显示所有VLAN的信息:Switch#show vlan brief
  cisco交换机还是比较常用的,于是我研究了一下Cisco交换机命令的大总结,在这里拿出来和大家分享一下,希望对大家有用。我所针对的都是Cisco的设备而言的,华为的可以跟据手册来查,配置都是差不多的,这里华子就不多写华为的设备了,了解的也不是很多。
  Cisco交换机命令之使用Telnet远程式管理
  switch(config)#interface vlan 1 进入vlan 1
  switch(config-if)#ip address 设置IP地址
  switch(config-if)#ip default-gateway 设置默认网关
  switch(config)#line vty 0 4 进入虚拟终端
  switch(config-line)#login 允许登录
  switch(config-line)#password xx 设置登录口令
  switch#exit 返回命令
  Cisco交换机命令之控制台口令
  switch(config)#line console 0 进入控制台口
  switch(config-line)#login 允许登录
  switch(config-line)#password xx 设置登录口令
  switch#exit 返回命令
  Cisco交换机命令之基本接口配置
  switch(config)#interface f0/1 进入f0/1接口
  switch(config-if)#duplex full 配置全双工模式
  switch(config-if)#speed 100 配置速率
  switch(config-if)#description to ***** 接口描述
  switch(config)#ip domain-name ***.com 设置或名服务器
  switch(config)#mac-address-table aging-time 设置mac表超时时间
  switch#write 保存配置信息
  switch#copy running-config startup-config 保存当前配置nvram
  switch#erase startup-config 清除配置文件
  Cisco交换机命令之交换机VLAN设置:
  switch#vlan database 进入VLAN设置
  switch(vlan)#vlan 2 建VLAN 2
  switch(vlan)#name 名字 建VLAN 2的名称
  switch(vlan)#no vlan 2 删vlan 2
  注:删除vlan时原属于此vlan的端口处于非激活状态,直到重新分配为止。
  switch(config)#int f0/1 进入端口1
  switch(config-if)#switchport mode access 当前端口工作莫试
  switch(config-if)#switchport access vlan 2 当前端口加入vlan 2
  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中删除vlans
  switch(config-if)#switchport trunk pruning vlan remove 1,2 ;从Trunk中关闭局部修剪
  Cisco交换机命令之以太网通道配置
  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#show etherchannel 1 summary 查看通道信息
  switch#show etherchannel load-balance 查看通道信息
  Cisco交换机命令之vtp配置
  switch(config)#vtp domain 设置vtp域名
  switch(config)#vtp password 设置vtp密码
  switch(config)#vtp mode server 设置vtp服务器模式
  switch(config)#vtp mode client 设置vtp客户机模式
  switch(config)#vtp mode transparent 设置vtp 透明模式
  switch(config)#vtp version 设置vtp版本
  switch(config)#vtp pruning 启用vtp修解
  switch(config)#no vtp pruning 关闭vtp修解
  注:要想从vtp中减少一台交换机只需将该交换机vtp 名更改
  Cisco交换机命令之生成树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 指定交换机优先级(基于vlan)
  switch(config)#no spanning-tree vlan priority 将交换机的优先级恢复默认值(基于vlan)
  switch(config-if)#spanning-tree vlan cost 指定端口成本(起用trunk的端口模式下)
  switch(config-if)#spanning-tree vlan port-prioty 指定交换机端口优先级(基于vlan)
  switch(config-if)#spanning-tree portfast 配置速端口(连接终端设备的端口状态)如pc机
  switch(config)#spanning-tree uplinkfast 配置上行速端口
  switch(config)#spanning-tree vlan hello-time 配置交换机hello时间(基于vlan)
  switch(config)#spanning-tree vlan forward-time 修改转发延迟计时器(基于vlan)
  switch(config)#spanning-tree vlan max-time 修改最大老化时间(基于vlan)
  switch#show spanning-tree summery 检测vlan生成树配置
  switch#show spanning-tree vlan detail 浏览详细生成树配置信息
  switch#show spanning-tree interface detail 浏览详细生成树端口配置信息
  Cisco交换机命令之交换机显示命令:
  switch#show vtp status 查看vtp配置信息
  switch#show running-config 查看当前配置信息
  switch#show vlan 查看vlan配置信息
  switch#show interface 查看端口信息
  switch#show int f0/0 查看指定端口信息
  switch#dir flash: 查看闪存
  switch#show version 查看当前版本信息
  switch#show mac-address-table aging-time 查看mac超时时间
  switch#show cdp cisco设备发现协议 (可以查看聆接设备)
  switch#show cdp traffic 杳看接收和发送的cdp包统计信息
  switch#show cdp neighbors 查看与该设备相邻的cisco设备
  switch#show interface f0/1 switchport 查看有关switchport的配置
  switch#show cdp neighbors 查看与该设备相邻的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}

在基于CLI的交换机上设置以太网的链路模式:

switch(enable) set port duplex module/number {full|half}

8.在基于IOS的交换机上配置静态VLAN:

switch# vlan database

switch(vlan)# vlan vlan-num name vla

switch(vlan)# exit

switch# configure teriminal

switch(config)# interface interface module/number

switch(config-if)# switchport mode access

switch(config-if)# switchport access vlan vlan-num

switch(config-if)# end

在基于CLI的交换机上配置静态VLAN:

switch(enable) set vlan vlan-num [name name]

switch(enable) set vlan vlan-num mod-num/port-list

9. 在基于IOS的交换机上配置VLAN中继线:

switch(config)# interface interface mod/port

switch(config-if)# switchport mode trunk

switch(config-if)# switchport trunk encapsulation {isl|dotlq}

switch(config-if)# switchport trunk allowed vlan remove vlan-list

switch(config-if)# switchport trunk allowed vlan add vlan-list

在基于CLI的交换机上配置VLAN中继线:

switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]

Vlan-range [isl|dotlq|dotl0|lane|negotiate]

10.在基于IOS的交换机上配置VTP管理域:

switch# vlan database

switch(vlan)# vtp domain domain-name

在基于CLI的交换机上配置VTP管理域:

switch(enable) set vtp [domain domain-name]

11.在基于IOS的交换机上配置VTP 模式:

switch# vlan database

switch(vlan)# vtp domain domain-name

switch(vlan)# vtp {sever|cilent|transparent}

switch(vlan)# vtp password password

在基于CLI的交换机上配置VTP 模式:

switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]

12. 在基于IOS的交换机上配置VTP版本:

switch# vlan database

switch(vlan)# vtp v2-mode

在基于CLI的交换机上配置VTP版本:

switch(enable) set vtp v2 enable

13. 在基于IOS的交换机上启动VTP剪裁:

switch# vlan database

switch(vlan)# vtp pruning

在基于CL I 的交换机上启动VTP剪裁:

switch(enable) set vtp pruning enable

14.在基于IOS的交换机上配置以太信道:

switch(config-if)# port group group-number [distribution {source|destination}]

在基于CLI的交换机上配置以太信道:

switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}

15.在基于IOS的交换机上调整根路径成本:

switch(config-if)# spanning-tree [vlan vlan-list] cost cost

在基于CLI的交换机上调整根路径成本:

switch(enable) set spantree portcost moudle/port cost

switch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]

16.在基于IOS的交换机上调整端口ID:

switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority

在基于CLI的交换机上调整端口ID:

switch(enable) set spantree portpri {mldule/port}priority

switch(enable) set spantree portvlanpri {module/port}priority [vlans]

17. 在基于IOS的交换机上修改STP时钟:

switch(config)# spanning-tree [vlan vlan-list] hello-time seconds

switch(config)# spanning-tree [vlan vlan-list] forward-time seconds

switch(config)# spanning-tree [vlan vlan-list] max-age seconds

在基于CLI的交换机上修改STP时钟:

switch(enable) set spantree hello interval[vlan]

switch(enable) set spantree fwddelay delay [vlan]

switch(enable) set spantree maxage agingtiame[vlan]

18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:

switch(config-if)#spanning-tree portfast

在基于CLI的交换机端口上启用或禁用Port Fast 特征:

switch(enable) set spantree portfast {module/port}{enable|disable}

19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:

switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]

在基于CLI的交换机端口上启用或禁用UplinkFast 特征:

switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]

20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name cv

主要看你的是什么牌子的交换机
他上面带的书是最好的命令书的
很详细的
找不到书就用这个
看看可以吗
http://www.ktv8848.com/news/200611/9307.shtml

华3还是CISCO,一般的配置文档都可以在论坛里面找到,如果找不到的话,我这有一大堆~


华为交换机配置好以后,用什么命令查看以配置的信息。
[Quidway]ppp mp max-bind number 设置虚拟模板最大绑定数(1-100)帧中继配置命令 [Quidway-Serial0]link-protocol fr {mfr|ietf|nonstandard} 封装帧中继协议:IETF、Cisco兼容 [Quidway-Serial0]fr interface-type {dte|dce|nni} 配置帧中继接口类型,NNI为帧中继交换机之间的接口。若配为DCE或NNI...

交换机的命令行操作模式有哪几种?
网络交换机(外文名:Network switch,简称:交换机)是一种网络硬件,通过报文交换接收和转发数据到目标设备

如何把一部安卓手机应用的数据转移到另一部手机上
详情请查看视频回答

求CISCO交换机全命令配置文档
interface serial 5 进人接口serial 5的配置模式,也可以使用show命令ip access-group 将IP访问列表应用到一个接口ip address 设置一个接口或交换机IP地址ip classless 一个全局配置命令,用于告诉路由器当目的网络没有出现在路由表中时通过默认路由转发数据包ip default-gateway 设置该交换机的默认网关ip domain-lookup...

华为交换机端口及业务的常用查询命令
查看端口是否有错包及协商模式,可以使用命令display interface。此命令可以查看端口有无错包及两边的协商模式、半双工模式是否一样。查看端口配置,可以使用命令display current-configuration interface。查看端口状态,可以使用命令display interface brief。此命令可以查看端口是为Up\/Down状态。查看mac地址表信息,...

linux中man命令的基本用法linux中man
1)用户在shell换机中可以操作的指令或可执行文件 2)系统核心可乎叫的函数与工具 3)一些常用的函数(function)与函数库(library),大部分为c的函数库(libc)4)硬件文件说明,通常是\/dev\/的文件 5)配置文件或者是某些档案的格式 6)游戏(games)7)惯例与协议等,例如linux文件系统、网络协议、ASCII...

求机战AP男主角换机金手指代码
※使用这个密码,请采取照顾的备份存档,无论最后什么行动,切??记不要按×关闭菜单而是选择“待机”指令,否则可能会导致身体消失,甚至崩溃。_C0经验值AlexWong _L 0x803971D4 0x00050002 _L 0x1000BF68 0X00000000 副驾驶也有效。_C0 AlexWong生产的气动 _L 0xD0381644 0X00000000 _L 0x00396...

如何在Linux中使用man帮助使用man命令
1用户在shell换机中可以操作的指令或可执行文件 2系统核心可乎叫的函数与工具 3一些常用的函数(function)与函数库(library),大部分为c的函数库(libc)4硬件文件说明,通常是\/dev\/的文件 5配置文件或者是某些档案的格式 6游戏(games)7惯例与协议等,例如linux文件系统、网络协议、ASCIIcode等说明 ...

电脑指令关机设置完以后,会天天自动关机吗,还是需要天天设置,如何指令...
指令是一次性的 不会次次关机 关机指令 shutdown -s -t 1 回车 取消指令 shutdown -a 回车 定时关机 shutdown -s -t %d %d是数字数字是按秒计算的 就比如 10分钟后换机 %d就是600 半个小时换机就是1800 跟换机一样 关机指令的1是一秒 ...

我才买的酷派手机开机出现无命令可以要求换机吗
楼主你好,可以的,不过买家会恢复出厂设置应该就好了。数据出错导致,解决方法:Recovery模式恢复出厂设置方案,操作步骤如下:1、手机关机状态下,然后再开机,只要在启动手机的同时按下主页键和挂机键即可进入Recovery模式,2、在Recovery模式下选择Wipe date即可开始恢复出厂设置 ...

乌当区17755652194: 交换机与路由器的常用配置命令 -
简冯卡尼: 1. 交换机支持的命令: 交换机基本状态: switch: ;ROM状态, 路由器是rommon>hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态交换机口令设置: switch>enable ;进入特权模...

乌当区17755652194: 交换机配置相关命令是什么? -
简冯卡尼: 你那什么牌子的呀 他的设置大同小类了 我给你几个 前面是通用的 后面的你自己慢慢研究 不会问我了 交换机基本配置命令(3026) PCA login: root ;使用root用户 password: linux ;口令是linux # shutdown -h now ;关机 # init 0 ;关机 # logout ...

乌当区17755652194: 问一下..常用的交换机配置命令是什么啊?高手回答下....
简冯卡尼: 简单的 enable configuration terminal int 端口 ip add IP 掩码 no shut 激活端口 加vlan vlan trunk 模式 你上网搜索吧 很多很多.

乌当区17755652194: 在交换机上配置的命令都是什么? -
简冯卡尼: 进特权enable 进全局config terminal 进借口interface f0/0 这些都是简单的命令

乌当区17755652194: 华为交换机stp配置命令
简冯卡尼: &nbsp display stp 查看接口状态 display stp brief 修改STP优先级 stp priority 0 (优先级是4096的倍数) 交换机的接口状态由down到转发状态大概需要30S 边缘端口(接PC的端口) inter g/0/0/3 stp edged-port enable stp 根保护. &nbsp 建议到根桥的端口配置(指定端口) inter g/0/0/2 stp root-protection STP bpdu 保护.

乌当区17755652194: 交换机的配置命令是什么?
简冯卡尼: interface Vlan11 ip address 192.168.1.254 255.255.255.0 iphelper-address 192.168.0.169 DHCP Server IP interface Vlan12 ip address 192.168.1.254 255.255.255.0 ip helper-address 192.168.0.169 DHCP server IP

乌当区17755652194: 交换机的基本配置 -
简冯卡尼: cisco交换机配置清除、启动及基本配置 CISCO交换机基本配置 switch>ena 进入特权模式 switch#erase nvram 全部清除交换机的所有配置 switch#reload 重新启动交换机(初始提示符为switch> ) ---------------------------------------------------------------------...

乌当区17755652194: 配置交换机的常用命令是?
简冯卡尼: en conf t interface fasterthernet enable password vlan database switchport access vlan ? 基本就这些了~自己多看看书~

乌当区17755652194: 谁有交换机所以配置命令? -
简冯卡尼: 1.创建vlan 10Switch(config)#vlan 102.删除vlan 10 Switch(config)#no vlan 103.查看vlan 的配置Switch#show vlan brief4.在vlan 10 中添加端口 f0/2Switch(config)#interface f0/2Switch(config-if)#switchport mode accessSwitch(config-if)#...

乌当区17755652194: Cisco交换机如何配置有哪些命令呢?
简冯卡尼: 1924交换机上配置 sw1924_b#delete nvram 全部清除交换机的所有配置 sw1924_b#reload 重新启动交换机(初始提示符为> ) sw1924_b#hostname sw1924 设置交换机...

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 星空见康网