When the ingress leaf switch receives the frame, it learns the source MAC and source IP and programs them into the local station table. The leaf switch derives the source EPG based on the VLAN ID or VXLAN VNID. The MAC and IP addresses in the local station table also contain the EPG information and they can be used to derive EPG information for the subsequent packets.
When a leaf switch receives a frame from the host it needs to determine whether the destination IP is inside the fabric or outside the fabric. If the destination IP matches with any /32 host route entry in the global station table, it means the destination is an endpoint inside the fabric and the leave switch already learned the endpoint.
An AEP is required to deploy any VLAN pools on the leaf switches. It is possible to reuse the encapsulation pools (for example, VLAN) across different leaf switches. An AEP implicitly provides the scope of the VLAN pool (associated to the domain) to the physical infrastructure.