BGP prefix-lists and network statement

DPGDPG Member Posts: 780 ■■■■■□□□□□
Are the below bolded network statements necessary if I am using prefix-lists to announce my networks?


router bgp 65000
network 1.1.1.0 mask 255.255.255.0
network 2.2.2.0 mask 255.255.255.0
network 3.3.3.0 mask 255.255.255.0

neighbor 10.0.0.2 remote-as 100
neighbor 10.0.0.2 prefix-list ISP_A out
neighbor 20.0.0.2 remote-as 200
neighbor 20.0.0.2 prefix-list ISP_B out


ip prefix-list ISP_A seq 10 permit 1.1.1.0/24
ip prefix-list ISP_A seq 20 permit 3.3.3.0/24

ip prefix-list ISP_B seq 10 permit 2.2.2.0/24
ip prefix-list ISP_B seq 20 permit 3.3.3.0/24

ip route 1.1.1.0 255.255.255.0 Null0
ip route 2.2.2.0 255.255.255.0 Null0
ip route 3.3.3.0 255.255.255.0 Null0

Comments

  • networker050184networker050184 Mod Posts: 11,962 Mod
    The prefix-list doesn't announce anything, its just for applying policy to existing advertisements. So yes, you still need the network command if that is how you are getting those prefixes into BGP.
    An expert is a man who has made all the mistakes which can be made.
  • DPGDPG Member Posts: 780 ■■■■■□□□□□
    What if I added redistribute static under the router bgp config?
  • kryollakryolla Member Posts: 785
    then you dont need the network statement
    Studying for CCIE and drinking Home Brew
  • networker050184networker050184 Mod Posts: 11,962 Mod
    I think you need to understand exactly what each of those commands is making the router do. Grab a book, turn on your debugs and watch it all go. That's how I learn anyway.
    An expert is a man who has made all the mistakes which can be made.
  • cisco_troopercisco_trooper Member Posts: 1,441 ■■■■□□□□□□
    Agree with networker. This is the only way to learn. Otherwise you are just memorizing stuff, and eventually your memory will fail. You MUST seek understanding or you will severely limit your capacity to learn, and a major undesired consequence of this will be an extreme inability to troubleshoot problems when they occur, or to administer a network you didn't design. Just my two cents.
  • kryollakryolla Member Posts: 785
    the network statement for bgp is different than igp and there is alot of good info on what redistribution is. Also check out route filtering which includes filtering with prefix lists
    Studying for CCIE and drinking Home Brew
  • Panzer919Panzer919 Member Posts: 462
    Read this book, it is well worth the time and money!
    Cisco Brat Blog

    I think “very senior” gets stuck in there because the last six yahoos that applied for the position couldn’t tell a packet from a Snickers bar.

    Luck is where opportunity and proper planning meet

    I have not failed. I've just found 10,000 ways that won't work.
    Thomas A. Edison
Sign In or Register to comment.