cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7136
Views
10
Helpful
5
Replies

MULTIPLE AS NUMBERS FOR BGP IN ROUTER RUNNING VRFs

davejumby
Level 1
Level 1

Hi all

 

I have two routers running BGP with the below configs. I am getting a new router which is to run VRFs and replace the 2 routers. I'm trying to configure per VFR BGP but it appears the router can only have one AS number. Can anyone help with how I can achieve this BGP configuration to work just the way it was working when I had 2 separate routers. The last set of configs is my trial at this but not working so far

 

ROUTER A

router bgp 65001
no synchronization
bgp router-id 10.2.32.2
bgp log-neighbor-changes
network 10.2.32.1 mask 255.255.255.255
network 10.2.32.2 mask 255.255.255.255
network 172.16.0.0 mask 255.255.255.0
network 172.16.1.0 mask 255.255.255.0
redistribute eigrp 10 metric 25
neighbor 10.2.0.2 remote-as 12455
neighbor 10.2.0.6 remote-as 12455
neighbor 172.16.5.21 remote-as 64840
no auto-summary

 

ROUTER B

 

router bgp 64840
bgp log-neighbor-changes
neighbor 172.30.120.181 remote-as 37061
!
address-family ipv4
network 172.16.5.0 mask 255.255.255.0
network 172.24.203.124 mask 255.255.255.252
network 192.168.91.73 mask 255.255.255.255
redistribute static
redistribute eigrp 10
neighbor 172.30.120.181 activate
neighbor 172.30.120.181 weight 500
neighbor 172.30.120.181 soft-reconfiguration inbound

 

NEW ROUTER CONFIG

 

router bgp 65001
no synchronization
bgp router-id 10.2.32.2
bgp log-neighbor-changes
!
address-family ipv4 VRF-A
network 10.2.32.1 mask 255.255.255.255
network 10.2.32.2 mask 255.255.255.255
network 172.16.0.0 mask 255.255.255.0
network 172.16.1.0 mask 255.255.255.0
redistribute eigrp 10 metric 25
neighbor 10.2.0.2 remote-as 12455
neighbor 10.2.0.6 remote-as 12455
neighbor 172.16.5.21 remote-as 64840// I'm facing a problem at such configs because of AS numbers
no auto-summary


address-family ipv4 VRF-B
neighbor 172.30.120.181 remote-as 37061
network 172.16.5.0 mask 255.255.255.0
network 172.24.203.124 mask 255.255.255.252
network 192.168.91.73 mask 255.255.255.255
redistribute static
redistribute eigrp 10
neighbor 172.30.120.181 activate
neighbor 172.30.120.181 weight 500
neighbor 172.30.120.181 soft-reconfiguration inbound
exit-address-family

 

1 Accepted Solution

Accepted Solutions

Hello

Only one bgp ASN is allowed on the one router however you can configure bgp so it peers with a different ASN other than the one specified in the routing process.

 

Example:
router bgp 65001
address-family ipv4 VRF-A
neighbor 172.16.5.21 remote-as 64840

address-family ipv4 VRF-B
neighbor 172.30.120.181 remote-as 37061
neighbor 172.30.120.181 local-as 64840 no-prepend  <-- this will allow the neighboring bgp router to peer with ASN 64840


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

View solution in original post

5 Replies 5

davejumby
Level 1
Level 1
Just to make my concern/question a bit clear there is a command where I need to enter a remote AS number for a neighbor(its in bold in the initial post) but in this case the neighbor is in the same router as a VRF instance so essentially the remote AS number will be the same as the AS number of the BGP configured on the router. This is what I need to work around

Hello

Only one bgp ASN is allowed on the one router however you can configure bgp so it peers with a different ASN other than the one specified in the routing process.

 

Example:
router bgp 65001
address-family ipv4 VRF-A
neighbor 172.16.5.21 remote-as 64840

address-family ipv4 VRF-B
neighbor 172.30.120.181 remote-as 37061
neighbor 172.30.120.181 local-as 64840 no-prepend  <-- this will allow the neighboring bgp router to peer with ASN 64840


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

Hi Paul
I'll try it out and give feedback

Yes, this is exactly the way to do it. I know of this as AS masquerading.  The AS that you set in the router command needs to be a completely dummy AS, that is never used for peering. Each VRF that is used for peering needs to have the local-AS command in line with Paul's post. It also needs the RID to be set in each VRF so that you don't have RID clashes either.

 

Hope this helps

 

Dave

thanks so much , it worked
Review Cisco Networking products for a $25 gift card