技术分享

您当前所在的位置:首页>>技术分享

CCNA常用命令大全(一)

登录网络设备,USB-COM-COM-RJ45,超级终端  /SecureCRT

Would you like to enter the initial configuration dialog? [yes/no]:// 回答 no ,如果回答了 yes ,会出现大量对话,Ctrl+C中断对话

% Please answer 'yes' or 'no'.

Router>// 用户模式,只能简单的show及 ping/tracer

Router>enable// 从用户模式进入特权模式

Router#// 特权模式,能够进行所有的show及 ping/tracerRouter#configure terminal// 从特权模式进入全局配置模式Router(config)#// 全局配置模式,可以进行相关配置Router(config)#hostname R1// 给设备命名 

R1#show version// 查看设备软硬件版本信息,开机时间,内存和Flash 大小,模块等

R1#show ip interface brief// 查看接口信息

R1#show running-config// 查看运行在内存中的当前配置

R1#show startup-config// 查看开机配置,保存在NVRAM

R1#copy running-config startup-config// 将当前运行配置保存到开机配置中

R1#show tech-support// 查看设备所有软硬件的详细信息

R1(config)#enable password xxx// 配置  enable密码,该密码show run可见 

R1(config)#enable secret xxx// 配置  enable密码,该密码show run不可见,两个同时配置时,secret密码生效

R1(config)#line vty 0 4// 进入telnet配置模式

R1(config-line)#login//telnet登陆需要密码验证

R1(config-line)#password xxx  // 配置 telnet 密码

R1(config-line)#exit 

R1(config)#line vty 0 4

R1(config-line)#no login//telnet登陆不需要验证

R1(config-line)#exit

R1(config)#line vty 0 4

R1(config-line)#login local//telnet登陆需要在本地数据库查找用户名密码进行验证

R1(config-line)#exit

R1(config)#username spoto password xxx// 创建本地用户名密码

R1(config)#banner ^!!!!R1!!!!!^// 配置设备登陆提示符,头尾符号需要一致,中间为提示符内容 

R1(config)#line vty 0 4

R1(config-line)#privilege level 15// 配置 telnet用户特权等级为15 ,即登陆后直接进入

enable模式

R1(config-line)#exit

R1(config)#interface fastEthernet x/x// 进入接口配置模式

R1(config-if)#ip address x.x.x.x x.x.x.x// 配置IP及掩码

R1(config-if)#no shutdown// 打开接口,路由器接口默认处于管理性关闭状态

R1(config-if)#exit// 退出接口配置模式,返回全局配置模式R1(config)#no ip routing// 关闭路由功能,将路由器模拟成PCR1(config)#ip default-gateway x.x.x.x// 配置网关地址

R1#show ip route  // 查看关闭路由功能后的网关配置

上一篇:华为HCIA R&S路由交换考试大纲

下一篇:CCNA常用命令大全(二)