| 场景 | 只允许运维网段登录设备 |
|---|---|
| 适用 | 三厂 |
| 命令族 | user-interface vty / line vty + acl | access-class |
华为 VRP
华为 VRP
acl number 2000
rule 5 permit source 10.0.0.0 0.0.0.255
user-interface vty 0 4
acl 2000 inbound
authentication-mode aaa思科 IOS
思科 IOS
access-list 10 permit 10.0.0.0 0.0.255.255
line vty 0 4
access-class 10 in
transport input sshH3C Comware
H3C Comware
acl basic 2000
rule 0 permit source 10.0.0.0 0.0.0.255
line vty 0 4
acl 2000 inbound
authentication-mode scheme差异:华为/H3C 在 user-interface / line 视图下用 acl <编号> inbound,思科用 access-class。配置前先确认自己当前的管理 IP 在放行范围内,否则会被锁在设备外。