diff --git "a/\351\231\206\345\260\217\350\220\215/2024-5-8\350\256\262\350\257\276\345\206\205\345\256\271.md" "b/\351\231\206\345\260\217\350\220\215/2024-5-8\350\256\262\350\257\276\345\206\205\345\256\271.md" new file mode 100644 index 0000000000000000000000000000000000000000..a37642c3108601a0d4d374b5f069bacd2dbcef2b --- /dev/null +++ "b/\351\231\206\345\260\217\350\220\215/2024-5-8\350\256\262\350\257\276\345\206\205\345\256\271.md" @@ -0,0 +1,19 @@ +### 5-8讲课内容 + +一、接口的安全模式 + +- 为什么要设置交换机接口的安全模式: +- 1.限制接入主机数量,比如限制每个接口只能连接固定数量的主机 +- 2.如果接口模式设置为单主机,那么当交换机检测到有新MAC地址加入时,自动将原有MAC地址删除。 +- 3.实现基于MAC和VLAN划分 +- 4.提高端口利用效率 + +二、设置交换机的安全模式配置: + +``` +Switch(config-if)#switchport mode access //把接口设置为访问模式 +Switch(config-if)#switchport port-security //开启安全模式 +Switch(config-if)#switchport port-security maximum 1 //设置最大连接数 +Switch(config-if)#switchport port-security violation shutdown //设置超过限制后采取的措施上述为关机模式 +/*Switch(config-if)#switchport port-security mac-address stick //设置MAC地址的输入模式上述为“粘性模式” +``` \ No newline at end of file diff --git "a/\351\231\206\345\260\217\350\220\215/2024-5-9\350\256\262\350\257\276\345\206\205\345\256\271.md" "b/\351\231\206\345\260\217\350\220\215/2024-5-9\350\256\262\350\257\276\345\206\205\345\256\271.md" new file mode 100644 index 0000000000000000000000000000000000000000..d95b3392eaecce7c566b7c64f917757a9e31117b --- /dev/null +++ "b/\351\231\206\345\260\217\350\220\215/2024-5-9\350\256\262\350\257\276\345\206\205\345\256\271.md" @@ -0,0 +1,14 @@ +## 5-9讲课内容 + +#### 一、认识三层交换机 + +- 三层交换机增加了路由选择功能的网络设备,它可以基于MAC地址和IP地址进行数据转发,实现一次路由多次转发,从而加快大型局域网内部的数据交换。 + - 三层交换机设置VLAN + - switchport trunk encapsulation dot1q:将trunk模式先封装成dot1q协议模式。才可以设置turnk,接口模式 + - ip routing 开启路由功能:作用让不同网段的ip互通,全局模式 + - no switchport 开启端口的三层功能:作用是让二层端口变成三层端口,使其可以绑定IP [这个命令要求先进入对应的端口]int f 0/1 + + + + +