| 场景 | 固定终端接入,免手工绑定 |
|---|---|
| 适用 | 思科/华为支持 sticky;H3C 用 autolearn 等价实现 |
思科 IOS
思科 IOS
interface GigabitEthernet0/1
switchport port-security
switchport port-security maximum 1
switchport port-security mac-address sticky
! 学到的 MAC 会以 sticky 条目写进 running-config
show port-security address华为 VRP
华为 VRP
interface GigabitEthernet0/0/1
port-security enable
port-security max-mac-num 1
port-security mac-address sticky
display port-security mac-address stickyH3C Comware
H3C Comware
interface GigabitEthernet1/0/1
port-security enable
port-security port-mode autolearn
port-security max-mac-count 1
display port-security mac-address差异:思科/华为的 sticky 是显式关键字;H3C 的 autolearn 模式本身就等价于粘滞学习,没有单独的 sticky 开关。