cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1804
Views
1
Helpful
5
Replies

BGP as-path prepend not working with peer-group?

vovochka83
Level 1
Level 1

router bgp 67111
bgp router-id 1.1.1.1
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor EBGP peer-group
neighbor EBGP remote-as 67222
neighbor 192.168.1.61 peer-group EBGP
neighbor 192.168.1.65 peer-group EBGP


address-family ipv4
redistribute ospf 1 route-map REDIST-OSPF-TO-BGP
neighbor 192.168.1.61 activate
neighbor 192.168.1.65 activate

route-map REDIST-OSPF-TO-BGP permit 10
match ip address prefix-list AAA
set origin igp
route-map REDIST-OSPF-TO-BGP permit 20
match ip address prefix-list BBB
set origin igp
set as-path prepend 67111 67111 67111

 

I couldn't see the as-path prepend on the peer router, is there any wrong on above configuration?

 

1 Accepted Solution

Accepted Solutions

vovochka83
Level 1
Level 1

i found the issue, since it is using peer-group, so the route-map must be part of the peer-group as well. For example:

 

address-family ipv4
neighbor 192.168.1.61 activate
neighbor 192.168.1.65 activate

neighbor EBGP route-map REDIST-OSPF-TO-BGP

 

View solution in original post

5 Replies 5

vovochka83
Level 1
Level 1

i found the issue, since it is using peer-group, so the route-map must be part of the peer-group as well. For example:

 

address-family ipv4
neighbor 192.168.1.61 activate
neighbor 192.168.1.65 activate

neighbor EBGP route-map REDIST-OSPF-TO-BGP

 

Hello

Try the following:

conf t
route-map REDIST-OSPF-TO-BGP permit 20
no set as-path prepend 67111 67111 6711
exit


ip prefix-list redistributed-ospf-routes permit x.x.x.x/yy
ip prefix-list redistributed-ospf-routes permit y.y.y.y/xx
etc...

route-map AS-path
match ip address redistributed-ospf-routes
set as-path prepend 67111 67111 6711
exit

router bgp 67111
neighbor EBGP AS-path out
exit

clear ip bgp * soft out


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

 

 

the route-map with peer-group command is working, also the prepend is working as expected, i just tested:

 

neighbor EBGP route-map REDIST-OSPF-TO-BGP

Do you mean that you kept the prepend command on both the individual peers and additionally to the peer-group? Because it seems also when applied only to the peer-group the prepend does not take effect.

Make new post let me check issue 

MHM

Review Cisco Networking for a $25 gift card