首先確認交換機是否支持smart install服務
檢查命令如下:
switch#show vstack config | inc Role
Role:Client (SmartInstall enabled)
或
switch#show vstack config | inc Role
Role:Director (SmartInstall enabled)
1、如果支持smart install 可通過no vstack關閉smart install
switch(config)#no vstack
switch#show vstack config
Role: Client (SmartInstall disabled)
或
switch#show vstack config
Role: Director (SmartInstall disabled)
關閉了smart install之后tcp 4786端口也會關閉。
通過show tcp brief all 查看交換機當前監聽的tcp端口。
1
2
3
4
5
6
7 |
switch #show tcp brief all
TCB Local Address Foreign Address (state)
05FD9F98 0.0 . 0.0 . 4786 *.* LISTEN
0568FFFC 0.0 . 0.0 . 443 *.* LISTEN
0568F038 0.0 . 0.0 . 443 *.* LISTEN
0568E428 0.0 . 0.0 . 80 *.* LISTEN
0568D818 0.0 . 0.0 . 80 *.* LISTEN
|
2、 如果設備不支持no vstack ,且在show tcp brief all 中有tcp 4786端口,那么可以通過acl限制端口的訪問。
例如:
1
2
3
4
5 |
ip access-list extended DropTCP4786
deny tcp any any eq 4786
permit ip any any
interface GigabitEthernet0/ 0
ip access-group DropTCP4786 in
|