enable

enable

編程用語及概念
enable英音:[in'eibl]美音:[in'ebl] vt. , 使能夠,使(成為)可能,使可行,使容易,使有效,使實現。enable是cisco路由和交換設備的一個常用命令,用于将設備從當前的用戶模式切換至特權模式(用戶模式隻能查看設備初始化信息,特權模式查看所有信息、調試、保存配置信息)。由于enable能夠進入設備的特權模式,修改設備全部配置信息,為保證命令安全性,CISCO系統設置了enable密碼,隻有經過密碼驗證才能成功進入特權模式,否則退回用戶模式。
    中文名:使能夠 外文名:enable 所屬學科: 英音:[in'eibl] 美音:[in'ebl]

函數名

功 能: 開放硬件中斷

用 法: 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 %dn",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

上一篇:disable

下一篇:pass

相關詞條

相關搜索

其它詞條