Do you mean to renumber the second field starting from 1? Awk can easily do that, e.g.
Code:
awk '/^p2snmpmod/{sub(/_[0-9]+/,sprintf("_%02d",++count),$2); print}' file
but it strongly depends on the exact format of the whole file. Does the numbers exceed 99? Is the first field always "p2snmpmod"? Just to give you an idea.