本文目录
- ensp交换机怎么关闭port-security
- 交换机设置Port-Security,能接路由器吗
- cisco交换机安全配置设定命令
- 交换机 输入switchport port-security
- 思科 port security violation mode 的三种模式 有什么区别 1.protect 2.restrict 3.shutdown
- Port Security : Enabled是什么意思
- 交换机信任端口代码是什么
- s2300交换机配置端口访问限制
ensp交换机怎么关闭port-security
这是交换机设置端口安全命令,关闭port-security命令就是undo port-security 。
交换机设置Port-Security,能接路由器吗
路由器使用方法是: 一、上网硬件 四口宽带路由器一个,直通双绞网线二根。 二、硬件安装 1、把公司网线,插到宽带路由器的WAN端口上,用直通双绞网线把路由器LAN端口同电脑网卡相连。 2、启动宽带猫和路由器的电源。 三、配置路由器 以TP-LINK的SOHO RT402宽带路由器为例,做如下设置(按该路由器说明书去做): 1、在IE窗口地址栏,输入192.168.1.1,打“转到”打开 要求输入用户名和密码的对话框。 2、在用户名和密码文本框中分别输入“admin”,确定,打开器的配置界面。 3、在路由的网络连接向导里面选择使用“WAN端口”。选择动态IP,输入DNS 四、配置网络电脑 给二台电脑分配固定IP地址(也可选择自取获取)。 1、打 开“本地连接”属性,在TCP/IP协议 上双击,出来一个对话框,在对话框中选择“使用固定IP地址”,在IP地址里输入192.168.1.2,子网掩码255.255.255.0,网关 192.168.1.1,主DNS192.168.1.1,确定,另一台电脑除了IP地址为192.168.1.3,别的栏目都一样。
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
***隐藏网址***
***隐藏网址***
***隐藏网址***
三、交换机防攻击安全加固配置
MAC Flooding(泛洪)和Spoofing(欺骗)攻击
预防方法:有效配置交换机port-security
STP攻击
预防方法:有效配置root guard,bpduguard,bpdufilter
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 bpdufilter enable
/当启用bpdufilter功能时,该端口将丢弃所有的bpdu包,可能影响网络拓扑的稳定性并造成网络环路
switch(config-if)#spanning-tree bpduguard enable
/当启用bpduguard功能的交换机端口接收到bpdu时,会立即将该端口置为error-disabled状态而无法转发数据,进而避免了网络环路!
注意:同时启用bpduguard与bpdufilter时,bpdufilter优先级较高,bpduguard将失效!
广播、组播风暴控制设定
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
交换机 输入switchport port-security
输入以下命令:
设置交换机MAC地址,学习模式由CPU控制就可以解决该问题。config模式下输入mac-address-learning cpu-control。神州数码二层交换机设置了规则,但就是不违反规则就是因为MAC学习方式没有设置好。
思科 port security violation mode 的三种模式 有什么区别 1.protect 2.restrict 3.shutdown
应用到端口安全,这是定义的三种违规模式;1、protect 模式,当违规 时,只丢弃违规的数据流量,不违规的正常转发,而且不会通知有流量违规,也就是不会发送SNMP trap ; 2、restrict , 当违规时,只丢弃违规的流量,不违规的正常转发,但它会产生流量违规通知,发送SNMP trap,并且会记录日志; 3、shutdown,这个是默认模式,当违规时,将接口变成error-disabled并shut down,并且接口LED灯会关闭,也会发SNMP trap,并会记录syslog。 当接口被error-disabled后,要恢复,可以在接口上使用命令:shutdown 后no shutdown。
Port Security : Enabled是什么意思
Port Security特性记住的是连接到交换机端口的以太网MAC地址即网卡号,并只答应某个MAC地址通过本端口通信。假如任何其它MAC地址试图通过此端口通信,端口安全特性会阻止它。使用端口安全特性可以防止某些设备访问网络,并增强安全性。
交换机信任端口代码是什么
port-security、violation。交换机信任端口代码通常是port-security、violation,这些代码表示在发生违规行为时,交换机应该采取的措施,如保护端口、限制访问或关闭端口。
s2300交换机配置端口访问限制
s2300交换机配置端口访问限制如下:1、进入交换机命令行界面,输入系统管理口令,进入交换机管理视图。2、配置端口安全策略,输入命令:port-securityenable,启用交换机的端口安全机制。3、配置端口加入端口安全策略,输入命令:port-securityportinterfaceinterface-typeinterface-number,将指定端口加入端口安全策略中,例如:port-securityportinterfaceGigabitEthernet0/0/1。4、配置端口加入端口安全策略,输入命令:port-securityportinterfaceinterface-typeinterface-number,将指定端口加入端口安全策略中,例如:port-securityportinterfaceGigabitEthernet0/0/1。5、配置端口MAC地址学习方式,输入命令:port-securitymac-addresslearning{static|dynamic},设置端口MAC地址的学习方式,静态或动态学习方式。6、配置端口违规操作动作,输入命令:port-securityviolation-action{shutdown|restrict|shutdownvlan},设置端口违规操作时的处理方式,例如:port-securityviolation-actionshutdown。7、保存配置,输入命令:save,将配置保存到交换机配置文件中,以便下次启动时加载配置。