Routers! Routers are considered Layer 3 devices because they examine the packet portion of each
data frame and they determine at the Layer 3 network layer of the OSI model which network or
LAN (Local Area Network) that the destination device resides in, and it sends that data to
that network as intended. Let me break that down a little bit here to make it simpler to
understand. The purpose of a router is to route traffic from one network or local area network to
another network. If you want to communicate with another computer on another network or LAN you
will have to have a router or a Layer 3 capable switch to pass that traffic and data from your
network to the other network and then back again if needed. As I talked about in the last session,
switches use MAC addresses to determine where the traffic and data needs to be sent. This
information is read from the frame portion of the data coming through it. Routers deal with
IP addresses so they actually don't too much care about the Source and Destination MAC addresses in
the frame header. Instead they look at the Source and Destination IP addresses in the packet portion
of the data to determine what device sent it and which network that device is in and what
device it's being sent to and what network that destination device is in. When data comes in on
one of the ports on a router the router reads the network packet portion of that data and looks at
the network address information to determine its destination using the information it has
in its own routing table. It sends that packet to the next network to allow the data to ultimately
reach its final intended destination. In this process the data may have to go through several
routers. When it has to go through several routers each of those steps is called a "hop" by the way,
in the networking industry. And it may have to go through several other routers to get to that
intended destination or that intended destination network. Now a routing table or routing database
on a router is stored in its RAM its RAM memory. The routing table on a particular router contains
information about all of the directly connected networks and it can be updated and maintained
either dynamically which is built automatically by the router or routers themselves using routing
protocols (which I'll talk more about in a later lesson) or statically where an admin or
someone like yourself or somebody with access to the router settings actually goes into it,
enters the routes statically and the network's statically and it's all done manually. On each
router, a routing table keeps track of certain important pieces of information such as the
network address assigned to all of the different interfaces on that router itself, the subnet masks
that it has to deal with, the route sources, the destination network, the outgoing interface
that that network is connected to. Again as you get more into learning about IP addressing an
IP version 4 and IP version 6 routing and as you get more into learning about routers themselves,
you'll understand more of this terminology and what it means and what it does. You can also go
on to my Level 2 mini course on routers and learn a lot more there which I'd highly recommend. Some
of the key features of network routers are that they have the ability to filter on IP addresses
and they do not forward broadcast or even multicast traffic. So since they don't forward
broadcast or multicast traffic they can be used to separate broadcast and or multicast domains,
one of the major benefits to a router. They perform packet switching and packet filtering
very similar to the way a switch performs MAC switching and filtering, only they actually
do this at the packet level using the IP address Source and Destination IP addresses. And routers
have the ability to select a path or choose the best path of the next hop to get the data to the
intended Destination address and to get there as efficiently as possible. To sum up what a router
does even more succinctly if you have different networks such as a network that has 192.168.10.0
and you have another network that's 192.168.20.0 and you want to send data between the 2 then you
need a router to perform that function or at least a Layer 3 switch that can perform routing
functions using IP addresses. I did want to make one more side note here: Layer 3 switches can
route traffic between networks very much like a similar to a router but they also perform
switching functions by looking at the Source and Destination MAC addresses, like any other Layer
2 switch does. Now typically a Layer 3 switch is not a replacement for a router especially at
an enterprise level but a Layer 3 switch can be used internally for different segments of
a network within your organization, typically in places where you might have slower or less
traffic being routed from one internal network (subnetwork) to another internal (subnetwork).
So that's basically the rundown on what a router does, how it's used and why we need them!