Full transcript
0:00hello welcome to the second part of our
0:02lesson on network devices
0:04this is the first lesson from the first
0:06module of my new course on networking
0:07fundamentals
0:09the purpose of this module is to teach
0:11you how data flows through the internet
0:13in part one of this lesson we discussed
0:15the concepts of a host
0:16an ip address and a network if you
0:18haven't watched that video go ahead and
0:20pause this video right now and watch the
0:21first video
0:22there'll be a link in the description in
0:24this video we're simply going to
0:25continue right where we left off
0:28now the main idea we want to teach in
0:29this video are these last two devices
0:32switches and routers but we can't really
0:34understand those
0:35until we understand where we've come
0:36from so we have to start there
0:39in the last video we unpacked the idea
0:41of a network we identified that a
0:43network is created anytime you connect
0:45two computers to each other using a wire
0:48one thing to understand about sending
0:49data across a wire is that it decays as
0:51it travels greater and greater distances
0:54if the two computers you're connecting
0:55are in the same room then you don't
0:57really have to worry about it
0:58the decay will still occur but the
1:00signal will still get through and
1:01therefore
1:02connectivity between these hosts is
1:03still attained if
1:05however these hosts span greater
1:07distances maybe
1:08you're connecting two computers on
1:09opposite sides of a building or even in
1:12two different buildings
1:13then you might have a problem if the
1:15signal decays before it gets the other
1:17side
1:17then these two hosts cannot share data
1:21in those cases what you need is a
1:22repeater a repeater
1:24is a device whose sole purpose is to
1:26regenerate signals
1:27anything that comes in on one end simply
1:29gets regenerated out the other side
1:32this allows you to connect devices
1:33together which span greater distances
1:39so far we've been talking about
1:40networking from the perspective of
1:42connecting one host
1:43directly to another host well if you add
1:46a third host
1:47you now have to connect that host to all
1:49the other hosts which you've already
1:50established and if you add a fourth host
1:53you now have to connect this fourth host
1:55to all the hosts that already exist
1:57and again if you add a fifth host you
1:59now have to connect this fifth host
2:01to every host that has already been
2:02connected as you can see
2:04connecting host directly to each other
2:06simply doesn't scale
2:08instead we created devices which we
2:10could put at the center of every network
2:11and connect all the hosts to those
2:13devices
2:14and these devices would then handle
2:16funneling communication between these
2:17different hosts
2:19the benefit to these types of devices is
2:21that if a sixth host gets spun up
2:23it's very easy to simply connect it once
2:25to that device and now it has
2:26connectivity to every host that has
2:28already existed
2:29that's what all of these are and the
2:32first of these types of device that
2:33we're going to discuss
2:34is known as a hub a hub
2:37is nothing more than a multi-port
2:39repeater
2:41earlier we discussed repeaters and we
2:42said all they do is regenerate signals
2:45hubs do the same thing except they do it
2:46across multiple ports
2:48for example if these two hosts over here
2:51need to communicate
2:52one of them sends a packet to the other
2:54it'll hit the hub and the hub will
2:55simply duplicate that packet and send it
2:57out all remaining ports
2:59that allow what this guy sends to arrive
3:02over here
3:03this fixes the scale problem hub is the
3:06first device that allows us to connect
3:08multiple devices in the center and now
3:10all of them have connectivity to each
3:11other
3:12but as you can probably see the problem
3:15with the hub is that everybody receives
3:17everybody else's data
3:18these two hosts over here which are
3:20uninvolved in the communication between
3:21these two hosts
3:22are receiving a copy of everything they
3:24send
3:26which brings us to bridges here
3:30we have two sets of hosts all
3:31interconnected using a hub
3:33and a bridge is meant to sit in between
3:36hub-connected hosts
3:38bridges by definition only have two
3:40ports one port facing one set of
3:42hub-connected devices and another port
3:44facing the other set of hub connected
3:46devices
3:47bridges will also then learn which hosts
3:49are on which
3:50side of the bridge this would allow the
3:52bridge to contain communication
3:54to only the side that is necessary for
3:57example
3:58if these hosts again need to speak to
4:00each other
4:01when they send data to each other
4:03through that hub the hub is of course
4:05going to simply regenerate that signal
4:07at all ports
4:08and notice that the bridge can be
4:10getting a copy of that packet
4:12but the bridge knows that the other
4:14green host is on this side of the bridge
4:16and therefore the bridge isn't going to
4:18bring that packet to the other side
4:21the bridge is the first type of device
4:23that helps contain packets only to their
4:25relative networks
4:27on the other side if these hosts need to
4:29speak to each other
4:30they can also send packets to each other
4:32through their hub and once again the
4:34bridge will not let those packets bleed
4:36into the other side because it knows
4:38the yellow devices exist on the right
4:40hub
4:43and of course if this device needs to
4:44send something to this device
4:46the bridge is going to know that that
4:47traffic is going to have to cross the
4:49bridge
4:50and the bridge will allow that packet to
4:51traverse to the other side
4:58the main takeaway is understanding that
5:00bridges can learn which hosts are
5:02connected
5:02on either side of the two ports of the
5:04bridge now this
5:06finally brings us to switches switches
5:09are sort of like a combination
5:11of hubs and bridges they are like hubs
5:14in the sense that many devices can
5:16connect to the switch
5:18and they are like bridges in the sense
5:19that they can learn which hosts are
5:21connected to each port
5:24the main difference is that they're
5:26doing it on a per port basis
5:28which means if these two hosts want to
5:30speak to each other
5:31the switch will know that the only ports
5:33that need to receive this traffic
5:34are the two that are connected to those
5:36green hosts and will keep that
5:37communication contained to just
5:39those ports moreover if these two hosts
5:43want to speak to each other
5:44the switch will again make sure that
5:45that communication only flows between
5:48the relative ports
5:49so this is how a switch is like a
5:51combination of a hub and a bridge
5:55the formal definition of a switch that
5:57we want to use is that a switch is a
5:59device
6:00which facilitates communication within a
6:03network
6:05earlier we defined a network as a
6:08logical grouping of hosts which require
6:10similar connectivity which means
6:13all of these devices over here all
6:15belong to the same
6:16network moreover networks
6:19all share the same ip address space
6:22which means this network owns all the ip
6:25addresses which start with
6:27192.168.1.anything
6:29and this host's identity is the ip
6:31address 192.168.1
6:33dot and this host would be 192.168.1.66
6:39and this set of devices could very
6:41easily represent
6:42all the different hosts on your home
6:44wi-fi network
6:45maybe this device is your printer and
6:48this device is your laptop
6:49and this device is your mobile phone and
6:51so on
6:52or maybe this network and these devices
6:54represent all the pcs that might exist
6:56within a particular classroom
6:58of the school network or maybe even
7:01further all these devices represent
7:03hosts that exist in the sales team
7:05of the london office of the acme
7:07corporation
7:08one way or another since all these
7:10devices are connected with a switch
7:12they all belong to the same network now
7:16let's go back to that example of the
7:18school network
7:20we said that the school likely has many
7:22different classrooms
7:23and each of those classrooms belong to
7:24their own network
7:26which means this would be a more
7:28accurate representation of the school
7:30network we would have classroom two
7:32owning that ipspace and classroom three
7:34owning that ipspace
7:36now the reason you might want to
7:38separate these two sets of devices into
7:40their own network is because they might
7:42have different connectivity requirements
7:44for example maybe these computers over
7:47here
7:47all belong to the biology classroom and
7:50all they need is simple internet
7:51connectivity
7:52but maybe these computers over here
7:54belong to the computer science classroom
7:56and they not only need internet
7:58connectivity but also access to various
8:00cloud resources
8:01to do their studies well since these
8:03computers have different connectivity
8:05requirements than
8:06these computers it's a good idea to
8:08separate those out into separate
8:10networks
8:11now in both cases we can still use
8:13switches to facilitate
8:15all the communication within the
8:16networks meaning
8:18this switch can handle all the
8:19communication between these three
8:22hosts and this switch can handle all the
8:24communication
8:25between these three hosts
8:28but what happens if this host down here
8:31wants to speak
8:32to this host on a different network
8:35well if a switch can only facilitate
8:37communication within
8:38a network we would need another type of
8:41device to handle the communication
8:43between networks and that device would
8:46be
8:47a router a router is a device whose
8:50primary purpose is to facilitate
8:52communication
8:53between networks at the very least
8:57you're going to need that router to
8:58connect you with the ultimate network of
9:00networks
9:01known as the internet so let's unpack
9:04this further
9:05routers provide traffic control points
9:08between
9:09networks let's say we wanted to limit
9:12the traffic that could go from this pc
9:14to this pc
9:15well since these two pcs aren't separate
9:17networks all that traffic
9:19has to flow through the router creating
9:21a great place
9:22to add security policies or traffic
9:24filtering or even redirecting that
9:26traffic elsewhere entirely
9:28since routers sit on the boundary
9:30between networks
9:32they provide a logical location to apply
9:34security policies
9:36this type of security filtering isn't
9:38traditionally available on switches
9:40these days there are modern switches
9:42that can do such filtering
9:43but it is generally accepted that the
9:45devices sitting on the same network
9:46don't typically need filtering for
9:48traffic traveling within the network
9:50if you had devices that needed different
9:52types of connectivity you'd want to
9:54place them in different networks
9:55the network boundary is what is meant to
9:57be the logical separation of devices
10:00the way routers work is that they learn
10:03which networks that they are
10:05attached to meaning this router is going
10:07to learn that on this interface it's
10:09connected to the 172 16.20 network
10:12and on this interface it's connected to
10:14the 172 1630 network
10:16and out here is the direction to go to
10:18the internet
10:20the knowledge of each of these different
10:22networks is known as a route
10:24and all these routes are stored in what
10:26the router calls a routing
10:27table a routing table is therefore
10:30all the networks that a router knows
10:32about and the router is going to use
10:34this routing table in order to funnel
10:36traffic
10:36out the appropriate interface now
10:40when we say a router learns which
10:42networks they are attached to
10:44what we mean is that a router has an ip
10:46address
10:47in every network that they're attached
10:49to for example
10:51when this router is attached to this
10:53network it is given
10:54an ip address in that network this
10:56interface's identity
10:57is the ip address 172.16.20.1
11:02and this interface's identity is the ip
11:04address 172
11:0616.30.254
11:09this ip address is going to serve as
11:11what's known as a gateway
11:13a gateway is a host's way out of their
11:16local network
11:17for example this host over here has the
11:20ip address 172
11:2216.20.33 but if that host
11:25wants to speak to something on a
11:27different network it knows it's going to
11:29have to go
11:30through a router and the ip address for
11:32that router is stored as that host's
11:34default gateway
11:36notice this host has a default gateway
11:38of 172.16.20.1
11:41that's this interface ip address of that
11:43router
11:46now if we go a step higher than that
11:48routers are actually what create
11:50the hierarchy in networks and ip
11:52addresses that we discussed in the prior
11:54sections of this lesson for example the
11:57new york office of the acme corporation
12:00that had all the different teams that
12:01each had their own ip networks
12:04well each of those networks are
12:05connected to different routers
12:07and each of those routers are then
12:08connected to another router
12:10and if a host in the sales team wants to
12:12speak to a host on the marketing team
12:14it's going to use its gateway which is
12:16its closest router ip address
12:17which is then going to send the packet
12:19to the next router to the next router
12:21and then finally to the host on the
12:22marketing team
12:24the tokyo office of the acme corporation
12:26is likely going to have a similar setup
12:28and both of these routers are then
12:30likely going to connect to the internet
12:33the internet is nothing more than a
12:34bunch of different routers itself
12:37meaning if a host on the marketing team
12:39wants to speak to a host on the
12:40engineering team in tokyo
12:42that host will send the data to the
12:44router which will send the data to the
12:46next router
12:46which will send it through all the
12:48routers on the internet which will
12:49finally send it to the tokyo router and
12:51finally to the engineering team
12:54that is how data is going to flow across
12:56the internet
12:57and that is the role that routers play
12:59in making that possible
13:01now the last idea i want to leave you
13:03with actually involves pulling back the
13:05definition of switches as well
13:08there's something important you have to
13:09understand about what we've defined as
13:11routers and switches
13:13route ding is the process of moving data
13:16between
13:16networks a router as we have described
13:20it
13:20is simply a device whose primary purpose
13:22is to perform
13:23routing in the same way switching
13:27is the process of moving data within
13:30networks
13:31and a switch as we have described it is
13:33a device whose primary purpose
13:35is switching the reason i bring that up
13:38is there are many other types of network
13:40devices that exist out there
13:42access points firewalls load balancers
13:44layer 3 switches proxies
13:46and there's even devices that only exist
13:48in the cloud like virtual switches and
13:50virtual routers
13:51one way or another all these devices are
13:54going to perform
13:55routing or switching or both so later on
13:58in this module when we describe
14:00what a router does or what a switch does
14:03what we are actually describing is what
14:05any device does that implements routing
14:07or any device does that implement
14:09switching
14:11and with that we close our lesson on
14:13network devices
14:15in part one of this lesson we unpacked
14:17hosts
14:18ip addresses and networks and in part
14:21two
14:21we continued that discussion by
14:23illustrating repeaters
14:24hubs bridges switches and routers
14:29in the next lesson we're going to give
14:31you a practical perspective on the osi
14:33model
14:34this will lay the foundation to
14:36understand what all of these devices do
14:38to enable data flowing through the
14:40internet
14:41but that wraps up this lesson your main
14:43takeaways are on the slide right now
14:45i hope you enjoyed this lesson i want to
14:47thank you for watching
14:48and we'll see you in the next one
14:52hey youtube i hope you enjoyed that free
14:53lesson for my new course on networking
14:55fundamentals
14:56i'll be releasing the entire first
14:57module for free here on youtube
15:00i want this course to be the ultimate
15:01networking fundamentals course and since
15:03i'm still scoping out the outline you
15:04could have a say in what topics will be
15:06covered
15:07let me know in the comments below what
15:08subjects you want included in this
15:09course
15:10otherwise remember to like and subscribe
15:12and of course if you learned something
15:14from this video the best way to thank me
15:15is to share this video
15:17it's a small act of gratitude but one i
15:19appreciate greatly
15:20i hope you enjoyed this lesson i want to
15:22thank you for watching and we'll see you
15:24in the next one