cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
495
Views
12
Helpful
6
Replies

BGP | Questions

Ibrahim Jamil
Level 6
Level 6

Hi Experts

I Have 2 question in BGP

1)what is the difference between the below

router bgp yy

network 172.16.16.0 mask 255.255.255.0

and the below as well

ip prefix-list test permit 172.16.16.0/24

which of the above advertise the the 172.16.16.0/24 to the neighbor ISP ? what is the difference

router bgp yy

neighbor Z.Z.Z.Z Prefix-list test out

2)why we need the below command even the same network advertised via bgp pr prefix network commands

ip route 172.16.16.0  255.255.255.0 null 0

thanks for your precious time

thanks

6 Replies 6

Marwan ALshawi
VIP Alumni
VIP Alumni

To answer your questions

First one network command will advertise the network

The prefix list like acl

Using it with neighbor and filter command will be use for route filtering inbound or outbound

2 second question's answer is

If you do nit have a network ir a route in your routing table and you want to advertise it for any reason

You add a dummy static route to null0 interface to present it in your routing table

And then use the network command to advertise it to the bgp neighbor

Hope this help

if helpful rate

Sent from Cisco Technical Support iPhone App

John Blakley
VIP Alumni
VIP Alumni

I'm not sure I understand all of your questions, so I'll try to answer what I can.

The ip route statement is so bgp has a route to pull from and advertise. BGP can't advertise a network that it doesn't know about. The route to null0 just allows for bgp to advertise the route and allow this router to be it's next hop for that subnet. The prefix-list test out is advertising the 172.16.16.0/24 subnet to the neighbor. There are 3 ways to advertise in bgp: with a route-map (usually used to set options though), distribute-list, and prefix-list.

John

HTH, John *** Please rate all useful posts ***

Hi John

you mentioned above:

"The prefix-list test out is advertising the 172.16.16.0/24 subnet to the neighbor. There are 3 ways to advertise in bgp: with a route-map (usually used to set options though), distribute-list, and prefix-list."

however the ways to advertise a route/network in BGP is either to use network command or redistribute a route

while those prefix-list, route-map and access-list they used for route filtering and bgp policies inbound or outbount

HTH

I meant filter...

HTH, John *** Please rate all useful posts ***

Hi and many thanks for reply

so  the only method to advertise in bgp  is through the  Network command,am i right?

thanks

You can also advertise routes to the BGP protocol from any other protocol (and local subnets) by using the redistibution command under the BGP. For instance to advertise (redistribute) the local subnets to BGP you can use the next command

router bgp XXXXX

redistibute connected

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card