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