A cactus graph is a connected graph in which every block is either an edge or a cycle. An optimal algorithm is presented here to find a maximum independent set and maximum 2-independent set on cactus graphs in O(n) time, where n is the total number of vertices of the graph. The cactus graph has many applications in real life problems, specially in radio communication system.