BGP (Border Gateway Protocol) uses ingress and egress filters for security and performance optimization purposes.
Ingress filtering is used to restrict the incoming BGP updates from unauthorized or malicious sources. It verifies the source of the BGP update and checks against a predefined policy whether to accept or drop the incoming update. Ingress filtering blocks the updates that come from networks that are not allowed to propagate BGP updates to prevent the router from forwarding invalid or misleading information about the internet routing table.
Egress filtering is used to restrict outgoing BGP updates from the router. It checks the destination of the BGP update and filters out the updates that are meant for networks that the router is not authorized to advertise or do not have permission to propagate. Egress filtering helps in reducing the propagation of incorrect or unauthorized BGP updates that may cause network instability or security issues.
Overall, ingress and egress filtering enhances the security and reliability of BGP routing by controlling the type and flow of routing information that enters or exits the network.