cisco privilege权限

             Cisco网络设备对于访问用户的不一样,能够像windows系统里的帐户设置同样,为了系统或设备的安全区别建立用户。经过权限的分配以实施安全的设备管理,怎样在Cisco路由设备里面控制相应用户的访问?那么咱们就须要知道privilege&privilege view 如何配置了。数据库

             privilege这东西很简单也很好玩的,接下来就来作个小实验吧。windows

 

              r1与r2之间网段设置为192.168.1.0/24,左边为:192。168。1。1 ,右边为192。168。1。2。安全

              咱先看下privilege的配置吧,需求:须要给chengxi用户一个四级的密码ccnp,只能使用configure terminal 其它命令不执行。网络

             命令:ide

                       username  chengxi privilege 4 password ccnp测试

                        line vty 0 4this

                        login local   spa

                         exit3d

                         enable secret level 4  ccnpblog

                         privilege  exec level 4 configure terminal

测试(r2------>r1):

 

  只能进入全局模式但不能执行任何动做:

 

那么privilege  的测试成功了,属于level 4的用户只能使用configure terminal命令。

若是咱们在本地转换用户级别的话如:enable password level 4 ccie

 

那就登陆进去就要先须要输入使能密码了,上面开始进入level 4的用户直接enable 4 回车就进入特权模式了,由于他是从r2 telnet r1的,直接认证进入特权模式了。

若是咱们要对用户行为定位更精确的话,可使用privilege view 来进行角色建立,多个privilege view 能够造成一个superview。。

          下面咱们就来建立一个privilege view 为A ,用户名与密码依旧是chengxi与ccnp。vty 认证也同样是本地数据库认证。可是咱们要建立privilege view A就先要开启aaa new-model ,而后再回到EXEC模式下输入:enable view

提示password: xxxx,输入level 15级的密码便可。

如:

 再进入全局模式里输入parser view A.就进入了parser view A配置了,你能够设置登陆密码,容许使用的命令或执行的动做。

        那么咱们如今要建立特权视图A,容许在EXEC模式下执行configure terminal ,在接口模式下只能配置fa0/1。其它配置一概否认。

parser view A
 secret  rhce

commands interface include shutdown
 commands interface include ip address
 commands interface include ip
 commands interface include no shutdown
 commands interface include no ip address
 commands interface include no ip
 commands interface include no
 commands configure include interface
 commands exec include configure terminal
 commands exec include configure
 commands exec include show
 commands configure include interface FastEthernet0/1

配置好后咱们如今就能够去测试了。

r2---->r1:

 

如今咱们已经进入了view A里面了,密码可不是level 15的密码了啊,是view A里定义的那个rhce啊。进去了以后哦,

 

看到了吧,其它命令都不可检测。呵呵。这就是咱们“受制于人”的效果啊。另外我还在上一张图里面给你们展现了一个小 case。就是alias别名的做用。看到了吧。我把telnet 192.168.1.1也就是r2 telnet r1的命令用一个r2tor1来代替了。。因此在exec里面只要输入r2tor1就能够telnet上r1了。呵呵。这个好玩吧。

相关文章
相关标签/搜索