diff --git "a/53\346\235\216\346\255\246\346\226\207/\347\254\224\350\256\26018\357\274\232\344\272\244\346\215\242\346\234\272\347\253\257\345\217\243\345\256\211\345\205\250.md" "b/53\346\235\216\346\255\246\346\226\207/\347\254\224\350\256\26018\357\274\232\344\272\244\346\215\242\346\234\272\347\253\257\345\217\243\345\256\211\345\205\250.md" new file mode 100644 index 0000000000000000000000000000000000000000..b34bf854cc9ccba3fe85a14298e84112db3bd60d --- /dev/null +++ "b/53\346\235\216\346\255\246\346\226\207/\347\254\224\350\256\26018\357\274\232\344\272\244\346\215\242\346\234\272\347\253\257\345\217\243\345\256\211\345\205\250.md" @@ -0,0 +1,77 @@ +### 笔记18:交换机的端口安全 + + + +##### 一,含义: + +- 可以限制 访问接口的MAC地址以及IP (可选) 来实现 严格控制,对该接口的输入 + +##### 二,操作步骤: + +1. 选择要进行安全设置的端口 + + ```c# + int f0/1 //在全局模式下,选择接口 + ``` + +2. 设置为访问为模式 + + ```c# + sw mo access //默认是动态,转为访问模式 + ``` + +3. 启用交换机接口的安全设置 + + ```c# + sw port-security //启用 + ``` + +4. 安全设置三大块 + + - 允许连接终端的最大数量 + + ```c# + sw port-security maximum 1 //数量为1 + ``` + + - 超过该数量的处理方式(关闭) + + ```c# + sw port-security violation shutdown //处理方式(关闭) + + - 提供正确的MAC地址 + + ```c# + sw port-security mac-address sticky(默认第一次连接的mac地址) //正确的MAC地址 + ``` + +##### 三,如何进行测试: + +1. 需要记录正确的IP地址:需要ping一下 + +2. 更换MAC地址: + + - ```c# + clear port-security sticky //在特权模式下 + ``` + + - ```c# + shutdown //关闭接口 + no shut //打开接口 + ``` + +3. 查看安全状态 + + - ```c# + show port-security intf0/1 //端口安全 + ``` + + - ```c# + show port-security address//地址安全 + ``` + + + +##### 四,作业: + +![image-20240509212620425.png](https://img2.imgtp.com/2024/05/09/cTm2yMvm.png) \ No newline at end of file