hi there,
well first of all, ensure your printer connects to your router and not a single computer, if you have to connect it to a single computer then need to make sure that computer is assigned a fixed IP address, and file printer sharing is turned on in all participating computer.
when you connect the printer to the router, ensure that you setup a fixed/static ip in your printer's network setup, so that whenever you restart/switch off/on the printer, the printer is not lost in the computers you are trying to print to, its never a good idea to have each computer directly talk to the printer without the router in middle.
try it and let me know.