Ultraedit might be able to do it by itself or in conjunction with their sister product Ultracompare.
What I did was search for all lines containing " set subnet " . I had the option show all lines checked. I then clicked on the clipboard, created a new document & pasted the lines in. In that new document, I used advanced sort and made sure that remove duplicates wasn' t checked. I set the first sorting field to 20 and 51 (go through your list to confirm!) and clicked on sort. I then copied the contents of that document into a new document & performed the same sort a second time but this time told it to remove duplicates. At this point, as I have the ultraedit suite, I saved the two documents & then launched Ultracompare & opened them. I then clicked on show me only the differences. The first doc showed me the duplicate lines.
I copied each line & went back to ultraedit and did a search asking it to show each line. I then clicked on each result to take me to the section in the config & the line above gave me the unique name.
As I said, ultraedit has some compare features built in & may be able to do it all internally. Equally, another text editor on steroids might fit the bill as well.
Hope this helps.
Victor