Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Access Control Lists (Firewall Filters)

Read this topic to learn about Layer 2 access control lists (Firewall filters) in the Cloud-Native Router.

Access Control Lists (Firewall Filters)

Cloud-Native Router includes firewall filter capability for bridge family traffic. L2 ACL support is enhanced in this release to align with L3 and L4 ACL capabilities. You can configure the filters using the Junos OS CLI within the Cloud-Native Router controller, using NETCONF, or the Cloud-Native Router APIs. You can also configure firewall filters using node annotations and custom configuration templates at the time of Cloud-Native Router deployment. See the deployment guide for more details.

During deployment, the system defines and applies firewall filters to block traffic from passing directly between the router interfaces. You can dynamically define and apply more filters. Use the firewall filters to:

  • Define firewall filters for bridge family traffic.

  • Define filters based on one or more of the following fields: source MAC address, destination MAC address, or EtherType.

  • Define multiple terms within each filter.

  • Apply terminating actions: accept, discard, or routing-instance.

  • Apply nonterminating actions: count, log, or syslog.

  • Apply filters to bridge domains.

Note: Cloud-Native Router supports a maximum of 16 filters per family and 16 terms per filter.
Note:

The L2 ACL changes in this release are not backward compatible with the previous releases. The show firewall output format has changed, and the vRouter acl utility now requires the bridge family to be explicitly specified. Review your existing L2 ACL configuration before upgrading.

Cloud-Native Router supports the following match conditions for bridge family firewall filters:

Table 1: Supported Match Conditions for Bridge Family Firewall Filters
Match Condition Description
source-mac-address Match the source MAC address of the packet.
destination-mac-address Match the destination MAC address of the packet.
ether-type Match the EtherType field in the Ethernet frame. You can specify the EtherType as a keyword (for example, arp, ipv4, ipv6) or as a hexadecimal value (for example, 0x0800 for IPv4).

Cloud-Native Router supports the following actions for bridge family firewall filter terms:

Table 2: Supported Actions for Bridge Family Firewall Filters
Type of Action Supported Actions Description
Terminating accept Accept the packet.
discard Discard the packet silently, without sending an ICMP message.
routing-instance routing-instance-name Direct the packet to the specified routing instance.
Nonterminating count counter-name Count the packet in the named counter. Use count only with a terminating action in the same term.
log Log the packet header information in a buffer within the Packet Forwarding Engine. Access this information using the show firewall log command.
syslog Log the packet to the system log file.
Note: You can specify only one terminating action per filter term. You can combine a terminating action with one or more nonterminating actions in the same term. For example, you can specify accept with count in a single term.
Note: Cloud-Native Router is preconfigured with the following syslog configuration: You must additionally configure syslog as follows:

Configuration Example

The following example shows a bridge family firewall filter that matches IPv4 traffic (EtherType 0x0800) and accepts it while counting matched packets.

  1. Configure the interface for bridge family traffic in access mode on VLAN 700:

  2. Configure the firewall filter:

  3. Configure the virtual switch routing instance, associate the interface, configure the bridge domain, and apply the filter to the bridge domain:

  4. Commit the configuration:

The complete configuration looks like this:

Note: You can configure up to 16 terms in a single firewall filter.

After configuration, you must apply your firewall filters to a bridge domain using the set routing-instances vswitch bridge-domains bd-name forwarding-options filter input filter-name configuration command. Then commit the configuration for the firewall filter to take effect.

Cloud-Native Router Controller Commands

The following commands can be used on the Cloud-Native Router controller to view bridge family firewall filter information.

Display all firewall filters for family bridge:

Display a specific firewall filter for family bridge:

Display all firewall filters across all families:

Clear counter statistics for bridge family:

View firewall logs:

View syslog messages:

Note: The show firewall output format for bridge family in this release is aligned with the L3 ACL format. It displays the filter name and named counter with packet and byte counts. In earlier releases, the output displayed the filter name, vlan-id, term name, and packet count. This change is not backward compatible.

Release 25.4 output format:

Release 26.2 output format:

vRouter Commands

The following commands can be used on the vRouter to view bridge family firewall filter configuration and state. Run these commands from inside the contrail-vrouter-agent-dpdk container or using the contrail-tools container.

List all bridge family ACL filters:

Display a specific bridge family filter term:

List all ACL actions (counters) across all families including bridge:

The complete set of acl command options now includes bridge as a supported family:

Note: In previous releases, bridge was not a supported family value for the acl command. You must now explicitly specify --family bridge to view bridge family ACL filters.

Display the bridge domain table to verify filter attachment:

The bd --dump output includes a Filter Name column that shows the filter attached to each bridge domain.

The Filter Name column shows the name of the filter applied to the bridge domain via the forwarding-options filter input configuration. A dash (-) indicates no filter is applied to that bridge domain.

Troubleshooting

The following table lists some of the potential problems that you might face when you implement firewall rules or ACLs in the cloud-native router. You run most of these commands on the host server.

Table 3: L2 Firewall Filter or ACL Troubleshooting
Problem Possible Causes and Resolution Command
Firewall filters or ACLs not working gRPC connection (port 50052) to the vRouter is down. Check the gRPC connection.
netstat -antp|grep 50052
The ui-pubd process is not running. Check whether ui-pubd is running.
ps aux|grep ui-pubd
Firewall filter or ACL show commands not working The gRPC connection (port 50052) to the vRouter is down. Check the gRPC connection.
netstat -antp|grep 50052
The firewall service is not running.
ps aux|grep firewall
show log filter.log
You must run this command in the JCNR-controller (cRPD) CLI.