05-20-2010 01:29 AM - edited 03-06-2019 11:10 AM
hello
i has 5 routers ,1--2---3---4---5. 1 and 2 run bgp in as 12, 3 in bgp as23 , 3 and 4 run ospf , 4 and 5 run bgp in as 45.
I redistribute bgp into ospf on 3, and use route-map of set tag automatic-tag. then I redistribute ospf into bgp on 4 and use
route-map of set as-path tag. But I can not see asn 23 on 5 in route learned from 1. how can I solve this problem ?
configuration of 3
router ospf 1
log-adjacency-changes
redistribute bgp 23 subnets route-map settag
network 35.1.1.0 0.0.0.255 area 0
router ospf 1
log-adjacency-changes
redistribute bgp 23 subnets route-map settag
network 35.1.1.0 0.0.0.255 area 0
configuration of 4
router bgp 45
redistribute ospf 1 route-map get
neighbor 54.1.1.2 remote-as 45
no auto-summary
!
route-map get permit 10
set as-path tag
Solved! Go to Solution.
05-20-2010 02:39 AM
Hello Zhiwei,
the tag will contain only one AS number not the whole AS path so you cannot rebuild the AS path in this way.
also local AS number 23 is added only when sending updates to an eBGP peer not in the local BGP table.
OSPF with redistribution accesses the local BGP table so you should see a tag = 12 reported in AS path
Hope to help
Giuseppe
05-20-2010 02:17 AM
AFAIK if you want to keep the AS-path - you need to run MPLS over the OSPF routers and have a VRF that includes just router 3 & 4.
HTH>
05-20-2010 02:38 AM
Hi,
wouldn't it be easier to run BGP between 3 and 4?
BR,
Milan
05-21-2010 06:17 AM
only one test
05-21-2010 06:32 AM
excuse me, how may I do ?
05-20-2010 02:39 AM
Hello Zhiwei,
the tag will contain only one AS number not the whole AS path so you cannot rebuild the AS path in this way.
also local AS number 23 is added only when sending updates to an eBGP peer not in the local BGP table.
OSPF with redistribution accesses the local BGP table so you should see a tag = 12 reported in AS path
Hope to help
Giuseppe
05-21-2010 06:21 AM
how may I see 23 on router
5 ?
05-21-2010 10:24 AM
Hello Zhiwei,
I agree with Andrew's answer you cannot rebuild the whole AS path without having a true chain of eBGP sessions.
The route tag is a single value so it can represent a single AS number not a sequence of AS numbers.
This is good news for real world where consistency of BGP AS paths allows routing over the internet.
Hope to help
Giuseppe
05-20-2010 04:28 AM
You didnt gave details of route map setag.
it is mandatory to have a match statement for set automatic-tag to work and yes as Giuseppe said you will see 12 not 23 in your as path.
Also under BGP, configure
If everything works out fine then you should be able to see both as path and origin attribute in router 5
HTH
Kind Regards
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