Well, at the end it turned out there was nothing wrong with the setup. The mac would not discover the printer directly over the network (using 'bonjour' protocol) as it would if connected through my switch's SSID. However, finally I was able to add and use the printer as IPP.
Thank you all for...