diff --git "a/\350\265\265\345\220\257\346\201\222/2024.5.10.txt" "b/\350\265\265\345\220\257\346\201\222/2024.5.10.txt" new file mode 100644 index 0000000000000000000000000000000000000000..5fa27ef126a944bb008a833f8631cee706ec349d --- /dev/null +++ "b/\350\265\265\345\220\257\346\201\222/2024.5.10.txt" @@ -0,0 +1,52 @@ +Switch> +Switch> +Switch>en +Switch#configure terminal +Enter configuration commands, one per line. End with CNTL/Z. +Switch(config)#vlan 10 +Switch(config-vlan)#vlan 20 +Switch(config-vlan)#ex +Switch(config)#interface FastEthernet0/1 +Switch(config-if)#switchport access vlan 10 +Switch(config-if)# +Switch(config-if)#exit +Switch(config)#interface FastEthernet0/2 +Switch(config-if)#switchport access vlan 20 +Switch(config)#interface vlan 10 +Switch(config-if)#ip address 192.168.10.254 255.255.255.0 +Switch(config-if)#ex +Switch(config)#interface vlan 20 + +Switch(config-if)#ip address 192.168.20.254 255.255.255.0 + + +Switch(config)#int f 0/1 +Switch(config-if)#no switchport //开启端口的三层功能:作用是让二层端口变成三层端口,使其可以绑定IP [这个命令要求先进入对应的端口]int f 0/1 +Switch(config-if)#ip address 192.168.3.254 255.255.255.0 +Switch(config-if)#ip routing //开启路由功能,作用让不同网段的ip互通 + +Switch(config)#int f 0/2 +Switch(config-if)#no switchport //开启端口的三层功能:作用是让二层端口变成三层端口,使其可以绑定IP [这个命令要求先进入对应的端口]int f 0/1 +Switch(config-if)#ip address 192.168.4.254 255.255.255.0 +Switch(config-if)#ip routing //开启路由功能,作用让不同网段的ip互通 + + + +Swit ch> +Switch>en +Switch# +Switch#conf +Switch#configure +Switch#configure terminal +Enter configuration commands, one per line. End with CNTL/Z. +Switch(config)#ip routing //开启路由协议 + +Switch> +Switch>en +Switch#configure terminal +Switch#configure terminal +Enter configuration commands, one per line. End with CNTL/Z. +Switch(config)#interface fastEthernet 0/24 +Switch(config-if)#switchport trunk encapsulation dot1q 给他trunk + +Switch(config-if)#switchport mode trunk \ No newline at end of file diff --git "a/\350\265\265\345\220\257\346\201\222/2024.5.7.txt" "b/\350\265\265\345\220\257\346\201\222/2024.5.7.txt" new file mode 100644 index 0000000000000000000000000000000000000000..c0dadc7b24fdf1428c261f426d9cd0eba6f3b89f --- /dev/null +++ "b/\350\265\265\345\220\257\346\201\222/2024.5.7.txt" @@ -0,0 +1,15 @@ +个人固定IP上网,绑定MAC地址 + +把动态端口固定位access switchport mode access + +开启安全功能 switchport port-security + +设置端口连接对最大数量 switchport port-security maximum 1-132 + +设置超过数量采取的措施 switchport-security violation shutdown + +绑定mac地址自动粘贴 switchport port-security mac-address sticky + +清除绑定 全局clear port-security sticky + +当违反被关闭后 先手动shut再no shutdown \ No newline at end of file