bgp neighbor 설정에서 neighbor IP만 읽어와 prefiex-list에 적용함
set protocols bgp group test type internal
set protocols bgp group test local-address 1.1.1.2
set protocols bgp group test neighbor 1.1.1.1
set protocols bgp group test neighbor 2.2.2.2
set protocols bgp group test neighbor 3.3.3.3
set policy-options prefix-list configured-bgp-neighbors apply-path "protocols bgp <*> neighbor <*>"
set firewall family inet filter protect-re term BGP-allow from source-prefix-list configured-bgp-neighbors
set firewall family inet filter protect-re term BGP-allow from protocol tcp
set firewall family inet filter protect-re term BGP-allow from port bgp
set firewall family inet filter protect-re term BGP-allow then accept
set firewall family inet filter protect-re term discard-all then discard
set interfaces lo0 unit 0 family inet filter input protect-re
확인
icraft@R2# show policy-options prefix-list configured-bgp-neighbors | display inheritance
##
## apply-path was expanded to:
## 1.1.1.1/32;
## 2.2.2.2/32;
## 3.3.3.3/32;
##
apply-path "protocols bgp group <*> neighbor <*>";