03-09-2012 11:34 AM - edited 03-04-2019 03:36 PM
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
03-09-2012 11:50 AM
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
03-09-2012 11:52 AM
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
03-09-2012 05:02 PM
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
03-09-2012 05:08 PM
I meant filter...
03-10-2012 12:25 AM
Hi and many thanks for reply
so the only method to advertise in bgp is through the Network command,am i right?
thanks
03-10-2012 01:29 AM
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
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: