1 00:00:02,650 --> 00:00:08,553 [music] 2 00:00:08,553 --> 00:00:14,038 Okay, so now we have the concept of a device, and you can envision 3 00:00:14,038 --> 00:00:16,442 it being a server or a mainframe or whatever you want, 4 00:00:16,442 --> 00:00:18,232 but we've got the concept of a 5 00:00:18,232 --> 00:00:22,246 networking device connecting to a cable. 6 00:00:22,246 --> 00:00:24,357 That networking device says, Okay, 7 00:00:24,357 --> 00:00:26,946 I'm running the Ethernet protocol, 8 00:00:26,946 --> 00:00:29,731 which means I'm not the only one 9 00:00:29,731 --> 00:00:30,607 on this cable. 10 00:00:30,607 --> 00:00:34,123 There could be an unknown quantity 11 00:00:34,123 --> 00:00:36,533 of devices on the same cable as me. 12 00:00:36,533 --> 00:00:38,085 I don't know. 13 00:00:38,085 --> 00:00:40,038 Before Ethernet, I did know. 14 00:00:40,038 --> 00:00:41,996 Before Ethernet back in 1969, 15 00:00:41,996 --> 00:00:43,855 I just knew it was me and one other 16 00:00:43,855 --> 00:00:45,599 mainframe and that's it. 17 00:00:45,599 --> 00:00:47,301 We can't make that assumption any more. 18 00:00:47,301 --> 00:00:49,065 Now that this device is running Ethernet, 19 00:00:49,065 --> 00:00:51,146 he says, I'm in a broadcast domain. 20 00:00:51,146 --> 00:00:54,759 It could be me and one other guy or it could be me and 20 guys on 21 00:00:54,759 --> 00:00:57,525 this cable. I just don't know. 22 00:00:57,525 --> 00:00:59,275 So now the developers of Ethernet said, 23 00:00:59,275 --> 00:01:02,422 Okay, well, so what I'm communicating on this cable, 24 00:01:02,422 --> 00:01:05,812 as I communicate, I could do it in one of three different ways. 25 00:01:05,812 --> 00:01:08,435 I could do a broadcast, which means 26 00:01:08,435 --> 00:01:10,226 that I'm putting my 1s and 0s 27 00:01:10,226 --> 00:01:11,116 on this cable. 28 00:01:11,116 --> 00:01:13,430 It's meant for everybody. 29 00:01:13,430 --> 00:01:14,970 In the case of a broadcast, 30 00:01:14,970 --> 00:01:18,087 really we don't even need any kind of an address. 31 00:01:18,087 --> 00:01:21,024 If Ethernet had been developed - 32 00:01:21,024 --> 00:01:22,170 let's just imagine this - 33 00:01:22,170 --> 00:01:23,976 if the developers of Ethernet had said, 34 00:01:23,976 --> 00:01:29,602 okay, anytime anything goes into an Ethernet frame, regardless of 35 00:01:29,602 --> 00:01:32,421 what it is, it's going to go to everybody. 36 00:01:32,421 --> 00:01:34,629 It's just always going to be like that. 37 00:01:34,629 --> 00:01:36,854 Then they would not have needed an address at all. 38 00:01:36,854 --> 00:01:39,477 There wouldn't be a need for it. 39 00:01:39,477 --> 00:01:42,197 But clearly, that's not the way it works 40 00:01:42,197 --> 00:01:43,395 and that doesn't really make 41 00:01:43,395 --> 00:01:44,721 sense to develop it that way, 42 00:01:44,721 --> 00:01:46,844 so they said, okay, we could do broadcasts. 43 00:01:46,844 --> 00:01:50,772 There might be a need for that, or we could do unicast. 44 00:01:50,772 --> 00:01:52,724 Maybe when someone's putting something in the wire, 45 00:01:52,724 --> 00:01:57,848 it's going to be meant for one other device on that same wire. 46 00:01:57,848 --> 00:01:59,164 So they said, okay, in that 47 00:01:59,164 --> 00:02:01,930 particular case we need an address. 48 00:02:01,930 --> 00:02:03,928 So when this data is being put on 49 00:02:03,928 --> 00:02:05,406 the wire, it needs to have a unique 50 00:02:05,406 --> 00:02:08,187 source address of where it came from, 51 00:02:08,187 --> 00:02:09,451 and it needs to have a unique 52 00:02:09,451 --> 00:02:12,165 destination address of where it's going to. 53 00:02:15,699 --> 00:02:18,926 Also keep in mind right here, now we've got devices that have 54 00:02:18,926 --> 00:02:21,340 two addresses that they're using, because remember, 55 00:02:21,340 --> 00:02:23,437 IP came first. 56 00:02:23,437 --> 00:02:25,446 So I've got this device connected 57 00:02:25,446 --> 00:02:26,975 to a network that for several years 58 00:02:26,975 --> 00:02:29,629 has been utilizing this 32 bit number - 59 00:02:29,629 --> 00:02:32,166 this IP number - and the 60 00:02:32,166 --> 00:02:34,056 first 8 bits have been the network, 61 00:02:34,056 --> 00:02:35,693 the remaining 24 bits at the 62 00:02:35,693 --> 00:02:38,878 end have been my own unique host identifier. 63 00:02:38,878 --> 00:02:43,089 Now in addition to that, if I'm coupling Ethernet to IP, 64 00:02:43,089 --> 00:02:46,068 if I'm saying, Okay well, at Layer 2, you're now running Ethernet, 65 00:02:46,068 --> 00:02:48,274 now in addition to an IP address, 66 00:02:48,274 --> 00:02:51,214 I have to also utilize a second address, 67 00:02:51,214 --> 00:02:52,104 a MAC address - 68 00:02:52,104 --> 00:02:54,895 a Layer 2 media access control address, 69 00:02:54,895 --> 00:02:57,580 which is what Ethernet uses. 70 00:02:57,580 --> 00:02:59,871 So the developers of these addresses said, 71 00:02:59,871 --> 00:03:01,976 Okay, we need to structure the 72 00:03:01,976 --> 00:03:03,278 address in such a way that if I'm 73 00:03:03,278 --> 00:03:06,453 sending it to everyone as a broadcast, 74 00:03:06,453 --> 00:03:09,297 both my Layer 3 IP address 75 00:03:09,297 --> 00:03:12,846 and my Layer 2 MAC address need to reflect that. 76 00:03:12,846 --> 00:03:15,490 I need to come up with some kind of address that says this is for 77 00:03:15,490 --> 00:03:17,570 everybody on this cable, and I'll 78 00:03:17,570 --> 00:03:19,399 show you in just a second what that looks like. 79 00:03:19,399 --> 00:03:21,173 Then they said, Okay, what if I'm 80 00:03:21,173 --> 00:03:24,071 sending it directly to Bob's computer? 81 00:03:24,071 --> 00:03:26,954 Bob's computer is on the same broadcast domain as me. 82 00:03:26,954 --> 00:03:29,722 Once again, at Layer 3, I need to 83 00:03:29,722 --> 00:03:31,476 say in the world of IP that this 84 00:03:31,476 --> 00:03:35,035 came from my IP address and it's going to Bob's IP address. 85 00:03:35,035 --> 00:03:37,818 And at Layer 2 - in the world of Ethernet 86 00:03:37,818 --> 00:03:38,640 - I need to say it came 87 00:03:38,640 --> 00:03:43,094 from my MAC address and it's going to Bob's MAC address. 88 00:03:43,094 --> 00:03:47,041 And then the third form of communication was multicast. 89 00:03:47,041 --> 00:03:50,422 Multicast is the concept where on this cable, 90 00:03:50,422 --> 00:03:52,149 this Ethernet broadcast domain, 91 00:03:52,149 --> 00:03:55,770 let's say there's 100 devices - 92 00:03:55,770 --> 00:03:58,363 100 PCs and servers and stuff. 93 00:03:58,363 --> 00:04:03,185 Now, I'm going to start transmitting 94 00:04:03,185 --> 00:04:06,885 data on this cable, and of the 99 devices 95 00:04:06,885 --> 00:04:09,400 on this cable - in addition to me - 96 00:04:09,400 --> 00:04:14,545 maybe 6 of them need this information. 97 00:04:14,545 --> 00:04:17,360 Well, broadcast is not appropriate 98 00:04:17,360 --> 00:04:17,971 because I don't want it to go 99 00:04:17,971 --> 00:04:21,686 out to everybody, and I could do unicast. 100 00:04:21,686 --> 00:04:23,542 I could take this information, 101 00:04:23,542 --> 00:04:29,229 send one copy of it to Sally's unicast address, 102 00:04:29,229 --> 00:04:30,642 copy it again and send 103 00:04:30,642 --> 00:04:32,468 another copy on the cable of Tom's 104 00:04:32,468 --> 00:04:34,476 unicast address, but that would 105 00:04:34,476 --> 00:04:36,022 put a lot of burden on me to make 106 00:04:36,022 --> 00:04:38,203 multiple copies of the same data and 107 00:04:38,203 --> 00:04:40,171 send it out there multiple times. 108 00:04:40,171 --> 00:04:41,356 So they came up with a third 109 00:04:41,356 --> 00:04:43,894 alternative which is called multicast. 110 00:04:43,894 --> 00:04:45,680 Multicast is the idea that - 111 00:04:45,680 --> 00:04:48,379 just like unicast or broadcast - 112 00:04:48,379 --> 00:04:50,889 I'm putting one copy of the data on the wire. 113 00:04:50,889 --> 00:04:53,495 I"m just sending out once, but at the 114 00:04:53,495 --> 00:04:55,684 Layer 3 address and at the 115 00:04:55,684 --> 00:04:58,103 Layer 2 address, it has a special 116 00:04:58,103 --> 00:04:59,204 address that says this is going 117 00:04:59,204 --> 00:05:01,142 to a group of people. 118 00:05:01,142 --> 00:05:02,970 It's not going to everybody. 119 00:05:02,970 --> 00:05:04,952 It's not going to just one person. 120 00:05:04,952 --> 00:05:07,979 It's going to a group of people. 121 00:05:07,979 --> 00:05:11,262 What's kind of interesting is that in the world of multicast, 122 00:05:11,262 --> 00:05:13,960 the sender of the information - which is me, 123 00:05:13,960 --> 00:05:15,910 the one who's transmitting the information - 124 00:05:15,910 --> 00:05:22,244 really doesn't know and doesn't care how many people are in that group. 125 00:05:22,244 --> 00:05:24,160 It's sort of like broadcast in that regard. 126 00:05:24,160 --> 00:05:26,077 When you put a broadcast on a wire, 127 00:05:26,077 --> 00:05:27,736 you don't know who's out there. 128 00:05:27,736 --> 00:05:28,962 You don't know who's going to get 129 00:05:28,962 --> 00:05:30,276 it or how many people are going 130 00:05:30,276 --> 00:05:31,322 to get it. You don't care. 131 00:05:31,322 --> 00:05:33,262 You're just saying, Hey, everybody, whoever's out there, 132 00:05:33,262 --> 00:05:34,905 this is for everyone. 133 00:05:34,905 --> 00:05:37,294 Multicast is kind of the same way where you're saying, 134 00:05:37,294 --> 00:05:39,488 Okay, hey, I'm putting some data on the wire. 135 00:05:39,488 --> 00:05:42,777 If there are any interested individuals, 136 00:05:42,777 --> 00:05:47,022 here you go. So it's actually-- in my example of the 100 people 137 00:05:47,022 --> 00:05:48,745 on the wire where there's 6 people 138 00:05:48,745 --> 00:05:50,892 actually want this and the other 139 00:05:50,892 --> 00:05:54,341 people don't, I have to use a 140 00:05:54,341 --> 00:05:57,059 special address at Layer 3 and 141 00:05:57,059 --> 00:05:59,384 Layer 2 called a multicast address. 142 00:05:59,384 --> 00:06:01,248 It's formatted in a unique way. 143 00:06:01,248 --> 00:06:03,380 It's still 32-bits at Layer 3, 144 00:06:03,380 --> 00:06:06,012 and it's still 48-bits at Layer 2, 145 00:06:06,012 --> 00:06:07,827 but the structure of a multicast 146 00:06:07,827 --> 00:06:10,004 address is such a way that 147 00:06:10,004 --> 00:06:13,614 the receivers - those six people - are looking for it. 148 00:06:13,614 --> 00:06:15,777 They're saying, Okay, I'm looking-- 149 00:06:15,777 --> 00:06:17,181 as data comes in the wire, 150 00:06:17,181 --> 00:06:20,258 as I'm seeing the electrical voltage going across, 151 00:06:20,258 --> 00:06:23,485 I'm saying, Okay, see, well I'm running Ethernet which tells me 152 00:06:23,485 --> 00:06:27,859 that 60 bits into it is where I will 153 00:06:27,859 --> 00:06:29,592 find the destination MAC address 154 00:06:29,592 --> 00:06:31,348 - who it's going to. 155 00:06:31,348 --> 00:06:33,743 Now if I'm a unique individual I will say, 156 00:06:33,743 --> 00:06:35,455 Okay, well, if that destination 157 00:06:35,455 --> 00:06:38,708 MAC address is broadcast, I've got 158 00:06:38,708 --> 00:06:39,277 to pick it up. 159 00:06:39,277 --> 00:06:41,918 I have to look at it - see if I'm interested. 160 00:06:41,918 --> 00:06:44,771 If that destination address is mine 161 00:06:44,771 --> 00:06:46,100 - my own unicast address - 162 00:06:46,100 --> 00:06:49,575 clearly I have to pick that up and look at it. 163 00:06:49,575 --> 00:06:52,039 But now I'm looking for a third type of address. 164 00:06:52,039 --> 00:06:56,021 If that destination address is a special multicast address that I 165 00:06:56,021 --> 00:06:58,887 have been told I need to look for, 166 00:06:58,887 --> 00:07:01,395 I will pick it up and process it. 167 00:07:01,395 --> 00:07:06,783 In the world of multicast, you've got this concept of senders and receivers. 168 00:07:06,783 --> 00:07:08,518 You've got one sender who 169 00:07:08,518 --> 00:07:10,247 is sending one copy of the data, 170 00:07:10,247 --> 00:07:13,743 and you've got potentially multiple receivers. 171 00:07:13,743 --> 00:07:15,487 And it's really the job of the 172 00:07:15,487 --> 00:07:18,727 receivers to somehow discover what 173 00:07:18,727 --> 00:07:20,824 that special address is going to be, 174 00:07:20,824 --> 00:07:22,254 and for them to start listening 175 00:07:22,254 --> 00:07:24,128 to that. That's a whole different world. 176 00:07:24,128 --> 00:07:26,100 We're not going to get into that today about, 177 00:07:26,100 --> 00:07:29,511 how do the receivers discover that special multicast address? 178 00:07:29,511 --> 00:07:30,672 How do they know what to look for? 179 00:07:30,672 --> 00:07:33,308 There's various different ways to do that. 180 00:07:33,308 --> 00:07:34,564 But the idea is, what makes 181 00:07:34,564 --> 00:07:36,193 multicast different from broadcast 182 00:07:36,193 --> 00:07:38,551 is that it's only a select group 183 00:07:38,551 --> 00:07:40,842 of people that's actually looking 184 00:07:40,842 --> 00:07:41,468 for that data. 185 00:07:41,468 --> 00:07:44,021 In a broadcast domain, everybody's still going to see it. 186 00:07:44,021 --> 00:07:45,564 Because remember, in the broadcast domain, 187 00:07:45,564 --> 00:07:46,538 the concept is, 188 00:07:46,538 --> 00:07:48,118 you put something in a wire, 189 00:07:48,118 --> 00:07:51,406 that electrical energy is seen by everyone 190 00:07:51,406 --> 00:07:55,170 on that wire. The question is, What people, 191 00:07:55,170 --> 00:07:58,312 when they see that electrical energy, are going to ignore it? 192 00:07:58,312 --> 00:08:00,577 What people are going to process it and say, 193 00:08:00,577 --> 00:08:01,870 This is for me. 194 00:08:01,870 --> 00:08:04,980 In the case of multicast, it's a group of people. 195 00:08:04,980 --> 00:08:08,180 Now we've got this concept of devices having two addresses, 196 00:08:08,180 --> 00:08:12,631 a Layer 3 IP address and a Layer 2 MAC address. 197 00:08:12,631 --> 00:08:14,218 Now we know that those two addresses 198 00:08:14,218 --> 00:08:16,465 can be formatted in one of three 199 00:08:16,465 --> 00:08:20,608 different ways as broadcast, unicast and multicast. 200 00:08:23,457 --> 00:08:26,183 When it comes to network software applications, 201 00:08:26,183 --> 00:08:27,283 as we can see here, they fall 202 00:08:27,283 --> 00:08:28,570 in two different categories. 203 00:08:28,570 --> 00:08:31,353 There's some network software that 204 00:08:31,353 --> 00:08:33,510 just makes the assumption, like ARP, 205 00:08:33,510 --> 00:08:34,974 the address resolution protocol, 206 00:08:34,974 --> 00:08:36,571 that when you invoke the software, 207 00:08:36,571 --> 00:08:39,123 when you tell it to start up, that software will say, 208 00:08:39,123 --> 00:08:41,640 Okay, I am designed in such a way 209 00:08:41,640 --> 00:08:42,953 that I am only going to talk to 210 00:08:42,953 --> 00:08:45,765 people in my own broadcast domain. 211 00:08:45,765 --> 00:08:48,076 I don't even know about other broadcast domains. 212 00:08:48,076 --> 00:08:49,301 I don't even know they exist. 213 00:08:49,301 --> 00:08:52,446 I'm just going to talk to people in my broadcast domain. 214 00:08:52,446 --> 00:08:54,807 Those types of software applications, 215 00:08:54,807 --> 00:08:56,740 technically, they don't even 216 00:08:56,740 --> 00:08:59,071 need IP. All they really need is a 217 00:08:59,071 --> 00:09:00,489 Layer 2 address if they're going 218 00:09:00,489 --> 00:09:02,166 to talk in their own broadcast domain. 219 00:09:02,166 --> 00:09:05,111 But most software falls into the second category, 220 00:09:05,111 --> 00:09:09,994 those capable of intra or inter broadcast domain communications. 221 00:09:14,274 --> 00:09:17,010 So a common misconception when 222 00:09:17,010 --> 00:09:18,383 people are first starting to learn 223 00:09:18,383 --> 00:09:21,969 about IP, is they think, okay, well 224 00:09:21,969 --> 00:09:24,731 an IP address then is equivalent 225 00:09:24,731 --> 00:09:26,247 to a broadcast domain. 226 00:09:26,247 --> 00:09:30,159 I've got one cable here and so that's going to be one network, 227 00:09:30,159 --> 00:09:32,411 that's going to need an IP address, 228 00:09:32,411 --> 00:09:34,571 going to need a network address. 229 00:09:34,571 --> 00:09:36,262 And then I've got another cable 230 00:09:36,262 --> 00:09:38,038 over here in a different building, 231 00:09:38,038 --> 00:09:39,523 that's a different broadcast domain 232 00:09:39,523 --> 00:09:41,897 so that's going to need a network address. 233 00:09:41,897 --> 00:09:44,946 People think, okay, they're equivalent. 234 00:09:44,946 --> 00:09:48,256 IP address equals broadcast domain. 235 00:09:48,256 --> 00:09:52,083 And that's not quite the case. 236 00:09:52,083 --> 00:09:55,723 As we see here, IP is used to address networks. 237 00:09:55,723 --> 00:09:57,985 Those networks might take the form 238 00:09:57,985 --> 00:09:59,374 of a broadcast domain if they're 239 00:09:59,374 --> 00:10:02,897 using Ethernet or Token Ring, or they 240 00:10:02,897 --> 00:10:04,334 could be using some other protocol 241 00:10:04,334 --> 00:10:09,586 that makes it a point-to-point network like HDLC or PPP. 242 00:10:09,586 --> 00:10:13,274 The main idea is that whenever you have a cable, 243 00:10:13,274 --> 00:10:18,196 and you expect IP packets to go across that cable, 244 00:10:18,196 --> 00:10:19,981 either end of that cable needs to 245 00:10:19,981 --> 00:10:22,244 know that this is part of a network. 246 00:10:22,244 --> 00:10:25,875 We need an IP address to represent this network, 247 00:10:25,875 --> 00:10:28,449 whether it be point-to-point or a 248 00:10:28,449 --> 00:10:30,075 broadcast domain - a collection 249 00:10:30,075 --> 00:10:33,136 of Ethernet devices. 250 00:10:33,136 --> 00:10:34,320 So an IP address, 251 00:10:34,320 --> 00:10:36,643 we know that the original developers of IP, 252 00:10:36,643 --> 00:10:40,832 they structured it in such a way that it had two parts to it. 253 00:10:40,832 --> 00:10:43,206 The first 25% of that address - 254 00:10:43,206 --> 00:10:45,665 I guess if you're looking, this would be the left here - 255 00:10:45,665 --> 00:10:49,343 the first 8 bits represent the network. 256 00:10:49,343 --> 00:10:51,615 So let's just say if we're talking about Ethernet, 257 00:10:51,615 --> 00:10:53,574 that represents the broadcast domain. 258 00:10:53,574 --> 00:10:55,583 Everybody on that Ethernet segment 259 00:10:55,583 --> 00:10:57,544 has the same 8 bits in common. 260 00:10:57,544 --> 00:11:01,587 They're part of the same group, part of the same clique. 261 00:11:01,587 --> 00:11:03,769 And then the remaining 24 bits at 262 00:11:03,769 --> 00:11:07,352 the end are unique on every single host. 263 00:11:07,352 --> 00:11:09,076 So if we're talking about a broadcast domain, 264 00:11:09,076 --> 00:11:10,193 if I'm talking about an Ethernet 265 00:11:10,193 --> 00:11:13,114 segment that's got 100 devices on it, 266 00:11:13,114 --> 00:11:15,758 because they're all part of the same broadcast domain, 267 00:11:15,758 --> 00:11:18,024 they can all see each other's electrical energy, 268 00:11:18,024 --> 00:11:21,853 from a Layer 3 perspective, from an IP perspective, 269 00:11:21,853 --> 00:11:23,380 it was originally designed that 270 00:11:23,380 --> 00:11:24,694 they would all have the first eight 271 00:11:24,694 --> 00:11:26,752 bits in common. 272 00:11:26,752 --> 00:11:27,980 They'd all have the same eight bits. 273 00:11:27,980 --> 00:11:28,897 They're all part of the same group. 274 00:11:28,897 --> 00:11:30,779 But then of those 100 devices, 275 00:11:30,779 --> 00:11:33,728 the remaining 24 bits would have unique patterns. 276 00:11:33,728 --> 00:11:35,273 Each device would have it's own unique, 277 00:11:35,273 --> 00:11:39,257 what they call host address or host bits. 278 00:11:39,257 --> 00:11:43,536 Okay, so we have devices that have two addresses - 279 00:11:43,536 --> 00:11:47,210 a Layer 3 IP address and a Layer 2 address. 280 00:11:47,210 --> 00:11:50,310 Let's just say it's a MAC address, 281 00:11:50,310 --> 00:11:54,000 and some application running way 282 00:11:54,000 --> 00:11:56,617 up here - Layer 7 of the OSI model. 283 00:11:56,617 --> 00:12:00,162 So that application gets invoked and that application says, 284 00:12:00,162 --> 00:12:03,645 Okay, I need to hook into IP so I 285 00:12:03,645 --> 00:12:06,122 can actually get out of my chassis, 286 00:12:06,122 --> 00:12:10,104 get out of my box and put some data on the wire. 287 00:12:10,104 --> 00:12:19,181 Okay, well, we know that as far as Layer 2 is concerned- 288 00:12:19,181 --> 00:12:23,346 the MAC layer, the data link layer, let's say - 289 00:12:23,346 --> 00:12:25,199 we know that that application has 290 00:12:25,199 --> 00:12:27,051 one fundamental question it has 291 00:12:27,051 --> 00:12:29,279 to answer as far as networking is concerned. 292 00:12:29,279 --> 00:12:31,156 It has to answer the question: 293 00:12:31,156 --> 00:12:33,696 the destination I'm trying to reach, 294 00:12:33,696 --> 00:12:35,375 the person I want to talk to, 295 00:12:35,375 --> 00:12:38,231 are they on the same wire as me, 296 00:12:38,231 --> 00:12:42,917 on the same broadcast domain, or are they not? 297 00:12:42,917 --> 00:12:45,004 Are they in some other broadcast domain, 298 00:12:45,004 --> 00:12:47,519 meaning that when I put my electrical energy on this wire, 299 00:12:47,519 --> 00:12:49,311 they can't see it because they're 300 00:12:49,311 --> 00:12:51,265 not on this broadcast domain. 301 00:12:51,265 --> 00:12:53,082 So every application that's network 302 00:12:53,082 --> 00:12:55,898 aware has to answer that question. 303 00:12:55,898 --> 00:13:00,323 So if the application determines that, 304 00:13:00,323 --> 00:13:02,495 okay, the destination I'm trying 305 00:13:02,495 --> 00:13:05,443 to reach is in my broadcast domain. 306 00:13:05,443 --> 00:13:07,154 I can talk to him directly. 307 00:13:07,154 --> 00:13:10,739 He will see my electrical energy as soon as I start putting it on 308 00:13:10,739 --> 00:13:14,724 the wire. Well, that application can't skip past IP. 309 00:13:14,724 --> 00:13:15,746 You might think Okay, well in 310 00:13:15,746 --> 00:13:17,346 that particular case, we don't need 311 00:13:17,346 --> 00:13:18,726 to use IP at all. 312 00:13:18,726 --> 00:13:20,535 Let's just skip past it and just 313 00:13:20,535 --> 00:13:22,297 go straight to Layer 2 addresses. 314 00:13:22,297 --> 00:13:23,525 Can't do that. 315 00:13:23,525 --> 00:13:26,835 If a system - like a laptop, or a PC - 316 00:13:26,835 --> 00:13:29,887 is running both IP and Ethernet, 317 00:13:29,887 --> 00:13:32,343 you can't skip past IP. 318 00:13:32,343 --> 00:13:34,973 So when you put your data on the wire, you're going to have an IP 319 00:13:34,973 --> 00:13:37,322 address in there and a MAC address. 320 00:13:37,322 --> 00:13:38,799 Now, in this particular case, if the 321 00:13:38,799 --> 00:13:41,483 person I'm talking to is on my wire, 322 00:13:41,483 --> 00:13:43,604 the IP address is kind of 323 00:13:43,604 --> 00:13:45,792 irrelevant because I'm talking to 324 00:13:45,792 --> 00:13:47,966 them directly via their Layer 2 address. 325 00:13:47,966 --> 00:13:50,031 If they're on my wire, now I discover 326 00:13:50,031 --> 00:13:51,595 what their Layer 2 address is, 327 00:13:51,595 --> 00:13:53,533 so as I'm transmitting my bits 328 00:13:53,533 --> 00:13:55,300 at Layer 2 their NIC card can say, 329 00:13:55,300 --> 00:13:56,979 Oh, this is for me. 330 00:13:56,979 --> 00:13:59,713 There's other people seeing it, but this is for me. 331 00:13:59,713 --> 00:14:01,458 And once my NIC card identifies 332 00:14:01,458 --> 00:14:04,074 that as a unicast transmission, 333 00:14:04,074 --> 00:14:05,878 it doesn't really need to see the IP address, 334 00:14:05,878 --> 00:14:07,464 but we can't skip past it 335 00:14:07,464 --> 00:14:10,962 so the destination IP address will be in there as well. 336 00:14:10,962 --> 00:14:12,415 Now, let's say I'm trying to talk 337 00:14:12,415 --> 00:14:14,555 to somebody that's not on my wire, 338 00:14:14,555 --> 00:14:18,252 someone that's on a different broadcast domain. 339 00:14:18,252 --> 00:14:19,631 Well, same thing. 340 00:14:19,631 --> 00:14:23,872 When I put my data on the wire, I can't skip past Layer 2. 341 00:14:23,872 --> 00:14:25,244 Even though the person I'm trying 342 00:14:25,244 --> 00:14:27,215 to talk to technically can't see 343 00:14:27,215 --> 00:14:31,244 my Layer 2 - they can't see my electrical energy - I can't just 344 00:14:31,244 --> 00:14:34,215 take data, address it with the 345 00:14:34,215 --> 00:14:35,948 destination IP address to the person 346 00:14:35,948 --> 00:14:39,276 that's 5000 miles away and put on my cable 347 00:14:39,276 --> 00:14:41,153 because my cable says, Well, wait a second. 348 00:14:41,153 --> 00:14:43,028 I'm running a Layer 2 protocol. 349 00:14:43,028 --> 00:14:45,738 I'm running Ethernet, and the rules 350 00:14:45,738 --> 00:14:49,684 of Ethernet state I need a Layer 2 address. 351 00:14:49,684 --> 00:14:50,178 So when you're 352 00:14:50,178 --> 00:14:51,711 talking to somebody that's not in 353 00:14:51,711 --> 00:14:54,169 the same broadcast domain as you, you say, 354 00:14:54,169 --> 00:14:55,895 Okay, well, what do I use as a 355 00:14:55,895 --> 00:14:57,224 Layer 2 address, because they're 356 00:14:57,224 --> 00:14:59,076 not on the same broadcast domain. 357 00:14:59,076 --> 00:15:01,811 This is where the concept of a default gateway comes in - 358 00:15:01,811 --> 00:15:04,655 a router. A router is someone, is a 359 00:15:04,655 --> 00:15:06,689 device that should know not only 360 00:15:06,689 --> 00:15:08,958 the broadcast domain he's connected to, 361 00:15:08,958 --> 00:15:11,563 which is the same one you are on, 362 00:15:11,563 --> 00:15:13,350 but he should also know about other 363 00:15:13,350 --> 00:15:14,525 broadcast domains. 364 00:15:14,525 --> 00:15:17,826 So he's like an intermediary device. 365 00:15:17,826 --> 00:15:20,651 So in the case of that, if my application says, 366 00:15:20,651 --> 00:15:21,622 Okay, let's see here. 367 00:15:21,622 --> 00:15:23,407 The destination I need to talk to 368 00:15:23,407 --> 00:15:25,224 is not on my broadcast domain. 369 00:15:25,224 --> 00:15:27,732 It's somewhere else, 370 00:15:27,732 --> 00:15:30,048 then the destination says, Okay, here's what I need to do. 371 00:15:30,048 --> 00:15:33,036 At Layer 3, I will source the 372 00:15:33,036 --> 00:15:35,650 data from my IP address, from my 373 00:15:35,650 --> 00:15:39,478 unique eight bit combination of my network, 374 00:15:39,478 --> 00:15:41,817 then at Layer 3 I will put the 375 00:15:41,817 --> 00:15:44,547 destination IP address as the 376 00:15:44,547 --> 00:15:45,966 destination I'm trying to reach and 377 00:15:45,966 --> 00:15:48,957 he has a unique eight bit combination 378 00:15:48,957 --> 00:15:53,153 of bits, then we send that down to Layer 2. 379 00:15:53,153 --> 00:15:55,330 At Layer 2, I will put the source 380 00:15:55,330 --> 00:15:58,724 address as my own NIC cards MAC address - 381 00:15:58,724 --> 00:16:02,303 my Layer 2 address - and the destination address will be, 382 00:16:02,303 --> 00:16:06,116 Okay, who on my broadcast domain 383 00:16:06,116 --> 00:16:08,537 can help me get this data to 384 00:16:08,537 --> 00:16:10,059 where it needs to go? 385 00:16:10,059 --> 00:16:12,413 The router, the default gateway. 386 00:16:12,413 --> 00:16:15,863 So at Layer 2, the Layer 2 address will be the router. 387 00:16:15,863 --> 00:16:18,295 For those of you who are studying for your CCNE, 388 00:16:18,295 --> 00:16:21,200 this is a foundational thing you need to be aware of, 389 00:16:21,200 --> 00:16:24,572 is that when you've got a device running Ethernet and IP, 390 00:16:24,572 --> 00:16:26,204 whenever it puts data on the wire, 391 00:16:26,204 --> 00:16:28,911 you will always see two addresses 392 00:16:28,911 --> 00:16:32,183 in that data. You will see a Layer 2 MAC 393 00:16:32,183 --> 00:16:34,264 and a Layer 3 IP address. 394 00:16:34,264 --> 00:16:36,838 Both of them will be in there. 395 00:16:36,838 --> 00:16:40,318 If the person you're trying to talk to is on your wire, 396 00:16:40,318 --> 00:16:44,589 is in your broadcast domain, the destination Layer 3 address will 397 00:16:44,589 --> 00:16:46,244 be the person you're trying to talk to, 398 00:16:46,244 --> 00:16:49,194 and the destination Layer 2 address 399 00:16:49,194 --> 00:16:50,207 will be the person you're trying 400 00:16:50,207 --> 00:16:53,192 to talk to. It's being unicast directly to them. 401 00:16:53,192 --> 00:16:54,358 But if the person you're trying to 402 00:16:54,358 --> 00:16:57,230 talk to is in a remote broadcast domain, 403 00:16:57,230 --> 00:17:01,579 which might be a dozen feet or 2,000 miles away, 404 00:17:01,579 --> 00:17:03,531 at Layer 3, nothing changes. 405 00:17:03,531 --> 00:17:05,894 At Layer 3 ,it's still your source IP 406 00:17:05,894 --> 00:17:08,068 address going to their destination 407 00:17:08,068 --> 00:17:11,263 IP address. What changes is Layer 2. 408 00:17:11,263 --> 00:17:14,244 At Layer 2, because you can't talk to them directly, 409 00:17:14,244 --> 00:17:16,575 you use your source MAC address 410 00:17:16,575 --> 00:17:18,626 and you use your default gateway's 411 00:17:18,626 --> 00:17:21,349 MAC address as the destination. 412 00:17:21,349 --> 00:17:22,831 The assumption is as I'm putting 413 00:17:22,831 --> 00:17:24,405 the electrical energy on the wire, 414 00:17:24,405 --> 00:17:27,090 the default gateway will will say, Oh, that's for me. 415 00:17:27,090 --> 00:17:28,989 I see my MAC address here. 416 00:17:28,989 --> 00:17:32,091 And then when he gets that Ethernet frame and he removes it, 417 00:17:32,091 --> 00:17:35,266 and he goes up to Layer 3, that's when the router will say, 418 00:17:35,266 --> 00:17:38,041 Ah well, at Layer 2 it looked like 419 00:17:38,041 --> 00:17:39,592 this was a unicast transmission 420 00:17:39,592 --> 00:17:43,204 for me, but at Layer 3 it's not. 421 00:17:43,204 --> 00:17:45,038 At Layer 3 it says, Oh, the 422 00:17:45,038 --> 00:17:47,622 destination IP address is not one of mine. 423 00:17:47,622 --> 00:17:48,982 It's somebody else's. 424 00:17:48,982 --> 00:17:51,001 Now it's the router's job to forward 425 00:17:51,001 --> 00:17:53,293 that data into another broadcast domain 426 00:17:53,293 --> 00:17:54,818 and it will hop through 427 00:17:54,818 --> 00:17:57,611 various broadcast domains until it 428 00:17:57,611 --> 00:17:59,886 reaches the destination broadcast domain. 429 00:18:04,673 --> 00:18:06,606 So this is what we're talking about here. 430 00:18:06,606 --> 00:18:09,436 On the top, we've got one broadcast domain, 431 00:18:09,436 --> 00:18:11,028 which is called LAN-1. 432 00:18:11,028 --> 00:18:13,349 And so in the original days of IP, 433 00:18:13,349 --> 00:18:17,251 we reserved the first eight bits for that network, 434 00:18:17,251 --> 00:18:21,051 and so it might be seven 0s and a 1. 435 00:18:21,051 --> 00:18:25,181 On the bottom, we have LAN-2, a second broadcast domain, 436 00:18:25,181 --> 00:18:28,206 so that needs a different, unique group number, 437 00:18:28,206 --> 00:18:30,177 a different, unique network number. 438 00:18:38,725 --> 00:18:40,916 So how do computers and mainframes 439 00:18:40,916 --> 00:18:42,405 and stuff actually see this? 440 00:18:42,405 --> 00:18:45,342 So we know that a MAC address is in binary, 441 00:18:45,342 --> 00:18:49,174 48 bits long, so there's 48 bits right there. 442 00:18:49,174 --> 00:18:50,631 An IP address, 443 00:18:50,631 --> 00:18:55,155 little bit shorter, 32 bits long. 444 00:18:55,155 --> 00:18:57,869 So what does a computer see when it looks at incoming data? 445 00:18:57,869 --> 00:19:01,836 I'll go ahead and expand this a little bit for you here. 446 00:19:01,836 --> 00:19:04,251 So there is the source on the right 447 00:19:04,251 --> 00:19:05,793 sending data to the destination 448 00:19:05,793 --> 00:19:09,548 on the left. What's coming in is just a string 449 00:19:09,548 --> 00:19:11,711 of thousands of 1s and 0s. 450 00:19:15,173 --> 00:19:16,842 So where are these addresses in all this? 451 00:19:16,842 --> 00:19:20,102 Well, if that destination device 452 00:19:20,102 --> 00:19:22,313 is running the Ethernet protocol, 453 00:19:22,313 --> 00:19:23,796 he's going to say, Okay, the first 454 00:19:23,796 --> 00:19:27,400 64 bits that I saw coming in 455 00:19:27,400 --> 00:19:29,996 is a bunch of Ethernet stuff - 456 00:19:29,996 --> 00:19:33,898 basically what we call the preamble. 457 00:19:33,898 --> 00:19:38,109 Then from bit 65 to bit 112, 458 00:19:38,109 --> 00:19:43,186 that's the destination MAC address. 459 00:19:43,186 --> 00:19:50,026 And then the bits 113 through 160 are the source MAC address. 460 00:19:50,026 --> 00:19:53,763 Now hopefully nobody will ever actually ask you to do this, 461 00:19:53,763 --> 00:19:55,302 but if someone said, Hey, 462 00:19:55,302 --> 00:19:56,600 I'm going to give you a piece of paper 463 00:19:56,600 --> 00:19:59,967 that's got 2000 bits in binary written on it, 464 00:19:59,967 --> 00:20:01,732 can you tell me what the destination 465 00:20:01,732 --> 00:20:03,792 MAC address is in this long 466 00:20:03,792 --> 00:20:05,055 string of bits? 467 00:20:05,055 --> 00:20:06,269 This is how you do it. 468 00:20:06,269 --> 00:20:09,157 You'd say, Okay, well, if this thing is Ethernet, 469 00:20:09,157 --> 00:20:11,789 it means that somewhere in here is a MAC address. 470 00:20:11,789 --> 00:20:16,722 You would look right at bit 65 and go from 65 to 112. 471 00:20:16,722 --> 00:20:18,713 That would be your destination MAC. 472 00:20:18,713 --> 00:20:23,386 Then 113 to 160 would be your source MAC. 473 00:20:23,386 --> 00:20:25,103 Then Ethernet says, Okay, I've got 474 00:20:25,103 --> 00:20:27,180 another 16 bits of Ethernet stuff, 475 00:20:27,180 --> 00:20:28,577 and I'm done. 476 00:20:28,577 --> 00:20:30,940 So as far as Ethernet is concerned, 477 00:20:30,940 --> 00:20:33,470 all of that is Layer 1 and 478 00:20:33,470 --> 00:20:38,991 Layer 2. So that's Layer 2 stuff that Ethernet interprets. 479 00:20:38,991 --> 00:20:43,567 Once Ethernet is done, it removes all of that stuff, 480 00:20:43,567 --> 00:20:45,030 sends it up to Layer 3. 481 00:20:45,030 --> 00:20:47,474 If we're assuming that IPv4 482 00:20:47,474 --> 00:20:49,093 is going to run at Layer 3, 483 00:20:49,093 --> 00:20:52,534 now IPv4 starts by looking right here. 484 00:20:52,534 --> 00:20:54,146 This is what IPv4 sees. 485 00:20:54,146 --> 00:21:00,313 It says, Okay, the first 96 bits are IP stuff." 486 00:21:00,313 --> 00:21:05,082 So if you ever do a Google search on an IPv4 header, 487 00:21:05,082 --> 00:21:07,157 you'll see that IPv4 actually has 488 00:21:07,157 --> 00:21:08,671 a lot of bits it needs to look 489 00:21:08,671 --> 00:21:10,910 at before it ever gets to any address. 490 00:21:10,910 --> 00:21:15,177 It has like an IP version field, IP header length, 491 00:21:15,177 --> 00:21:16,393 whole bunch of stuff. 492 00:21:16,393 --> 00:21:20,408 So it's 96 bits of stuff that IP looks at. 493 00:21:20,408 --> 00:21:25,624 Then at bit number 273, that's where 494 00:21:25,624 --> 00:21:29,859 we see our source IP address. 495 00:21:29,859 --> 00:21:34,127 Because an IP address is 32 bits long, that goes from bit 273 to 496 00:21:34,127 --> 00:21:38,404 bit 304, and then from bit 305 to 336 497 00:21:38,404 --> 00:21:40,931 is the destination IP address. 498 00:21:40,931 --> 00:21:42,676 Then there's more bits beyond this 499 00:21:42,676 --> 00:21:46,343 that are other IP stuff like IP options. 500 00:21:46,343 --> 00:21:47,324 Then you're going to have 501 00:21:47,324 --> 00:21:49,569 a whole string of bits after that, 502 00:21:49,569 --> 00:21:52,066 which is what TCP looks at. 503 00:21:52,066 --> 00:21:53,124 Then they're going to have a whole 504 00:21:53,124 --> 00:21:56,205 string of bits after that for 505 00:21:56,205 --> 00:22:00,400 what FTP looks at, or telnet looks at. 506 00:22:00,400 --> 00:22:03,205 So really, a simple packet of like 507 00:22:03,205 --> 00:22:05,142 telnet or email is going to 508 00:22:05,142 --> 00:22:08,508 be thousands of bits long. 509 00:22:08,508 --> 00:22:10,984 But within the first few hundred bits 510 00:22:10,984 --> 00:22:12,190 is where you're going to see 511 00:22:12,190 --> 00:22:17,162 your MAC addresses and your IP addresses encoded. 512 00:22:17,162 --> 00:22:18,830 So that's what your computer sees. 513 00:22:18,830 --> 00:22:24,330 [music]