导航:首页 > 文档加密 > 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交换机密码加密相关的资料

热点内容
java指定位数的随机数 浏览:899
300公斤压缩机 浏览:549
java时间转换毫秒数 浏览:290
我的世界怎么开挂在服务器 浏览:848
app怎么退定金 浏览:925
php获取外网地址 浏览:172
单片机lan 浏览:582
html炫酷黑页源码 浏览:955
如何远程更新服务器 浏览:785
服务器导轨怎么安装图解 浏览:984
如何设置加密共享文档 浏览:656
单片机双灯左移右移 浏览:927
网页无法打开pdf 浏览:556
linux命令scp 浏览:519
怎样把图片转为pdf格式 浏览:115
linux变量类型 浏览:840
linux中网卡配置 浏览:704
appstore里面的软件怎么设定年龄 浏览:290
jpg在线转换pdf格式 浏览:600
java泛型详解 浏览:616