CCNA ---LAB1

1.实验目的

  1. 掌握Cisco IOS命令行的基本操作
  2. 设备常用的基本命令
  3. 设备console信息抓取和识别

 

2.拓扑和需求

  1. .设备主机名,时区,系统时间
  2. .关闭域名解析, console永不超时,console权限
  3. .创建MOTD(登录路由器时显示的信息)
  4. .设置和取消密码:console密码,enable密码,VTY线路密码
  5. .配置接口IP地址, 查看接口状态
  6. .直连连通性测试
  7. .配置Telnet实现远程设备管理
  8. .查看配置并保存
  9. .删除配置到初始化状态

 


3.配置与实现

1.设备主机名,时区,系统时间

R1

Router>en
Router#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R1
R1(config)#clock timezone GMT +8
修改当前的系统时区
R1(config)#clock set hh:mm:ss day mouth year
修改当前设置的时间

R2同上

2.关闭域名解析, console永不超时,console权限

R1与R2

R1(config)#no ip domain lookup 
关闭域名解析
R1(config)#line console 0
R1(config-line)#no exec-time 
console永不超时
R1(config-line)#privilege  level 15
当console时直接进入特权模式(常用于实验环境)

3.创建MOTD(登录路由器时显示的信息)

R1(config)#banner motd # THIS IS FIRST LAB#

4.设置和取消密码:console密码,enable密码,VTY线路密码

console密码

R1(config)#line console 0                  
R1(config-line)#password xia
添加密码
R1(config-line)#login
登录使密码生效
R1(config-line)#no password xia
删除密码

enable密码


R1(config)#enable password xia 
设置明文密码
R1(config)#no enable password
取消明文密码 
R1(config)#enable secret xia 
设置密文密码,show run只能看到字母密码的组合,优先级比明文密码高
R1(config)#no enable secret
取消密文密码
R1(config)#

 

VTY线路密码

R1(config)#line vty 0 4
进入VTY 0-4 线路
R1(config-line)#password xia
R1(config-line)#login
设置密码与登陆生效(用户通过Telnet登录时需要的密码)
R1(config-line)#no password
R1(config-line)#no login
取消VTY线路密码 

5.配置接口IP地址, 查看接口状态

R1(config-line)#int e0/0
R1(config-if)#ip add 12.1.1.1 255.255.255.252
R2 IP 地址改动,其余同理
R1(config-if)#no shutdown

接口状态;

R1#show ip int br
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/0                12.1.1.1        YES manual up                    up      
Ethernet0/1                unassigned      YES unset  administratively down down    
Ethernet0/2                unassigned      YES unset  administratively down down    
Ethernet0/3                unassigned      YES unset  administratively down down    

6.直连连通性测试

R1#ping 12.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms

连通成功

7.配置Telnet实现远程管理设备

 

R1(config)#line vty 0 4
进入线路
R1(config-line)#password xia
R1(config-line)#login
启用密码
R1(config-line)#transport input telnet 
允许使用Telnet管理

测试:
R1登录到R2

R1#telnet 12.1.1.2
Trying 12.1.1.2 ... Open


User Access Verification

Password: 
Router>show ip int b
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/0                12.1.1.2        YES manual up                    up      
Ethernet0/1                unassigned      YES unset  administratively down down    
Ethernet0/2                unassigned      YES unset  administratively down down    
Ethernet0/3                unassigned      YES unset  administratively down down    
Router>

R2登录到R1

Router#telnet 12.1.1.1
Trying 12.1.1.1 ... Open
 THIS IS FIRST LAB

User Access Verification

Password: 
R1>show ip int b 
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/0                12.1.1.1        YES manual up                    up      
Ethernet0/1                unassigned      YES unset  administratively down down    
Ethernet0/2                unassigned      YES unset  administratively down down    
Ethernet0/3                unassigned      YES unset  administratively down down    
R1>

8.查看配置并保存

R1#show startup-config 
startup-config is not present
当前未保存未开机配置
R1#write
查看开机配置并保存
R1#show running-config 
查看当前配置

9.删除配置到初始化状态

Router#erase start-config
或者
Router#write erase

实验结束

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值