WEBVTT

0:00:08.200000 --> 0:00:12.880000
 In this video, I'd like to talk about
 a classification feature of Cisco

0:00:12.880000 --> 0:00:15.600000
 iOS called Access Lists.

0:00:15.600000 --> 0:00:19.200000
 Now, you might be wondering, what do
 you mean by classification feature?

0:00:19.200000 --> 0:00:21.960000
 That's what I'm going
 to talk about.

0:00:21.960000 --> 0:00:30.000000
 So, there are many features within Cisco
 iOS that allow you to look for

0:00:30.000000 --> 0:00:33.520000
 certain things. Look for certain things
 in data that's passing through

0:00:33.520000 --> 0:00:39.080000
 your switch or through your router, because
 you want to identify something

0:00:39.080000 --> 0:00:43.420000
 and then based on if what you're looking
 for is matching, you want to

0:00:43.420000 --> 0:00:47.860000
 do something to that frame or that packet
 that matches what you're looking

0:00:47.860000 --> 0:00:53.720000
 for. So, a lot of times in Cisco iOS,
 features are divided into two separate

0:00:53.720000 --> 0:00:58.200000
 sections. You've got a feature that
 you configure to say, this is what

0:00:58.200000 --> 0:00:59.200000
 I'm looking for.

0:00:59.200000 --> 0:01:03.460000
 Like, I'm looking for this particular
 destination IP address or I'm looking

0:01:03.460000 --> 0:01:07.460000
 for this particular MAC address or I'm
 looking for a packet that's a certain

0:01:07.460000 --> 0:01:10.780000
 size. A whole variety of things.

0:01:10.780000 --> 0:01:13.880000
 So, there's features that say, this is
 what I'm looking for and you program

0:01:13.880000 --> 0:01:15.580000
 those, you type those in.

0:01:15.580000 --> 0:01:20.240000
 And then there's other features that
 refer to those identification or

0:01:20.240000 --> 0:01:22.300000
 those classification features.

0:01:22.300000 --> 0:01:26.100000
 And those other features say, okay,
 if you find a packet that matches

0:01:26.100000 --> 0:01:29.760000
 what you're looking for, tell me and
 I'm going to do something to it.

0:01:29.760000 --> 0:01:33.100000
 And maybe one feature will say, I'm
 going to encrypt that packet.

0:01:33.100000 --> 0:01:36.920000
 I will take the data and sort of garble
 it up so that if anybody happens

0:01:36.920000 --> 0:01:40.440000
 to see it while it's in transit, they
 won't be able to tell what's in

0:01:40.440000 --> 0:01:41.800000
 the payload, what's in the data.

0:01:41.800000 --> 0:01:45.480000
 There are other features that say,
 okay, I'm a security feature.

0:01:45.480000 --> 0:01:49.880000
 If a packet matches you classification
 tool, tell me and then I'll make

0:01:49.880000 --> 0:01:52.960000
 sure it gets dropped or I'll
 make sure it gets forwarded.

0:01:52.960000 --> 0:01:54.940000
 And there's a lot of other
 things like that as well.

0:01:54.940000 --> 0:01:58.900000
 So a lot of times in Cisco, iOS, we
 have the separation between various

0:01:58.900000 --> 0:02:03.220000
 tools you can use to identify or classify
 things and then you can associate

0:02:03.220000 --> 0:02:07.580000
 those tools with other tools that actually
 do something, that takes some

0:02:07.580000 --> 0:02:09.580000
 action on what has
 been identified.

0:02:09.580000 --> 0:02:16.180000
 And an access list is one example of those
 tools that are for classification.

0:02:16.180000 --> 0:02:23.360000
 So access lists are specifically designed
 to look for layer three and

0:02:23.360000 --> 0:02:25.260000
 layer four information.

0:02:25.260000 --> 0:02:29.480000
 There actually are Mac access list
 that you can also configure to look

0:02:29.480000 --> 0:02:32.720000
 for layer two information, but we don't
 really go into those at all at

0:02:32.720000 --> 0:02:40.960000
 the CCNA level. So when you create
 an access list, think of an access

0:02:40.960000 --> 0:02:45.280000
 list as being like a container of
 several different statements.

0:02:45.280000 --> 0:02:49.520000
 Maybe one statement is I'm looking for a
 packet with this specific destination.

0:02:49.520000 --> 0:02:52.440000
 Maybe another statement is I'm looking
 for a packet with this particular

0:02:52.440000 --> 0:02:59.300000
 source. And then that grouping of entries,
 we give it some sort of identifier.

0:02:59.300000 --> 0:03:03.100000
 So with access list, that identifier
 could be a number.

0:03:03.100000 --> 0:03:06.840000
 For example, I could say I have
 access list one on one.

0:03:06.840000 --> 0:03:12.380000
 And access list one on one has 15 or
 20 entries in it, what we call access

0:03:12.380000 --> 0:03:13.880000
 control entries.

0:03:13.880000 --> 0:03:17.100000
 So access list one on one, look
 for this source address.

0:03:17.100000 --> 0:03:21.260000
 Access list one on one, the next line
 down, look for this destination.

0:03:21.260000 --> 0:03:23.520000
 Access list one on one,
 the third line down.

0:03:23.520000 --> 0:03:25.880000
 Look at this combination of
 source and destination.

0:03:25.880000 --> 0:03:30.720000
 So all of that together would be considered
 access list one on one.

0:03:30.720000 --> 0:03:33.260000
 I'm identifying it by that
 number one on one.

0:03:33.260000 --> 0:03:35.960000
 Every single line has
 that one on one in it.

0:03:35.960000 --> 0:03:39.280000
 But each entry is unique
 and different.

0:03:39.280000 --> 0:03:43.500000
 Or another option you have available
 to you is naming your access list.

0:03:43.500000 --> 0:03:47.000000
 And we'll look at that a little bit
 later about maybe it's more, maybe

0:03:47.000000 --> 0:03:50.060000
 if you're looking at your running config,
 it's more meaningful to you

0:03:50.060000 --> 0:03:52.080000
 if the name is there.

0:03:52.080000 --> 0:03:58.160000
 For example, access list deny engineering
 to payroll or access list permit

0:03:58.160000 --> 0:04:00.400000
 marketing or something like that.

0:04:00.400000 --> 0:04:04.860000
 And then once again, you'd have a bunch
 of entries beneath that grouping.

0:04:04.860000 --> 0:04:10.700000
 So an access list is going to have
 one or more access control entries

0:04:10.700000 --> 0:04:14.660000
 in it. How many access control entries
 are really completely up to you?

0:04:14.660000 --> 0:04:16.380000
 How specific you want to get?

0:04:16.380000 --> 0:04:19.300000
 How many different things
 you want to match?

0:04:19.300000 --> 0:04:24.220000
 Now one key thing to remember is that
 whether you configure an access

0:04:24.220000 --> 0:04:29.560000
 list with just one access control entry
 or 500 access control entries,

0:04:29.560000 --> 0:04:34.340000
 at the very bottom it's actually going
 to put in an entry that you can't

0:04:34.340000 --> 0:04:36.180000
 even see in the running config.

0:04:36.180000 --> 0:04:37.760000
 It's sort of invisible.

0:04:37.760000 --> 0:04:44.180000
 And I frequently call it the deny all
 entry or the implicit deny entry.

0:04:44.180000 --> 0:04:49.600000
 Now, what these entries do is just looking
 for something, just matching

0:04:49.600000 --> 0:04:52.720000
 on something. You don't know if I show
 you an access list that says permit

0:04:52.720000 --> 0:04:56.080000
 this, deny this, you can't tell me
 what's going to happen to a packet

0:04:56.080000 --> 0:05:00.800000
 if it matches this permit statement or
 if it matches this deny statement.

0:05:00.800000 --> 0:05:05.420000
 It really depends on what is the feature
 that's using this access list.

0:05:05.420000 --> 0:05:09.440000
 Perhaps that packet, if it says deny
 in the access list, will be dropped

0:05:09.440000 --> 0:05:15.360000
 because we're going to see that packet
 of it says deny in the access list

0:05:15.360000 --> 0:05:19.420000
 will mean let it go through just don't
 encrypt it because an encryption

0:05:19.420000 --> 0:05:22.540000
 feature says okay I'm only going to
 encrypt stuff that says permit in

0:05:22.540000 --> 0:05:23.640000
 the access list.

0:05:23.640000 --> 0:05:27.860000
 Or maybe it says if it says deny means
 don't change it in some way.

0:05:27.860000 --> 0:05:32.740000
 So just by looking at ACL you don't
 know what each line is ultimately

0:05:32.740000 --> 0:05:36.740000
 going to do if it matches
 a packet or not.

0:05:36.740000 --> 0:05:41.000000
 So when you look at the running configuration
 and you see one or more

0:05:41.000000 --> 0:05:45.140000
 lines of an access list there'll be
 in some sort of an order and the way

0:05:45.140000 --> 0:05:49.060000
 you see it in the running config is actually
 the way it will be processed.

0:05:49.060000 --> 0:05:55.020000
 So when a packet comes in and some features
 says oh hold on I got to have

0:05:55.020000 --> 0:05:58.460000
 the access list check you out and then
 tell me if I should do something

0:05:58.460000 --> 0:06:02.360000
 to you then it's going to start by looking
 at the top line of the access

0:06:02.360000 --> 0:06:04.960000
 list and then proceed
 in sequential order.

0:06:04.960000 --> 0:06:06.740000
 Do I match the first line?

0:06:06.740000 --> 0:06:08.440000
 Do I match the second line?

0:06:08.440000 --> 0:06:09.900000
 Do I match the third line?

0:06:09.900000 --> 0:06:13.020000
 Yes we're done. Now that's
 an important point.

0:06:13.020000 --> 0:06:14.460000
 Look at that last bullet
 point there.

0:06:14.460000 --> 0:06:19.280000
 ACEs are processed in the sequential
 order until a match is found.

0:06:19.280000 --> 0:06:23.020000
 So if I showed you an access list that
 has 10 entries and I gave you a

0:06:23.020000 --> 0:06:26.560000
 packet and I said here's the source
 and destination of a packet and you

0:06:26.560000 --> 0:06:29.060000
 look to these 10 entries and you said
 oh well that packet would match

0:06:29.060000 --> 0:06:33.200000
 entry number 3, entry number
 7 and entry number 10.

0:06:33.200000 --> 0:06:36.340000
 Entry 7 and 10 are irrelevant.

0:06:36.340000 --> 0:06:39.220000
 The fact that it matched
 entry number 3 it's done.

0:06:39.220000 --> 0:06:43.520000
 Whatever entry number 3 says to do permit
 or deny that's going to be what

0:06:43.520000 --> 0:06:45.000000
 happens to that packet.

0:06:45.000000 --> 0:06:51.960000
 Now if a packet comes in and it goes
 line by line says no match, no match,

0:06:51.960000 --> 0:06:55.480000
 no match and it goes all the way to
 the end and finds no match it will

0:06:55.480000 --> 0:07:01.300000
 always match that invisible deny
 any statement at the very end.

0:07:01.300000 --> 0:07:03.040000
 Now once again what
 does that mean?

0:07:03.040000 --> 0:07:06.600000
 We don't know unless we know what the
 access list is referring to as far

0:07:06.600000 --> 0:07:09.240000
 as what feature is using it.

0:07:09.240000 --> 0:07:16.120000
 Now from the CCNA level you use access
 list for a couple of different

0:07:16.120000 --> 0:07:19.320000
 things. The very first thing we're
 going to learn about access list is

0:07:19.320000 --> 0:07:24.180000
 pairing it up with a security feature
 called an access group feature.

0:07:24.180000 --> 0:07:28.140000
 The access group feature is sort
 of like a real basic firewall.

0:07:28.140000 --> 0:07:33.540000
 It says either let the packet
 go through or drop the packet.

0:07:33.540000 --> 0:07:38.520000
 So in that context when you're looking
 at an access list that says permit

0:07:38.520000 --> 0:07:44.120000
 something, if a packet comes in and
 it matches that permit statement and

0:07:44.120000 --> 0:07:48.580000
 we're referencing an access group security
 feature that means permit the

0:07:48.580000 --> 0:07:51.200000
 packet through. Let
 it be forwarded.

0:07:51.200000 --> 0:07:54.860000
 If a packet comes in and it matches
 a deny statement in an access list

0:07:54.860000 --> 0:07:59.660000
 that's matching an access group security
 feature that means deny the packet,

0:07:59.660000 --> 0:08:04.160000
 drop it. And then later on we'll see
 some other videos about a different

0:08:04.160000 --> 0:08:09.280000
 type of a feature called NAT, network
 address translation that says if

0:08:09.280000 --> 0:08:12.800000
 a packet comes in and it matches a permit,
 we're going to change the IP

0:08:12.800000 --> 0:08:15.600000
 address in some way and
 then let it go through.

0:08:15.600000 --> 0:08:19.140000
 If a packet comes in and it matches
 an access list that says deny, that

0:08:19.140000 --> 0:08:21.840000
 means we're not going to change
 it in any way whatsoever.

0:08:21.840000 --> 0:08:26.220000
 NAT will not get involved, we'll
 just let it through unchanged.

0:08:26.220000 --> 0:08:29.260000
 So what can be matched
 by access lists?

0:08:29.260000 --> 0:08:33.120000
 Well, it really depends on what kind
 of access list you're using and we

0:08:33.120000 --> 0:08:36.820000
 will talk about that, but theoretically
 within your layer three or your

0:08:36.820000 --> 0:08:41.040000
 layer four headers, these are all the
 various things that could be matched.

0:08:41.040000 --> 0:08:45.960000
 Some fields have to
 be matched entirely.

0:08:45.960000 --> 0:08:53.020000
 For example, if your access list is
 looking at port numbers or TCP flags

0:08:53.020000 --> 0:09:03.880000
 or within the field, you have to match
 the entire field bit for bit.

0:09:03.880000 --> 0:09:07.140000
 Sort of like how switches have to match
 an entire MAC address, it's either

0:09:07.140000 --> 0:09:10.600000
 an entire 48-bit match
 or it's nothing.

0:09:10.600000 --> 0:09:14.780000
 Other fields, you have a choice of
 partially matching those fields and

0:09:14.780000 --> 0:09:18.000000
 that's when we're looking at the address,
 the source and destination IP

0:09:18.000000 --> 0:09:20.120000
 address. You have a choice.

0:09:20.120000 --> 0:09:24.220000
 You could say I want to match that
 entire source address all 32 bits.

0:09:24.220000 --> 0:09:27.300000
 I want to match a specific host.

0:09:27.300000 --> 0:09:32.680000
 Or, you could say, well, I only want
 to match a certain few bits within

0:09:32.680000 --> 0:09:37.480000
 that. Maybe I only want to match on packets
 coming from a particular network.

0:09:37.480000 --> 0:09:41.160000
 So any host within the 10 network,
 I only care about matching on that

0:09:41.160000 --> 0:09:42.880000
 first byte, the number 10.

0:09:42.880000 --> 0:09:45.520000
 I don't care about what their
 host identifier is.

0:09:45.520000 --> 0:09:46.640000
 So you can do that.

0:09:46.640000 --> 0:09:50.460000
 That's a partial match
 is supported.

0:09:50.460000 --> 0:09:55.980000
 So, when we are looking at these fields
 of the address specifically and

0:09:55.980000 --> 0:09:59.860000
 we're looking at the potential of matching
 the entire thing or matching

0:09:59.860000 --> 0:10:03.720000
 just part of it, well, then that means
 we have to have something that

0:10:03.720000 --> 0:10:09.360000
 goes along with that field that tells
 exactly how much am I going to match.

0:10:09.360000 --> 0:10:11.520000
 This sounds sort of familiar,
 doesn't it?

0:10:11.520000 --> 0:10:16.140000
 When you put an IP address on an interface,
 something else goes with that

0:10:16.140000 --> 0:10:17.480000
 IP address, doesn't it?

0:10:17.480000 --> 0:10:21.520000
 A subnet mask. And what
 does a subnet mask do?

0:10:21.520000 --> 0:10:25.560000
 In the context of an IP address and
 a subnet mask, it tells the system

0:10:25.560000 --> 0:10:30.000000
 where that IP address is, it provides
 the boundary line between these

0:10:30.000000 --> 0:10:31.600000
 are the networking bits.

0:10:31.600000 --> 0:10:34.440000
 If you're looking for the network, these
 are the bits that are important

0:10:34.440000 --> 0:10:40.500000
 for you. So, 10, 10, 10, 10, slash eight
 says, if you're looking for the

0:10:40.500000 --> 0:10:44.120000
 network, only the first
 eight bits matter.

0:10:44.120000 --> 0:10:47.060000
 The rest of it are host bits.

0:10:47.060000 --> 0:10:52.060000
 Excuse me. So, when we're talking about
 an access list, same thing is

0:10:52.060000 --> 0:10:55.500000
 going to apply. There's going to be
 a portion of the access list where

0:10:55.500000 --> 0:10:59.760000
 we can plug in our source or our
 destination address or both.

0:10:59.760000 --> 0:11:02.740000
 And then we're going to apply something
 against that that says, okay,

0:11:02.740000 --> 0:11:07.180000
 of this 32-bit source or of this 32
-bit destination, here's how many of

0:11:07.180000 --> 0:11:08.980000
 the bits I'm interested in.

0:11:08.980000 --> 0:11:12.340000
 Now, you might be thinking, oh, okay,
 well, then you put a subnet mask

0:11:12.340000 --> 0:11:13.480000
 in there, right?

0:11:13.480000 --> 0:11:18.480000
 No. Actually, with access list, it's
 something that we call a wildcard

0:11:18.480000 --> 0:11:23.440000
 mask. An easy way to think of a wildcard
 mask is thinking of it as being

0:11:23.440000 --> 0:11:29.300000
 sort of like just the inverse
 of a subnet mask.

0:11:29.300000 --> 0:11:33.400000
 You say, what? Okay, let me whiteboard
 this for you for a moment.

0:11:33.400000 --> 0:11:38.940000
 Let's say I was to give you
 just one single byte.

0:11:38.940000 --> 0:11:43.920000
 So, not an entire IP address,
 just a single byte.

0:11:43.920000 --> 0:11:49.500000
 Let's say, 0, 0, 1, 1, 0, 0, 0, 1.


0:11:49.500000 --> 0:11:57.220000
 Okay. Now, if I said I want you to use
 a subnet mask and using that subnet

0:11:57.220000 --> 0:12:02.340000
 mask, I want you to tell whatever feature
 is going to be looking at this

0:12:02.340000 --> 0:12:07.060000
 byte to match the first five bits.


0:12:07.060000 --> 0:12:10.780000
 Well, with a subnet mask,
 ones are important.

0:12:10.780000 --> 0:12:13.320000
 Zeros mean we don't care.

0:12:13.320000 --> 0:12:17.320000
 So, we would say 1,
 1, 1, 1, 1, 0, 0, 0.

0:12:17.320000 --> 0:12:23.280000
 So, if this number was paired up with
 a subnet mask, the ones here in

0:12:23.280000 --> 0:12:26.680000
 the subnet mask would say I only want
 you to match against this five-bit

0:12:26.680000 --> 0:12:31.040000
 pattern, 0, 0, 1, 1, 0, and I don't
 care about anything else.

0:12:31.040000 --> 0:12:35.340000
 Well, a wildcard mask is just
 the opposite of that.

0:12:35.340000 --> 0:12:38.040000
 So, I'll put the wildcard
 mask below it.

0:12:38.040000 --> 0:12:42.600000
 In a wildcard mask, zeros
 mean match that bit.

0:12:42.600000 --> 0:12:47.280000
 1, 2, 3, 4, 5, and ones
 mean I don't care.

0:12:47.280000 --> 0:12:55.960000
 So, this is a wildcard mask where you're
 saying the zeros have to match

0:12:55.960000 --> 0:13:03.920000
 up and that's what I'm interested
 in and the ones I don't care.

0:13:03.920000 --> 0:13:07.420000
 So, this can be pretty easy since you're
 already used to creating subnet

0:13:07.420000 --> 0:13:12.080000
 masks. If you can create a subnet mask
 in your head, if you can imagine

0:13:12.080000 --> 0:13:16.440000
 what that subnet mask looks like in
 binary and then flip it, you've got

0:13:16.440000 --> 0:13:18.020000
 a wildcard mask.

0:13:18.020000 --> 0:13:20.860000
 So, let's do that
 a couple of times.

0:13:20.860000 --> 0:13:34.940000
 Let's say, for example, that I had
 an IP address of 10.10.10.anything.

0:13:34.940000 --> 0:13:39.960000
 So, all I care to match on are the
 first three bytes and that's it.

0:13:39.960000 --> 0:13:46.860000
 Well, if we were talking about a subnet
 mask, it'd be 255.255.255.0, right?

0:13:46.860000 --> 0:13:52.360000
 And in binary, 1, 2, 3, 4, 5, 6, 7,
 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3,

0:13:52.360000 --> 0:13:55.420000
 4, 5, 6, 7, 8, 1, 2,
 3, 4, 5, 6, 7, 8.

0:13:55.420000 --> 0:13:57.800000
 That's what our subnet
 mask would look like.

0:13:57.800000 --> 0:14:04.180000
 Okay? Well, if a wildcard mask is just
 the opposite of that, imagine turning

0:14:04.180000 --> 0:14:14.240000
 all these ones to zeros and
 all these zeros to ones.

0:14:14.240000 --> 0:14:18.420000
 And so, if we convert that back in
 a dotted decimal, what do we have?

0:14:18.420000 --> 0:14:34.800000
 0.0.0.255. So, if the feature I'm using needs
 an access list as its classification

0:14:34.800000 --> 0:14:41.740000
 mechanism, an access list matches bits
 based on wildcard masks, not subnet

0:14:41.740000 --> 0:14:47.100000
 masks. Let's do another
 one of these.

0:14:47.100000 --> 0:15:01.460000
 If I gave you this address, 10.40.32
.0, and I said use a wildcard mask

0:15:01.460000 --> 0:15:11.700000
 to match only the first 19 bits.

0:15:11.700000 --> 0:15:17.080000
 Okay? Well, there's a couple of
 ways we could approach this.

0:15:17.080000 --> 0:15:19.220000
 We could sort of envision
 it in binary.

0:15:19.220000 --> 0:15:21.260000
 1, 2, 3, 4, 5, 6, 7, 8.

0:15:21.260000 --> 0:15:23.420000
 1, 2, 3, 4, 5, 6, 7, 8.

0:15:23.420000 --> 0:15:26.320000
 1, 2, 3. Okay, that's
 the first 19 bits.

0:15:26.320000 --> 0:15:29.820000
 1, 2, 3, 4, 5. 1, 2,
 3, 4, 5, 6, 7, 8.

0:15:29.820000 --> 0:15:37.240000
 Okay? So we could do that,
 which ends up being 0.0.0.

0:15:37.240000 --> 0:15:39.660000
 What's that number?

0:15:39.660000 --> 0:15:42.180000
 Remember the quick way to do this?


0:15:42.180000 --> 0:15:46.120000
 If you don't want to add up all those
 ones, ask yourself, what's the value

0:15:46.120000 --> 0:15:47.880000
 of that right there?

0:15:47.880000 --> 0:15:49.780000
 Isn't that the 32 bit?

0:15:49.780000 --> 0:15:53.440000
 So if that's the 32 bit, this
 is one less than that.

0:15:53.440000 --> 0:16:04.360000
 That's 31.255. So if I'm creating an
 access list saying of this 32 bit

0:16:04.360000 --> 0:16:07.760000
 number right here, I only want you
 to match on the first 19 bits.

0:16:07.760000 --> 0:16:12.200000
 If you find a packet that matches the
 first 19 bits that looks like this,

0:16:12.200000 --> 0:16:14.620000
 that's a hit. That's a match.

0:16:14.620000 --> 0:16:20.760000
 Then my wildcard mask
 would be 0.0.31.255.

0:16:20.760000 --> 0:16:22.540000
 Here's another way of doing it.

0:16:22.540000 --> 0:16:24.860000
 This is a shortcut.

0:16:24.860000 --> 0:16:29.740000
 For those of you that are really good
 at coming up with subnet masks,

0:16:29.740000 --> 0:16:33.580000
 because you've had a lot of practice
 with that now, what would the subnet

0:16:33.580000 --> 0:16:38.320000
 mask be in this particular case?

0:16:38.320000 --> 0:16:50.300000
 The subnet mask would
 be 255.255.224.0.

0:16:50.300000 --> 0:16:54.540000
 Here's one way that you can come up
 with a, if this is easier for you,

0:16:54.540000 --> 0:16:58.060000
 I don't know, but this is one way some
 people use to come up with a wildcard

0:16:58.060000 --> 0:17:03.980000
 mask. Once you know what the subnet
 mask is, put 255 above each number

0:17:03.980000 --> 0:17:10.980000
 and then subtract the
 lower number from it.

0:17:10.980000 --> 0:17:15.620000
 So 255 minus 255 is 0.

0:17:15.620000 --> 0:17:27.240000
 255 minus 224 is 31 and
 255 minus 0 is 255.

0:17:27.240000 --> 0:17:28.640000
 It's your choice.

0:17:28.640000 --> 0:17:32.120000
 However you want to approach it, some
 people find this method easier because

0:17:32.120000 --> 0:17:36.020000
 they're used to coming up with subnet
 masks and then from a subnet mask

0:17:36.020000 --> 0:17:42.600000
 you can just subtract the subnet mask
 from 255, 255, 255, 255 and whatever

0:17:42.600000 --> 0:17:46.800000
 you're left with is
 your wildcard mask.

0:17:46.800000 --> 0:17:49.100000
 What if I had this?

0:17:49.100000 --> 0:17:58.360000
 When a packet arrives, we must do something,
 we don't know what the feature

0:17:58.360000 --> 0:18:09.880000
 is, to it only if the packet
 exactly matches 5.5.5.5.

0:18:09.880000 --> 0:18:17.540000
 All 32 bits. So only if
 it matches that host.

0:18:17.540000 --> 0:18:20.380000
 What wildcard mask
 would we select?

0:18:20.380000 --> 0:18:27.880000
 Well if 0's in binary mean match that
 bit and we're saying I want to match

0:18:27.880000 --> 0:18:33.960000
 all the bits, that would be
 my wildcard mask, all zeros.

0:18:33.960000 --> 0:18:41.280000
 Actually when we create an access list
 and in the next section, the next

0:18:41.280000 --> 0:18:45.600000
 video will actually start showing
 you the commands to do that.

0:18:45.600000 --> 0:18:50.460000
 In this case, you can actually
 shorten that to this.

0:18:50.460000 --> 0:18:53.740000
 So in the access list, I'll show you
 a quick preview here of a simple

0:18:53.740000 --> 0:19:02.320000
 access list. I could say access-list
 1 permit and then what am I looking

0:19:02.320000 --> 0:19:12.680000
 for? I could say that or since I'm matching
 all 32 bits, typically when

0:19:12.680000 --> 0:19:16.440000
 you're matching all 32 bits is because
 you're matching a host address.

0:19:16.440000 --> 0:19:21.840000
 You're matching on packet coming from
 or going to a particular host.

0:19:21.840000 --> 0:19:28.780000
 So a shorthand way of doing it is like
 this, access-list 1 permit host.

0:19:28.780000 --> 0:19:30.520000
 I'm assuming this is a host.

0:19:30.520000 --> 0:19:33.900000
 So match all 32 bits of this.

0:19:33.900000 --> 0:19:38.620000
 So that's a key word you'll
 see a lot in access-list.

0:19:38.620000 --> 0:19:42.560000
 And notice that when you use this shorthand
 of host instead of wildcard

0:19:42.560000 --> 0:19:47.240000
 mask, it actually goes in front of
 what you're matching, not behind.

0:19:47.240000 --> 0:19:51.080000
 So if you're using a wildcard mask, which
 you might have to, the wildcard

0:19:51.080000 --> 0:19:53.860000
 mask goes behind the value, just
 like in an IP address, right?

0:19:53.860000 --> 0:19:59.140000
 In IP address, the subnet mask
 went behind the IP address.

0:19:59.140000 --> 0:20:01.920000
 But in this particular case, if you
 use the keyword of host, that goes

0:20:01.920000 --> 0:20:06.760000
 in front of. And there's one other shortcut
 I want to show you that you

0:20:06.760000 --> 0:20:09.780000
 will see a lot in access-list.

0:20:09.780000 --> 0:20:17.180000
 Match any packet.

0:20:17.180000 --> 0:20:25.740000
 I don't care what bit
 sequence it has.

0:20:25.740000 --> 0:20:37.520000
 Okay. So what would my wildcard mask,
 what wildcard mask would you use?

0:20:37.520000 --> 0:20:43.080000
 Well in a wildcard mask, in binary,
 what binary bits indicate, I don't

0:20:43.080000 --> 0:20:46.060000
 care. This could be
 anything to me.

0:20:46.060000 --> 0:20:49.100000
 Isn't it the one bit?

0:20:49.100000 --> 0:20:59.360000
 So that wildcard mask applied against
 anything means don't even bother

0:20:59.360000 --> 0:21:00.680000
 matching this bit sequence.

0:21:00.680000 --> 0:21:03.600000
 I had to put some bit sequence
 in here because I'm forced to.

0:21:03.600000 --> 0:21:05.940000
 I have to put something
 in this field.

0:21:05.940000 --> 0:21:11.680000
 But the wildcard mask of 255, 255,
 255, 255 says, ignore that field.

0:21:11.680000 --> 0:21:16.420000
 You don't even have to
 match on it at all.

0:21:16.420000 --> 0:21:18.240000
 So I could do it like this.

0:21:18.240000 --> 0:21:26.560000
 Access-list 1, permit, and I could put
 anything right there if I'm going

0:21:26.560000 --> 0:21:29.800000
 to put this. It really
 doesn't matter.

0:21:29.800000 --> 0:21:37.040000
 I could put 777, I could put 1.2.3
.4, I could put 10.333 because this

0:21:37.040000 --> 0:21:39.880000
 wildcard mask is saying this pattern
 doesn't mean anything.

0:21:39.880000 --> 0:21:44.080000
 You don't have to match
 any of the bits here.

0:21:44.080000 --> 0:21:50.600000
 So usually the shorthand way that people
 do for this is access-list 1,

0:21:50.600000 --> 0:21:58.420000
 permit, any. Now all you have to do is
 the word any because that's exactly

0:21:58.420000 --> 0:22:00.160000
 what this wildcard mask means.

0:22:00.160000 --> 0:22:04.280000
 I don't care what the bit pattern
 is, it all matches.

0:22:04.280000 --> 0:22:06.880000
 There's nothing I'm excluding.

0:22:06.880000 --> 0:22:14.700000
 So with IP version 4 access-lists, you
 can have a standard access list,

0:22:14.700000 --> 0:22:17.540000
 you can have an extended access list,
 and both of these are considered

0:22:17.540000 --> 0:22:19.840000
 numbered access-lists.

0:22:19.840000 --> 0:22:23.060000
 So for example, my whiteboard here where
 I was putting a number, and then

0:22:23.060000 --> 0:22:27.120000
 a lot of times in my verbal explanations
 I was saying access-list 101,

0:22:27.120000 --> 0:22:31.020000
 those are numbered access-list and
 a numbered access-list can take the

0:22:31.020000 --> 0:22:35.080000
 form of a standard ACL
 or an extended ACL.

0:22:35.080000 --> 0:22:38.860000
 And we'll get into what the differences
 are between those coming up.

0:22:38.860000 --> 0:22:44.020000
 Or like I said, if you wanted to,
 you create a named access list.

0:22:44.020000 --> 0:22:50.640000
 Now a named access list is something
 we will get into a bit later, but

0:22:50.640000 --> 0:22:53.680000
 a named access-list you still have
 to identify whether it is standard

0:22:53.680000 --> 0:23:01.700000
 or extended. Standard or extended tells
 Cisco iOS what my limitations

0:23:01.700000 --> 0:23:03.820000
 are as far as what I can match.

0:23:03.820000 --> 0:23:07.260000
 With a standard access list, there's
 not a lot of things I can match,

0:23:07.260000 --> 0:23:08.840000
 but maybe that's fine.

0:23:08.840000 --> 0:23:11.260000
 Maybe I don't need to
 match a whole lot.

0:23:11.260000 --> 0:23:15.060000
 But if I need to match a lot of those
 other fields like the TCP port numbers

0:23:15.060000 --> 0:23:18.700000
 or the TCP flags, then
 I need more options.

0:23:18.700000 --> 0:23:21.960000
 And that's where an extended
 access list would help me.

0:23:21.960000 --> 0:23:24.100000
 So that concludes this
 particular video.

0:23:24.100000 --> 0:23:27.240000
 In the next video, we'll start looking
 at standard access lists, what

0:23:27.240000 --> 0:23:29.620000
 they can match against, and
 how we can figure them.

