19.07.2013 Views

CCNA Complete Guide 2nd Edition.pdf - Cisco Learning Home

CCNA Complete Guide 2nd Edition.pdf - Cisco Learning Home

CCNA Complete Guide 2nd Edition.pdf - Cisco Learning Home

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

- Do not confuse wildcard masks with subnet masks!<br />

0s indicate bits in the address that must be exactly matched.<br />

1s indicate bits in the address that do not need to be matched. Also known as “don’t care” bits.<br />

- Below lists 2 wildcard mask examples:<br />

0.0.0.0 .00000000.00000000.00000000.00000000. The entire IP address must be matched.<br />

0.0.0.255 00000000.00000000.00000000.11111111. Just the first 24 bits must be matched.<br />

- A wildcard mask can be calculated by subtracting the subnet mask from 255.255.255.255:<br />

i) To match all hosts in a network with subnet mask of 255.255.240.0, the wildcard mask<br />

is 255.255.255.255 – 255.255.240.0 = 0.0.15.255.<br />

ii) To match all hosts in a network with subnet mask of 255.255.128.0, the wildcard mask<br />

is 255.255.255.255 – 255.255.128.0 = 0.0.127.255.<br />

Extended IP Access Lists<br />

- Extended ACLs provide complex and powerful matching logic with the ability to examine many<br />

parts of a packet. A match of an extended access list entry requires that all defined matching<br />

parameters are matched. Action will be taken after the matching process.<br />

- Below lists the syntax of an extended access list statement:<br />

access-list {access-list-number} {deny | permit} {protocol} [host] {source-addr}<br />

[source-wildcard] [src-port] [host] {destination-addr} [destination-wildcard] [dst-port]<br />

- Extended ACL examples:<br />

access-list Statement What It Matches<br />

access-list 101 deny ip any host 172.16.1.1 Any IP packet, any source<br />

IP address, with a<br />

destination of 172.16.1.1.<br />

access-list 101 deny tcp any gt 1023 host 172.16.1.1 eq 23 TCP segments with any<br />

source address, source port<br />

greater than 1023, with a<br />

destination of 172.16.1.1<br />

and destination port of 23.<br />

access-list 101 deny tcp any host 172.16.1.1 eq 23 Same as previous example,<br />

but any source port can be<br />

matched as the source port<br />

parameter is removed.<br />

access-list 101 deny udp 172.16.2.0 0.0.0.255 lt 1023 any UDP segments with a source<br />

address in network<br />

172.16.2.0, source port less<br />

than 1023, with any<br />

destination IP address.<br />

- Below lists the <strong>Cisco</strong> IOS ACL operators used for matching TCP and UDP port numbers:<br />

lt Less than<br />

gt Greater than<br />

eq Equal to<br />

neq Not equal to<br />

range Range of port numbers<br />

137<br />

Copyright © 2008 Yap Chin Hoong<br />

yapchinhoong@hotmail.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!