Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

bgp as-path

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

1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Silver

Re: bgp as-path

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

8 REPLIES

Re: bgp as-path

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>

Re: bgp as-path

Hi,

wouldn't it be easier to run BGP between 3 and 4?

BR,

Milan

Community Member

Re: bgp as-path

only one test

Community Member

Re: bgp as-path

excuse me, how  may I do ?

Hall of Fame Super Silver

Re: bgp as-path

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

Community Member

Re: bgp as-path

how may I see 23 on router

5 ?

Hall of Fame Super Silver

Re: bgp as-path

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

Bronze

Re: bgp as-path

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 where you distributing BGP into OSPF.

If everything works out fine then you should be able to see both as path and origin attribute in router 5

HTH

Kind Regards

599
Views
0
Helpful
8
Replies
CreatePlease to create content