欢迎来到天天文库
浏览记录
ID:50076522
大小:82.50 KB
页数:13页
时间:2020-03-04
《cisco交换机配置命令.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、交换机配置交换机基本的命令:交换机基本状态:switch:;ROM状态,路由器是rommon>hostname>;用户模式hostname#;特权模式hostname(config)#;全局配置模式hostname(config-if)#;接口状态hostname(config-vlan)#vlan状态hostname(config-line)#虚拟终端状态用户模式↓特权模式↓全局模式以上命令为交换机各模式之间的进位转化,当要进行退位时,exit命令退到上一层模式,end命令直接退回特权模式。交换机口令设置:switch>enable;进入特权模式switch#config
2、terminal;进入全局配置模式switch(config)#hostnamexxx;设置交换机的主机名switch(config)#enablesecretxxx;设置特权加密口令switch(config)#enablepasswordxxx;设置特权非密口令(两个可同时设置,但select优先)router(config)#servicepassword-encryption(给明文密码加密)router#showrunning-config(显示已经完成的配置但可能还没有保存)router#write(保存当前配置)//copyrunning-configstar
3、tup-config(保存当前配置)router#showstartup-config(显示保存在nvram中的配置文件)router#showversion(显示系统的硬件配置、软件版本、配置文件名称和启动映像信息、寄存器的值router#showprotocol(显示已经配置的三层协议)router#showinterface 接口(显示相应接口的详细信息)//配置远程登录交换机进行的设置(否则不能远程登录)switch(config)#lineconsole0;进入控制台口switch(config-line)#linevty04;进入虚拟终端5个端口switch(c
4、onfig-line)#login;允许登录(必设)switch(config-line)#passwordxx;设置登录口令xxswitch#exit;返回命令交换机VLAN设置:switch#vlandatabase;进入VLAN设置switch(vlan)#vlan2;建VLAN2switch(vlan)#novlan2;删vlan2switch(config)#intf0/1;进入端口1switch(config-if)#switchportaccessvlan2;当前端口加入vlan2switch(config-if)#switchportmodetrunk;设置
5、为干线switch(config-if)#switchporttrunkallowedvlan1,2;设置允许的vlanswitch(config-if)#switchporttrunkencapdot1q;设置vlan中继switch(config)#vtpdomain;设置发vtp域名switch(config)#vtppassword;设置发vtp密码switch(config)#vtpmodeserver;设置发vtp模式switch(config)#vtpmodeclient;设置发vtp模式交换机设置IP地址:switch(config)#interfacevl
6、an1;进入vlan1switch(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
7、;显示配置信息router#showinterface;显示接口信息router#showiproute;显示路由信息router#showcdpnei;显示邻居信息router#reload ;重新起动路由器口令设置:router>enable;进入特权模式router#configterminal;进入全局配置模式router(config)#hostname;设置交换机的主机名router(config)#enablesecretxxx;设置特权加密口令router(config)#enablepasswo
此文档下载收益归作者所有