KSH or Awk first and last line based on column 2

Example:

10.160.101.160,0707073711,22.203.203.200
10.160.101.160,0707075132,22.203.210.249
10.160.101.160,0707085436,22.203.210.249
10.160.101.160,0707091712,22.203.221.176
10.160.101.160,0707091811,22.203.221.176
10.160.101.160,0707091845,22.203.221.176
10.160.101.160,0707092111,22.203.208.18
10.160.101.160,0707094653,22.203.240.84
10.160.101.160,0707094753,22.203.240.84
10.160.101.160,0707094824,22.203.240.84
10.160.101.160,0707101747,22.203.240.84
10.160.101.161,0707104159,22.203.201.19
10.160.101.161,0707141428,22.203.223.22
10.160.101.161,0707141728,22.203.225.28
10.160.101.161,0707155114,22.203.224.14
10.160.101.161,0707155315,22.203.224.14
10.160.101.161,0707155324,22.203.224.14
10.160.101.161,0707161956,22.203.224.14

Expected Output:

10.160.101.160,0707073711,22.203.203.200
10.160.101.160,0707075132,22.203.210.249
10.160.101.160,0707085436,22.203.210.249
10.160.101.160,0707091712,22.203.221.176
10.160.101.160,0707091845,22.203.221.176
10.160.101.160,0707092111,22.203.208.18
10.160.101.160,0707094653,22.203.240.84
10.160.101.160,0707101747,22.203.240.84
10.160.101.161,0707104159,22.203.201.19
10.160.101.161,0707141728,22.203.225.28
10.160.101.161,0707155114,22.203.224.14
10.160.101.161,0707161956,22.203.224.14

Please help!!!!

It should compare both the private and public IP just the first and the last time record.. if there should be any single record they should be printed as it is....... Please helppppppppppp!!!!

how is this thread any different from this thread?
Please don't start separate threads on the same subject.