On the EX4300 platform, a firewall filter applied on the lo0 interface may not work as expected. OSPF adjacencies form irrespective of the source-address. The adjacency should never form using the configuration below. It should only form if the correct source-address is used in the OSPF_NEIGHBORS term, in this case, the 192.168.1.x/24 subnet. This same configuration works on the EX4200 as expected. The adjacency does not form until the incorrect source-address is replaced with the correct one. In below example, an incorrect source-address 172.16.1.x/32 subnet is used intentionally in the OSPF_NEIGHBOR term. The term should not match and it should go to the next term - DENY_ANY term, where the action is count and discard. However, the adjacency forms regardless of the source-address in the OSPF_NEIGHBOR term. It is not discarded or counted by DENY_ANY term as indicated by the formation of a Full adjacency and DENIED_TRAFFFIC counter.
This limitation is reproduced in the JTAC lab using EX4300. EX4300-1 - ge-0/0/15 ------------ ge-0/0/15 - EX4300-2
{master:0} root@ospf-1> show configuration | display set set version 13.2X51-D37.1 set system host-name ospf-1 set system root-authentication encrypted-password "$1$QKgKM4mj$SjcxtW9i/ILQQYLK2IMzF1" set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.1/24 set interfaces lo0 unit 0 family inet filter input OSPF_FILTER set interfaces lo0 unit 0 family inet address 1.1.1.1/32 set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set firewall family inet filter OSPF_FILTER term OSPF_NEIGHBOR from source-address 172.16.1.2/32 set firewall family inet filter OSPF_FILTER term OSPF_NEIGHBOR from protocol ospf set firewall family inet filter OSPF_FILTER term OSPF_NEIGHBOR then log set firewall family inet filter OSPF_FILTER term OSPF_NEIGHBOR then accept set firewall family inet filter OSPF_FILTER term DENY_ANY then count DENIED_TRAFFIC set firewall family inet filter OSPF_FILTER term DENY_ANY then discard {master:0} root@ospf-2> show configuration | display set set version 14.1X53-D30.3 set system host-name ospf-2 set system root-authentication encrypted-password "$1$m0KUv05.$jkU1qDmiRaEuW5zTQxNm80" set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.2/24 set interfaces lo0 unit 0 family inet filter input OSPF_FILTER set interfaces lo0 unit 0 family inet address 2.2.2.2/32 set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set firewall family inet filter OSPF_FILTER term OSPF_NEIGHBOR from source-address 172.16.1.1/32 set firewall family inet filter OSPF_FILTER term OSPF_NEIGHBOR from protocol ospf set firewall family inet filter OSPF_FILTER term OSPF_NEIGHBOR then log set firewall family inet filter OSPF_FILTER term OSPF_NEIGHBOR then accept set firewall family inet filter OSPF_FILTER term DENY_ANY then count DENIED_TRAFFIC set firewall family inet filter OSPF_FILTER term DENY_ANY then discard
root@ospf-2# show | compare [edit firewall family inet filter OSPF_FILTER] term OSPF_NEIGHBOR { ... } + term OSPF_tmp { + from { + source-address { + 192.168.1.1/32; + } + protocol ospf; + } + then { + count intersted_SA; + discard; <--------- + } + } term DENY_ANY { ... } root@ospf-2> show ospf neighbor
See Solution section above.
2016-04-26: Initial publication 2016-05-02: Removed software version reference. Affects all versions of Junos OS. 2017-03-05: Category restructure. 2018-03-19: Clarified that issue only affects EX4300 platform.