From 0706401c0e8744921bd7407ea7486d933415afd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E7=89=A1=E4=B8=B9?= <3334543605@qq.com> Date: Thu, 9 May 2024 23:39:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...11\345\205\250\351\205\215\347\275\256.md" | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 "03\351\222\237\347\211\241\344\270\271/\347\254\224\350\256\260/2024-5-8\344\272\244\346\215\242\346\234\272\347\253\257\345\217\243\345\256\211\345\205\250\351\205\215\347\275\256.md" diff --git "a/03\351\222\237\347\211\241\344\270\271/\347\254\224\350\256\260/2024-5-8\344\272\244\346\215\242\346\234\272\347\253\257\345\217\243\345\256\211\345\205\250\351\205\215\347\275\256.md" "b/03\351\222\237\347\211\241\344\270\271/\347\254\224\350\256\260/2024-5-8\344\272\244\346\215\242\346\234\272\347\253\257\345\217\243\345\256\211\345\205\250\351\205\215\347\275\256.md" new file mode 100644 index 0000000..6b7c602 --- /dev/null +++ "b/03\351\222\237\347\211\241\344\270\271/\347\254\224\350\256\260/2024-5-8\344\272\244\346\215\242\346\234\272\347\253\257\345\217\243\345\256\211\345\205\250\351\205\215\347\275\256.md" @@ -0,0 +1,32 @@ +# 交换机端口安全配置 + +### 实验步骤 + +- 选择要进行安全设置的端口 + - int 发0/1 +- 先将该接口设置为access模式 + - Switchport mode access +- 启用交换机接口的接口安全设置 + - Switchport port-security +- 设置最大允许连接数量为1 + - Switchport port-security maximum 1 +- 设置超过最大连接数的违规设备的处理方式 + - Switchport port-security violation shutdown +- 绑定正确的mac地址 + - Switchport port-security mac-address sticky + + + + + +##### 在特权模式下: + +- 清除交换机以及记录的安全mac地址 重新开始记录 + - clear port-security sticky + + + +#### 注意: + +- 分清access模式与trunk模式 注意不要写错 +- 交换机之间连接的端口模式需要设置成trunk模式 \ No newline at end of file -- Gitee From 63aa2ef16376835324403bc5c0a93024768fd32e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E7=89=A1=E4=B8=B9?= <3334543605@qq.com> Date: Fri, 10 May 2024 16:38:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...02\344\272\244\346\215\242\346\234\272.md" | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 "03\351\222\237\347\211\241\344\270\271/\347\254\224\350\256\260/2024-5-10\345\210\235\350\257\206\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272.md" diff --git "a/03\351\222\237\347\211\241\344\270\271/\347\254\224\350\256\260/2024-5-10\345\210\235\350\257\206\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272.md" "b/03\351\222\237\347\211\241\344\270\271/\347\254\224\350\256\260/2024-5-10\345\210\235\350\257\206\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272.md" new file mode 100644 index 0000000..a08d156 --- /dev/null +++ "b/03\351\222\237\347\211\241\344\270\271/\347\254\224\350\256\260/2024-5-10\345\210\235\350\257\206\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272.md" @@ -0,0 +1,31 @@ +# 三层交换机 + +**三层交换机具有部分路由功能** + +## 三层交换机的虚拟接口 + +- **概念**:在三层交换机上配置的VLAN接口为虚接口SVI + +交换机配置了VLAN虚拟接口,就好像在交换机的内部内虚拟出这两个网关,当数据从对应的VLAN物理接口进入后,会映射到VLAN的虚拟接口从而找到自己的网关。 + +- **配置命令** + + - ``` + 前提 + 1. switchport trunk encapsulation dot1q//在三层交换机开启trunk模式 + 2. no switchport //将交换接口转换成路由器接口 + + ``` + + + + - ` + + - VLAN 10 //创建VLAN + + - int vlan 10 //进入VLAN + + - ip address ip 地址+子网掩码 //设置虚拟VLAN的IP + + ` + -- Gitee