enable英音:[in'eibl]美音:[in'ebl] vt. , 使能够,使(成为)可能,使可行,使容易,使有效,使实现。enable是cisco路由和交换设备的一个常用命令,用于将设备从当前的用户模式切换至特权模式(用户模式只能查看设备初始化信息,特权模式查看所有信息、调试、保存配置信息)。由于enable能够进入设备的特权模式,修改设备全部配置信息,为保证命令安全性,CISCO系统设置了enable密码,只有经过密码验证才能成功进入特权模式,否则退回用户模式。
函数名
功 能: 开放硬件中断
用 法: void enable(void);
程序例:
/* ** NOTE:
This is an interrupt service routine. You can NOT compile this program
with Test Stack Overflow turned on and get an executable file which will
operate correctly.
*/
#include
#include
#include
/* The clock tick interrupt */
#define INTR 0X1C
void interrupt ( *oldhandler)(void);
int count=0;
void interrupt handler(void)
{
/*
disable interrupts during the handling of the interrupt
*/
disable();
/* increase the global counter */
count++;
/*
re enable interrupts at the end of the handler
*/
enable();
/* call the old routine */
oldhandler();
}
int main(void)
{
/* save the old interrupt vector */
oldhandler = getvect(INTR);
/* install the new interrupt handler */
setvect(INTR, handler);
/* loop until the counter exceeds 20 */
while (count < 20)
printf("count is %d//n",count);
/* reset the old interrupt handler */
setvect(INTR, oldhandler);
return 0;
}
系统命令
enable是cisco路由和交换设备的一个常用命令,用于将设备从当前的用户模式切换至特权模式(用户模式只能查看设备初始化信息,特权模式查看所有信息、调试、保存配置信息)。
用户模式只能查看设备信息,使用PING命令。特权模式则进入配置模式,可以修改设备配置信息。
命令用法
假如当前设备名是Switch,进入设备后首先处于用户模式(符号为" > ")。
输入enable命令后,设备将从用户模式(符号为">")升级至特权模式(符号为"#"),
示例:
Switch > (当前为用户模式)
Switch > enable (输入enable命令)
Switch # (切换至特权模式)
命令安全性
由于enable能够进入设备的特权模式,修改设备全部配置信息,为保证命令安全性,CISCO系统设置了enable密码,只有经过密码验证才能成功进入特权模式,否则退回用户模式。
建议首次启用 cisco 设备后,建立enable安全性配置,保证设备系统的访问安全。
设置enable密码主要有 enable password **** 和 enable secret **** 两个命令。****为设置的密码。以上两个命令均要在设备的全局模式(conf)下配置。
1、enable password **** ,设置普通密码,以明文方式保存在配置文件中,可以在show running-configure看到,普通级别的加密。
示例:
switch > enable (进入特权模式)
switch # configure terminal (进入全局配置模式)
switch(conf) # enable password aaaa (设置普通密码aaaa)
通过 show running-configure 可以查看设备配置的明文密码,如下:
Switch#sh run
Building configuration…
Current configuration : 970 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
enable password aaaa (明文密码显示)
!
!
2、enable secret **** ,设置高级密码,以密文方式保存在配置文件中,无法在show running-configure看到,使用的是MD5算法加密。
注:secret 的级别高于password,如果两个密码同时设置,则secret 的密码生效,password的密码不生效。
示例:
switch > enable (进入特权模式)
switch # configure terminal (进入全局配置模式)
switch(conf) # enable secret aaaa (设置高级密码aaaa)
通过 show running-configure 无法查看设备配置的明文密码,如下:
Switch#sh run
Building configuration…
Current configuration : 970 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
enable secret 5 $1$mERr$hy8E2yMknG1VFOpEO7zOL1 (密码以MD5加密后的乱码显示,无法查看到明文)
!
!
编程语言
用途
获取或设置一个值,该值指示是否启用应用程序域。
命名空间:System.Web.Configuration
程序集:System.Web(在 system.web.dll 中)
语法
Visual Basic(声明)
Public Property Enable As Boolean
Visual Basic(用法)
Dim instance As HttpRuntimeSection
Dim value As Boolean
value = instance.Enable
instance.Enable = value
该文章由作者:【萨尔那加】发布,本站仅提供存储、如有版权、错误、违法等相关信息请联系,本站会在1个工作日内进行整改,谢谢!
