diff --git "a/25 \351\222\261\346\263\260\351\223\255/25 \351\222\261\346\263\260\351\223\255 \344\275\234\344\270\232/\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272.pkt" "b/25 \351\222\261\346\263\260\351\223\255/25 \351\222\261\346\263\260\351\223\255 \344\275\234\344\270\232/\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272.pkt" new file mode 100644 index 0000000000000000000000000000000000000000..7378df7ea39fd7ea79598ec16ab2c1e9522c8ebe Binary files /dev/null and "b/25 \351\222\261\346\263\260\351\223\255/25 \351\222\261\346\263\260\351\223\255 \344\275\234\344\270\232/\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272.pkt" differ diff --git "a/25 \351\222\261\346\263\260\351\223\255/25 \351\222\261\346\263\260\351\223\255 \344\275\234\344\270\232/\345\244\247\347\273\274\345\220\210.pkt" "b/25 \351\222\261\346\263\260\351\223\255/25 \351\222\261\346\263\260\351\223\255 \344\275\234\344\270\232/\345\244\247\347\273\274\345\220\210.pkt" new file mode 100644 index 0000000000000000000000000000000000000000..7b6adc941e3a85fe1c7f41b4d29cc2cdc83220e9 Binary files /dev/null and "b/25 \351\222\261\346\263\260\351\223\255/25 \351\222\261\346\263\260\351\223\255 \344\275\234\344\270\232/\345\244\247\347\273\274\345\220\210.pkt" differ diff --git "a/25 \351\222\261\346\263\260\351\223\255/25 \351\222\261\346\263\260\351\223\255 \347\254\224\350\256\260/\345\210\235\350\257\206\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272.md" "b/25 \351\222\261\346\263\260\351\223\255/25 \351\222\261\346\263\260\351\223\255 \347\254\224\350\256\260/\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 0000000000000000000000000000000000000000..302de070cc2e44e3bf94efa5ece00006b41a81d4 --- /dev/null +++ "b/25 \351\222\261\346\263\260\351\223\255/25 \351\222\261\346\263\260\351\223\255 \347\254\224\350\256\260/\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,9 @@ + + + + +初识三层交换机 + +1. ip routing 开启路由功能:作用让不同网段的ip互通,全局模式 +2. no switchport 开启端口的三层功能:作用是让二层端口变成三层端口,使其可以绑定IP [这个命令要求先进入对应的端口]int f 0/1 +3. switchport trunk encapsulation dot1q:将trunk模式先封装成dot1q协议模式。才可以设置turnk,接口模式 \ No newline at end of file diff --git "a/25 \351\222\261\346\263\260\351\223\255/25 \351\222\261\346\263\260\351\223\255 \347\254\224\350\256\260/\347\253\257\345\217\243\345\256\211\345\205\250.md" "b/25 \351\222\261\346\263\260\351\223\255/25 \351\222\261\346\263\260\351\223\255 \347\254\224\350\256\260/\347\253\257\345\217\243\345\256\211\345\205\250.md" new file mode 100644 index 0000000000000000000000000000000000000000..751560cfcd1dfc9ac6100e1ef22638e371da176f --- /dev/null +++ "b/25 \351\222\261\346\263\260\351\223\255/25 \351\222\261\346\263\260\351\223\255 \347\254\224\350\256\260/\347\253\257\345\217\243\345\256\211\345\205\250.md" @@ -0,0 +1,23 @@ +# 交换机端口安全的配置 + +```js +// 1.选择要进行安全设置的端口 +Switch(config)#int f0/1 +// 2.启用交换机接口的接口安全设置 +Switch(config-if)#switchport port-security // 直接这么写会报提示 +//Command rejected: FastEthernet0/1 is a dynamic port. 因为端口默认是动态的。要改成访问模式access +// 3.改成访问模式access +Switch(config-if)#switchport mode access +Switch(config-if)#switchport port-security // 再次启用交换机接口的接口安全设置 +// 启动安全设置后,还要做三件事,才能生效 +Switch(config-if)#switchport port-security maximum 1 // 设置最大允许连接的终端数量1 +Switch(config-if)#switchport port-security violation shutdown //设置超过最大连接数的违规设备的处理方式 +Switch(config-if)#switchport port-security mac-address sticky //绑定正确的MAC地址 + + +// 如何测试是否生效,前提是交换机要记录到正确的MAC地址 +//为了让交换机记录到第一次正确的MAC地址,需要ping一次, +// 要重新启用被安全规则关闭的端口,先手动关闭一次,再手动开启。 +Switch#clear port-security sticky // 清除交换机已经记录的安全MAC地址,重新开始记录 +``` +