Community discussions

 
User avatar
tgrand
Long time Member
Long time Member
Topic Author
Posts: 671
Joined: Mon Aug 21, 2006 2:57 am
Location: Winnipeg, Manitoba, Canada

bgp prefered route

Tue Mar 19, 2019 8:30 pm

I have 2 bgp peers which advertise the same ASN.
Peer 1 advertises a single /20
Peer 2 advertises a /20 and several /24s

I have set the distance of the peer 1 routes to a lower value, yet the routes still prefer peer 2.
It seems to prefer the smaller subnet first.

I would like to prefer the peer 1 routes.

Any suggestions?
 
bbs2web
Member Candidate
Member Candidate
Posts: 197
Joined: Sun Apr 22, 2012 6:25 pm
Location: Johannesburg, South Africa
Contact:

Re: bgp prefered route

Tue Mar 19, 2019 9:07 pm

Longer prefix match (/24) will always beat /20. Filter x.x.x.x/20 prefix length 21-24 from peer 2...
 
User avatar
tgrand
Long time Member
Long time Member
Topic Author
Posts: 671
Joined: Mon Aug 21, 2006 2:57 am
Location: Winnipeg, Manitoba, Canada

Re: bgp prefered route

Tue Mar 19, 2019 9:08 pm

I have figured it out.
turns out the more specific route (ie. largest netmask or smallest subnet) is chosen over the larger subnet.
I have to filter the routes to discard smaller subnets from the prefix.
 
Vooray
Frequent Visitor
Frequent Visitor
Posts: 68
Joined: Mon Feb 23, 2015 3:34 pm

Re: bgp prefered route

Tue Mar 19, 2019 9:39 pm

So, what is an idea behind setting two bgp peers with views?
Prefix length is not something about bgp route selection process.
If you keep ISP2 for failover purposes keep default route only and filter out all other prefixes, or ask peer to announce default only.

Who is online

Users browsing this forum: No registered users and 11 guests