cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6588
Views
0
Helpful
8
Replies

bgp advertise inactive route

ramesh.karki
Level 1
Level 1

Hi,

How IOS forward bgp RIB route (inactive) that has another prefer (active) next-hop on ip routing table .

Here, I have listed the bgp output.

R6#sh ip bgp

   Network          Next Hop            Metric LocPrf Weight Path

*  192.168.4.0      10.10.10.1                             0 555 444 i

*>                           10.10.12.1               0             0 444 i

*> 192.168.7.0      10.10.9.1                0             0 777 i

My requirement is to forward or advertise further upstream marked red next-hop route instead of active one. Running platform 7200VXR with version 12.3(10a)

thanks,

Ramesh

1 Accepted Solution

Accepted Solutions

Hi,

yes,

router bgp 666

neighbor  10.10.10.1 remote-as 555

neighbor  10.10.10.1 route-map manipulate in

ip as-path access-list 1 permit ^555_444$

route-map manipulate 10

match as-path 1

set local-preference 150

set ip next-hop 10.10.12.1

route-map manipulate 20

might work.

But I feel it a little dangerous, guite hard routing info modification.

What's the purpose of the original request?

BR,

Milan

View solution in original post

8 Replies 8

Hi,

You can increase the WEIGHT attribute for 192.168.4.0 update coming from 10.10.10.1.Then this next-hope will be  prefered.

write a prefix-list and match the update(192.168.4.0) and call this prefix into route-map.

apply this route-map in 10.10.10.1 as inbound direction.

I have attached BGP case studies -- FYR

Regards

Karuppu

hi,

After increasing the weight value the route will be active on the routing table and the next-hop will be 10.10.10.1 for that network instead of 10.10.12.1 this will not fulfil my requirement. I just want to forward such inactive route like JunOS does (advertise-inactive).

thanks

Hi,

Yes, The bgp command is availbale in cisco alos

router bgp 100

no bgp suppress-inactive

But your IOS should be 12.2(25)S and above.

Regards

Karuppu

Hi Karuppu,

IMHO, you are wrong here.

AFAIK, BGP is always advertising the best route only.

In a case the BGP best route is not installed into RIB (there's a static route for the same destination existing, e.g.), this BGP prefix is called inactive (marked by r in the beginning of the line while issuing "sh ip bgp" command).

But still advertised to BGP neighbours.

IOS 12.2T version introduced bgp suppress-inactive command briought a possiblity to suppress advertising of inactive prefixes. But the command is disabled by default, i.e., inactive prefixes are advertised.

See http://www.cisco.com/en/US/customer/docs/ios/12_2/iproute/command/reference/1rfbgp1.html#wp1250868 for deatils.

IMHO, there's no way to fulfil the original request.

BGP will never advertise a non-optimal route to the neighbor.

@Ramesh:

What is your topology exactly?

Couldn't set ip next-hop ... peer-address command help somehow, e.g.?

See http://www.cisco.com/en/US/customer/docs/ios/12_2/iproute/command/reference/1rfbgp2.html#wp1021368

HTH,

Milan

http://www.cisco.com/en/US/customer/docs/ios/12_2/iproute/command/reference/1rfbgp1.html#wp1250868

Hi,

Milan, your are right in this point. Command “no bgp suppress-inactive” does not help my problem.

My scenario is (I have attached the network diagram – FYR) :

As-444 is peering with as-555 and as-666 and announcing the prefixes to both peers. As-666 is also peering with as-555 as like a transit service and as-777. As-666 is advertising whatever prefixes received from its downstream neighbor as-444 to as-777. here, as-666 can received the same prefixes from as-555 (announced by as-444)

Now, I want to advertise only those prefixes received from the peer as-555 being announced by as-444 which is inactive on bgp RIB table on as-666 to advertise as-777. But my return traffic for that network should be as-666 to as-444 direct from as-777 instead to as-555.

Is it possible ??

Lei Tian
Cisco Employee
Cisco Employee

Hi Ramesh,

You can apply route-map to the neighbor match this prefix and set next-hop to 10.10.10.1.

HTH,

Lei Tian

Hi,

yes,

router bgp 666

neighbor  10.10.10.1 remote-as 555

neighbor  10.10.10.1 route-map manipulate in

ip as-path access-list 1 permit ^555_444$

route-map manipulate 10

match as-path 1

set local-preference 150

set ip next-hop 10.10.12.1

route-map manipulate 20

might work.

But I feel it a little dangerous, guite hard routing info modification.

What's the purpose of the original request?

BR,

Milan

Hi Milan,

I have applied your config in GNS and verified. It works as expected.

router bgp 666

neighbor 10.10.10.1 remote-as 555

neighbor 10.10.10.1 route-map mymap in

ip community-list 100 permit 444:100
!
route-map mymap permit 10
match community 100

set local-preference 110

set ip next-hop 10.10.12.1

!
route-map mymap permit 20
!
!

Thnak you,

Review Cisco Networking for a $25 gift card