Juniper Configuring MPLS Firewall Filters

Материал из IN-TON
Перейти к: навигация, поиск

Configuring MPLS Firewall Filters

The following examples illustrate how you might configure an MPLS firewall filter and then apply the filter to an interface. This filter is configured to count MPLS packets with EXP bits set to either 0 or 4.

The following shows a configuration for an MPLS firewall filter:

  1.  
  2. [edit firewall]
  3. family mpls {
  4. filter expf {
  5. term expt0 {
  6. from {
  7. exp [0 4];
  8. }
  9. then {
  10. count counter0;
  11. accept;
  12. }
  13. term all-other {
  14. then {
  15. accept;
  16. }
  17. }
  18. }
  19. }
  20.  

The following shows how to apply the MPLS firewall filter to an interface:

  1.  
  2. [edit interfaces]
  3. so-0/0/0 {
  4. mtu 4474;
  5. encapsulation ppp;
  6. sonet-options {
  7. fcs 32;
  8. }
  9. unit 0 {
  10. point-to-point;
  11. family mpls {
  12. filter {
  13. input expf;
  14. output expf;
  15. }
  16. }
  17. }
  18. }
  19.  

The MPLS firewall filter is applied to the input and output of an interface (see the input and output statements in the preceding example).