09-02-2005 11:07 AM - edited 03-03-2019 10:25 AM
I'm redistributing from BGP into EIGRP and want to tag some routes with one tag and others with another. So, far when I try this the next router sees it with all the same tag. Is it possible to have 2 different tags? The config was similar to the following:
router eigrp 1
redsitribute BGP 44444 metric 1500 20 255 1 1500 route-map SET-TAG
ip prefix-list ADDR1 seq 10 permit 10.0.1.0/24
ip prefix-list ADDR2 seq 10 permit 10.0.5.0/24
route-map SET-TAG permit 10
match ip address prefix-list ADDR1
set tag 11111
route-map SET-TAG permit 20
match ip address prefix-list ADDR2
set tag 22222
09-02-2005 11:16 AM
Can you paste a sh ip eigrp topology 10.0.1.0/24
and 10.0.5.0/24 on the router that sees this as same.
09-02-2005 11:39 AM
I have left work for the day and won't be able to post that till Tuesday.
09-02-2005 02:59 PM
Make sure that your route-map configuration didn't look like this:
route-map SET-TAG permit 10
match ip address prefix-list ADDR1 ADDR2
set tag 2
That would have happened if "route-map SET-TAG" was typed and the permit # line was left off when configuring by mistake. Otherwise, the above configuration you have should have worked.
I quickly tested the following and it works as expected with 12.3(7)T6:
router eigrp 1
redistribute bgp 1 metric 1 1 1 1 1 route-map test
ip prefix-list add1 seq 5 permit 5.0.0.0/8
!
ip prefix-list add2 seq 5 permit 6.0.0.0/8
!
!
route-map test permit 10
match ip address prefix-list add1
set tag 1
!
route-map test permit 20
match ip address prefix-list add2
set tag 2
sh ip eigrp top
IP-EIGRP Topology Table for AS(1)/ID(5.1.1.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 11.9.0.0/16, 1 successors, FD is 284160
via 11.1.1.2 (284160/28160), Ethernet0/0
P 5.0.0.0/8, 1 successors, FD is 2560000256, tag is 1
via Redistributed (2560000256/0)
P 6.0.0.0/8, 1 successors, FD is 2560000256, tag is 2
via Redistributed (2560000256/0)
P 11.1.1.0/24, 1 successors, FD is 281600
via Connected, Ethernet0/0
HTH
09-06-2005 06:26 AM
09-07-2005 04:27 AM
There's no space after the last AS in the AS Path--try this as path access list instead:
ip as-path access-list 2 permit .*_11111$
And see what it does.
:-)
Russ.W
09-07-2005 05:41 AM
Russ, I changed the AS-PATH list to the following and as you can see it gave me the same result.
ip as-path access-list 2 permit .*_11111$
A1#sho ip eigrp topology
IP-EIGRP Topology Table for AS(1)/ID(10.213.0.3)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 0.0.0.0/0, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 10.15.0.0/24, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 10.0.0.0/22, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 10.27.0.0/24, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 10.28.0.0/24, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 10.28.1.0/24, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 10.16.0.0/12, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 100.100.100.4/30, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 100.100.100.0/30, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 100.100.100.12/30, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 100.100.100.8/30, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 200.200.200.8/30, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 200.200.200.12/30, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 200.200.200.0/30, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 200.200.200.4/30, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 10.210.0.8/30, 1 successors, FD is 2588160
via 10.210.0.14 (2588160/2585600), GigabitEthernet0/1
P 10.210.0.12/30, 1 successors, FD is 28160
via Connected, GigabitEthernet0/1
P 10.208.12.0/24, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 200.200.200.16/30, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 10.210.0.0/30, 1 successors, FD is 2588160
via 10.210.0.14 (2588160/2585600), GigabitEthernet0/1
P 10.211.1.0/24, 1 successors, FD is 2172416
via 10.210.0.14 (2172416/2169856), GigabitEthernet0/1
P 10.211.0.0/24, 1 successors, FD is 2169856
via Connected, Serial0/0/0
P 10.208.0.0/24, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
P 200.200.200.20/30, 0 successors, FD is Inaccessible, tag is 65000
via 10.210.0.14 (2588160/2585600), GigabitEthernet0/1
P 10.210.0.4/30, 1 successors, FD is 2588160
via 10.210.0.14 (2588160/2585600), GigabitEthernet0/1
P 10.213.0.3/32, 1 successors, FD is 128256
via Connected, Loopback0
P 10.213.0.2/32, 1 successors, FD is 2588160
via 10.210.0.14 (2588160/2585600), GigabitEthernet0/1
P 10.213.0.1/32, 1 successors, FD is 2588160
via 10.210.0.14 (2588160/2585600), GigabitEthernet0/1
P 10.212.0.0/24, 1 successors, FD is 51200, tag is 11111
via Redistributed (51200/0)
09-07-2005 08:59 AM
It looks like everything is matching on the 11111 as path access list. I don't know that EIGRP will actually look at the bgp attributes when the route is being redistributed--remember that EIGRP is pulling these routes from the routing table, not from the BGP table. It might be better to set a community, and then match on that community, rather than trying to match on the as path directly.
:-)
Russ.W
09-07-2005 10:34 AM
It shouldn't match everything on the permit 10 line.
ip as-path access-list 2 permit _11111_
route-map BACKDOOR-FLAG permit 10
match as-path 2
set tag 11111
If I change the route map to only what is shown above here is what I get when I do a show on BGP against the route-map.
A1#sho ip bgp route-map BACKDOOR-FLAG
BGP table version is 83, local router ID is 10.213.0.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.212.0.0/24 200.200.200.21 45000 65000 65000 11111 i
As you can see there is only 1 route that matches and the rest "SHOULD" drop through to the permit 20 line of the route-map.
Any ideas????
09-07-2005 01:10 PM
"It shouldn't match everything on the permit 10 line."
Unless the AS Path isn't there for it to match on. EIGRP is probably ignoring the line in the route map checking the AS Path.
I looked up what "_" matches, and it turns out to match carriage returns as well as spaces, periods, and a couple of other things. I only ever use it for spaces and periods, so I didn't know it would match an end of line as well. I wouldn't use it for that, since _11111_ will match [11111 65000] as well as [65000 11111], and you want to catch only the routes coming from 11111, not those that might have passed through it before reaching some other AS you're connected to. The "$" matches just an end of line, so _11111$ matches 11111 only when it's the last (right most) AS in the AS Path.
:-)
Russ.W
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