bgpq3 icon indicating copy to clipboard operation
bgpq3 copied to clipboard

About the operation when multiple database sources are specified by'-S flag'

Open M-anazawa opened this issue 2 years ago • 0 comments

Hello,

Please tell me what happens when multiple Database Sources are specified with'-S flag'.

bgpq3 -S JPIRR,RIPE,RADB AS-IRR-NET

What kind of filter list will be generated if the following are registered in the IRR?

database sources : JPIRR
as-set           : AS-IRR-NET
members          : AS00001,AS00002,AS00003,AS00004

database sources : RIPE
as-set           : AS-IRR-NET
members          : AS00001,AS00003,AS00004

database sources : JPIRR
route            : 192.168.1.0/24
origin           : AS00001

database sources : RIPE
route            : 192.168.2.0/24
origin           : AS00002

database sources : RADB
route            : 192.168.3.0/24
origin           : AS00002

database sources : JPIRR
route            : 192.168.4.0/24
origin           : AS00003

database sources : RADB
route            : 192.168.4.0/24
origin           : AS00003

database sources : ARIN
route            : 192.168.5.0/24
origin           : AS00004

As far as I can see in the documentation and Issues, I expect the following filter to be generated:

no ip prefix-list NN
ip prefix-list NN permit 192.168.1.0/24
ip prefix-list NN permit 192.168.2.0/24
ip prefix-list NN permit 192.168.4.0/24

Since each object is searched in the order of JPIRR → RIPE → RADB specified in database sources, the operation is as follows in this case.

(1) Search AS-IRR-NET in the order of JPIRR → RIPE → RADB, and since AS-IRR-NET is registered in JPIRR, RIPE and RADB are not searched.AS-IRR-NET registered in RIPE is not searched.

(2) Search for a route whose origin is AS00001 of members registered in AS-IRR-NET of JPIRR in the order of JPIRR → RIPE → RADB.Since JPIRR has a route: 192.168.1.0/24 of origin: AS00001, generate a prefix-list. RIPE and RADB are not searched.

(3) Search for a route whose origin is AS00002 of members registered in AS-IRR-NET of JPIRR in the order of JPIRR → RIPE → RADB.Since RIPE has a route: 192.168.2.0/24 of origin: AS00002, a prefix-list is generated.Route: 192.168.3.0/24 registered in RADB is not generated.

(4) Search for a route whose origin is AS00003 of members registered in AS-IRR-NET of JPIRR in the order of JPIRR → RIPE → RADB.Since JPIRR has a route: 192.168.4.0/24 of origin: AS00003, a prefix-list is generated. RIPE and RADB are not searched.

(5) Search for a route whose origin is AS00004 of members registered in AS-IRR-NET of JPIRR in the order of JPIRR → RIPE → RADB. Prefix-list is not generated because there is no registration in JPIRR, RIPE, RADB.ARIN not specified in database sources will not be searched.

Is this perception correct?

I would appreciate it if you could provide a little more detail in the documentation.

Regards, Anazawa

M-anazawa avatar Mar 11 '22 02:03 M-anazawa