IPv6 ACLs Types and Configuration

IPv6 ACLs are alike to IPv4 ACLs. If you can understand IPv4 access lists than IPv6 ACLs are not difficult for you to understand and configure. IPv4 are two types of ACLs, standard and extended, both can either numbered or named ACLs but IPv6 ACLs are only one type, similar to IPv4 extended named ACL in function and configuration. IPv6 has no numbered ACLs. IPv6 ACLs cannot share the same name with IPv4 ACLs.

Comparing IPv4 and IPv6 ACLs

There are three major differences between IPv4 and IPv6 ACLs.

Applying an IPv6 ACL

IPv4 uses the command ip access-group command to link and apply an ACL to an IPv4 interface but IPv6 uses the ipv6 traffic-filter command to perform the same task for IPv6 interfaces.

Wildcard Masks and IPv6 Prefix length

IPv6 ACLs do not use and wildcard masks. It is used the prefix-length to indicate how much of an IPv6 source or destination address should be matched.

 Additional Default Statements

The major difference between IPv4 and IPv6 ACL is an implicit permit statement.  Each IPv6 ACL required two implicit permit statement at the end. The implicit permit statement at the end of every IPv4 standard or extended ACL is deny any or deny ip any any. The IPv6 also has the similar deny ipv6 any any statement at the end of each IPv6 ACL but it also includes two other implicit statements which is “permit icmp any any nd-na” and “permit icmp any any nd-ns”

The “permit icmp any any nd-na” and “permit icmp any any nd-ns” allow the IPv6 equivalent of ARP for IPv4. We have already discussed ARP in previous articles. ARP is used to resolve the Layer2 MAC addresses while the IPv6 uses ICMP Neighbor Discovery (ND) messages to accomplish the same task.

ND has two types of messages Neighbor Solicitation (NS) and Neighbor Advertisement (NA) messages which are encapsulated in IPv6 packets and uses IPv6 network layer services but ARP uses layer2 services. So IPv6 ACLs need to implicitly permit ND packets for both directions on an interface. Therefore, both Neighbor Discovery – Neighbor Advertisement (nd-na) and Neighbor Discovery – Neighbor Solicitation (nd-ns) messages are permitted. The figure below illustrates the ND process.

IPv6 ACLs Types and Configuration 4

Configuring IPv6 ACLs

We are using topology similar to the previous IPv4 topology except for the IPv6 addressing scheme.  The addressing scheme is shown in topology in the figure below. There are seven subnets with /64 prefix. You can check and verify the IPv6 interface configuration using the show ipv6 interface brief command in the interface configuration mode. Recall that we can set IPv6 address on the router interface using the “IPv6 address <Ipv6 address/ prefix> “ for example If I want to set the IP address on router0 interface fa0/0 the command should be:  R0(config-if)# IPv6 address 2001:DACA:1::1/64

IPv6 ACLs Types and Configuration 5

The command syntax for IPv6 is similar to the syntax used for an IPv4 extended ACL. The difference between both command syntax is the use of the IPv6 prefix-length instead of an IPv4 wildcard mask. The command syntax for IPv6 ACLs is the following:

R1(config)# ipv6 access-list <access-list-name>

R1 (config-ipv6-acl)# deny | permit protocol {source-ipv6-prefix/prefix-length  any | host  source-ipv6-address} [operator <port-number>] {destination-ipv6-prefix/prefix-length | any | host destination-ipv6-address} [operator [port-number] ]

You can see that the parameter is similar to IPv4 syntax parameter except for the prefix/prefix-length. The steps for IPv6 ACL configuration are the following:-

  1. Use theipv6 access-list <name> command to create an IPv6 ACL. The name can be alphanumeric, case sensitive, and must be unique and there is no need for a standard or extended option.
  2. From the IPv6 named ACL configuration mode, use the permit or deny statements to specify one or more conditions to decide if a packet is forwarded or dropped.
  3. Apply the ACL to Interface using ipv6 traffic-filter

The figure below illustrates the steps to create an IPv6 ACL with a simple example. The first statement names the IPv6 access list NO- ACCESS-SERVER. Similar to IPv4 named ACLs. The second statement denies all IPv6 packets from the 2001:DACA:4::/64 to server0. The third statement allows all other IPv6 packets.

IPv6 ACLs Types and Configuration 6

Applying an IPv6 ACL to an Interface

When we configure the access control list, it is required to link to an interface using the ipv6 traffic-filter command. The syntax linking ACL to an interface is following:

R2(config-if)# ipv6 traffic-filter <access-list-name> in out }

The figure below illustrates the NO-ACCESS-SERVER configured previously and the commands used to apply the IPv6 ACL outbound to the fa0/0 interface. To remove an ACL from an interface, first, enter the no ipv6 traffic-filter command on the interface, and then enter the global no ipv6 access-list command to remove the ACL. Like IPv4 ACL IPv6 ACL also uses an access-class command to apply an access list to VTY ports. To apply the above-configured ACL use the following commands on router2.

R2(config)#interface FastEthernet 0/0

R2(config-if) ipv6 traffic-filter NO-ACCESS-SERVER0 in



Verifying IPv6 ACLs

We can use similar commands to verify an IPv6 access list to those used for IPv4 ACLs. We can use the show ipv6 interface command to verify and confirm that ACL is configured inbound or outbound on the interface.

We can use the show access-lists command to displays and verify all access lists configured on the router including both IPv4 and IPv6 ACLs. The difference here is the sequence number; the sequence numbers of IPv6 ACLs occur at the end of the statement and not the beginning as with IPv4 access lists. The IPv6 ACEs appear in the order they were entered during configuration, they are not always incremented by 10. The IPv6 access lists are also processed and displayed in the order the statements are entered.  We can also verify the IPv6 ACL configuration using the show running-config command.