思科三层交换机配置命令
1.交换 支机的命持:令
交换基本机状态 :
witsch :;ORM态, 路由器是状rmmoon>
ho tsamen>; 用模式 户
hotsamne ;特#权式 模
hstonma(ceonifg# );局全配模置 式
hotsanm(eonficgif)-#; 接口状 态
换机交口令设: 置sw
tchi>eanleb ;入进特权式模
swtihcc#ofnigterm inl a进;全入局配置模 式s
wichtc(onigf)#hsotanm ;e设置交换机主机名的
wisthc(onfcgi#)eablens ecert xx ;x设置特权密加口令
switch(onfci)g#nealbep ssaowrd xax;设置特权 密口令 非
swtih(cocnifg#l)ni eonsoce 0 ;l入进控台制
口witshc(cofin-lign)el#in veyt 4 ;0入进虚终端 拟sw
tcihc(noif-lgie)#lognni 允许;录登
sw itc(hocnifgl-in)epa#sswordx x ;置登录设口令xx
swtci#hxie ;t返回命令
交机换VAL设置:N
wstci#vhln aadatabe s;入VL进N设置A
swtih(vclan#)lavn2 ;建LVNA 2
witcs(vlhn)#na voaln2 ;vlan 2删
sitch(cwnoigf#)intf0/1 ;进端入1口
sitwhccon(ig-fi)#sfitwhpcor atccessvl n 2 ;a当端口加前vl入a n2
witsc(hcnfiog-fi)sw#tciporth mode rtnuk 设;为干线 置
wstci(hcnfio-ifg#swi)tchorpt trnku aloled wlan v,1 ;设置2允的许lav
nsiwthcco(nfi-gfi#sw)tcihprtotr nuke cap dnto1q;设 置val n继
中swich(tconfig#v)tp doamni ;置设发vt域p名
wischtc(nofg)#vip passtowd r;设发置tpv密码 s
itwhc(cofng)ivt#p ome sedrev ;r设发v置t模p式 s
wich(tcofni)g#vtp omed liecn t;设发置tv模p 式
交机换置IP地址:设
wstihcco(nfi)#gnteiracf veal 1n;进 v入lna1
swtihcconfi(-ig)fip a#dderss; 置IP地址设
swtci(honfcgi#i) depfalu-gttawey a设置默认网关;
sitwh#cdrif asl: h查看闪;存
换交显机示命令: s
wicthwri#et;保存 置信配 息
wischt#sow htpv;查 看tvp置信息配 swi
thc#sho run ;查w看当配前置息 信
sitcwh#show lav ;查n看lanv置配信 息
swtihc#hswoi terfanc ;查e端口看息信
s itchw#soh iwt f0n0/;查 指定端口信看息
补充 : 3层
换交机出的就是路多能力,体由现在lan的v互通相信功和端能口的路由能,力下介面: 绍
开路由功启能ip:routi g n
入vl进na配 置网段网与关由路配置接相同口
in etrfac elvan 1
p 1i9.12681..1255.255.25 .0 5
路由配置与路由器置配同只是相把接换为VL口NAVL+N号A,开启接口路由能,功入进接口置配no :wscipohtr