Hi,
Can you please give the model number and IOS version of the L2 switches you have? As there are many L2 and L3 switches with different features, there is no general answer to your questions. What do you mean by "port number", TCP or UDP? What exactly do you try to achieve, what is the issue, which traffic do you want to block from where?
Regards,
Martin