05-28-2021 06:28 AM - edited 05-28-2021 09:11 AM
Hello Friend, good afternoon, look, I am starting the configuration of an ASR 9006 and I have problems with the BGP out publication, since I receive prefixes without problems, the issue is to publish prefixes to my peer neighbors, I will share my config if you can help me.
prefix-set Locales
10.240.10.0/24,
10.240.11.0/24
end-set
!
route-policy pass_all
pass
end-policy
!
route-policy Locales-OUT
if destination in Locales then
pass
endif
end-policy
!
router bgp 65000
bgp router-id 10.241.0.1
address-family ipv4 unicast
network 10.240.10.0/24 (Prefixes that I want to publish to my bgp peers)
network 10.240.11.0/24 (Prefixes that I want to publish to my bgp peers)
!
neighbor 10.241.0.2
remote-as 65000
advertisement-interval 15
description IBGP
address-family ipv4 unicast
route-policy pass_all in
route-policy Locales-OUT out
soft-reconfiguration inbound
!
!
!
end
-------------------------------------------------- -------------------------
RP / 0 / RSP0 / CPU0: ASR9006 # show bgp neighbor 10.241.0.2 advertised-count
Fri May 28 11: 43: 06.902 Santiago
No of prefixes Advertised: 0 (There is nothing published)
-------------------------------------------------- -------------------------
RP / 0 / RSP0 / CPU0: ASR9006 # show bgp summary
Fri May 28 11: 43: 26.816 Santiago
BGP router identifier 10.241.0.1, local AS number 65000
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000 RD version: 20
BGP main routing table version 20
BGP NSR Initial initsync version 2 (Reached)
BGP NSR / ISSU Sync-Group versions 20/0
BGP scan interval 60 secs
BGP is operating in STANDALONE mode.
Process RcvTblVer bRIB / RIB LabelVer ImportVer SendTblVer StandbyVer
Speaker 20 20 20 20 20 20
Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up / Down St / PfxRcd
10.241.0.2 0 65000 209 191 20 0 0 00:06:49 2 (I get two network prefixes)
-------------------------------------------------- --------------------------
RP / 0 / RSP0 / CPU0: ASR9006 # show bgp
Fri May 28 11: 44: 48.698 Santiago
BGP router identifier 10.241.0.1, local AS number 65000
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000 RD version: 20
BGP main routing table version 20
BGP NSR Initial initsync version 2 (Reached)
BGP NSR / ISSU Sync-Group versions 20/0
BGP scan interval 60 secs
Status codes: s suppressed, d damped, h history, * valid,> best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP,? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> i10.5.4.0 / 24 10.241.0.2 100 0 i
*> i10.18.0.0 / 24 10.241.0.2 100 0 i
Processed 2 prefixes, 2 paths
Solved! Go to Solution.
05-28-2021 03:53 PM - edited 05-28-2021 05:37 PM
Hi @emendez1816 ,
You could just configure static route to a specific destination or to null0.
router static
address-family ipv4 unicast
10.240.10.0/24 null0
10.240.11.0/24 null0
or
router static
address-family ipv4 unicast
10.240.10.0/24 <next hop address>
10.240.11.0/24 <next hop address>
Static routes to null0 are normally used when you have more specific routes available locally.
Regards,
05-29-2021 09:54 AM - edited 05-29-2021 09:55 AM
Hi @emendez1816 ,
you need to add a network statement in BGP as follow:
router bgp 65000
address-family ipv4 unicast
network 0.0.0.0/0
and then add a static route for the default route.
router static
address-family ipv4 unicast
0.0.0.0/0 <next-hop address>
or
router static
address-family ipv4 unicast
0.0.0.0/0 null0
You will also need to change the prefix-set Locales to allow the default router.
prefix-set Locales
10.240.10.0/24,
10.240.11.0/24,
0.0.0.0/0
end-set
Regards,
05-31-2021 03:50 PM
Hi Friend,
I see many post about the Network and BGP and the why this network command not work in BGP?
the BGP is depend on RIB in advertise any prefix, if the BGP not see this prefix in RIB then it not advertise it to other BGP Peers
BUT
why we use Network for prefix different than RIB ???
the answer is aggregate, where one method of aggregate many prefix in to single prefix is through the
config this single prefix to NULL0 with static and then use Network in BGP with this new single prefix.
So what happened !!
many config the network for this new single prefix in BGP without config the static and hence the BGP check the RIB and see there is no prefix and not advertise it to other peers.
05-28-2021 12:18 PM
Hi @emendez1816 ,
These two prefixes (10.240.10.0/24 and 10.240.11.0/24) have to exist in the local routing table before BGP originates them via the network statements. They can be either received via a dynamic routing protocol or statically configured.
Regards,
05-28-2021 12:54 PM
How do I configure them statically? for it to be published by bgp?
05-28-2021 03:53 PM - edited 05-28-2021 05:37 PM
Hi @emendez1816 ,
You could just configure static route to a specific destination or to null0.
router static
address-family ipv4 unicast
10.240.10.0/24 null0
10.240.11.0/24 null0
or
router static
address-family ipv4 unicast
10.240.10.0/24 <next hop address>
10.240.11.0/24 <next hop address>
Static routes to null0 are normally used when you have more specific routes available locally.
Regards,
05-29-2021 06:40 AM
Thanks, I will try.
05-29-2021 07:27 AM
Last question, how do I generate the default route in bgp to send it to my IBGP peers?
What are the commands that I should use to generate the route of 0.0.0.0/0 ??
05-29-2021 09:54 AM - edited 05-29-2021 09:55 AM
Hi @emendez1816 ,
you need to add a network statement in BGP as follow:
router bgp 65000
address-family ipv4 unicast
network 0.0.0.0/0
and then add a static route for the default route.
router static
address-family ipv4 unicast
0.0.0.0/0 <next-hop address>
or
router static
address-family ipv4 unicast
0.0.0.0/0 null0
You will also need to change the prefix-set Locales to allow the default router.
prefix-set Locales
10.240.10.0/24,
10.240.11.0/24,
0.0.0.0/0
end-set
Regards,
05-28-2021 02:01 PM
remove policy OUT and try again,
also please more info about the policy OUT, what is if destination
05-28-2021 04:07 PM
Hi @MHM Cisco World ,
The configured outbound policy is fine. It only permits the two specific routes.
Regards,
05-28-2021 03:01 PM
Could you give me the output of the commands #sh ip bgp summary
# show ip bgp neigh
In order for you to propagate the network you want, you must configure the BGP family as follows
!
address-family ipv4
network 10.240.10.0
network 10.240.10.0 mask 255.255.255.0
neighbor 10.241.0.2 activate
neighbor 10.241.0.2 prefix-list default in
neighbor 10.241.0.2 distribute-list prefijos-CANTV out
exit-address-family
remenber to rate
05-28-2021 04:09 PM
Hi Javier,
The network statements the original poster provided are correct. They are in IOS-XR format. What you are providing is in iOS format.
Regards,
05-31-2021 03:50 PM
Hi Friend,
I see many post about the Network and BGP and the why this network command not work in BGP?
the BGP is depend on RIB in advertise any prefix, if the BGP not see this prefix in RIB then it not advertise it to other BGP Peers
BUT
why we use Network for prefix different than RIB ???
the answer is aggregate, where one method of aggregate many prefix in to single prefix is through the
config this single prefix to NULL0 with static and then use Network in BGP with this new single prefix.
So what happened !!
many config the network for this new single prefix in BGP without config the static and hence the BGP check the RIB and see there is no prefix and not advertise it to other peers.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide