Page MenuHomePhabricator

IPv4 BGP prefix lists not applying correctly
Closed, ResolvedPublicBUG

Description

IPv4 BGP prefix lists does not seem to be properly enabled in FRR. IPv6 does not seem to have the same issue.
Version: VyOS 1.2.0-rc5

VyOS config:

set policy prefix-list test rule 10 action 'permit'
set policy prefix-list test rule 10 le '24'
set policy prefix-list test rule 10 prefix '100.140.22.0/23'
set protocols bgp 1 address-family ipv4-unicast redistribute connected
set protocols bgp 1 address-family ipv4-unicast redistribute kernel
set protocols bgp 1 neighbor 1.1.1.2 address-family ipv4-unicast prefix-list export 'test'
set protocols bgp 1 neighbor 1.1.1.2 address-family ipv4-unicast prefix-list import 'test'
set protocols bgp 1 neighbor 1.1.1.2 remote-as '2'

FRR generated config, notice the missing prefix-lists.

vtysh#
router bgp 1
 neighbor 1.1.1.2 remote-as 2
 !
 address-family ipv4 unicast
  redistribute kernel
  redistribute connected
 exit-address-family
!

Adding the prefix-lists manually to FRR makes things work as expected.

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.2.0-rc5
Why the issue appeared?
Will be filled on close
danhusan created this task.Nov 5 2018, 3:51 PM
danhusan updated the task description. (Show Details)
danhusan updated the task description. (Show Details)

Vyos has had a similar issue for quite some time with BGP route maps. route maps and filters do not work initially on first boot or when the box is being taken down. the BGP sessions are up w/out filters for several minutes and usually trip prefix number filters on peers. Is this the same issue? i.e. are you sure the prefix list isn't engaged after several minutes?

My test env has been running for 50 minutes without the prefix-lists engaging so I'd say this is another issue. Furthermore I think the issue you are describing has been fixed in the upcoming rc6 (T944).

From a70d2041bde216389b903eb273d3a09270d8f9aa Mon Sep 17 00:00:00 2001
From: Daniel Husand <daniel@fnutt.net>
Date: Tue, 6 Nov 2018 15:11:05 +0100
Subject: [PATCH] Fixed some typos to get ipv4 prefix-lists working again. Bug
 T968.

---
 scripts/bgp/vyatta-bgp.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl
index 5b443301..6c6884af 100755
--- a/scripts/bgp/vyatta-bgp.pl
+++ b/scripts/bgp/vyatta-bgp.pl
@@ -446,11 +446,11 @@ my %qcom = (
       set => 'router bgp #3 ; address-family ipv4 unicast ; neighbor #5 next-hop-self',
       del => 'router bgp #3 ; address-family ipv4 unicast ; no neighbor #5 next-hop-self',
   },
-  'protocols bgp var neighbor var prefix-list' => {
+  'protocols bgp var neighbor var address-family ipv4-unicast prefix-list' => {
       set => undef,
       del => undef,
   },
-  'protocols bgp var neighbor address-family ipv4-unicast var prefix-list export' => {
+  'protocols bgp var neighbor var address-family ipv4-unicast prefix-list export' => {
       set => 'router bgp #3 ; address-family ipv4 unicast ; neighbor #5 prefix-list #10 out',
       del => 'router bgp #3 ; address-family ipv4 unicast ; no neighbor #5 prefix-list #10 out',
   },
--
2.11.0
syncer triaged this task as Normal priority.Nov 7 2018, 4:59 PM
dmbaturin closed this task as Resolved.Nov 11 2018, 9:35 AM
dmbaturin claimed this task.
dmbaturin added a subscriber: dmbaturin.

Good catch!