如何使网络上的一台设备只能与另一台设备通信?

网络工程 转变 路由器 网络
2022-02-25 04:40:32

我有一台连接到网络的打印机,我希望只能从网络上的一台计算机访问该打印机。我有什么选择来实现这一目标?如果有用的话,我手下有一个 HP2530-48G 开关。

2个回答

遵循 Zac67 的想法,以下是使用 HP2530 进行这项工作的步骤。我的打印机连接到交换机的 43 端口,IP 为 10.1.1.11,唯一可以访问打印机的计算机是 10.1.1.10。

// Enable configuration mode
configure

// Create the ACL PrinterACL
ip access-list extended PrinterACL

// Create two ACE has Zac67 recommended
10 permit ip 10.1.1.10 0.0.0.0 10.1.1.11 0.0.0.0 
20 permit ip 10.1.1.11 0.0.0.0 10.1.1.10 0.0.0.0 

// Exit ACL
exit 

// Set the ACL on port 43
interface 43 ip access-group PrinterACL in

您应该能够为此使用访问列表。查看 2530 的“访问安全指南”。

类似的东西allow any <IP of computer>/32 <IP of printer>/32适用于打印机端口,反之亦然。deny any是隐含的。

在尝试使用 ACL 之前,请确保您能够通过串行控制台访问交换机。