没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
CCNP 排错基础知识
第一天——高级管理
internet
193
r2
S1/1
r3
.2
.2
210.1.23.0/24
S1/0
.3
10.1.12.0/24
S1/0
inside outside
.1
r2
r1
r1
F0/0
192.168.2.200
S1/1
acs
第一步:基本配置
inside-r1(config)#int s1/1
inside-r1(config-if)#ip add 10.1.12.1 255.255.255.0
inside-r1(config-if)#no shu
inside-r1(config-if)#end
gw-r2(config)#int s1/0
gw-r2(config-if)#ip add 10.1.12.2 255.255.255.0
gw-r2(config-if)#no shut
gw-r2(config-if)#int s1/1
gw-r2(config-if)#ip add 210.1.23.2 255.255.255.0
gw-r2(config-if)#no shut
isp-r3(config)#int s1/0
isp-r3(config-if)#ip add 210.1.23.3 255.255.255.0
isp-r3(config-if)#no shu
第二步:多级别管理
默认情况下 ios 有 16 个管理级别,0-15,用户模式为 1 级,特权模式为 15,0 级基本不用.
gw-r2#show privilege
Current privilege level is 15
gw-r2#disable
gw-r2>show privi
Current privilege level is 1
gw-r2>enable 0
gw-r2>?
Exec commands:
disable Turn off privileged commands
enable Turn on privileged commands
exit Exit from the EXEC
help Description of the interactive help system
logout Exit from the EXEC
gw-r2>help
2-14 为自定义级别,可以灵活授权.
gw-r2(config)#enable secret level 2 cisco2
gw-r2(config)#end
gw-r2#enable 2
gw-r2#show priv
Current privilege level is 2
默认高级会自动继承低级命令.
gw-r2(config)#enable secret cisco15
gw-r2(config)#privilege exec level 2 conf t
gw-r2(config)#exit
高级进入低级是不需要口令的.
gw-r2#enable 2
低级进入高级是需要认证的.二级目前只能敲接口.
gw-r2#disable
gw-r2>enable 2
Password:
gw-r2#show pri
Current privilege level is 2
gw-r2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
gw-r2(config)#int lo 0
^
% Invalid input detected at '^' marker.
gw-r2(config)#router ospf 1
^
% Invalid input detected at '^' marker.
授权所有接口相关命令.
gw-r2(config)#privilege configure all level 2 interface
测试一下
gw-r2#enable 2
gw-r2#show priv
Current privilege level is 2
gw-r2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
gw-r2(config)#int lo 0
gw-r2(config-if)#ip add 2.2.2.2 255.255.255.0
gw-r2(config-if)#shu
gw-r2(config-if)#no shut
gw-r2(config-if)#exit
gw-r2(config)#router ospf 1
^
定制多级用户
gw-r2(config)#username user2 privilege 2 pass cisco2
gw-r2(config)#username user3 privilege 3 pass cisco3
gw-r2(config)#username cio-df priv 15 pass cisco15
gw-r2(config)#line console 0
gw-r2(config-line)#login local
gw-r2(config-line)#line vty 0 4
gw-r2(config-line)#login local
gw-r2#exit
gw-r2 con0 is now available
Press RETURN to get started.
User Access Verification
Username: cio-df
Password:
gw-r2#show priv
Current privilege level is 15
inside-r1#telnet 10.1.12.2
Trying 10.1.12.2 ... Open
User Access Verification
Username: cio-df
Password:
gw-r2#
打开 ssh
gw-r2(config)#ip domain-name df.com
gw-r2(config)#crypto key generate rsa
The name for the keys will be: gw-r2.df.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]:
% Generating 512 bit RSA keys, keys will be non-exportable...[OK]
gw-r2(config)#line vty 0 4
gw-r2(config-line)#transport input ssh
r1 通过 telnet 方式无法登录
inside-r1#telnet 10.1.12.2
Trying 10.1.12.2 ...
% Connection refused by remote host
r1 通过 ssh 方式可以登录
inside-r1#ssh -l cio-df 10.1.12.2
Password:
gw-r2#
gw-r2(config)#int f0/0
gw-r2(config-if)#ip add 192.168.2.200 255.255.255.0
gw-r2(config-if)# no shutdown
用 pc crt 登录测试。
第三步:角色帐号管理
首先进入角色的管理模式
gw-r2(config)#aaa new-model
gw-r2(config)#end
gw-r2#enable view
Password:
gw-r2#
*Aug 4 11:22:17.439: %PARSER-6-VIEW_SWITCH: successfully set to view 'root'.
gw-r2#show privilege
Currently in View Context with view 'root'
添加一个初级帐号
gw-r2(config)#parser view ccna
gw-r2(config-view)#
*Aug 4 11:26:04.519: %PARSER-6-VIEW_CREATED: view 'ccna' successfully created.
gw-r2(config-view)#secret ciscoccna
gw-r2(config-view)#command exec include ?
LINE Keywords of the command
all wild card support 所有相关
gw-r2(config-view)#command exec include show run
gw-r2(config-view)#command exec include reload
登录测试
gw-r2#disable
gw-r2>enable view ccna
Password:
gw-r2#
*Aug 4 11:29:06.207: %PARSER-6-VIEW_SWITCH: successfully set to view 'ccna'.
gw-r2#
gw-r2#show running-config
Building configuration...
Current configuration : 17 bytes
!
End
自己练习:增加两个 user
Interuser:可以配所有接口,如配 ip 地址,no shutdown 和 shutdown 之类
routeruser:可以配所有路由协议,如可以 network 和 router-id 之类 .
gw-r2#enable view
Password:
gw-r2#conf t
gw-r2(config)#parser view interuser
gw-r2(config-view)#secret ciscocisco
gw-r2(config-view)#commands exec include conf t
gw-r2(config-view)#commands configure include all interface
gw-r2(config-view)#end
gw-r2(config)#parser view routeruser
gw-r2(config-view)#secret ciscocisco
gw-r2(config-view)#command exec include conf t
gw-r2(config-view)#command configure include all router
第四步:结合 acs 多级管理
对于 console 登录基于本地用户认证
gw-r2(config)#aaa authentication login con local
gw-r2(config)#line console 0
gw-r2(config-line)#login authentication con
给自己留登录后门
gw-r2(config)#aaa authentication login vty100 line(基于线路口令认证)
gw-r2(config)#line vty 100
gw-r2(config-line)#login authentication vty100
gw-r2(config-line)#password dfcisco
gw-r2(config-line)#rotary 88 (登录端口为 3088)
gw-r2(config-line)#privilege level 15 (直接进入 15 级)
加密所有明文口令
gw-r2(config)#service password-encryption
用 r3 登录测时
isp-r3#telnet 210.1.23.2 3088
剩余104页未读,继续阅读
资源评论
悠闲饭团
- 粉丝: 155
- 资源: 3306
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功