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 192.168.2.0/24).

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)#                     

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

    bgp(config-router-af)# neighbor 1.1.1.1 pre

      prefix-list  Filter updates to/from this neighbor

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

    bgp(config-router-af)#

    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.

    Thanks.

Children
No Data