12-20-2013 12:32 AM - edited 03-04-2019 09:54 PM
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
12-20-2013 05:11 AM
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
12-20-2013 06:38 AM
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
12-23-2013 01:18 AM
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
12-23-2013 05:06 PM
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)
12-23-2013 02:01 AM
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
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