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. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Route Map -- Why match this sequence?

Hi All,

Why 10.1.1.0/24 is match tag 1 and 20.1.1.0/24 is match tag 2 ??

C6509 and OS Version is 12.2(18)SXF7

#sh ip ro 10.1.1.0
Routing entry for 10.1.1.0/24
  Known via "static", distance 1, metric 0
  Tag 2
  Redistributing via bgp 1
  Advertised by bgp 1 route-map static-to-bgp
  Routing Descriptor Blocks:
  * 1.1.1.1, via GigabitEthernet2/31
      Route metric is 0, traffic share count is 1
      Route tag 1
    1.1.1.5, via GigabitEthernet2/30
      Route metric is 0, traffic share count is 1
      Route tag 2

#sh ip ro 20.1.1.0
Routing entry for 20.1.1.0/24
  Known via "static", distance 1, metric 0
  Tag 1
  Redistributing via bgp 1
  Advertised by bgp 1 route-map static-to-bgp
  Routing Descriptor Blocks:
  * 1.1.1.5, via GigabitEthernet2/30
      Route metric is 0, traffic share count is 1
      Route tag 1
    1.1.1.1, via GigabitEthernet2/31
      Route metric is 0, traffic share count is 1
      Route tag 2

Following is my configuration--------------------------------------------------------------------------------------

ip route 10.1.1.0 255.255.255.0 GigabitEthernet2/31 1.1.1.1 tag 1

ip route 10.1.1.0 255.255.255.0 GigabitEthernet2/30 1.1.1.5 tag 2

ip route 20.1.1.0 255.255.255.0 GigabitEthernet2/30 1.1.1.1 tag 1

ip route 20.1.1.0 255.255.255.0 GigabitEthernet2/31 1.1.1.5 tag 2

route-map static-to-bgp, permit, sequence 10
  Match clauses:
    tag 2
  Set clauses:

    metric 20
  Policy routing matches: 0 packets, 0 bytes
route-map static-to-bgp, permit, sequence 20
  Match clauses:
    tag 1
  Set clauses:

    metric 10

  Policy routing matches: 0 packets, 0 bytes

Everyone's tags (4)
5 REPLIES
Hall of Fame Super Blue

Re: Route Map -- Why match this sequence?

Can you post -

"sh ip bgp 10.1.1.0 255.255.255.0" and "sh ip bgp 20.1.1.0 255.255.255.0"

Jon

New Member

Route Map -- Why match this sequence?

Hi Jon,

#sh ip bgp 10.1.1.0 255.255.255.0
BGP routing table entry for 10.1.1.0/24, version 25
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Multipath: eBGP
Flag: 0x880
  Advertised to update-groups:
     1
  Local
    0.0.0.0 from 0.0.0.0 (100.1.1.1)
      Origin incomplete, metric 20, localpref 100, weight 32768, valid, sourced, best


#sh ip bgp 20.1.1.0 255.255.255.0
BGP routing table entry for 20.1.1.0/24, version 24
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Multipath: eBGP
Flag: 0x880
  Advertised to update-groups:
     1
  Local
    0.0.0.0 from 0.0.0.0 (100.1.1.1)
      Origin incomplete, metric 10, localpref 100, weight 32768, valid, sourced, best

Route Map -- Why match this sequence?

Hi,

I believe it's always the last static route entered for the same prefix which "wins" of you don't specify different ADs?

Try to enter

ip route 10.1.1.0 255.255.255.0 GigabitEthernet2/31 1.1.1.1 tag 1

once more and observe what outout you'll get for

#sh ip ro 10.1.1.0

after that.

Best regards,

Milan

New Member

Re: Route Map -- Why match this sequence?

Hi,

#sh run | i ip route

ip route 10.1.1.0 255.255.255.0 GigabitEthernet2/30 1.1.1.5 tag 2

ip route 10.1.1.0 255.255.255.0 GigabitEthernet2/31 1.1.1.1 tag 1

ip route 20.1.1.0 255.255.255.0 GigabitEthernet2/30 1.1.1.1 tag 1

ip route 20.1.1.0 255.255.255.0 GigabitEthernet2/31 1.1.1.5 tag 2

#sh ip ro 10.1.1.0

Routing entry for 10.1.1.0/24

  Known via "static", distance 1, metric 0

  Tag 2

  Redistributing via bgp 3786

  Advertised by bgp 3786 route-map static-to-bgp

  Routing Descriptor Blocks:

  * 1.1.1.5, via GigabitEthernet2/30

      Route metric is 0, traffic share count is 1

      Route tag 2

    1.1.1.1, via GigabitEthernet2/31

      Route metric is 0, traffic share count is 1

      Route tag 1

I think.. Gi2/30 is faster than Gi2/31, so match tag 2(10.1.1.0) and tag 1(20.1.1.0)

Re: Route Map -- Why match this sequence?

Hello

You have set tags on your static routes then the route-map is matching on these tags and setting a metric value when advertised into bgp

Res
Paul

Sent from Cisco Technical Support iPad App

Please don't forget to rate any posts that have been helpful. Thanks.
362
Views
0
Helpful
5
Replies