Wiki DE Start in the browser

Wiki › Protocols

Access control lists (ACL)

Named lists with permit and deny on a switch port or VLAN interface: stateless, first match applies, implicit deny at the end.

Layer
3 und 4
See an example
See demo

ACL or firewall?

An ACL (access control list) filters directly on a switch port or a VLAN interface. It is stateless: every packet is checked on its own, replies need their own rule on the port they come in on. In return it is fast and sits exactly where traffic enters the network, e.g. on the guest port.

ACLFirewall
Whereswitch port, VLAN interfacerouter, firewall, end device
Statestatelessusually stateful
End of the listimplicit denydefault rule of your choice

Structure

Switch(config)# ip access-list extended GUESTS
Switch(config-ext-nacl)# permit udp any any eq 53
Switch(config-ext-nacl)# permit tcp 192.168.10.0 0.0.0.255 host 192.168.10.80 eq 80
Switch(config-ext-nacl)# deny ip any any
Switch(config)# interface port1
Switch(config-if)# ip access-group GUESTS in

Addresses are written with a wildcard mask: 0.0.0.255 means “the last 8 bits don’t matter”, the opposite of the subnet mask. host stands for a single address.

ARP, spanning tree and IPv6 neighbor discovery always pass, otherwise the network would not work. In the simulation every rule counts its hits.

How to do it in leyoNET

The same text as in the app’s help (F1 key).

Access lists (ACL)

An access list (access control list, ACL) filters the IP packets that arrive on a port of a switch. On a layer 3 switch also on the VLAN interface: in checks everything from the VLAN (also to the switch itself, e.g. DHCP to the relay), out everything routed into the VLAN. This separates guests from the internal server, for example, without building a separate network.

  • Rules are checked from top to bottom, the first match wins.
  • An implicit deny comes last: whatever no rule allows is dropped.
  • Stateless: unlike the Firewall, the ACL does not remember connections. Replies are checked on the port they arrive on.
  • ARP, spanning tree and IPv6 neighbour discovery always pass.
  • An ACL only takes effect once it is applied to a port. If the name is applied but the list was deleted, everything passes.

In the form: advanced settings of the switch, tab ACL. On the command line as on Cisco:

  • ip access-list extended GUESTS
  • permit tcp 192.168.10.0 0.0.0.255 host 192.168.10.80 eq 80
  • deny ip any any (implicit at the end anyway)
  • no 20 removes the entry with number 20
  • on the port: interface port1, ip access-group GUESTS in
  • show access-lists shows the matches in the simulation

Addresses: any, host A, A W with a wildcard mask (0.0.0.255 = /24) or A/24.

See an example

  • Demo “Firewall device and ACL” in leyoNETDemo “Firewall device and ACL” in leyoNET
    Firewall device and ACL

    A dedicated firewall separates WAN, LAN and DMZ; an access list on the switch port lets guests reach only the web server.

    «Aussen» opens the web server in the DMZ (allowed) and pings the office PC (firewall blocks). Then the guest notebook pings the office PC (ACL drops) and opens the web server (allowed). Filter «tcp.port == 80 or icmp».

    Watch live Project file

“Watch live” opens the network in leyoNET, the simulation runs in a loop. In the app you find it under File → Demo networks, with a step-by-step tour.

Practise

  • ★★★☆☆ Guest port with access list · 3 goals · Worksheet (German)
  • ★★★★☆ UE07b Layer 3 switch with ACL · 5 goals · Worksheet (German)

In leyoNET under Tools → Exercise catalogue. Every exercise checks itself.

Read on

Found a mistake or have an idea? Source of this page on GitHub.