欢迎来到天天文库
浏览记录
ID:47037536
大小:49.00 KB
页数:5页
时间:2019-07-04
《交换机路由器配置命令》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、计算机命令:PCAlogin:root;使用root用户password:linux;口令是linux#shutdown-hnow;关机#init0;关机#logout#login#ifconfig;显示IP地址#ifconfigeth0netmask;设置IP地址#ifconfigeht0netmaskdown;删除IP地址#routeadd0.0.0.0gw#routedel0.0.0.0gw#routeadddefaultgw;设置网关#routedeldefau
2、ltgw;删除网关#route;显示网关#ping#telnet;建立telnet之前先ping一下^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^交换机基本状态:switch:;ROM状态,路由器是rommon>hostname>;用户模式hostname#;特权模式hostname(config)#;全局配置模式hostname(config-if)#;接口状态交换机口令设置:switch>enable;进入特权模式switch#configterminal;进入全局配置模式switch(co
3、nfig)#hostname;设置交换机的主机名switch(config)#enablesecretxxx;设置特权加密口令为xxxswitch(config)#enablepasswordxxx;设置特权非密口令为xxxswitch(config)#lineconsole0;进控制台口(Rs232)初始化switch(config-line)#linevty04;进入虚拟终端virtualttyswitch(config-line)#login;允许登录switch(config-line)#passwordxx;设置登录口令xxswitch#ex
4、it;返回命令交换机VLAN设置:switch#vlandatabase;进入VLAN设置switch(vlan)#vlan2;建VLAN2switch(vlan)#novlan2;删vlan2switch(config)#intf0/1;进入端口1switch(config-if)#switchportaccessvlan2;当前端口1加入VLAN2switch(config-if)#switchportmodetrunk;设置为干线switch(config-if)#switchporttrunkallowedvlan1,2;设置允许的vlanswitch(confi
5、g-if)#switchporttrunkencapdot1q;设置vlan中继switch(config)#vtpdomain;设置发vtp域名switch(config)#vtppasswordswitch(config)#vtpmodeserverswitch(config)#vtpmodeclient交换机设置IP地址:switch(config)#interfacevlan1;进入vlan1switch(config-if)#ipaddress;添加远程登录IPswitch(config)#ipdefault-gate
6、way;添加默认网关switch#dirflash:;查看内存交换机显示命令:switch#write;写入保存switch#showvtpswitch#showrun;查看当前配置信息switch#showvlan;看VLANswitch#showinterface;显示所有端口信息switch#showintf0/0;显示端口0的信息^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^路由器显示命令:router#showrun;显示接口router#showinterface;显示接口router#showip
7、route;显示路由router#showcdpnei;看邻居router#reload ;重新起动设置口令:router>enable;进入特权模式router#configterminal;进入全局配置模式router(config)#hostname;设置交换机的主机名router(config)#enablesecretxxx;设置特权加密口令为xxxrouter(config)#enablepasswordxxx;设置特权非密口令为xxxrouter(config)#lineconsole0;进
此文档下载收益归作者所有