The ability to dunk does not come easy to everyone who tries to achieve it. In fact the taller you are the easier it may be because you are already closer to the rim, but that does not guarantee that you can dunk. But, if you have the will to try and you can already jump and touch the net, there is a really good chance you can dunk.
Factors such as lack of strength in the legs will seriously limit your chances. Think about your body weight, if you have got some extra pounds you could loose do it, the strength-to-weight ratio plays a factor in this. If you need to get stronger and you are doing the dead lifts and squats like you should be doing, be careful how you eat because you may get bigger. Getting bigger is ok because you may have added more muscle, just make sure it is a lean weight.
Set yourself up with a guide that you can follow to help you learn to jump higher, it would be easier than just trying different things and hoping you get it right. Following a guide will help you to be better focused when you have a plan to follow. Be persistent with your plan, it will take a few months or more for most to really see results. If you feel like you have reached a point where you just cannot jump higher, take a week off, come back and work on your leg strength and then get right back into your program. If you want it bad enough you can do it.