Steel mountain Data centre- protected by Network ACLs
ACL controls what can establish a TCP/IP socket connection to specific ports which means ACLS control what services you can get to on a network
ACL Nut
ACLS have a mask which determines what gets passed and what gets dropped
They use an inverse mask , an example of this is 0.0.0.255 , where ever there is a 0 you must consider the network address wherever there is a 1 you can ignore it so the inverse of a normal mask
for example if you got an ACL that looks like this
10.1.1.0 0.0.0.255
the network address to be processed is 10.1.1.0 in binary is
00001010 .00000001.00000001.00000000
and the mask in binary is
00000000.00000000.00000000.11111111
- 0 indicates that the network address must be considered (exact match)
- 1 in the mask is a don’t care
10.1.1.”we don’t care what’s in this last octet since here it is all ones “so the address we process starts with 10.1.1.1 and stops with 10.1.1.255
you can subtract the normal mask from 255.255.255.255 to get the inverse mask
255.255.255.255-255.255.255.0 = 0.0.0.255
ACL cuts
source 0.0.0.0 / wildcard 255.255.255.255 means “any ” how so ?? because basically we are flying all 1’s against 0.0.0.0 it can be any value between 0 and 255 so that’s pretty much everything
if we got a source/wildcard 10.1.1.2/0.0.0.0 that means we got to match exactly in every position so that means the same as host 10.1.1.2
192.168.32.0/24 (192.168.32.0 – 192.168.32.255)
192.168.33.0/24 (192.168.33.0-192.168.33.255)
192.168.34.0/24 you get the idea
192.168.35.0/24
192.168.36.0/24
192.168.37.0/24
192.168.38.0/24
192.168.39.0/24
in these addresses the first two octets and the last octet is the same for each of these networks
| Decimal | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| 32 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 33 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
| 34 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
| 35 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 |
| 36 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 |
| 37 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 |
| 38 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 |
| 39 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 |
This means that those 8 original networks can be summarized as one
If you look at the anatomy of a network acl or NACL it looks a bit like this
access-list 10 permit 192.168.146.0 0.0.1.255
this permits traffic from 192.168.146.0 – 192.168.147.254
access-list 11 permit 192.168.148.0 0.0.1.255
this permits traffic from 192.168.148.0-192.168.149.254
How ACLS are processed
Traffic that comes into a router via an interface is compared to the ACL entries based on the order that they have been configured in , so they run from the top ACL statements to the last ACL statement of an access-list
new statements are added to the end of the list
The router will process network traffic until it gets to the end of the list , this traffic would be denied ( since no match in the configured ACL)
“There is an implied deny for traffic that is not permitted”
for this reason you should have the frequently hit entries at the top of the list
A single ACL entry with only 1 deny has the effect of denying all traffic , you must have at least one permit statement
these two ACLS have the same effect
access-list 101 permit ip 10.1.1.0 0.0.0.255 172.16.1.0 0.0.0.255
!--- This command is used to permit IP traffic from 10.1.1.0 !--- network to 172.16.1.0 network. All packets with a source !--- address not in this range will be rejected.
access-list 102 permit ip 10.1.1.0 0.0.0.255 172.16.1.0 0.0.0.255
access-list 102 deny ip any any
!--- This command is used to permit IP traffic from 10.1.1.0 !--- network to 172.16.1.0 network. All packets with a source !--- address not in this range will be rejected.
In this example, the last entry is sufficient. You do not need the first three entries because TCP includes Telnet, and IP includes TCP, User Datagram Protocol (UDP), and Internet Control Message Protocol (ICMP).
!--- This command is used to permit Telnet traffic !--- from machine 10.1.1.2 to machine 172.16.1.1. access-list 101 permit tcp host 10.1.1.2 host 172.16.1.1 eq telnet
!--- This command is used to permit tcp traffic from !--- 10.1.1.2 host machine to 172.16.1.1 host machine. access-list 101 permit tcp host 10.1.1.2 host 172.16.1.1
!--- This command is used to permit udp traffic from !--- 10.1.1.2 host machine to 172.16.1.1 host machine. access-list 101 permit udp host 10.1.1.2 host 172.16.1.1
!--- This command is used to permit ip traffic from !--- 10.1.1.0 network to 172.16.1.10 network. access-list 101 permit ip 10.1.1.0 0.0.0.255 172.16.1.0 0.0.0.255
you can use ports and traffic types in ACLS , which is where we can control what the IP networks can access so for example
access-list 102 permit ICMP host 10.1.1.1 host 172.16.1.1 14
becomes
access-list 102 permit ICMP host 10.1.1.1 host 172.16.1.1 Timestamp-Reply
Where to place ACL’s

It is a good practice to apply the ACL on the interface closest to the source of the traffic. As shown in this example, when you try to block traffic from source to destination, you can apply an inbound ACL to E0 on router A instead of an outbound list to E1 on router C. An access-list has a deny ip any any implicitly at the end of any access-list.
DHCP and ACL’s
If traffic is related to a DHCP request and if it is not explicitly permitted, the traffic is dropped because when you look at DHCP request in IP, the source address is s=0.0.0.0 (Ethernet1/0), d=255.255.255.255, len 604, rcvd 2 UDP src=68, dst=67.
Note that the source IP address is 0.0.0.0 and destination address is 255.255.255.255. Source port is 68 and destination 67. Hence,
you should permit this kind of traffic in your access-list else the traffic is dropped due to implicit deny at the end of the statement.
The motor way analogy
Traffic on a IP network is a bit like traffic on a road network and much like those meanings where you get inbound and outbound in response to road blocks for example the same sorts of meanings occur
- Out—Traffic that has already been through the router and leaves the interface. The source is where it has been, on the other side of the router, and the destination is where it goes.
- In—Traffic that arrives on the interface and then goes through the router. The source is where it has been and the destination is where it goes, on the other side of the router.
- Inbound —If the access list is inbound, when the router receives a packet, the Cisco IOS software checks the criteria statements of the access list for a match. If the packet is permitted, the software continues to process the packet. If the packet is denied, the software discards the packet.
- Outbound—If the access list is outbound, after the software receives and routes a packet to the outbound interface, the software checks the criteria statements of the access list for a match. If the packet is permitted, the software transmits the packet. If the packet is denied, the software discards the packet.
EDITING ACL’s
so this is in bold because there are some rules here that i was not aware and i have fallen foul of
rule 1 – when you edit an ACL entry and delete a specific line from an ACL the whole ACL is deleted
so whenever you are working with an ACL you should take the trouble to make a note of what was there in the first place make the change you need in the editor and then re-apply it
rule 2 – if you are working with a numbered ACL list , if in your edit you attach a number than it will find its place in the ACL
DEBUGGING ACL’s
Use the debug ip packet 101 or debug ip packet 101 detail command in order to begin the debug process.
ACL types
standard;
This is the command syntax format of a standard ACL.
access-list access-list-number {permit|deny}
{host|source source-wildcard|any}

