BGP - exclude a network from learning

My other other end BGP peer advertises a lot of network, including my side local network. I want my end device to exclude one network from learning (like

Are there any BGP commands for this.

Edited TAGs
[edited by: Erick Jan at 5:34 AM (GMT -8) on 13 Nov 2023]
Parents Reply
  • Hello  , 

    The Configuration options that impact the prefixes (sent/received) would be listed under the respective address family.  In this case, the option "prefix-list" would be listed under "address-family ipv4 unicast" mode. Pls try the following: 


    bgp(config-router)# address-family ipv4 unicast

    bgp(config-router-af)# neighbor pre

      prefix-list  Filter updates to/from this neighbor

    bgp(config-router-af)# neighbor prefix-list my_list out


    Even though the CLI doesnt list the "prefix-list" option in the "config-router" mode, on entering the particular command, it is stored under the respective address family.


No Data