Wireshark

How ToSteps
List all ports used in a communicationFilter the capture to only traffic between hosts A and B, then use Statistics -> Endpoints