交換機(jī)設(shè)置命令中關(guān)于口令和基本狀態(tài)的描述
交換機(jī)設(shè)置命令中關(guān)于口令和基本狀態(tài)的描述,朋友向我介紹幾個(gè)關(guān)于交換機(jī)設(shè)置命令,不知道具體怎么使用,希望廣大網(wǎng)友給我一些建議,***是那些IT高手的網(wǎng)友的建議,謝謝。
交換機(jī)支持的命令:
交換機(jī)設(shè)置命令基本狀態(tài):
switch:;ROM狀態(tài),路由器是rommon>
hostname>;用戶模式
hostname#;特權(quán)模式
hostname(config)#;全局配置模式
hostname(config-if)#;接口狀態(tài)
交換機(jī)設(shè)置命令口令設(shè)置:
switch>enable;進(jìn)入特權(quán)模式
switch#configterminal;進(jìn)入全局配置模式
switch(config)#hostname;設(shè)置交換機(jī)的主機(jī)名
switch(config)#enablesecretxxx;設(shè)置特權(quán)加密口令
switch(config)#enablepasswordxxa;設(shè)置特權(quán)非密口令
switch(config)#lineconsole0;進(jìn)入控制臺(tái)口
switch(config-line)#linevty04;進(jìn)入虛擬終端
switch(config-line)#login;允許登錄
switch(config-line)#passwordxx;設(shè)置登錄口令xx
switch#exit;返回命令
交換機(jī)設(shè)置命令VLAN設(shè)置:
switch#vlandatabase;進(jìn)入VLAN設(shè)置
switch(vlan)#vlan2;建VLAN2
switch(vlan)#novlan2;刪vlan2
switch(config)#intf0/1;進(jìn)入端口1
switch(config-if)#switchportaccessvlan2;當(dāng)前端口加入vlan2
switch(config-if)#switchportmodetrunk;設(shè)置為干線
switch(config-if)#switchporttrunkallowedvlan1,2;設(shè)置允許的vlan
switch(config-if)#switchporttrunkencapdot1q;設(shè)置vlan中繼
switch(config)#vtpdomain;設(shè)置發(fā)vtp域名
switch(config)#vtppassword;設(shè)置發(fā)vtp密碼
switch(config)#vtpmodeserver;設(shè)置發(fā)vtp模式
switch(config)#vtpmodeclient;設(shè)置發(fā)vtp模式
交換機(jī)設(shè)置命令設(shè)置IP地址:
switch(config)#interfacevlan1;進(jìn)入vlan1
switch(config-if)#ipaddress;設(shè)置IP地址
switch(config)#ipdefault-gateway;設(shè)置默認(rèn)網(wǎng)關(guān)
switch#dirflash:;查看閃存
交換機(jī)設(shè)置命令顯示命令:
switch#write;保存配置信息
switch#showvtp;查看vtp配置信息
switch#showrun;查看當(dāng)前配置信息
switch#showvlan;查看vlan配置信息
switch#showinterface;查看端口信息
switch#showintf0/0;查看指定端口信息
路由器支持的命令:
路由器顯示命令:
router#showrun;顯示配置信息
router#showinterface;顯示接口信息
router#showiproute;顯示路由信息
router#showcdpnei;顯示鄰居信息
router#reload;重新起動(dòng)
路由器口令設(shè)置:
router>enable;進(jìn)入特權(quán)模式
router#configterminal;進(jìn)入全局配置模式
router(config)#hostname;設(shè)置交換機(jī)的主機(jī)名
router(config)#enablesecretxxx;設(shè)置特權(quán)加密口令
router(config)#enablepasswordxxb;設(shè)置特權(quán)非密口令
router(config)#lineconsole0;進(jìn)入控制臺(tái)口
router(config-line)#linevty04;進(jìn)入虛擬終端