I know the second one is specific to net traffic, but other than that is there any difference between the two?
No.
jhead@R1# set firewall ?
Possible completions:
> filter Define an IPv4 firewall filter
Contains IPv4 (protocol family inet).
jhead@R1# set firewall family ?
Possible completions:
> inet Protocol family IPv4 for firewall filter
Also contains IPv4 (protocol family inet).
If not, why have two different ways to write firewall rules on MX routers?
Older version of JUNOS used to only have "set firewall filter"
, and the newer versions contain "set firewall family"
as well. So it was decided that it should stay for those who don't need to specify a family other than IPv4 (inet).
It does seem a bit backwards, but if you're not already, I would advise sticking to one style just to keep configuration as clear as possible.