cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1830
Views
0
Helpful
8
Replies

bgp as-path

hblfzhangzhiwei
Level 1
Level 1

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

Giuseppe Larosa
Hall of Fame
Hall of Fame

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

View solution in original post

8 Replies 8

andrew.prince
Level 10
Level 10

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>

Hi,

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

BR,

Milan

only one test

excuse me, how  may I do ?

Giuseppe Larosa
Hall of Fame
Hall of Fame

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

how may I see 23 on router

5 ?

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

rajatsetia
Level 1
Level 1

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

Review Cisco Networking for a $25 gift card