雏鹰部落

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 3349|回复: 5

各种交换机常用命令

[复制链接]
发表于 2007-4-16 12:41:57 | 显示全部楼层 |阅读模式
引自陈少松前辈总结:
o 交换机型号为:
1900,2900XL,2900Set,2948GL2,2950,
S2403H,Extreme
n 清除配置
n 创建VLAN
n 划分端口入VLAN
n 起TRUNK
n 配置管理IP及网关
n 开启生成树
1900
1900#delete nvram
1900(config)#vlan 2 name vlan2
1900(config)#int e0/2
1900(config-if)#vlan static 2
1900(config)#int fa0/27
1900(config-if)#trun ?
auto Set DISL state to AUTO
desirable Set DISL state to DESIRABLE
nonegotiate Set DISL state to NONEGOTIATE
off Set DISL state to OFF
on Set DISL state to ON
1900(config-if)#trun on
1900(config)#ip add 192.1.1.1 255.255.255.0
1900(config)#ip default-gateway 192.1.1.254
2900XL
2900xl#delete flash:?
2900xl#erase nvram:
2900xl#erase startup-config
2900xl#write erase
2900xl#vlan database
2900xl(vlan)#vlan 2 name vlan2
2900xl(config-if)#switchport access vlan 2
2900xl(config)#int fa0/2
2900xl(config)#int vlan 1
2900xl(config-if)#ip add 192.3.3.3 255.255.255.0
2900xl(config-if)#no sh
2900xl(config)#ip default-gateway 192.3.3.254
2900xl(config-if)#switchport trunk allowed vlan all
2900xl(config)#int fa0/12
Spanning-tree
2900xl(config)#spanning-tree ?
forward-time Set a Spanning Tree
FORWARD Interval
hello-time Set a Spanning Tree
HELLO Interval
max-age Set a Spanning Tree MAX
AGE Interval
portfast Allow a change **
blocking to forwarding
priority Set a Spanning Tree Priority
protocol Spanning tree protocol
type
uplinkfast Enable UplinkFast Feature
vlan VLAN Switch Spanning Trees
<cr>
2950
2950#write erase
2950#erase startup-config
2950#erase nvram:
2950#erase /all nvram:
2950#delete nvram:startup-config
2950#delete flash:vlan.dat
Switch(config-if)# switchport access vlan 2
Switch(config)#int fa0/2
Switch(config-if)#switchport trunk allowed vlan all
Switch(config)#int vlan 1
Switch(config-if)#ip add 192.2.2.2 255.255.255.0
Switch(config-if)#no sh
Switch(config)#ip default-gateway 192.2.2.254
Spanning-tree
Switch(config)#spanning-tree ?
backbonefast Enable BackboneFast Feature
etherchannel Spanning tree etherchannel specific
configuration
extend Spanning Tree 802.1t extensions
loopguard Spanning tree loopguard options
mode Spanning tree operating mode
mst Multiple spanning tree configuration
pathcost Spanning tree pathcost options
portfast Spanning tree portfast options
uplinkfast Enable UplinkFast Feature
vlan VLAN Switch Spanning Tree
2948G-L2
2948G> (enable) set ?
Set commands:
-----------------------------------------------------------------
-----------
set alias Set alias for command
set arp Set ARP table entry
set authentication Set TACACS authentication
set banner Set message of the day banner
set boot Set booting environment variable
set cam Set CAM table entry
set cdp Set cdp, use 'set cdp help' for more
info
set cgmp Set CGMP (enable/disable)
set enablepass Set privilege mode password
set help Show this message
set interface Set network interface configuration
set ip Set IP, use 'set ip help' for more info
set length Set screen's number of lines (0 to disable
'more')
set logging Set system logging configuration information
set logout Set number of minutes before automatic logout
set module Set module, use 'set module help' for more
info
set multicast Set multicast router port
set ntp Set NTP, use 'set ntp help' for more info
set password Set console password
set port Set port, use 'set port help' for more info
set prompt Set prompt
set protocolfilter Set protocol filtering
set snmp Set SNMP, use 'set snmp help' for more info
set span Set switch port analyzer
set spantree Set spanning tree information
set standbyports Set standby ports feature
(enable/disable).
set summertime Set summertime
set system Set system, use 'set system help' for
more info
set tacacs Set TACACS information
set time Set time
set timezone Set timezone
set trunk Set trunk ports
set vlan Set virtual LAN information
set vtp Set VLAN Trunk Information
2948G> (enable) clear config all
Console> (enable) set vtp domain gogo mode server
VTP domain gogo modified
Console> (enable) set vlan 2 name vlan2
Vlan 2 configuration successful
Console> (enable) set int sc0 1 192.4.4.4 255.255.255.0
Interface sc0 vlan set, IP address and netmask set.
Console> (enable) set ip alias default 192.4.4.254
Console> (enable) set vlan 2 2/2
Console> (enable) set trunk 2/50 on
Console> (enable) set spantree ?
Set spantree commands:
----------------------------------------------------------------------------
set spantree backbonefast Enable or disable fast convergence
set spantree disable Disable spanning tree
set spantree enable Enable spanning tree
set spantree fwddelay Set spantree forward delay
set spantree hello Set spantree hello interval
set spantree help Show this message
set spantree maxage Set spantree max aging time
set spantree portcost Set spantree port cost
set spantree portfast Set spantree port fast start
set spantree portpri Set spantree port priority
set spantree portvlancost Set spantree port cost per vlan
set spantree portvlanpri Set spantree port vlan priority
set spantree priority Set spantree priority
set spantree root Set switch as primary or secondary root
set spantree uplinkfast Enable or disable uplinkfast groups

S2403H
<2406H>reset saved-configuration
[2406H]vlan 2
[2406H-vlan2]description vlan2
[2406H-vlan2]port Ethernet 0/2
[2406H]int Ethernet 0/25
[2406H-Ethernet0/25]port trunk permit vlan all
[2406H]int vlan 1
[2406H-Vlan-interface1]ip add 192.5.5.5 255.255.255.0
[2406H-Vlan-interface1]un sh
[2406H]stp ?
bpdu-protection Specify global bpdu protection
disable Disable Spanning Tree Protocol
enable Enable Spanning Tree Protocol
mcheck Specify mcheck parameter
mode Specify state machine mode parameter
priority Specify bridge priority
root Specify root switch
timeout-factor Specify timeout factor of the spanning tree
protocol
timer Specify timers of spanning tree protocol
[2406H]stp enable
发表于 2007-4-16 15:20:28 | 显示全部楼层
<p>相当不错</p><p>支持原创!</p><p>支持楼主!!</p>
发表于 2010-6-9 22:56:26 | 显示全部楼层
非常受用,多谢
发表于 2010-7-23 13:14:36 | 显示全部楼层
看看 多学习
发表于 2010-10-20 17:32:56 | 显示全部楼层
多学习多学习
发表于 2010-10-20 21:51:31 | 显示全部楼层
完全没看懂阿。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )

GMT+8, 2024-11-23 00:24 , Processed in 0.075129 second(s), 18 queries , Gzip On.

快速回复 返回顶部 返回列表