cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1263
Views
0
Helpful
5
Replies

Route Map -- Why match this sequence?

pabburi01
Level 1
Level 1

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

5 Replies 5

Jon Marshall
Hall of Fame
Hall of Fame

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

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

milan.kulik
Level 10
Level 10

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

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)

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 rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card