導航:首頁 > 文檔加密 > cisco交換機密碼加密

cisco交換機密碼加密

發布時間:2024-09-10 14:39:19

1. Cisco 路由器、交換機中各密碼的作用

1、思科交換機主要有兩層密碼:
第一層密碼:控制台登錄密碼或遠程登錄(虛擬終端vty)密碼。
第二層密碼:進入特權執行模式密碼。

2、控制台登錄密碼的設置
比如將控制台登錄密碼設置為cisco,進入配置模式後,輸入以下指令:
S1(config)#line console 0 從全局配置模式切換到控制台0的線路配置模式
S1(config-line)#password cisco 設置控制台0的線路登錄密碼為cisco
S1(config-line)#login 將控制台線路設置為需要輸入密碼才允許訪問

3、遠程登錄密碼的設置
比如將遠程登錄密碼設置為cisco,進入配置模式後,輸入以下指令:
S1(config)#line vty 0 15 從全局配置模式切換到vty的線路配置模式(Cisco 2960有線路0~15)
S1(config-line)#password cisco 設置vty的線路登錄密碼為cisco
S1(config-line)#login 將vty線路設置為需要輸入密碼才允許訪問

4、進入特權執行模式密碼的設置
進入特權執行模式密碼的設置方法有兩種:(1)enable password;(2)enable secret。
enable password設置的密碼可以在配置文件中看到,而enable secret設置的密碼在配置文件中看不到,比enable password更安全。如果使用了enable secret設置了密碼,則交換機將不會再使用enable password設置的密碼,兩種設置方式設置的密碼不能相同。
比如將進入特權執行模式密碼設置為class,輸入一下指令:
S1(config)#enable password class

S1(config)#enable secret class

5、對登錄密碼和進入特權執行模式密碼進行加密
進行加密後,交換機所有系統密碼都將以加密形式存儲,在配置文件中將不能被直接看到,而是一些雜亂的字元。
輸入以下指令進行加密:
S1(config)#service password-encryption
輸入以下指令取消加密:
S1(config)#no service password-encryption
註:取消加密不會將當前已加密的密碼恢復為可閱讀文本,但是新設置的密碼將以可閱讀文本存儲和顯示。

2. cisco交換機安全配置設定命令

cisco交換機安全配置設定命令大全

思科交換機的安全怎麼設置,下面為大家分交換機安全設置的配置命令,希望對同學們學習思科交換機有所幫助!

一、交換機訪問控制安全配置

1、對交換機特權模式設置密碼盡量採用加密和md5 hash方式

switch(config)#enable secret 5 pass_string

其中 0 Specifies an UNENCRYPTED password will follow

5 Specifies an ENCRYPTED secret will follow

建議不要採用enable password pass_sting密碼,破解及其容易!

2、設置對交換機明文密碼自動進行加密隱藏

switch(config)#service password-encryption

3、為提高交換機管理的靈活性,建議許可權分級管理並建立多用戶

switch(config)#enable secret level 7 5 pass_string7 /7級用戶進入特權模式的密碼

switch(config)#enable secret 5 pass_string15 /15級用戶進入特權模式的密碼

switch(config)#username userA privilege 7 secret 5 pass_userA

switch(config)#username userB privilege 15 secret 5 pass_userB

/為7級,15級用戶設置用戶名和密碼,Cisco privilege level分為0-15級,級別越高許可權越大

switch(config)#privilege exec level 7 commands

/為7級用戶設置可執行的命令,其中commands可以根據分配給用戶的許可權自行定義

4、本地console口訪問安全配置

switch(config)#line console 0

switch(config-line)#exec-timeout 5 0 /設置不執行命令操作的超時時間,單位為分鍾和秒

switch(config-line)#logging synchronous

/強制對彈出的干擾日誌信息進行回車換行,使用戶輸入的命令連續可見

設置登錄console口進行密碼驗證

方式(1):本地認證

switch(config-line)#password 7 pass_sting /設置加密密碼

switch(config-line)#login /啟用登錄驗證

方式(2):本地AAA認證

switch(config)#aaa new-model /啟用AAA認證

switch(config)#aaa authentication login console-in group acsserver local

enable

/設置認證列表console-in優先依次為ACS Server,local用戶名和密碼,enable特權密碼

switch(config)#line console 0

switch(config-line)# login authentication console-in

/調用authentication設置的console-in列表

5、遠程vty訪問控制安全配置

switch(config)#access-list 18 permit host x.x.x.x

/設置標准訪問控制列表定義可遠程訪問的PC主機

switch(config)#aaa authentication login vty-in group acsserver local

enable

/設置認證列表vty-in, 優先依次為ACS Server,local用戶名和密碼,enable特權密碼

switch(config)#aaa authorization commands 7 vty-in group acsserver local

if-authenticated

/為7級用戶定義vty-in授權列表,優先依次為ACS Server,local授權

switch(config)#aaa authorization commands 15 vty-in group acsserver local

if-authenticated

/為15級用戶定義vty-in授權列表,優先依次為ACS Server,local授權

switch(config)#line vty 0 15

switch(config-line)#access-class 18 in /在線路模式下調用前面定義的標准ACL 18

switch(config-line)#exec-timeout 5 0 /設置不執行命令操作的超時時間,單位為分鍾和秒

switch(config-line)#authorization commands 7 vty-in /調用設置的授權列表vty-in

switch(config-line)#authorization commands 15 vty-in

switch(config-line)#logging synchronous

/強制對彈出的干擾日誌信息進行回車換行,使用戶輸入的命令連續可見

switch(config-line)#login authentication vty-in

/調用authentication設置的vty-in列表

switch(config-line)#transport input ssh

/有Telnet協議不安全,僅允許通過ssh協議進行遠程登錄管理

6、AAA安全配置

switch(config)#aaa group server tacacs+ acsserver /設置AAA伺服器組名

switch(config-sg-tacacs+)#server x.x.x.x /設置AAA伺服器組成員伺服器ip

switch(config-sg-tacacs+)#server x.x.x.x

switch(config-sg-tacacs+)#exit

switch(config)# tacacs-server key paa_string /設置同tacacs-server伺服器通信的密鑰

二、交換機網路服務安全配置

禁用不需要的各種服務協議

switch(config)#no service pad

switch(config)#no service finger

switch(config)#no service tcp-small-servers

switch(config)#no service udp-small-servers

switch(config)#no service config

switch(config)#no service ftp

switch(config)#no ip http server

switch(config)#no ip http secure-server

/關閉http,https遠程web管理服務,默認cisco交換機是啟用的

三、交換機防攻擊安全加固配置

MAC Flooding(泛洪)和Spoofing(欺騙)攻擊

預防方法:有效配置交換機port-security

STP攻擊

預防方法:有效配置root guard,bpguard,bpfilter

VLAN,DTP攻擊

預防方法:設置專用的native vlan;不要的介面shut或將埠模式改為access

DHCP攻擊

預防方法:設置dhcp snooping

ARP攻擊

預防方法:在啟用dhcp snooping功能下配置DAI和port-security在級聯上層交換機的trunk下

switch(config)#int gi x/x/x

switch(config-if)#sw mode trunk

switch(config-if)#sw trunk encaps dot1q

switch(config-if)#sw trunk allowed vlan x-x

switch(config-if)#spanning-tree guard loop

/啟用環路保護功能,啟用loop guard時自動關閉root guard

接終端用戶的埠上設定

switch(config)#int gi x/x/x

switch(config-if)#spanning-tree portfast

/在STP中交換機埠有5個狀態:disable、blocking、listening、learning、forwarding,只有處於forwarding狀態的埠才可以發送數據。但需經過從blocking-->listening

15s,listening-->learning 15s,learning-->forwarding 20s

共計50s的時間,啟用portfast後將直接從blocking-->forwarding狀態,這樣大大縮短了等待的時間。

說明:portfast僅適用於連接終端或伺服器的交換機埠,不能在連接交換機的埠上使用!

switch(config-if)#spanning-tree guard root

/當一埠啟用了root

guard功能後,當它收到了一個比根網橋優先值更優的.BPDU包,則它會立即阻塞該埠,使之不能形成環路等情況。這個埠特性是動態的,當沒有收到更優的包時,則此埠又會自己變成轉發狀態了。

switch(config-if)#spanning-tree bpfilter enable

/當啟用bpfilter功能時,該埠將丟棄所有的bp包,可能影響網路拓撲的穩定性並造成網路環路

switch(config-if)#spanning-tree bpguard enable

/當啟用bpguard功能的交換機埠接收到bp時,會立即將該埠置為error-disabled狀態而無法轉發數據,進而避免了網路環路!

注意:同時啟用bpguard與bpfilter時,bpfilter優先順序較高,bpguard將失效!

廣播、組播風暴控制設定

switch(config-if)#storm-control broadcast level 10 /設定廣播的閥值為10%

switch(config-if)#storm-control multicast level 10 /設定組播的閥值為10%

switch(config-if)#storm-control action shutdown / Shutdown this interface

if a storm occurs

or switch(config-if)#storm-control action trap / Send SNMP trap if a storm

3. 思科交換機詳細配置方法和命令

思科交換機的基本配置命令學習
一、交換機口令設置:

switch>enable ;進入特權模式
switch#config terminal ;進入全局配置模式

switch(config)#hostname csico ;設置交換機的主機名
switch(config)#enable secret
csico1 ;設置特權加密口令
switch(config)#enable password csico8 ;設置特權非密口令

switch(config)#line console 0 ;進入控制台口
switch(config-line)#line vty 0 4
;進入虛擬終端
switch(config-line)#login ;虛擬終端允許登錄
switch(config-line)#password
csico6 ;設置虛擬終端登錄口令csico6
switch#exit ;返回命令

二、交換機顯示命令:
switch#write ;保存配置信息

switch#show vtp ;查看vtp配置信息
switch#show run ;查看當前配置信息
switch#show
vlan ;查看vlan配置信息
switch#show interface ;查看埠信息
switch#show int f0/0
;查看指定埠信息
switch#show int f0/0 status;查看指定埠狀態
switch#dir flash: ;查看快閃記憶體

Cisco路由器配置命令大全網路 2010-06-26 06:43:44 閱讀657 評論0 字型大小:大中小 訂閱 .

(1)模式轉換命令
用戶模式----特權模式,使用命令"enable"
特權模式----全局配置模式,使用命令"config
t"
全局配置模式----介面模式,使用命令"interface+介面類型+介面號"

全局配置模式----線控模式,使用命令"line+介面類型+介面號"
注:
用戶模式:查看初始化的信息.

特權模式:查看所有信息、調試、保存配置信息
全局模式:配置所有信息、針對整個路由器或交換機的所有介面
介面模式:針對某一個介面的配置

線控模式:對路由器進行控制的介面配置
(2)配置命令
show running config 顯示所有的配置
show
versin 顯示版本號和寄存器值
shut down 關閉介面
no shutdown 打開介面
ip add +ip地址
配置IP地址
secondary+IP地址 為介面配置第二個IP地址
show interface+介面類型+介面號 查看介面管理性

show controllers interface 查看介面是否有DCE電纜
show history 查看歷史記錄
show
terminal 查看終端記錄大小
hostname+主機名 配置路由器或交換機的標識
config memory
修改保存在NVRAM中的啟動配置
exec timeout 0 0 設置控制台會話超時為0
service password-encryptin
手工加密所有密碼
enable password +密碼 配置明文密碼
ena sec +密碼 配置密文密碼
line vty 0
4/15 進入telnet介面
password +密碼 配置telnet密碼
line aux 0 進入AUX介面
password
+密碼 配置密碼
line con 0 進入CON介面
password +密碼 配置密碼
bandwidth+數字 配置帶寬

no ip address 刪除已配置的IP地址
show startup config 查看NVRAM中的配置信息

run-config atartup config 保存信息到NVRAM
write 保存信息到NVRAM
erase
startup-config 清除NVRAM中的配置信息
show ip interface brief 查看介面的謫要信息
banner
motd # +信息 + # 配置路由器或交換機的描素信息
description+信息 配置介面聽描素信息
vlan database
進入VLAN資料庫模式
vlan +vlan號+ 名稱 創建VLAN
switchport access vlan +vlan號
為VLAN為配介面
interface vlan +vlan號 進入VLAN介面模式
ip add +ip地址 為VLAN配置管理IP地址

vtp+service/tracsparent/client 配置SW的VTP工作模式
vtp +domain+域名 配置SW的VTP域名

vtp +password +密碼 配置SW的密碼
switchport mode trunk 啟用中繼
no vlan +vlan號
刪除VLAN
show spamming-tree vlan +vlan號 查看VLA怕生成樹議

三. 路由器配置命令
ip
route+非直連網段+子網掩碼+下一跳地址 配置靜態/默認路由
show ip route 查看路由表
show protocols
顯示出所有的被動路由協議和介面上哪些協議被設置
show ip protocols 顯示了被配置在路由器上的路由選擇協議,同時給出了在路由選擇協議中使用

的定時器
等信息
router rip 激活RIP協議
network +直連網段 發布直連網段

interface lookback 0 激活邏輯介面
passive-interface +介面類型+介面號 配置介面為被動模式

debug ip +協議 動態查看路由更新信息
undebug all 關閉所有DEBUG信息
router eigrp +as號
激活EIGRP路由協議
network +網段+子網掩碼 發布直連網段
show ip eigrp neighbors 查看鄰居表

show ip eigrp topology 查看拓撲表
show ip eigrp traffic 查看發送包數量
router
ospf +process-ID 激活OSPF協議
network+直連網段+area+區域號 發布直連網段
show ip ospf
顯示OSPF的進程號和ROUTER-ID
encapsulation+封裝格式 更改封裝格式
no ip admain-lookup
關閉路由器的域名查找
ip routing 在三層交換機上啟用路由功能
show user 查看SW的在線用戶
clear line
+線路號 清除線路

四. 三層交換機配置命令
配置一組二層埠
configure terminal 進入配置狀態

nterface range {port-range} 進入組配置狀態
配置三層埠
configure terminal 進入配置狀態

interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} |
{port-

channel port-channel-number} 進入埠配置狀態
no switchport
把物理埠變成三層口
ip address ip_address subnet_mask 配置IP地址和掩碼
no shutdown 激活埠

例:
Switch(config)# interface gigabitethernet0/2
Switch(config-if)#
no switchport
Switch(config-if)# ip address 192.20.135.21 255.255.255.0

Switch(config-if)# no shutdown
配置VLAN
configure terminal 進入配置狀態

vlan vlan-id 輸入一個VLAN號, 然後進入vlan配態,可以輸入一個新的VLAN號或舊的來進行修改

4. cisco配置交換機使能加密口令是什麼命令是什麼

命令為:lineconsole0。

如下參考:

1.首先點擊電腦打開思科軟體。使用控制台電纜將計算機連接到路由器。

5. cisco交換機密碼配置問題

enable password 7 後面跟的是通過思科自己的加密演算法加密後的密碼。
那麼怎麼獲得思科加密演算法加密的密碼呢,我們可以在全局模式下使用命令
R1(config)# service password-encryption //這條命令使用的是7的加密方法//
然後show run,查看被思科加密後的密碼,復制出來填在
enable password 7的後面。;而如果直接使用enable password 7 +密碼是根本就不通的;並且server password-encryption後會讓你在機器里配置的所有密碼都加密;如果要設置enable password;你可以使用enable secret +密碼?這個是使用md5加密安全性更高;並且許可權在enable password 之上

閱讀全文

與cisco交換機密碼加密相關的資料

熱點內容
網頁無法打開pdf 瀏覽:555
linux命令scp 瀏覽:519
怎樣把圖片轉為pdf格式 瀏覽:115
linux變數類型 瀏覽:840
linux中網卡配置 瀏覽:704
appstore裡面的軟體怎麼設定年齡 瀏覽:290
jpg在線轉換pdf格式 瀏覽:600
java泛型詳解 瀏覽:616
pdf介質框 瀏覽:210
蘋果手機怎麼用藍牙傳app軟體到安卓 瀏覽:435
東方財富app怎麼找場內基金 瀏覽:276
粉筆app怎麼修改身份 瀏覽:529
價值投資選股公式源碼 瀏覽:681
u盤文件夾變成了白色隱藏無法使用 瀏覽:876
python如何爬取火車票 瀏覽:977
生命哲學pdf 瀏覽:61
socket程序源碼 瀏覽:156
修改文件夾用戶和用戶組 瀏覽:595
女生隱私軟體不加密不要錢 瀏覽:560
壓縮式霧化泵和霧化器一樣嗎 瀏覽:675