The ACL API
The Access Control List (ACL) filters traffic passed from the AppNexus core switch into your VLAN depending on permit and deny conditions that apply to packets. So, ACL can help limit network traffic and restrict network use by some subnets or hosts.
An ACL is ordered set of Access Control Entries (ACEs) that are represent permit and deny statements. For example, the below ACE permits TCP traffic from any IP address to the IP address 188.8.131.52.
Here is an example of an ACL made up of several ACEs. Please note: the switch tests packets against the conditions from ACEs one by one. So, the order of ACEs is critical because the switch stops checking after the first match. If no conditions match, the switch denies the packet.
Formerly, ACLs were set and modified though the AppNexus support team. Now you can set and modify them yourself with new parameters in the
manage-vlan CLI tool.
- The "get-acl" command shows VLAN ACL. By default, the ACL is printed on display. You can change this behavior by means of specifying the --file optional parameter. In this case the ACL is placed in the corresponding file.
- The "validate-acl" command validates syntax and semantics of passed ACE(s). You can specify one of two allowed sources where ACE(s) should be read from: --file (ACEs to
validate are placed in the corresponding file) or a lone dash (ACEs should be read from standard input).
- The "set-acl/append-acl" commands allow to make changes in VLAN ACL.
ACL Syntax and Validation
ACLs must be in a specific format to be read by the API. We have chosen the Cisco format.
- Possible protocol values: ip, tcp, udp, gre, esp, ahp
- Source and destination may be specified in one of three ways:
1. The whole subnet: network address and network mask (cisco notation must be used) separated by space symbol. E.g. "184.108.40.206 0.0.0.255".
2. A single host. E.g. "host 10.1.1.1".
3. Any host, from 0.0.0.0 to 255.255.255.255. Use "any".
An operator and numeric port specify source and/or destination port when ACE protocol is set to tcp or udp. The following operators may be presented in ports definitions: eq (equal), gt (greater than), lt (less than), and range (requires two ports numbers and represents inclusive range).
In addition to ACEs you can place remarks (comments) in ACLs. The remarks are needed usually for easier understanding the ACL. how?