diff --git "a/33 \346\236\227\347\247\200\346\270\205/Imgs/\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\347\273\203\344\271\240\346\210\252\345\233\276.PNG" "b/33 \346\236\227\347\247\200\346\270\205/Imgs/\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\347\273\203\344\271\240\346\210\252\345\233\276.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..c24a3f3a24ee247b6dad5ffa4204269c7383fc49 Binary files /dev/null and "b/33 \346\236\227\347\247\200\346\270\205/Imgs/\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\347\273\203\344\271\240\346\210\252\345\233\276.PNG" differ diff --git "a/33 \346\236\227\347\247\200\346\270\205/\344\275\234\344\270\232/20240508-\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\347\273\203\344\271\240.md" "b/33 \346\236\227\347\247\200\346\270\205/\344\275\234\344\270\232/20240508-\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\347\273\203\344\271\240.md" new file mode 100644 index 0000000000000000000000000000000000000000..bb98a9cc5efbd9ee230765f9a0b6f1b5960360e4 --- /dev/null +++ "b/33 \346\236\227\347\247\200\346\270\205/\344\275\234\344\270\232/20240508-\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\347\273\203\344\271\240.md" @@ -0,0 +1,51 @@ +1. 在二层交换机(Sw1)创建Vlan 100、Vlan 200,并将其命名为*为V*LAN00100和VLAN00200,并将PC1加入VLAN 100,PC2加入VLAN 200; + +```js +vlan 100//创建 +name VLAN00100//命名 +int f 0/1//选中PC1的接口 +switch access vlan 100//将其划分到VLAN 100 +vlan 200 +name VLAN00200 +int f 0/2//选中PC2的接口 +switch access vlan 200//将其划分到VLAN 200 +``` + +2、交换机之间连接端口配置Trunk口 + +```js +(1)、二层交换机Sw1 +int f 0/24//选中与三层交换机连接的接口 +switch mode trunk//设置成trunk模式 +(2)、三层交换机Sw2 +int f 0/24//选中与二层交换机连接的接口 +switch mode trunk//设置成trunk模式 +``` + +3、三层交换机SW2启用路由功能; + +```js +ip routing +``` + +4、在三层交换机SW2上创建VLAN100和VLAN200,分别命名为VLAN00100和VLAN00200,并配置相应的SVI地址; + +```js +no ip routing//先关闭路由 +int vlan 100 +ip address 192.168.100.254 255.255.255.0//配置vlan 100的IP及子网掩码 +int vlan 200 +ip address 192.168.200.254 255.255.255.0//配置vlan 200的IP及子网掩码 +int f 0/24//查找连接二层交换机的接口 +switch trunk encapsulation dot1q//把该接口封装协议改成dot1q +switch mode trunk//设置成trunk模式 +ip routing//开启路由 +``` + +5、按下方表格中的要求完成设备主机名(hostname)及接口配置; + + + +##### 截图 + +![](../Imgs/三层交换机练习截图.PNG) \ No newline at end of file diff --git "a/33 \346\236\227\347\247\200\346\270\205/\347\254\224\350\256\260/20240508-\344\272\244\346\215\242\346\234\272\347\232\204\347\253\257\345\217\243\345\256\211\345\205\250\351\205\215\347\275\256.md" "b/33 \346\236\227\347\247\200\346\270\205/\347\254\224\350\256\260/20240508-\344\272\244\346\215\242\346\234\272\347\232\204\347\253\257\345\217\243\345\256\211\345\205\250\351\205\215\347\275\256.md" new file mode 100644 index 0000000000000000000000000000000000000000..e6ab187585e783815bc51ea8bcda9ebaa4ea015d --- /dev/null +++ "b/33 \346\236\227\347\247\200\346\270\205/\347\254\224\350\256\260/20240508-\344\272\244\346\215\242\346\234\272\347\232\204\347\253\257\345\217\243\345\256\211\345\205\250\351\205\215\347\275\256.md" @@ -0,0 +1,54 @@ +#### 交换机的端口安全配置 + +1. 查找要进行安全设置的端口,并将其设置成访问模式(因为交换机默认是动态模式) + + ```js + switch mode access(访问模式) + ``` + + + +2. 启用交换机接口安全设置 + + ```js + switch port-security + ``` + + + +3. 设置最大连接终端数量:1 + + ```js + switch port-security maximum 1 + ``` + + + +4. 设置超过最大连接数的违规处理方式:将接口关闭 + + ```js + switch port-security shut + ``` + + + +5. 绑定正确的Mac地址: + + ```js + switch port-security mac-address sticky + ``` + + + +6. 检查是否生效的前提是交换机记录正确的Mac地址(先ping一次) + +7. 要重启被安全规则关闭的端口,**要先手动再关闭一次再重新打开** + +8. 清除交换机安全设置的Mac地址:(清除后可以重新设置新的Mac地址) + + ```js + 全局模式下clear port-security sticky + ``` + + +