Advanced distance protection relays represent a significant challenge for many tasks that are performed by protection specialists during the engineering, commissioning and maintenance process due to the fact that the design and implementation of these functions varies significantly from one vendor to another. The paper analyzes the different components of a distance protection function. The modeling of the complete distance function and its individual components for the different types of applications is presented. The differences in modeling requirements for setting and testing purposes are discussed also in the paper.