华为交换常用命令

上一篇 / 下一篇  2008-03-18 14:53:46 / 不允许评论 / 个人分类:职场人生

.在基于IOS的交换机上设置主机名/系统名:
lz%iQ&IX)lB0switch(config)# hostname hostname 移动通信网(MSCBSC)-jhEb.M\D%O#\
在基于CLI的交换机上设置主机名/系统名:
%y4r*L8M#{5z0switch(enable) set system name name-string 移动通信网(MSCBSC)m Z:?u.X
移动通信网(MSCBSC)r*z};C"hx7_w
2.在基于IOS的交换机上设置登录口令:
/nSw,y[WL!wS0switch(config)# enable password level 1 password 移动通信网(MSCBSC)3bH$nz)T-X
在基于CLI的交换机上设置登录口令:
#L%s)oy#C$Ga.I0switch(enable) set password 移动通信网(MSCBSC)"wf1K\1D$Uc
switch(enable) set enalbepass
{ L&FF;Z,i1E:slz0移动通信网(MSCBSC);M+CG6k8hB8N
3.在基于IOS的交换机上设置远程访问:
?-b#g(U"@3P7O0switch(config)# interface vlan 1 移动通信网(MSCBSC))h t] EB`E
switch(config-if)# ip address ip-address netmask
4q}5G Od.xnc0switch(config-if)# ip default-gateway ip-address
Ktx;N3C9xWE0在基于CLI的交换机上设置远程访问:
,}5p"`]o"]"kt+`1r0switch(enable) set interface sc0 ip-address netmask broadcast-address
^Vg_dDS'w7K0switch(enable) set interface sc0 vlan 移动通信网(MSCBSC)%WrfY qg"a.sMa
switch(enable) set ip route default gateway 移动通信网(MSCBSC)*Ei5sE}6t
移动通信网(MSCBSC)N@^c1]&[
4.在基于IOS的交换机上启用和浏览CDP信息: 移动通信网(MSCBSC)*C5j mEb.`'c
switch(config-if)# cdp enable
;y0^3@i-Z;[0switch(config-if)# no cdp enable 移动通信网(MSCBSC)0rA4s-~"C%t'H(K
为了查看Cisco邻接设备的CDP通告信息: 移动通信网(MSCBSC)!x:Cy3a#uVO\uYq
switch# show cdp interface [type modle/port]
/X8o*q*wf6?&vG|0switch# show cdp neighbors [type module/port] [detail] 移动通信网(MSCBSC)m-i"][$z:s/l
在基于CLI的交换机上启用和浏览CDP信息:
{Bz!u.f0switch(enable) set cdp {enable|disable} module/port
pl-S w$vf3o0为了查看Cisco邻接设备的CDP通告信息:
+?lp7x8[:nb _,|0CVB0switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]
/mn z%uV G{0
6e{:K jO6?%^P6]05.基于IOS的交换机的端口描述: 移动通信网(MSCBSC)&QqACV:z \ I
switch(config-if)# description description-string
(k0QT*o5h _!r-\[0基于CLI的交换机的端口描述:
#wBaQ[0switch(enable)set port name module/number description-string 移动通信网(MSCBSC)"P:nx:k4rh/^Wt;e
移动通信网(MSCBSC)y$k,g(q bZ z
6.在基于IOS的交换机上设置端口速度:
sj G4B8J8OR!v0switch(config-if)# speed{10|100|auto} 移动通信网(MSCBSC);gw S9EP0d'VU8q
在基于CLI的交换机上设置端口速度: 移动通信网(MSCBSC)*a"m0h-{.`t'Ue
switch(enable) set port speed moudle/number {10|100|auto} 移动通信网(MSCBSC)sApS3d(t@3o
switch(enable) set port speed moudle/number {4|16|auto}
zk p6Up/a!f;O6K`0
k"zo\/^q7K07.在基于IOS的交换机上设置以太网的链路模式: 移动通信网(MSCBSC)!Z5OV&Fr8de
switch(config-if)# duplex {auto|full|half}
L qy&j-I~3RK_0在基于CLI的交换机上设置以太网的链路模式: 移动通信网(MSCBSC)"i"VC X!E n J
switch(enable) set port duplex module/number {full|half}
-Wdj|~R[I*}0
O0](C7cJ],U08.在基于IOS的交换机上配置静态VLAN:
}M8_C'o(a x N7|0switch# vlan database 移动通信网(MSCBSC)\.gnL|)x#o
switch(vlan)# vlan vlan-num name vla 移动通信网(MSCBSC)9pUoxOBwd

B e,dS|b#f0switch(vlan)# exit 移动通信网(MSCBSC) kh X(U1R`X
switch# configure teriminal 移动通信网(MSCBSC)1khp r2|Ytr
switch(config)# interface interface module/number 移动通信网(MSCBSC)vI'?(Emisa|
switch(config-if)# switchport mode access
.gkjP6jlm8k?0switch(config-if)# switchport access vlan vlan-num 移动通信网(MSCBSC)0@.[hWG$_
switch(config-if)# end
c$p'K A2d0ek0在基于CLI的交换机上配置静态VLAN:
sj"y]#c B%_O"j0switch(enable) set vlan vlan-num [name name]
+U#Kr9])NU7~0switch(enable) set vlan vlan-num mod-num/port-list
R{F QY5Z,B U0移动通信网(MSCBSC) t*? T!@ G
9. 在基于IOS的交换机上配置VLAN中继线: 移动通信网(MSCBSC) W?M+WCpp+l
switch(config)# interface interface mod/port
-\d'UuKz[#k3a0switch(config-if)# switchport mode trunk
VJ9WM~UQ"VK0switch(config-if)# switchport trunk encapsulation {isl|dotlq}
8q&tS*vM2DU,`i#l0switch(config-if)# switchport trunk allowed vlan remove vlan-list 移动通信网(MSCBSC)x&hc%@aQ
switch(config-if)# switchport trunk allowed vlan add vlan-list 移动通信网(MSCBSC)"gOM|:e
在基于CLI的交换机上配置VLAN中继线:
P,TGq.d~/SU0switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate] 移动通信网(MSCBSC)YU!_fPjls!Q9b
Vlan-range [isl|dotlq|dotl0|lane|negotiate] 移动通信网(MSCBSC) hN:K Y@{9Gd
移动通信网(MSCBSC)4H8CVT ^'x;{e)d
10.在基于IOS的交换机上配置VTP管理域:
3K`LTx,QE0switch# vlan database
8GoW5Y)JdDcJ0switch(vlan)# vtp domain domain-name 移动通信网(MSCBSC)] fQ ?o9S.[Q
在基于CLI的交换机上配置VTP管理域: 移动通信网(MSCBSC)/wWS$~7E0{Tk_(A
switch(enable) set vtp [domain domain-name]
Q"Hnvm4vT1A0移动通信网(MSCBSC) ACB%{?w0_
11.在基于IOS的交换机上配置VTP 模式:
m`!N5g:q+A0switch# vlan database 移动通信网(MSCBSC):M3r X6n0mR {/US
switch(vlan)# vtp domain domain-name 移动通信网(MSCBSC)e3JdSy c9o
switch(vlan)# vtp {sever|cilent|transparent}
OVJ{vl0switch(vlan)# vtp password password
hS&}p0R?!dX0在基于CLI的交换机上配置VTP 模式: 移动通信网(MSCBSC)b&W4sD,qnN-Rn
switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password] 移动通信网(MSCBSC)0Ns_ l}xu

&z7c+]n:eo012. 在基于IOS的交换机上配置VTP版本: 移动通信网(MSCBSC)9HZ n/I y.d+t
switch# vlan database 移动通信网(MSCBSC)FchDaE1[^B
switch(vlan)# vtp v2-mode
Q&E yx:HwU0在基于CLI的交换机上配置VTP版本:
#|+F#RXeFi p0switch(enable) set vtp v2 enable
[8]-R*N U+p0
&s)~*p9D p9{013. 在基于IOS的交换机上启动VTP剪裁: 移动通信网(MSCBSC)&A-`+Xn*~7T
switch# vlan database 移动通信网(MSCBSC)%P5tg/i uI'NCV_m
switch(vlan)# vtp pruning
$P!gvo7ks.GE0在基于CL I 的交换机上启动VTP剪裁: 移动通信网(MSCBSC)p&jx3m K&V(xu
switch(enable) set vtp pruning enable
H1xw}"V1o0移动通信网(MSCBSC)W:G(Ez5p
14.在基于IOS的交换机上配置以太信道:
C_)x^)S1^FLt0switch(config-if)# port group group-number [distribution {source|destination}] 移动通信网(MSCBSC)0_;AI.U!L|I:l
在基于CLI的交换机上配置以太信道: 移动通信网(MSCBSC)&mqU:ZH9U)Q6VV
switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto} 移动通信网(MSCBSC){/J+vP9Fq;a

{/uoNwY015.在基于IOS的交换机上调整根路径成本:
!uOmsO*@R8x0switch(config-if)# spanning-tree [vlan vlan-list] cost cost 移动通信网(MSCBSC)+Q3]n!JGh
在基于CLI的交换机上调整根路径成本: 移动通信网(MSCBSC)j]pqQ}G

U[[pgN0switch(enable) set spantree portcost moudle/port cost
0a gaE ka;ic0switch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]
oC `*s2h0移动通信网(MSCBSC)]7^qo x/} d(V ZD
16.在基于IOS的交换机上调整端口ID:
g'p'J7i[od`{0switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority
,Gp q1g9Ru"p/c^0在基于CLI的交换机上调整端口ID: 移动通信网(MSCBSC)X$t"Qg q0MF2c
switch(enable) set spantree portpri {mldule/port}priority 移动通信网(MSCBSC)8C4V]l D
switch(enable) set spantree portvlanpri {module/port}priority [vlans] 移动通信网(MSCBSC)| \8Wx,fR
移动通信网(MSCBSC)X+Ji/Y?W
17. 在基于IOS的交换机上修改STP时钟:
q/kDd]nK`0switch(config)# spanning-tree [vlan vlan-list] hello-time seconds
X#B lTO'c0switch(config)# spanning-tree [vlan vlan-list] forward-time seconds 移动通信网(MSCBSC)'V;u aql,d3fyn
` switch(config)# spanning-tree [vlan vlan-list] max-age seconds 移动通信网(MSCBSC)Ne]Tt| pl
在基于CLI的交换机上修改STP时钟: 移动通信网(MSCBSC)oqN(R/?:|
switch(enable) set spantree hello interval[vlan]
)|]"t_ @eS0switch(enable) set spantree fwddelay delay [vlan] 移动通信网(MSCBSC)+d}8` v#Vv(j c
switch(enable) set spantree maxage agingtiame[vlan]
(M W*{4n![8t@0
I `+`)C!O.rS/W018. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:
nUU a2j(ds:[0switch(config-if)#spanning-tree portfast
i$DuI h0在基于CLI的交换机端口上启用或禁用Port Fast 特征:
6~,_9@-x Er0switch(enable) set spantree portfast {module/port}{enable|disable} 移动通信网(MSCBSC)!^ff }c:v

i-Ie L+B Dk&vhI019. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:
/WjE fHh0switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]
]3}P8J9rUg+@,vB0在基于CLI的交换机端口上启用或禁用UplinkFast 特征:
/_ ra/dx*HCDr0switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]
ZeF t9E0
~ nt"z!jS,mLX B020. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name 移动通信网(MSCBSC)4I4}/v2F2y
移动通信网(MSCBSC)}J!N*UZxb%k Z
21. 为了从一条中继链路上删除VLAN,可使用下列命令:
Qq1O;@1~w0xE(f#X0switch(enable) clear trunk module/port vlan-range 移动通信网(MSCBSC)"G#e;Q$Njt.QoZ)u&x

@'DeH.w022. 用show vtp domain 显示管理域的VTP参数.
-x Yk%d K0移动通信网(MSCBSC) B!W'F BWdaH
23. 用show vtp statistics显示管理域的VTP参数. 移动通信网(MSCBSC)Nu$bV;Nf-G5P3B}d
移动通信网(MSCBSC)q5s{(o3{ N
24. 在Catalyst交换机上定义TrBRF的命令如下: 移动通信网(MSCBSC)~8nM+?N.i3I,qMx%O
switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}] 移动通信网(MSCBSC) vD\v(`/Q*K

[)g ~S3C4x025. 在Catalyst交换机上定义TrCRF的命令如下: 移动通信网(MSCBSC).x*O qzH A
switch (enable) set vlan vlan-num [name name] type trcrf 移动通信网(MSCBSC)%tXv-i0U1R c \A
{ring hex-ring-num|decring decimal-ring-num} parent vlan-num
sm0q{r1s0
o:Y\'H M,]%?026. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口: 移动通信网(MSCBSC)/a8W7eSq|;b6AO
switch(enable) set vlan vlan-num mod-num/port-num 移动通信网(MSCBSC)6V*Z K&_;i

$^A0Ze ].^y027. 命令show spantree显示一个交换机端口的STP状态.
mo Z]+CQ+V5Y0
@-~ SD/vj-e:j;L028. 配置一个ELAN的LES和BUS,可以使用下列命令:
8w*Z/X-i5H-[a0ATM (config)# interface atm number.subint multioint
}H-w8P;i)_[S0ATM(config-subif)# lane serber-bus ethernet elan-name
z*a2Kg6l9A0c0
$iw@/B8] N/E i6h029. 配置LECS: 移动通信网(MSCBSC)0?o _{r;[
ATM(config)# lane database database-name 移动通信网(MSCBSC)v:R~J!h#``*bd
ATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address 移动通信网(MSCBSC)U9P6wI+m'F;s
ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address 移动通信网(MSCBSC);o8b2Fx_k
ATM(lane-config-databade)# name … 移动通信网(MSCBSC)n G2},u9h;U+QJ|$?
移动通信网(MSCBSC)'A+C]&@&@*Mw4~D&~?mK
30. 创建完数据库后,必须在主接口上启动LECS.命令如下:
{;g1RA'|[9[0ATM(config)# interface atm number
a{3Nlu&O{0ATM(config-if)# lane config database database-name 移动通信网(MSCBSC)Ifl{#D/GF-B"i.G
ATM(config-if)# lane config auto-config-atm-address
,{(?9|o S Ue:Q0
8Q7[n_7S'A031. 将每个LEC配置到一个不同的ATM子接口上.命令如下: 移动通信网(MSCBSC) n,M"U5g#F%B~
ATM(config)# interface atm number.subint multipoint 移动通信网(MSCBSC)x7~6D*^-gI
ATM(config)# lane client ethernet vlan-num elan-num
Y's&NfTQ0移动通信网(MSCBSC) [d:cjr @&C.f~
32. 用show lane server 显示LES的状态. 移动通信网(MSCBSC) `#^*S Zr$u*DF0l

k2G,q:z7hEwB033. 用show lane bus显示bus的状态.
W g#j-E@"wF0移动通信网(MSCBSC) N`p6BNg!U
34. 用show lane database显示LECS数据库可内容. 移动通信网(MSCBSC) W3H3z0f2OR Z

J4o8B8s`G'Lr4_v035. 用show lane client显示LEC的状态.
1R'ua#C3p/R-c g,L5ZD0移动通信网(MSCBSC),j x`S:i/s X"m2z"]8a
36. 用show module显示已安装的模块列表.
J~h(u6`#j0
2LI:WG X+e jq(s9M-y#N037. 用物理接口建立与VLAN的连接:
K*} x'A*j.E#S8w2g0Lt^Qt0router# configure terminal
h@RQ-]p0router(config)# interface media module/port
#k |*~t*AJ%H]0router(config-if)# description description-string
bO~"v8w7`$B0router(config-if)# ip address ip-addr subnet-mask
N|z"RD0router(config-if)# no shutdown
V5r5y F*\uT0移动通信网(MSCBSC)Wi3K1LI
38. 用中继链路来建立与VLAN的连接:
)wz*i$Pp BL|O0router(config)# interface module/port.subinterface
"Lv vY,N2l-}9k~0router(config-ig)# encapsulation[isl|dotlq] vlan-number
y qB&@\?.c+@h0router(config-if)# ip address ip-address subnet-mask
` i(Z2[~.WG&a(`0
W-^S\]039. 用LANE 来建立与VLAN的连接:
;B.|.~@Z0U*p e0router(config)# interface atm module/port
E8a$s*sm0router(config-if)# no ip address
!hQSvi`Y g)p0router(config-if)# atm pvc 1 0 5 qsaal
-~QK-W4~'@\;{0router(config-if)# atm pvc 2 0 16 ilni 移动通信网(MSCBSC)$y#n-B/hpl8cS
router(config-if)# interface atm module/port.subinterface multipoint
3Kv2Q PI2q[0router(config-if)# ip address ip-address subnet-mask 移动通信网(MSCBSC)E:T jeH E-| f
router(config-if)# lane client ethernet elan-num 移动通信网(MSCBSC)4c3_H1o B
router(config-if)# interface atm module/port.subinterface multipoint
u*@s-h.`/if*e0router(config-if)# ip address ip-address subnet-name 移动通信网(MSCBSC)6E_8s _6D Bn
router(config-if)# lane client ethernet elan-name
#f\iMZ9x9W0router(config-if)# … 移动通信网(MSCBSC)J`2mD}x

'[ I#u5~8NA5f040. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:
uk`SB1u1\Y0router(config)# ip routing
KRm0] Fmd7y0router(config)# router ip-routing-protocol
P M{C^y i0router(config-router)# network ip-network-number
{%}x1vQ0router(config-router)# network ip-network-number
)` L@~wU0
!Q7IN8{,p$x6^L.I041. 配置默认路由:
&S!l@%js@0q0switch(enable) set ip route default gateway 移动通信网(MSCBSC) N G `/e*d+f^;P L
移动通信网(MSCBSC)fYP+Q3M-j
42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:
a/?|@3m5o1T5N7qr0router(config)# interface interface number 移动通信网(MSCBSC)]NMg(G:u c
router(config-if)# mls rp vlan-id vlan-id-num 移动通信网(MSCBSC)8Xoa4_.e$\

!z&Dxr0KM8A-T043. 在路由处理器启用MLSP:
TM$U.mw2Y.R1w0router(config)# mls rp ip
#I,^xrp0
$Rx*TzB.U|044. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中: 移动通信网(MSCBSC)h[L-T/liT ]
router(config)# interface interface number
8{(c3Q]`!xth0router(config-if)# mls rp vtp-domain domain-name 移动通信网(MSCBSC)u}*m2I.^$n

-[ ^{?#S045. 查看指定的VTP域的信息: 移动通信网(MSCBSC)9[OS$R(?%_5w
router# show mls rp vtp-domain vtp domain name 移动通信网(MSCBSC)R1gs Y]7a%`[!G

f&Ca`eD @046. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令: 移动通信网(MSCBSC)1q IWR0ueg-uI:y
router(config-if)#mls rp management-interface 移动通信网(MSCBSC)&y1q)D `e'xE$h2y oV r
移动通信网(MSCBSC)7\^lFk~
47. 要检验MLS-RP的配置情况: 移动通信网(MSCBSC).p0JT/K#f4w
router# show mls rp
([+{BS"a1Wz_0移动通信网(MSCBSC)dACF Z:]C
48. 检验特定接口上的MLS配置:
#{d9VoWO0router# show mls rp interface interface number
({ ^*U[ye5k0
(kwh+m4P!jY:P049. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表: 移动通信网(MSCBSC)q&^d wGQ;m
set mls flow [destination|destination-source|full] 移动通信网(MSCBSC)yUIk jg
移动通信网(MSCBSC),wP8g.BEC-[.D f
50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令: 移动通信网(MSCBSC)/V,GYI3OM0^
router(config)# mls rp ip input-acl 移动通信网(MSCBSC)5^6tkI*|0J
移动通信网(MSCBSC)P9l.d#F)Mm+w@'E
51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:
-M)l3]/aIL j}!j0switch(enable) set mls enable
9]+gc:R{%_0移动通信网(MSCBSC)yP0n|1H:W P
52. 若想改变老化时间的值,可在特权模式下输入以下命令:
d}*P I'W6sf3Us0switch(enable) set mls agingtime agingtime
B5^[9w/E@0
"N,{6j6C|/d L].T\$y053. 设置快速老化:
3N2E V$v|B b0switch(enable) set mls agingtime fast fastagingtime pkt_threshold 移动通信网(MSCBSC)%b|6G7Ll}S)Aq
移动通信网(MSCBSC)PfD8Y`
54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定: 移动通信网(MSCBSC)%p1[ ^&T,\5@*Z
switch(enable) show mls include 移动通信网(MSCBSC)(C Z*ir*b
移动通信网(MSCBSC)l s)y!yE0U
55. 显示MLS高速缓存记录:
2m%xc*{b `0switch(enable) show mls entry
E^d@l0
+~EB)l ^x056. 用命令show in arp显示ARP高速缓存区的内容。
8]z"IP#I&`9pV0
2M"\5Ig B3h&_;O&d057. 要把路由器配置为HSRP备份组的成员,可以在接口配置模式下使用下面的命令:
'JJwCd0router(config-if)# standby group-number ip ip-address
1r4MO[#D\2Yh0
I}7L&R U4|9wa'N058. 为了使一个路由器重新恢复转发路由器的角色,在接口配置模式下: 移动通信网(MSCBSC) Fv[6Ceb*_
router(config-if)# standy group-number preempt
9Z-bLLS0
*w1j b*gUO1O059. 访问时间和保持时间参数是可配置的: 移动通信网(MSCBSC)cBzD0HR\
router(config-if)# standy group-number timers hellotime holdtime
B'h$|[dO5M1T7|0移动通信网(MSCBSC)d!Ix$A?.gs+vW
60. 配置HSRP跟踪:
,Y [ {SF#x%R0router(config-if)# standy group-number track type-number interface-priority
pqS|S6S6b8k0移动通信网(MSCBSC)3h"l&nNc[V0m
61. 要显示HSRP路由器的状态:
:@dIE Yt?0router# show standby type-number group brief
-Fo6m3Qv0移动通信网(MSCBSC)F5i tV"GJ(jh
62. 用命令show ip igmp确定当选的查询器。 移动通信网(MSCBSC)J$_?5c#@-Mt1p:\

s;J1jj"K"TWU063. 启动IP组播路由选择:
d"dgH*W-k b0router(config)# ip muticast-routing
!RLkC5Ro0
*a;FzvG{ bb064. 启动接口上的PIM:
h lt'`,M^0p`:d!pL%x0dalllasr1>(config-if)# ip pim {dense-mode|sparse-mode|sparse-dense-mode}
c ^Kn(T k+b8E0
.v'o5fw-}+aH065. 启动稀疏-稠密模式下的PIM: 移动通信网(MSCBSC)*W7Z6b&U K6~5{&k
router# ip multicast-routing 移动通信网(MSCBSC)s6A4RI4j)t-P
router# interface type number
)H^JlL;A2l0router# ip pim sparse-dense-mode
ng3y.hN0移动通信网(MSCBSC)E"}"t#j:I4WNg
66. 核实PIM的配置: 移动通信网(MSCBSC)9?)rZ7I#\kiVX
dallasr1># show ip pim interface[type number] [count] 移动通信网(MSCBSC)$U8VjG:K [(V

A'FN'C4fA067. 显示PIM邻居:
+kku1I-i;@R0dallasr1># show ip neighbor type number
vL-]:B:H A0
&wo8f+U!v]068. 为了配置RP的地址,命令如下: 移动通信网(MSCBSC)"Mfk5a_qQ
dallasr1># ip pim rp-address ip-address [group-access-list-number][override] 移动通信网(MSCBSC)7A9y{6To A

IQ#m1NeW q069. 选择一个默认的RP: 移动通信网(MSCBSC) Q%i F)G A8?6e,n
dallasr1># ip pim rp-address 移动通信网(MSCBSC) J$?Nu s5wN
通告RP和它所服务的组范围:
[`8T-n kK0dallasr1># ip pim send-rp-announce type number scope ttl group-list access-list-number
2v`L7R5M }2s0为管理范围组通告RP的地址: 移动通信网(MSCBSC)1W})Oq6f.F^
dallasr1># ip pim send-rp-announce ethernet0 scope 16 group-list1 移动通信网(MSCBSC)*?rv'cx1u sc
dallasr1># access-list 1 permit 266.0.0.0 0.255.255.255 移动通信网(MSCBSC)Wx~7Hw[
设定一个RP映像代理:
\\ LN4q%y)c;p0dallasr1># ip pim send-rp-discovery scope ttl 移动通信网(MSCBSC) D,PH @n2u G;RH|
核实组到RP的映像: 移动通信网(MSCBSC)sV y/o*k
dallasr1># show ip pim rp mapping
LP1D a,k8?xo:Yl0dallasr1># show ip pim rp [group-name|group-address] [mapping] 移动通信网(MSCBSC)7h3n`/@8U'XBt

/X E4E4k!W h t!t070. 在路由器接口上用命令ip multicast ttl-threshold ttl-value设定TTL阀值:
;}7wvy4O3F0dallasr1>(config-if)# ip multicast ttl-threshold ttl-value 移动通信网(MSCBSC)] C.U s*[5F$v

dM~T1xQ&{J071. 用show ip pim neighbor显示PIM邻居表。
mM5^DQ ZM6Y(w0R0
[6f&JO)U072. 显示组播通信路由表中的各条记录: 移动通信网(MSCBSC)Am$IeZx M5`u.Y&p^
dallasr1>show ip mroute [group-name|group-address][scoure][summary][count][active kbps] 移动通信网(MSCBSC) ^`(r.Rai SB
移动通信网(MSCBSC)_!Fhkcz
73. 要记录一个路由器接受和发送的全部IP组播包: 移动通信网(MSCBSC)y h"J[*n4VeC]
dallasr1> #debug ip mpacket [detail] [access-list][group] 移动通信网(MSCBSC)cY(q,o$@c*^ Von
移动通信网(MSCBSC)Mg,]ZX}
74. 要在CISCO路由器上配置CGMP:
g6?t7yg {{0dallasr1>(config-if)# ip cgmp 移动通信网(MSCBSC)8?M } D\*B

&M-Rx LVU2u~z075.配置一个组播路由器,使之加入某一个特定的组播组:
t7u^'S-Z5Qh$e,HhY~0dallasr1>(config-if)# ip igmp join-group group-address
7cL5K{8O}G7a GuQ0移动通信网(MSCBSC)+m Kt*n,\k W
76. 关闭 CGMP: 移动通信网(MSCBSC){tKy W
dallasr1>(config-if)# no ip cgmp
0}@a3c2c)Yv0移动通信网(MSCBSC)\.R#P#Hv r.n1j*a%K*y)we
77. 启动交换机上的CGMP: 移动通信网(MSCBSC)D']/_X Q,u Fb
dallasr1>(enable) set cgmp enable
N ~p*qQ^U0移动通信网(MSCBSC)A(v+@ zYG |.c+l
78. 核实Catalyst交换机上CGMP的配置情况:
&yU%@u9v{Rjc0catalystla1>(enable) show config
D)f[*c {7Q2V#tx"r0set prompt catalystla1>
e9^4br%G F3A w0set interface sc0 192.168.1.1 255.255.255.0 移动通信网(MSCBSC)&A ?iZ[b
set cgmp enable 移动通信网(MSCBSC);Y0{(YV!Y5w[8l

xa2fs2g5iJ,Q079. CGMP离开的设置: 移动通信网(MSCBSC),C;j U7T^H(O2\
Dallas_SW(enable) set cgmp leave 移动通信网(MSCBSC)2}e(F[tv/k
移动通信网(MSCBSC).LK b'z)XE
80. 在Cisco设备上修改控制端口密码:
/sB^ s+@0R1(config)# line console 0 移动通信网(MSCBSC)#TO'i` q
R1(config-line)# login 移动通信网(MSCBSC)/\eTG^5W|H/n)_
R1(config-line)# password Lisbon 移动通信网(MSCBSC)y ^]e-Y n l(H K.B
R1(config)# enable password Lilbao
2p'gW]zL i0R1(config)# login local
W B*\ iY8E0R1(config)# username student password cisco 移动通信网(MSCBSC)5osh+v{5XVvT#R

-X.r1B!^7}081. 在Cisco设备上设置控制台及vty端口的会话超时: 移动通信网(MSCBSC) Xs!E-DY1y W D
R1(config)# line console 0 移动通信网(MSCBSC)cZ*G.hFeLuK
R1(config-line)# exec-timeout 5 10 移动通信网(MSCBSC)`N,l |x'y0gK&w%kyl
R1(config)# line vty 0 4 移动通信网(MSCBSC)ubl;R A/N
R1(config-line)# exec-timeout 5 2
Nt0C!y:jdI3J6L/@0
_2A@OG6Rv\ sK7Q082. 在Cisco设备上设定特权级: 移动通信网(MSCBSC)F{EFq7]%|
R1(config)# privilege configure level 3 username 移动通信网(MSCBSC)@4N |qX Y"[
R1(config)# privilege configure level 3 copy run start
Q/sX J q'yy l(S/Y0R1(config)# privilege configure level 3 ping 移动通信网(MSCBSC)[1`!~ q `
R1(config)# privilege configure level 3 show run 移动通信网(MSCBSC)&D PC(] }#l`)X:}
R1(config)# enable secret level 3 cisco 移动通信网(MSCBSC)6t&q-f| bu+h5}

xs"^8mCw6s083. 使用命令privilege 可定义在该特权级下使用的命令: 移动通信网(MSCBSC)\v|jy"`
router(config)# privilege mode level level command 移动通信网(MSCBSC),vcxRp#z G
移动通信网(MSCBSC).Ih1H-?.f:R+R
84. 设定用户特权级: 移动通信网(MSCBSC)o,T QL J#X%j%b%Wv0[
router(config)# enable secret level 3 dallas 移动通信网(MSCBSC)0e ^)C[$\3W%p9v)K
router(config)# enable secret san-fran
g)cOW;i0router(config)# username student password cisco 移动通信网(MSCBSC)'wju$Zg|.{

0o$w5jw,kWSk*l }085. 标志设置与显示:
qRkTY|r OoP#Z0R1(config)# banner motd ‘unauthorized access will be prosecuted!’ 移动通信网(MSCBSC)@?sWr'B1u*@ e

/R|J x4V8R086. 设置vty访问:
6M1h-i2x%?x[4^+T+f0R1(config)# access-list 1 permit 192.168.2.5 移动通信网(MSCBSC)!BaR%F&G*u)Sk `
R1(config)# line vty 0 4 移动通信网(MSCBSC)4ZI0Aw7^ l2h%B:r
R1(config)# access-class 1 in
%z]^3~({M+d3p r7q8p0
k`1}a nK7i#e087. 配置HTTP访问: 移动通信网(MSCBSC)0j }&`;{u Cr*P
Router3(config)# access-list 1 permit 192.168.10.7
c c x(XUO/F0Router3(config)# ip http sever 移动通信网(MSCBSC)T h};S]U7D
Router3(config)# ip http access-class 1
P m5vDIz8kj9A0Router3(config)# ip http authentication local
} v"G&fV)X L W;G0Router3(config)# username student password cisco 移动通信网(MSCBSC)l w$T5\'or

rN:cD7~ S088. 要启用HTTP访问,请键入以下命令: 移动通信网(MSCBSC) c SOG;A W7t
switch(config)# ip http sever
m^#_'|M^0移动通信网(MSCBSC)]0[;o'\$t/r(L+NF5Z
89. 在基于set命令的交换机上用setCL1启动和核实端口安全:
6j'y;Q [8QZ-`8q0switch(enable) set port security mod_num/port_num…enable mac address 移动通信网(MSCBSC)onE7~1Fi$]
switch(enable) show port mod_num/port_num
O}DOz K:R0在基于CiscoIOS命令的交换机上启动和核实端口安全: 移动通信网(MSCBSC):N[`&|6f0I(op;|
switch(config-if)# port secure [mac-mac-count maximum-MAC-count]
l ToTK!{#K;v@9N0switch# show mac-address-table security [type module/port] 移动通信网(MSCBSC)h Xz1Sx/GQ%u

Ar-u5Aem090. 用命令access-list在标准通信量过滤表中创建一条记录:
A K(BGWH ]R0Router(config)# access-list access-list-number {permit|deny} source-address [source-address] 移动通信网(MSCBSC) {2b ^.J.ZU
移动通信网(MSCBSC)&J fCx0B F2@(J#Q
91. 用命令access-list在扩展通信量过滤表中创建一条记录: 移动通信网(MSCBSC)Q1S4Q7nG-Q rz
Router(config)# access-list access-list-number {permit|deny{protocol|protocol-keyword}}{source source-wildcard|any}{destination destination-wildcard|any}[protocol-specific options][log] 移动通信网(MSCBSC),Ku%?3G7p+v#S

n(EDP;@ggc!b092. 对于带内路由更新,配置路由更新的最基本的命令格式是:
@-KKk#u:oA#d0R1(config-router)#distribute-list access-list-number|name in [type number] 移动通信网(MSCBSC)bZ#LG[Qx

6|)x@ z"eF5Q+e7}pk093. 对于带外路由更新,配置路由更新的最基本的命令格式是:
x/~ ]!@5Xv.j%P0R1(config-router)#distribute-list access-list-number|name out [interface-name] routing-process| autonomous-system-number 移动通信网(MSCBSC)f.T%B.B2Ow}0MZ

+W-|Fk)J#my094. set snmp命令选项: 移动通信网(MSCBSC)t%x u p ]o
set snmp community {read-only|ready-write|read-write-all}[community_string] 移动通信网(MSCBSC){g}0Y+cz yf
移动通信网(MSCBSC)*|S~7o R |_8e(N"ap
95. set snmp trap 命令格式如下:
/TCO~@ {7s2|0set snmp trap {enable|disable}
a#N_Qh-F0nR0[all|moudle|classis|bridge|repeater| auth|vtp|ippermit|vmps|config|entity|stpx]
%`dx9\8mO&rwS0set snmp trap rvcr_addr rcvr_community
w3F9ytG*?&Oz"v0移动通信网(MSCBSC)A8hu6Quu-p2S
96. 启用SNMP chassis 陷阱: 移动通信网(MSCBSC)9fUQQd
Console>(enable) set snmp trap enable chassis 移动通信网(MSCBSC)Ve }YYe
移动通信网(MSCBSC)1v*c ~9L-eDVmh
97. 启用所有SNMP chassis 陷阱:
[{hLh4Tv8b0Console>(enable) set snmp trap enable
L:Kif O K0
7wkK7{pj0N0…………以下由about于2002年12月6日增加…………
2s)Z'v&W?;s6t4y098. 禁用SNMP chassis 陷阱: 移动通信网(MSCBSC)l\FwB"Ds8M#r
Console>(enable) set snmp trap disable chassis 移动通信网(MSCBSC)7qN8nq:j4D T(Z
移动通信网(MSCBSC)3RYq2K |
99. 给SNMP陷阱接收表加一条记录:
7CRs[Xa0Console>(enable) set snmp trap 192.122.173.42 public 移动通信网(MSCBSC))Z7T,o~'~EA%p e$V

D.x2`)^]"B+m&?0SK0100. show snmp 输出结果。 移动通信网(MSCBSC)K/H|8C1P8t
移动通信网(MSCBSC)#rtv*G4M(Sg
101. 命令set snmp rmon enable 的输出结果。 移动通信网(MSCBSC)4QfO9c9pQ*D0h2h
移动通信网(MSCBSC))u:B!ao:D
102. 显示SPAN信息:
| NA#d:E%o?e9u;j0Consile> show span
Z7lN3d%\g&sz0
Z(x-^;G{:UN:Y Iw@8M0
:z(n]:Aa/vH"a&lO0
BF/L8D'f0v0移动通信网(MSCBSC)V#d$GPi5t |fla5su
一些华为路由器命令: 移动通信网(MSCBSC)6X|y.ARR)Y
移动通信网(MSCBSC)f"?F0oek
删除设备配置 移动通信网(MSCBSC)+G$``bh3z
reset saved-configuration
8s+E0pTt9i,?h0移动通信网(MSCBSC)p6Y S!W2_#tj#?
重启 移动通信网(MSCBSC))x_x!DS
reboot
?!NOc%}3T0移动通信网(MSCBSC)b#G x2t$ECO/jS
看当前配置文件
X+aK$u oUoKu0display current-configuration 移动通信网(MSCBSC){G4_0l"igv4xC+@'z _

q i+z8l]fJI0改设备名 移动通信网(MSCBSC)7F ~y_{M6S%yB
sysname 移动通信网(MSCBSC))[&J5` Gt?9e;Dh In
移动通信网(MSCBSC)%N7y4br*Sc#vXw;^
保存配置 移动通信网(MSCBSC) k6E!F"[)Hc6ssH#C
save 移动通信网(MSCBSC)"i1j'W![H2p:NA;g

8M U$t7P O0进入特权模式 移动通信网(MSCBSC)z RCs^I
sysview 移动通信网(MSCBSC)J8goW1e0t*S5R2`
华为只有2层模式 不像cisco enale之后还要conf t 移动通信网(MSCBSC)2` ~~_u$Jn

:HoEd5O'i0定义acl
U$r \WJLq/E3m0acl nubmere XXXX(3000以上)进入以后 移动通信网(MSCBSC)\X5a T,`So
rule permit/deny IP/TCP/UDP等 source XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX(反向) 移动通信网(MSCBSC)`!f;R8{S
destination XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX(反向) eq 移动通信网(MSCBSC)*PY-h r9O5b
注意 华为默认没有deny any any 移动通信网(MSCBSC)C"MD1U4r nu

cv8dV w0防火墙上端口加载ACL 移动通信网(MSCBSC).dLD i3J"@9PV
[Quidway-Ethernet0/0]firewall packet-filter 3000 inbound
J1G.JP d_/v#ol%W:^ T n0移动通信网(MSCBSC) J(I.a*X1s&pCH i2M.G
防火墙上新增加用户
bq\ y;e6N0V0local-user XXX(用户名) password simple XXX(密码)
P'yDDTk*G0local-user XXX service-type ppp
5Q k-}!kRCz0移动通信网(MSCBSC)xVv3A k}*Q,nE
删除某条命令 移动通信网(MSCBSC)el+zC*V8x
undo(类似与cisco的no)
GM2siBI/M(x0
._&V3]#rm[:P W_9C0静态路由
M2aX Pg$F-y0ip route-static 0.0.0.0 0.0.0.0 XXX.XXX.XXX.XXX 移动通信网(MSCBSC)b\J8O&H6M|
移动通信网(MSCBSC)8]w g0Bw
对vpdn用户设置acl的接口
T7@y:@X.H)q{ f E0inte***ce Virtual-Template1 移动通信网(MSCBSC)h XV&P ^kKp'D

} u$e.J:Cw`0查看路由表
A \0y!E!~Dm!a;k0display ip routing-table 移动通信网(MSCBSC) G[E"j YIj

Ho?5XRO wR8C0设定telnet密码 移动通信网(MSCBSC)nh\g[k+eR*lpg
user-inte***ce vty 0 4
,I:q0`pp9yz)s"t4k0user privilege level 3 移动通信网(MSCBSC)e6c0j hG5b.d
set authentication password simple XXX 移动通信网(MSCBSC)7L*tx9T${6SWx)D

`.uf,~)i^Q)b5SG/D E0启动/关闭
X.~nz X6a0启动 un shut 移动通信网(MSCBSC)6D!w/g _k
关闭 shut 移动通信网(MSCBSC)Ik0b dFU*zG
移动通信网(MSCBSC)}#^"Fo9zg`
动态nat设置
$I~:kt ^)c0acl number 3000
y/b+[4Jh!Voyp6g]0rule 0 permit ip source XXX.XXX.XXX.XXX
q'bJ6{7@2C l/X4f!hi2m0rule 1 permit ip source XXX.XXX.XXX.XXX
^6CW#o2O;Z0rule 2 permit ip source XXX.XXX.XXX.XXX
3{K$o;w6E,]:x0inte***ce Ethernet1/0
7?f2@3h ~ o0des cription ====To-Internet(WAN)====
)v c|3G$oh0ip address XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX
:o0Wf4`+bl0nat outbound 3000 移动通信网(MSCBSC)7W W*nHXbu7ET6d
ipsec policy policy1 移动通信网(MSCBSC) iwIXeNG
利用acl来做 符合acl的IP地址可以出去(注意 此处的ACL隐含了deny any any)不符合的IP地址不可以出去 移动通信网(MSCBSC)V/N D4hR#\$CZ

:D-E{qv1~;dh O ` V0创建vlan 移动通信网(MSCBSC)i$W'? Kn&Cl
[shzb-crsw-s6506-1]vlan 100
?E9y9Y}0华为vlan不支持name 移动通信网(MSCBSC) E3^ dw/m
将port放入vlan
9wweNw}7T(Y{0创建了vlan后 进入vlan模式 移动通信网(MSCBSC)AmjAe ?(wK
[shzb-crsw-s6506-1-vlan100]port GigabitEthernet 1/0/1 to GigabitEthernet 1/0/8 移动通信网(MSCBSC)/@+]G Kk r
表示从G1/0/1 到1/0/8放入VLAN 100
B,Z,eH!n\#vKq0移动通信网(MSCBSC)`S!F'o|,@vs a
创建trunk
%m5mQe[;sGK0inte***ce GigabitEthernet1/0/1 移动通信网(MSCBSC)4p)xxV]"T"] `
duplex full 移动通信网(MSCBSC)3Rc+X?$?*W7D
speed 1000
s*} BH;Crq0* port link-type trunk
-P9q*uI1F+l9?,Ht4@0* port trunk permit vlan all
Z"Rqp:fl0port link-aggregation group 1
}Tu} E;mE0带*号的是创建trunk链路的语句
A/h[9n+TF;[q%B0移动通信网(MSCBSC)Z"Em1C^e s
vlan地址指定 移动通信网(MSCBSC)@ s'lVu'H/d
inte***ce Vlan-inte***ce2 移动通信网(MSCBSC) ly5|6k4[?
des cription server 移动通信网(MSCBSC)8aohkm%r b
ip address XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX
m$k3s&n4["W|%M%~0vrrp vrid 2 virtual-ip XXX.XXX.XXX.XXX
p/A:p1x-g1D-} eB]0vrrp vrid 2 priority 120
i c-kp wR0vrrp vrid 2 preempt-mode timer delay 10
? ~o9Hlqb;U0a;N0其中vrrp语句指定vrrp 类似与hsrp
;N-[q-yzw&Tc0p0使用vrrp要注意的是华为不支持pvst
)v3r(`v/f5Xui"f0只能一台完全是主,一台完全是备份
z`!d:F2DfX~0在主vrrp设备上要指定
!W D,G8|WSO9qX0stp instance 0 root primary 移动通信网(MSCBSC)?iC#OPz(J0p
stp TC-protection enable
@X|-gWH0stp enable 移动通信网(MSCBSC)!nb@U9S)q2S
在从vrrp设备上要指定
:h7Rh.RW0A(TKB0stp instance 0 root secondary 移动通信网(MSCBSC)kU!oX"g5|z
stp TC-protection enable 移动通信网(MSCBSC)C W }\ VKB+H]'L ^
stp enable
6E)\-k o6O&N0
\3wO:i1_ s1WU0交换机下面绑acl
*`"K1M.hs6@0首先进入接口模式,输入qos命令
9D}&G"Y [/_6h [0[shzb-crsw-s6506-1-GigabitEthernet1/0/1]qos 移动通信网(MSCBSC)f qkFL6F-V`
在输入如下命令
TTqX`k0[shzb-crsw-s6506-1-qoss-GigabitEthernet1/0/1]packet-filter inbound ip-group 3000
*y aM5BS6zs0华为交换机只能指定inbound方向 移动通信网(MSCBSC) CK\*H8BB|l4J&K

}Qusu;~Q0启用ospf 移动通信网(MSCBSC)z#{mje5c ^:IoG,U
[shzb-crsw-s6506-1]ospf 100
+P\(mj]*VE#l0[shzb-crsw-s6506-1-ospf-100]area 0
f4e)w+T \_P0[shzb-crsw-s6506-1-ospf-100-area-0.0.0.0]network XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX
2@#|cqbd0配置ospf重发布
W G?r U4V:J2|0[shzb-crsw-s6506-1-ospf-100-area-0.0.0.0]quit 移动通信网(MSCBSC)#q(d9M2[qq7tD!q
[shzb-crsw-s6506-1-ospf-100]import-route static 移动通信网(MSCBSC)wQ;iKr;xWd j
移动通信网(MSCBSC).ngh;{8p%u_R&O!cr
建立link-group(类似与cisco的channel-group)
n[Nr6[0
Z,@f jw}e"{4k0link-aggregation group 1 mode manual
jH!S/y4IkH!k;Gg0然后进入接口 移动通信网(MSCBSC)*K&~,i\*p4])B un
port link-aggregation group 1
6Wv(g&G.wNwR}7r"Z0移动通信网(MSCBSC)wqjZ,s_:}6h;v
启用VRRP之前必须输入
r&F6k:F)I0vrrp ping-enable
4ce$E |%h\)i4I:l`0使得客户能ping网关 移动通信网(MSCBSC)3i F&Z7cn
移动通信网(MSCBSC)z{J0?w&`y

TAG: 命令 华为 交换机 switch IOS

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-12-03  
 123456
78910111213
14151617181920
21222324252627
28293031   

数据统计

  • 访问量: 5351
  • 日志数: 31
  • 影音数: 2
  • 建立时间: 2007-11-14
  • 更新时间: 2008-11-06

RSS订阅

Open Toolbar