当前位置:首页>综合>正文

交换机设置怎么进行优化

2025-01-14 12:46:11 互联网 未知 综合

交换机设置怎么进行优化

interface GigabitEthernet0/1 switchport access vlan 2 switchport mode access //switchport host(主机模式) = switchport mode access + switchport portfast(不能做TRUNK口) switchport protected //端口保护,主机之间相互不能访问 storm-control broadcast level 0.01 //广播风暴控制 spanning-tree portfast //端口快速启动,否则要等待生成树收敛,需要大约50秒的时间 spanning-tree bpduguard enable //当有环路时,端口变为err-disable状态,需手动关闭再启用 ip dhcp snooping //全局开启DHCP侦测 interface GigabitEthernet0/24 switchport trunk encapsulation dot1q switchport mode trunk ip access-group 110 in //应用到入口方向 ip dhcp snooping trust //信任,即只接受TRUNK口下的DHCP服务 access-list 110 deny tcp any any eq 3389 //禁止远程桌面

interface GigabitEthernet0/1switchport access vlan 2switchport mode access//switchport host(主机模式) = switchport mode access + switchport portfast(不能做TRUNK口)switchport protected //端口保护,主机之间相互不能访问storm-control broadcast level 0.01 //广播风暴控制spanning-tree portfast //端口快速启动,否则要等待生成树收敛,需要大约50秒的时间spanning-tree bpduguard enable //当有环路时,端口变为err-disable状态,需手动关闭再启用ip dhcp snooping //全局开启DHCP侦测interface GigabitEthernet0/24switchport trunk encapsulation dot1qswitchport mode trunkip access-group 110 in //应用到入口方向ip dhcp snooping trust //信任,即只接受TRUNK口下的DHCP服务access-list 110 deny tcp any any eq 3389 //禁止远程桌面

随便看看