Chapter 7 Flashcards
A _______ is any piece of hardware or software that forwards packets based on their destination IP address. ______work, therefore, at the Network layer of the OSI model and at the Internet layer of the TCP/IP model.
router; Routers
EXAM TIP:
A switch that works at more than one layer of the OSI model is called a ______ switch (MLS). An MLS that handles routing is often called a Layer 3 switch because it handles IP traffic.
multilayer
Routing begins as packets come into the router for handling (Figure 7-5). The router immediately strips off any of the Layer _ information and drops the resulting IP packet into a _____(Figure 7-6). The important point to make here is that the router doesn’t care where the packet originated. Everything is dropped into the same queue based on the time it arrived.
2; queue
EXAMPLE:
https: //learning.oreilly.com/library/view/comptia-network-certification/9781260122398/fig07-05.jpg
https: //learning.oreilly.com/library/view/comptia-network-certification/9781260122398/fig07-06.jpg
The router inspects each packet’s destination IP address and then sends the IP packet out the correct port. To perform this inspection, every router comes with a _______ table that tells the router exactly where to send the packets. This table is the key to understanding and controlling the process of forwarding packets to their proper destination.
routing
SEE:
Figure 7-7 shows a very simple routing table for a typical home router. Each row in this routing table defines a single route. Each column identifies one of two specific criteria. Some columns define which packets are for the route and other columns define which port to send them out. (We’ll break these down shortly.)
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/fig07-07.jpg
The router in this example has only two ports internally: one port that connects to an Internet service provider, labeled as WAN in the Interface column of the table, and another port that connects to the router’s built-in switch, labeled LAN in the table. Due to the small number of ports, this little router table has only four routes. Wait a minute: four routes and only two ports? No worries, there is not a one-to-one correlation of routes to ports, as you will soon see. Let’s inspect this routing table.
__________ LAN IP A defined network ID. Every network ID directly connected to one of the router’s ports is always listed here.
Destination
NOTE:
The router uses the combination of the destination LAN IP and subnet mask to see if a packet matches that route. For example, if you had a packet with the destination 10.12.14.26 coming into the router, the router would check the network ID and subnet mask. It would quickly determine that the packet matches the first route shown in Figure 7-8.
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/fig07-08.jpg
The other two columns in the routing table tell the router what to do with the packet:
Gateway & Interface
To define a network ID, you need a subnet _____
Mask
NOTE:
The router uses the combination of the destination LAN IP and subnet mask to see if a packet matches that route. For example, if you had a packet with the destination 10.12.14.26 coming into the router, the router would check the network ID and subnet mask. It would quickly determine that the packet matches the first route shown in Figure 7-8.
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/fig07-08.jpg
The other two columns in the routing table tell the router what to do with the packet:
Gateway & Interface
The IP address for the next hop router; in other words, where the packet should go. If the outgoing packet is for a network ID that’s not directly connected to the router, the _______ column tells the router the IP address of a router to which to send this packet. That router then handles the packet, and your router is done. (Well-configured routers ensure a packet will get to where it needs to go.) If the network ID is directly connected to the router, then you don’t need a _______. If there is no ________needed, most routing tables put either 0.0.0.0 or On-link in this column.
Gateway; gateway; gateway
NOTE:
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/fig07-08.jpg
________ tells the router which of its ports to use. On this router, it uses the terms “LAN” and “WAN.” Other routing tables use the port’s IP address or some other description. Some routers, for example, use gig0/0 or Gig0/1, and so on.
Interface
NOTE:
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/fig07-08.jpg
A routing table looks like a table, so there’s an assumption that the router will start at the top of the table and march down until it finds the correct route. That’s not accurate. The router compares the destination IP address on a packet to _____ route listed in the routing table and only then sends the packet out. If a packet works for more than one route, the router will use the better route (we’ll discuss this more in a moment).
every
NOTE:
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/fig07-08.jpg
A properly configured router must have a ____for any packet it might encounter. Routing tables tell you a lot about the network connections. From just this single routing table, for example, the diagram in Figure 7-9 can be drawn.
route
PIC:
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/fig07-09.jpg
Take another look at Figure 7-8. Notice the last route. How do I know the 76.30.4.1 port connects to another network? The third line of the routing table shows the default route for this router, and every router has one. (See the note below on the two exceptions to this rule.) This line says:
(Any destination address) (with any subnet mask) (forward it to 76.30.4.1) (using my WAN port)
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c223-01.jpg
The default route is very important because this tells the router exactly what to do with every incoming packet unless another line in the routing table gives another route.
(Any packet for the 10.12.14.0) (/24 network ID) (don’t use a gateway) (just ARP on the LAN interface to get the MAC address and send it directly to the recipient)
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c223-02.jpg
(Any packet for the 76.30.4.0) (/23 network ID) (don’t use a gateway) (just ARP on the WAN interface to get the MAC address and send it directly to the recipient)
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c223-03.jpg
NOTE There are two places where you’ll find routers that do not have default routes: isolated (as in not on the Internet) internetworks, where every router knows about every single network, and the monstrous “Tier One” backbone, where you’ll find the routers that make the main connections of the Internet.
NOTE:
Every modern operating system gives you tools to view a computer’s _______ table. Most techs use the command line or terminal window interface—often called simply terminal—because it’s fast. To see your routing table in Linux or in macOS, for example, type this command at a terminal:
routing
NOTE:
The netstat -r command works in Windows too, plus you can use route print as an alternative.
You should note two differences in the columns from what you saw in the previous routing table. First, the interface has an actual IP address—10.12.14.201, plus the loopback of 127.0.0.1—instead of the word “LAN.” Second—and this is part of the magic of routing—is something called the metric.
PIC:
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c224-01.jpg
A ______ is a relative value that defines the “cost” of using this route. The power of routing is that a packet can take more than one route to get to the same place. If a route were to suddenly cut off, then you would have an alternative. Figure 7-10 shows a networked router with two routes to the same place. The router has a route to Network B with a metric of 1 using Route 1, and a second route to Network B using Route 2 with a metric of 10.
metric
PIC:
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/fig07-10.jpg
NOTE:
When a router has more than one route to the same network, it’s up to the person in charge of that router to assign a different metric for each route. With dynamic routing protocols (discussed in detail later in the chapter in “Dynamic Routing”), the routers determine the proper metric for each route.
NOTE:
Lowest routes always win. In this case, the router will always use the route with the metric of 1, unless that route suddenly stopped working. In that case, the router would automatically switch to the route with the 10 metric (Figure 7-11). This is the cornerstone of how the Internet works! The entire Internet is nothing more than a whole bunch of big, powerful routers connected to lots of other big, powerful routers. Connections go up and down all the time, and routers (with multiple routes) constantly talk to each other, detecting when a connection goes down and automatically switching to alternate routes.
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/fig07-11.jpg
I’ll go through this routing table one line at a time. Remember, every address is compared to every line in the routing table before it goes out, so it’s no big deal if the default route is at the beginning or the end.
The top line defines the default route:
(Any destination address) (with any subnet mask) (forward it to my default gateway) (using my NIC) (Metric of 25 to use this route). Anything that’s not local goes to the router and from there out to the _________ (with the help of other routers).
destination
PIC:
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c226-01.jpg
PIC (Route print):
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c224-01.jpg
The next three lines tell your system how to handle the loopback address. The second line is straightforward, but examine the first and third lines carefully. Earlier you learned that only 127.0.0.1 is the __________, but according to the first route, any 127.0.0.0/8 address is the loopback. The third line is a little weird and is placed in the routing table to satisfy a loopback addressing requirement. Bottom line: no matter how you use a loopback address, as long as you start the address with 127, it will always go to 127.0.0.1.
loopback
PIC:
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c226-02.jpg
PIC (Route print):
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c224-01.jpg
The next line defines the local connection:
(Any packet for the 10.12.14.0) (/24 network ID) (don’t use a gateway) (just ___ on the LAN interface to get the MAC address and send it directly to the recipient) (Cost of 1 to use this route).
ARP
PIC:
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c226-03.jpg
PIC (Route print):
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c224-01.jpg
Okay, on to the next line. This one’s easy. Anything addressed to this machine should go right back to it through the loopback (127.0.0.1).
PIC:
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c226-04.jpg
PIC (Route print):
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c224-01.jpg
The next line is for broadcasting to the other computers on the same network ID. In rare cases, you could have more than one network ID on the same network. This line targets only the nodes with the same _______ ID.
network
PIC:
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c226-05.jpg
PIC (Route print):
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c224-01.jpg
The next two lines are for the multicast address range. Most operating systems put these lines in ____________.
automatically
https://learning.oreilly.com/library/view/comptia-network-certification/9781260122398/c226-06.jpg