Agreed, though banning by steam id will not 'ban people with dynamic ip.' It will ban people regardless of the type of IP they have.
How can you determine if the player has static or dynamic IP? Better off just using the steam id. It is much easier (and free) for people to change their IP vs. getting a new steam id.