Rigidbody passing thru each other in 2D

This is my scenario:
I have a 2D game where the enemies should be able to pass thru each other, but i need them to collide with walls.
My walls have static RigidBody body without Trigger flag.
But idk what combination of Rigidbody and Collider i have to put in the enemies prefabs to make them capable of pass thru each other and collide with walls.

Thanks for help.

For anyone who was the same problem, i solved it using physic layers.