I have a printer attached to a network that I would like to be accessible only from one computer on the network. What are my options to accomplish this? I have a HP2530-48G switch under my hand if that could be useful.
You should be able to use access-lists for this. Check the "Access Security Guide" for the 2530.
Something along the line of
allow any <IP of computer>/32 <IP of printer>/32 and vice versa applied to the printer port. The
deny any is implicit.
Make sure you're able to access the switch via serial console before experimenting with ACLs.
Following Zac67 idea, here are the steps to make this work using the HP2530. My printer is connected to the port 43 on the switch and has the ip 10.1.1.11 and the only computer that can access the printer is 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