华为交换常用命令1.docx
- 文档编号:26180858
- 上传时间:2023-06-17
- 格式:DOCX
- 页数:24
- 大小:32.40KB
华为交换常用命令1.docx
《华为交换常用命令1.docx》由会员分享,可在线阅读,更多相关《华为交换常用命令1.docx(24页珍藏版)》请在冰豆网上搜索。
华为交换常用命令1
华为交换常用命令
.在基于IOS的交换机上设置主机名/系统名:
MSCBSC|移动通信网_dN_Z_w
S_l_S
switch(config)#hostnamehostname
_}/u2l.]__8c86102在基于CLI的交换机上设置主机名/系统名:
MSCBSC|移动通信网y_x3d_|,B%b%z
switch(enable)setsystemnamename-string
*w_`3U_QQ_c86102
(b_I%M;n_`'K861022.在基于IOS的交换机上设置登录口令:
MSCBSC|移动通信网
?
_y!
]7s&Z9?
J_j;D`
switch(config)#enablepasswordlevel1password
:
@_v_]K%i/KF8I_^86102在基于CLI的交换机上设置登录口令:
MSCBSC|移动通信网_R;J_n_I1W_w_}_Rz_M_I
switch(enable)setpassword
/Y;o_zs_j_z'D_^86102switch(enable)setenalbepassMSCBSC|移动通信网W_^*Y+F_W_]:
F0q_z9q
MSCBSC|移动通信网8})I_u5D3x_K;D'?
3a_w
3.在基于IOS的交换机上设置远程访问:
_R-}$x&p/L"h_o_S1X-T!
E_?
5q86102switch(config)#interfacevlan1
_F;C-h_o_{:
y*Y86102switch(config-if)#ipaddressip-addressnetmask
_I7{_a.tp_M/v7j_U_l86102switch(config-if)#ipdefault-gatewayip-address
_t*B.o_]_M86102在基于CLI的交换机上设置远程访问:
&I;\i_`]%jm-U_~86102switch(enable)setinterfacesc0ip-addressnetmaskbroadcast-address
_LE*D_M_~_w_yQ_l86102switch(enable)setinterfacesc0vlanMSCBSC|移动通信网_N+C0h-s_t8RG'?
switch(enable)setiproutedefaultgateway
`_^_MZ_~.G
wU_X7S_m86102
_n_I_z$X7r_L!
w861024.在基于IOS的交换机上启用和浏览CDP信息:
MSCBSC|移动通信网B_]5K7Y_iW_E_Z_h_s+m
switch(config-if)#cdpenableMSCBSC|移动通信网s&Q;@"j_Z;Q_h+@*N
switch(config-if)#nocdpenable
8B_X'|_}0Q_{86102为了查看Cisco邻接设备的CDP通告信息:
%^:
M_Yb{86102switch#showcdpinterface[typemodle/port]MSCBSC|移动通信网_J_z_[0q7s_z-R_um
switch#showcdpneighbors[typemodule/port][detail]
_Z_?
*V,u*p*d6s_v"K7k86102在基于CLI的交换机上启用和浏览CDP信息:
/@_I_u_a_y6m*L86102switch(enable)setcdp{enable|disable}module/portMSCBSC|移动通信网&G&L^%R;Y_Y:
flh
为了查看Cisco邻接设备的CDP通告信息:
MSCBSC|移动通信网$k_J"h4H_h
switch(enable)showcdpneighbors[module/port][vlan|duplex|capabilities|detail]MSCBSC|移动通信网_S_h.?
s`&f,P
MSCBSC|移动通信网_G$x4d#Pd_un_Y_i
5.基于IOS的交换机的端口描述:
_zJ-J_T'BIW_H%N3M(n86102switch(config-if)#descriptiondescription-stringMSCBSC|移动通信网_I:
X*}_V_D+`_t*d
基于CLI的交换机的端口描述:
MSCBSC|移动通信网9M4EU7}2u_@-hP
switch(enable)setportnamemodule/numberdescription-stringMSCBSC|移动通信网)g'm_R+U_`@
MSCBSC|移动通信网1H_~3E:
g#UD(\
R0P
6.在基于IOS的交换机上设置端口速度:
_LM#iNv3Vv_z86102switch(config-if)#speed{10|100|auto}
_D4p_?
*`W_ME_`_U86102在基于CLI的交换机上设置端口速度:
MSCBSC|移动通信网?
/e+X_}nN
switch(enable)setportspeedmoudle/number{10|100|auto}MSCBSC|移动通信网_b%d.b_[7]_?
o
switch(enable)setportspeedmoudle/number{4|16|auto}
+f3l)ks_j_mkJ86102
-F4yJ_q8`4g861027.在基于IOS的交换机上设置以太网的链路模式:
#uO_u_x_p_N86102switch(config-if)#duplex{auto|full|half}
2d_Hi(g_~,W86102在基于CLI的交换机上设置以太网的链路模式:
"J$w"__n)l_O86102switch(enable)setportduplexmodule/number{full|half}
3?
$I_M@:
?
:
u;?
_N.m86102
_n+}6k_R!
U_g:
F_F&T-@861028.在基于IOS的交换机上配置静态VLAN:
p%e_B6a/L86102switch#vlandatabaseMSCBSC|移动通信网0a_w_n"F']4\,X(^
switch(vlan)#vlanvlan-numnamevla
_zG8e*d_\_C_f86102
_Z5{_GX_NJ_ot86102switch(vlan)#exit
_I$t_b7Xiw.H:
Y"A_v_^86102switch#configureteriminalMSCBSC|移动通信网!
{%o
V1fT
switch(config)#interfaceinterfacemodule/number
'K/Z_i!
U_G(^.q_p86102switch(config-if)#switchportmodeaccessMSCBSC|移动通信网)V_N0g_tZPB$h_M5W
switch(config-if)#switchportaccessvlanvlan-numMSCBSC|移动通信网L_g/?
_V6uk[_G
switch(config-if)#end
_N3Md_Xp_h86102在基于CLI的交换机上配置静态VLAN:
MSCBSC|移动通信网-G_L,H4E)R_z_g
switch(enable)setvlanvlan-num[namename]
6[5]p%u%w_dg86102switch(enable)setvlanvlan-nummod-num/port-list
_dN_A_i1@"E86102MSCBSC|移动通信网[1^_g|5__c_?
_x
9.在基于IOS的交换机上配置VLAN中继线:
MSCBSC|移动通信网_i_E2YI_M/Q_S
switch(config)#interfaceinterfacemod/portMSCBSC|移动通信网+T'V_L_v_mD
J
switch(config-if)#switchportmodetrunkMSCBSC|移动通信网&V,C4R%t,ph_C
switch(config-if)#switchporttrunkencapsulation{isl|dotlq}MSCBSC|移动通信网_|
L,v_bW+G(R:
a9a
switch(config-if)#switchporttrunkallowedvlanremovevlan-listMSCBSC|移动通信网$k1Q5p"B
I%g]_Ms)U
switch(config-if)#switchporttrunkallowedvlanaddvlan-listMSCBSC|移动通信网y_]!
^)h+K
在基于CLI的交换机上配置VLAN中继线:
&OX%p6fg]c$M_[86102switch(enable)settrunkmodule/port[on|off|desirable|auto|nonegotiate]
_v*d_v_\'c_X0{_j86102Vlan-range[isl|dotlq|dotl0|lane|negotiate]MSCBSC|移动通信网_L_g_P"F7C4D#O
MSCBSC|移动通信网8q2i.]_A/\!
n
10.在基于IOS的交换机上配置VTP管理域:
MSCBSC|移动通信网!
{_qtd,B7](zS
switch#vlandatabase
_e*n,dT(O2Gf8B_T_C(I86102switch(vlan)#vtpdomaindomain-name
_d_?
2p_R"SN1c86102在基于CLI的交换机上配置VTP管理域:
_Yu-g/P4]:
z+D_k_X86102switch(enable)setvtp[domaindomain-name]
_B'v_B9th_]"f%S"O86102
8s*I,ED3c,o8610211.在基于IOS的交换机上配置VTP模式:
_af"p7Q+r0H$Es_D86102switch#vlandatabaseMSCBSC|移动通信网1r_S_PeI8?
switch(vlan)#vtpdomaindomain-nameMSCBSC|移动通信网_C0FE"d_N_h?
A9T
switch(vlan)#vtp{sever|cilent|transparent}MSCBSC|移动通信网2H_?
_q-T;~_?
_x
switch(vlan)#vtppasswordpasswordMSCBSC|移动通信网_n0n"]__4v/YK1i_e_K_d
在基于CLI的交换机上配置VTP模式:
0|;[_d_Z_V_Q#]_B-E86102switch(enable)setvtp[domaindomain-name][mode{sever|cilent|transparent}][passwordpassword]
i_L&k_zek3@86102MSCBSC|移动通信网'P_l6j_S5@_E.P
12.在基于IOS的交换机上配置VTP版本:
MSCBSC|移动通信网
Z,B_S-g%m-^_m_C7e
switch#vlandatabaseMSCBSC|移动通信网_e8Xd_t2v_p'v_s
switch(vlan)#vtpv2-mode
;i_Y!
U_u3O0b%I%M_Z86102在基于CLI的交换机上配置VTP版本:
MSCBSC|移动通信网'i*|_U,m+Y!
T9D:
o
switch(enable)setvtpv2enable
)u'E_HHQ_S*n86102MSCBSC|移动通信网7__],?
:
C*N_P_^_W,n_H
13.在基于IOS的交换机上启动VTP剪裁:
_R,kX/i0f/S_n_?
2{86102switch#vlandatabaseMSCBSC|移动通信网.I(i9l_b[_y}
switch(vlan)#vtppruningMSCBSC|移动通信网'?
"UUN_@T
在基于CLI的交换机上启动VTP剪裁:
_U6b:
w:
},Z_A|(P86102switch(enable)setvtppruningenable
S0OP_?
1B'p_FC86102
_M'F]/G_j8610214.在基于IOS的交换机上配置以太信道:
MSCBSC|移动通信网3J:
o1nV&\]_k,v_g
switch(config-if)#portgroupgroup-number[distribution{source|destination}]
_X_\w8I_g_a_z86102在基于CLI的交换机上配置以太信道:
%r_\+G_I"i_t86102switch(enable)setportchannelmoudle/port-rangemode{on|off|desirable|auto}
(]_F0M_C7K4Tu86102MSCBSC|移动通信网__d"q4KS_d7K_h4N
15.在基于IOS的交换机上调整根路径成本:
MSCBSC|移动通信网5l_p_g9j_s8i
switch(config-if)#spanning-tree[vlanvlan-list]costcostMSCBSC|移动通信网_X_db_u
O;m
在基于CLI的交换机上调整根路径成本:
_v#G8h,Z_S$]_b)tQ&O86102
#I_i_N_W_z_B86102switch(enable)setspantreeportcostmoudle/portcostMSCBSC|移动通信网_G.^_F:
R%@%X:
m-H4i(N
switch(enable)setspantreeportvlancostmoudle/port[costcost][vlan-list]MSCBSC|移动通信网#^_vX_X_k+a/s0W
MSCBSC|移动通信网_~_s_})c#IQ2`
16.在基于IOS的交换机上调整端口ID:
MSCBSC|移动通信网'o_c_A_pm_EW_R_F"f+s
switch(config-if)#spanning-tree[vlanvlan-list]port-priorityport-priorityMSCBSC|移动通信网+S2Jb_p!
D:
^
在基于CLI的交换机上调整端口ID:
#q0b,l+^%@_~86102switch(enable)setspantreeportpri{mldule/port}priorityMSCBSC|移动通信网8n_ebJ_b(Vdr\
switch(enable)setspantreeportvlanpri{module/port}priority[vlans]MSCBSC|移动通信网(F"[d_L_~_^_q
_aAcG_I_Z_M8610217.在基于IOS的交换机上修改STP时钟:
-r/}_@_N*y86102switch(config)#spanning-tree[vlanvlan-list]hello-timeseconds
_c'm_}_K_s7u_W86102switch(config)#spanning-tree[vlanvlan-list]forward-timeseconds
3M%UR9s_Gu_l_i86102`switch(config)#spanning-tree[vlanvlan-list]max-ageseconds
_D8|&p_x2L3\86102在基于CLI的交换机上修改STP时钟:
_f_S_L_@_m_f(]J'o#M!
GL86102switch(enable)setspantreehellointerval[vlan]
*I_C)x6[_G_r.V+F86102switch(enable)setspantreefwddelaydelay[vlan]MSCBSC|移动通信网5Df_V_c.vz_N
switch(enable)setspantreemaxageagingtiame[vlan]MSCBSC|移动通信网0t0h5n_t*?
2P6s_I
MSCBSC|移动通信网_Q_n0^_r_H1Z3\.A4\
18.在基于IOS的交换机端口上启用或禁用PortFast特征:
MSCBSC|移动通信网_t_^(`)W_}'J_f_Z
switch(config-if)#spanning-treeportfast
kr_kA_h_q
oW"I_f86102在基于CLI的交换机端口上启用或禁用PortFast特征:
#o$?
;kJ_qO86102switch(enable)setspantreeportfast{module/port}{enable|disable}MSCBSC|移动通信网9_D+?
;B;y$D,@
_Y_E_W:
I_K_~_C?
*j-N]_[_Q8610219.在基于IOS的交换机端口上启用或禁用UplinkFast特征:
MSCBSC|移动通信网9l*o_y_sP#{:
Gm&f
switch(config)#spanning-treeuplinkfast[max-update-ratepkts-per-second]MSCBSC|移动通信网_L/V]5f:
j_N+B#I-v
在基于CLI的交换机端口上启用或禁用UplinkFast特征:
MSCBSC|移动通信网R*E/Gt_^
switch(enable)setspantreeuplinkfast{enable|disable}[rateupdate-rate][all-protocolsoff|on]
_F(T(ME_\_n#R4{r86102MSCBSC|移动通信网n_N6z_R@9M
__M_m_O
20.为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令:
switch(config)#clusterenablecluster-name
;};j_F3XI+s_t2q86102
k_p_r_C_D8610221.为了从一条中继链路上删除VLAN,可使用下列命令:
_tUC_Mg#X6a.G86102switch(enable)cleartrunkmodule/portvlan-rangeMSCBSC|移动通信网_P_[_W_t,GF
_X-]`On%m/X_j0z8610222.用showvtpdomain显示管理域的VTP参数.MSCBSC|移动通信网5XDU_S_M0]/|U_m_i
_y%E_p5I1O%|,O%k_w/t8610223.用showvtpstatistics显示管理域的VTP参数.
_u/H_\g6H"o:
F86102
_a6H_}C
h_[_`8610224.在Catalyst交换机上定义TrBRF的命令如下:
_r\"d#a_U_V86102switch(enable)setvlanvlan-name[namename]typetrbrfbridgebridge-num[stp{ieee|ibm}]
_G0?
/z2e_S0X$Y.u0h86102MSCBSC|移动通信网6MB_c_n_c&~_n_Ca
25.在Catalyst交换机上定义TrCRF的命令如下:
_ic_X-A_jt0H*O86102switch(enable)setvlanvlan-num[namename]typetrcrfMSCBSC|移动通信网/V7s4Q`_A
{ringhex-ring-num|decringdecimal-ring-num}parentvlan-numMSCBSC|移动通信网;u_m_[&o-Z_n8h
eM3{4~_W_p_e8610226.在创建好TrBRFVLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:
3?
$i.K_u4e+N86102switch(enable)setvlanvlan-nummod-num/port-numMSCBSC|移动通信网$Xq)J"c_Z_f_C1B
D)F_r*b_^H_^/?
)}_kO8610227.命令showspantree显示一个交换机端口的STP状态.
Y_W_w-[-s&y_W,a86102MSCBSC|移动通信网%P"^_Hu_a1J_m:
A_w
28.配置一个ELAN的LES和BUS,可以使用下列命令:
w6T4W_t(a86102ATM(config)#interfaceatmnumber.subintmultioint
;S1P_z_Hm_|9k_x_U2f_i_l86102ATM(config-subif)#laneserber-busethernetelan-name
%}_Y_{|e_ke+e_a_q86102MSCBSC|移动通信网_~_@_x_p8b-N
29.配置LECS:
MSCBSC|移动通信网_B(n_j1t"r_r_H_~2P
ATM(config)#lanedatabasedatabase-name
z/U7F_D:
U_b_v_i86102ATM(lane-config-databade)#nameelan1-nameserver-atm-addressles1-nsap-addressMSCBSC|移动通信网_b_yRI0]pe)x2G
ATM(lane-config-databade)#nameelan2-nameserver-atm-addressles2-nsap-address
_c_Q+I_]_K_z_^|86102ATM(lane-config-databade)#name…
bh)_+U2O
f)n_h86102MSCBSC|移动通信网_I;E3]]_E_v#_6Z%N_p
30.创建完数据库后,必须在主接口上启动LECS.命令如下:
MSCB
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 华为 交换 常用命令