Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

How do I advertise single host routes to BGP neighbor?

I have several host routes that I want to advertise from a specific subnet. I do not want to advertise the entire class B subnet or individual /24 subnets. Only want to advertise the specific host without adding the 'network 164.103.195.60 mask 255.255.255.255' statement under the BGP process for every host. Would prefer to use a prefix-list or route-map to specify the host within a subnet.  I have this configured but BGP is only advertising the subnets and not the /32 host routes in the prefix-list.

router bgp 45
 bgp router-id 164.103.3.102
 bgp log-neighbor-changes
 network 10.15.1.236 mask 255.255.255.252
 redistribute ospf 45 match internal external 1 external 2 route-map Southwind_to_Loveland
 neighbor 10.15.1.238 remote-as 223
 neighbor 10.15.1.238 soft-reconfiguration inbound
 neighbor 10.15.1.238 prefix-list Southwind_Routes_to_Loveland out

!
route-map Southwind_to_Loveland permit 10
 match ip address prefix-list Southwind_Routes_to_Loveland
!

ip prefix-list Southwind_Routes_to_Loveland seq 5 permit 10.15.1.236/30
ip prefix-list Southwind_Routes_to_Loveland seq 10 permit 10.15.1.240/30
ip prefix-list Southwind_Routes_to_Loveland seq 15 permit 10.20.250.16/28
ip prefix-list Southwind_Routes_to_Loveland seq 20 permit 10.40.250.16/28
ip prefix-list Southwind_Routes_to_Loveland seq 25 permit 10.60.250.16/28
ip prefix-list Southwind_Routes_to_Loveland seq 27 permit 10.199.4.8/29
ip prefix-list Southwind_Routes_to_Loveland seq 28 permit 10.199.4.16/29
ip prefix-list Southwind_Routes_to_Loveland seq 30 permit 10.199.1.136/29
ip prefix-list Southwind_Routes_to_Loveland seq 35 permit 10.199.1.144/29
ip prefix-list Southwind_Routes_to_Loveland seq 45 permit 10.200.100.16/28
ip prefix-list Southwind_Routes_to_Loveland seq 50 permit 10.206.250.0/27
ip prefix-list Southwind_Routes_to_Loveland seq 55 permit 164.103.160.53/32
ip prefix-list Southwind_Routes_to_Loveland seq 60 permit 164.103.160.147/32
ip prefix-list Southwind_Routes_to_Loveland seq 65 permit 164.103.160.148/32
ip prefix-list Southwind_Routes_to_Loveland seq 70 permit 164.103.185.68/32
ip prefix-list Southwind_Routes_to_Loveland seq 75 permit 164.103.195.60/32
ip prefix-list Southwind_Routes_to_Loveland seq 80 permit 164.103.211.73/32
ip prefix-list Southwind_Routes_to_Loveland seq 85 permit 164.103.211.74/32
ip prefix-list Southwind_Routes_to_Loveland seq 90 permit 164.103.211.138/32
ip prefix-list Southwind_Routes_to_Loveland seq 95 permit 164.103.211.139/32
ip prefix-list Southwind_Routes_to_Loveland seq 100 permit 164.103.211.163/32
ip prefix-list Southwind_Routes_to_Loveland seq 105 permit 164.103.211.164/32

===================

sh ip bgp nei 10.15.1.238 adv

BGP table version is 520, local router ID is 164.103.3.102
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external, f RT-Filter
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.15.1.236/30   0.0.0.0                  0         32768 i
*> 10.20.250.16/28  164.103.7.101          110         32768 ?
*> 10.40.250.16/28  164.103.7.101          110         32768 ?
*> 10.60.250.16/28  164.103.7.101          110         32768 ?
*> 10.199.1.136/29  0.0.0.0                  0         32768 ?
*> 10.199.1.144/29  0.0.0.0                  0         32768 ?
*> 10.199.4.8/29    0.0.0.0                  0         32768 ?
*> 10.199.4.16/29   0.0.0.0                  0         32768 ?
*> 10.200.100.16/28 0.0.0.0                  0         32768 ?
*> 10.206.250.0/27  164.103.7.101            3         32768 ?
*> 164.103.218.0/27 164.103.7.101            3         32768 ?

Total number of prefixes 11

 

2 REPLIES
Hall of Fame Super Silver

For the prefix list applied

For the prefix list applied outbound on the neighbor to achieve what you want then BGP must be trying to advertise the prefixes. For BGP to try to advertise the prefixes they must either be part of the routes known by OSPF and advertised into BGP or there must be BGP network statements that specify the particular address and mask.

 

From the output of show ip bgp neighbor advertised routes it is apparent that many of the prefixes you want to advertise do not meet either of those conditions. If you want to advertise those host routes you must either make sure that they are in the routing table from OSPF (those specific prefixes and mask) or you must configure BGP network statements.

 

HTH

 

Rick

You get get this /32s into

You get get this /32s into BGP by either redistributing from some other source ( OSPF or Static ). IF you add a network statement, then the prefix _must_ be in the local routing table in order to be advertised via BGP.

So you'll have to add the /32s somewhere ( either on an OSPF speaker, or locally with static routes). In fact, if you added local static routes, you'd still need to redistribute them into BGP OR use network statements. I don't see how adding the /32s is avoidable.

1936
Views
5
Helpful
2
Replies
CreatePlease login to create content