Cisco交换机作业1.9 端口安全

303 阅读1分钟

结构


新建财务部 153
pc0为内部存储资料的电脑,禁止上外网
pc10可以正常和其他部门联通
switch6——f0/24——switch5——f0/22——switch0

在这里插入图片描述

\

一、三层交换机设置


改成路由口就能配置ip
no switchport关闭二层接口并启用三层接口

conf t
int f0/22
no switchport
ip address 192.168.153.254 255.255.255.0

\

二、switch5设置


conf t
int f0/24
shutdown
switchport mode access

复制信任电脑MAC地址

在这里插入图片描述

switchport port-security
switchport port-security maximum 1
switchport port-security mac-address 0010.11EE.9D9E
switchport port-security violation restrict
no shut

\

三、PC0和PC10设置ip


在这里插入图片描述

\

四、测试结果


在这里插入图片描述

\

扩展


switchport port-security :打开端口防护

switchport port-security mac-address (mac地址):信任的mac地址

switchport port-security maximum 5: 允许最高5个MAC地址
.
在这里插入图片描述
switchport port-security vioalation:违规后怎么处理

shutdown:直接关闭

restrict:数据包丢弃并通知管理员

switchport port-security vioalation restrict:数据包全部丢弃

在这里插入图片描述