Chapter 4
Network Protocols and Routing
Applying Concepts: Trace the Route to Google.com
You can perform a trace using an IP address or a host name. On a UNIX or Linux system,
the command syntax would be:
1. On a Windows system, perform a trace on one of Googles public DNS servers with
the command tracert 8.8.8.8. How many hops were traced? What is the IP
address of the final hop?
2. Use tracert to perform a trace on Googles web server with the command
tracert google.com. How many hops were traced this time? What is the IP
address of the final hop? Why is this IP address different than the IP address of the
final hop in the previous step?
2
Review Questions
1. Which protocol’s header would a Layer 4 device read and process?
a. IP
b. TCP
c. ARP
d. HTTP
2. What field in a TCP segment is used to determine if an arriving data unit exactly
matches the data unit sent by the source?
a. Source port
b. Acknowledgement number
c. DiffServ
d. Checksum
3. At which OSI layer does IP operate?
a. Application layer
b. Transport layer
3
c. Network layer
d. Data Link layer
4. Which OSI layer is responsible for directing data from one LAN to another?
a. Transport layer
b. Network layer
c. Data Link layer
d. Physical layer
5. What kind of route is created when a network administrator configures a router to
use a specific path between nodes?
a. Trace route
b. Static route
c. Default route
d. Best path
6. When a router can’t determine a path to a message’s destination, where does it
send the message?
a. Default gateway
b. Routing table
4
c. Administrative distance
d. Gateway of last resort
7. A routing protocol’s reliability and priority are rated by what measurement?
a. Routing table
b. MTU
c. Latency
d. AD
8. Which routing protocol does an exterior router use to collect data to build its
routing tables?
a. RIPv2
b. BGP
c. OSPF
d. IP
9. What is the Internet standard MTU?
a. 65,535 bytes
b. 1,522 bytes
c. 1,500 bytes
d. 9,198 bytes
10. Which two protocols manage neighbor discovery processes on IPv4 networks?
a. ICMP and ARP
b. IPv4 and IPv6
c. TCP and UDP
d. BGP and OSPF
11. What three characteristics about TCP distinguish it from UDP?
12. What process is used to establish a TCP connection?
13. What is the difference between dynamic ARP table entries and static ARP table
entries?
14. Which two fields in an Ethernet frame help synchronize device communications
but are not counted toward the frame’s size?
15. What four functions do all routers perform?
16. What database does a router consult before determining the most efficient path for
delivering a message?
17. Give three examples of routing metrics used by routers to determine the best of
various available routing paths.
18. List three IGPs (interior gateway protocols).
19. Which Linux utility provides output similar to Wireshark’s?
20. Which protocol is supported by ICMPv6 to facilitate neighbor discovery on an
IPv6 network?
7
Hands-On Projects
Project 4-1: Repair a Duplicate IP Address
ARP can be a valuable troubleshooting tool for discovering the identity of a machine
whose IP address you know, or for identifying two machines assigned the same IP
address. Lets see what happens when two devices on the network are assigned the same
IP address. First you change the IP address of a local Windows machine to match an IP
address of another devicein other words, you break the computer. Then you see how
the arp command helps you diagnose the problem.
1. Open a Command Prompt window and enter the command arp a. Your devices
2. Open the Network and Sharing Center, click Change adapter settings, right-click
3. Select Internet Protocol Version 4 (TCP/IPv4) and click Properties. Set the IP
address to match the other devices IP address that you wrote down in Step 1. The
system automatically assigns the Subnet mask, as shown in Figure 4-21. Click OK,
and then click Close.
4. Back at the command prompt, enter ipconfig /all.
5. Find the appropriate network connection and identify your computers current IPv4
address. Has your computer identified the duplicate IP address problem yet? How do
you know? Your computer might also have autoconfigured another IP address. If so,
what address did your computer resort to?
6. In the window on the left side of Figure 4-22, you can see a warning that the IP
address is a duplicate. The system also shows a preferred IPv4 address of
169.254.143.79, which is an APIPA address. How can you tell this is an APIPA
address?
7. To confirm the duplication of IP addresses, enter the command arp a.
You can see in Figure 4-22 that the local computers IPv4 address listed on the left
matches another IP address in the ARP table on the right, and again you see the
APIPA address assigned to the local interface. What are two ways to solve this
problem?
8. Open the Internet Protocol Version 4 (TCP/IPv4) Properties dialog box again and
select the option Obtain an IP address automatically, then click OK. Close the
connection’s properties dialog box, the Network Connections window, and the
9. Run the ipconfig command or the arp a command to confirm that a unique IP
address has been assigned. What is the new IP address?
10. Close the Command Prompt window.
Project 4-2: Redirect Command Output to a Text File
Sometimes when youre using a command such as pathping, the sheer volume of
output can be daunting to work with. Theres no way to search through the output for
specific information, and you can only expand the Command Prompt window so far. One
solution to this problem is to redirect the command output to a text file where you can
search the text, copy and paste text, and save the output for future reference. To
accomplish this feat, youll need to add a redirection operator to the command whose
output you want to export to a text file. Complete the following steps:
1. First, try this simple command:
ipconfig > ipconfigtest.txt
2. To specify the location of the file when you create it, add the path to the file in the
command line. For example, to save the file to the desktop, use the following
3. If you already have a file on the desktop by that name, the file will be overwritten
with the new data. What if you would rather append data to an existing file? In this
case, use the >> operator. Enter this command (substitute the correct file path to your
desktop):
4. Where do command parameters fit when redirecting output? Let’s use the netstat
command to show the IP address and port of all TCP and UDP connections on the
computer. In the following command, substitute the correct file path to your desktop
to output the data to a new file:
5. Include a space in the filename by putting quotation marks around the entire filename
and location:
What do you do if youve already run a command, and you desperately want to save
some of the data from the output? In Windows 10, you can perform a normal copy-and-
6. Run the command ipconfig /all. The new output populates your Command
7. Right-click the Command Prompt window title bar, point to Edit, and click Mark.
8. Scroll to where you want to begin collecting the copy. Press and hold the mouse
9. Go to any text editor program and paste the selected text into your document.
Project 4-3: Create a Routing Table Entry in Windows
A computer’s routing table can be viewed and modified using the route command at an
elevated Command Prompt. Complete the following steps:
1. In this chapter, you used both route print and netstat r to view the routing
table. Because youll need the route command to modify the routing table, open an
127.x.y.z routes refer to reserved addresses in that domain. In Figure 4-23, you can
12
reserved addresses for that private domain. 224.0.0.0 is reserved for multicasting, and
255.255.255.255 for certain broadcast messages.
2. Now add an entry to the routing table that will reroute messages destined for the
private network 172.16.50.0/24 to another internal IP address, 192.168.10.8. Enter the
following command:
3. Now all messages generated by this routing tables local host and addressed to an IP
address in the network 172.16.50.0/24 will instead be routed to the host at
192.168.10.8. You can see in Figure 4-24 where this new entry has been inserted.
4. Windows resets its routing table during reboot, so add the p parameter after the
word route in the command from Step 2 to make the static route persist beyond
reboot. (See Figure 4-25.)
5. Delete the route you just added with the following command:
route delete 172.16.50.0
13
Project 4-4: Create a Path MTU Black Hole
When a router receives a message that is too large for the next segments MTU, the
router is supposed to respond with an ICMP error message to the sender. Sometimes,
though, these error messages are not returned correctly. This can result in an MTU black
hole along the path, where messages are being lost for no apparent reason.
You can use the ping command to determine the largest size message that can
successfully traverse a path to its destination by adjusting the buffer size of the ICMP
echo message. Using too large of a buffer will prevent the messages from returning in
response to your ping. Start with a smaller buffer and work your way up to determine
the largest MTU the route can handle. The ping parameters needed in Windows are f
(do not fragment the IP packet) and l (packet or buffer size is specified following the
lowercase L).
What is the largest MTU that can be used to reach the cengage.com host from your
computer without creating an MTU black hole? To find out, complete the following
steps:
1. Ping cengage.com using an IP packet size of 1024.
2. What is the ping command you used?
3. Keep increasing the packet size until the packet does not return. Do not allow the
packet to be fragmented.
4. What is the largest MTU that gets through?
5. What error message appears when an MTU error occurs?
Capstone Projects
Capstone Project 4-1: Set Up Ubuntu Server in a VM
In the Chapter 1 Capstone Projects, you created a virtual machine using Oracle
VirtualBox or Windows 10 Client Hyper-V. In Chapter 2, Capstone Project 2-1, you
added a second VM, this one running Ubuntu Desktop. In this Capstone Project, you
create a third VM and install Ubuntu Server in the VM. You also learn how to use some
Linux commands. In the next chapter, youll set up an FTP server in Ubuntu Server and
make FTP services available to other computers in your network.
Using the same computer that you used in Capstone Project 1-1 or 1-2 (which should
have Oracle VirtualBox or Client Hyper-V installed), follow these steps:
1. Go to ubuntu.com/server and download the Ubuntu Server OS to your hard drive. If
2. Open the Oracle VM VirtualBox Manager or Hyper-V Manager. Following the
directions in the Chapter 1 Capstone Projects, create a new VM named VM3,
15
3. Start the VM and install Ubuntu Server, accepting all default settings. Be sure to
4. After you restart the VM, Ubuntu Server launches, which does not have a GUI
interface. You should see the shell command interface, as shown in Figure 4-26.
5. The shell shows the shell prompt, which usually includes your username and current
6. Practice using Ubuntu Server by entering in order each of the commands listed in
7. Add the new VM’s information to your VMclients page in your wiki. On the
Virtualization:VMclients page, click Edit at the bottom of the page, and add the new
VM to your list. Include the chapter number, hypervisor used, VM computer name,
Capstone Project 4-2: Install and Use Wireshark
Wireshark is a free, open source network protocol analyzer that can help demystify
network messages for you and help make the OSI model easier to understand. For some
students, using Wireshark for the first time can be an epiphany experience. It allows you
16
1. Open a browser and go to wireshark.org. Download and install the current stable
release, using the appropriate version for your OS. At the time of this writing, the
2. When installation is complete, open Wireshark. Note that while the Wireshark
3. In the Wireshark Network Analyzer window, select your network interface from
the list. Then click the shark-fin icon to start the capture, as shown in Figure 4-27.
17
4. While the capture is running, open your browser and navigate to cengage.com.
Then open a Command Prompt window and enter ping 8.8.8.8. Click the
red box on the command ribbon to stop the capture.
Take a look at some of the items you’ve captured. You can adjust the pane sizes by
5. Notice the column headers along the top of the capture, as shown in Figure 4-28.
Of particular interest are the Source and Destination columns, the Protocol
column, and the Info column. Find a UDP message that has an IPv4 Source
address and click on it. In the middle pane, click on each line to expand that
layer’s information. What pieces of information stand out to you? Which device
on your network do you think sent this message, and which device(s) received it?
Color highlighting can help you easily spot different protocols. Notice in Figure 4-29 that
TCP messages are a light lavender color, ARP messages are a yellowish color, and DNS
messages are a light bluish color. You can see the protocol names in the Protocol column.
18
6. To filter for a particular kind of message in your capture, type the name of the
protocol in the Filter box (shown in Figure 4-28). Figure 4-31 shows a filter for
ICMP messages, which are currently highlighted in bright green. These ICMP
messages were generated when pinging another host on the network. Try filtering
for other protocols discussed in this and earlier chapters, and see how many
different types you can find in your capture. Click the red X to clear filters
between searches. Which protocols did you find?
[[Insert Figure 4-31 here]]
7. To compare which OSI layers are represented by each of these protocols, apply a
slightly more complicated filter where you can see both HTTP messages and
ICMP messages in the same search. Enter the following phrase into the Filter box:
http or icmp.
8. Click on an ICMP message and count the layers of information available in the
middle pane. In Figure 4-32, there are four layers of information, which
correspond to Layer 2 (Frame and Ethernet II) and Layer 3 (Internet Protocol
Version 4 and Internet Control Message Protocol).
9. Examine an HTTP message. Figure 4-33 shows five layers of information in the
middle pane. This time, Layer 7 (Hypertext Transfer Protocol) and Layer 4
(Transmission Control Protocol) are represented, in addition to Layer 3 (Internet
Protocol Version 4) and Layer 2 (Ethernet II and Frame).
10. Recall that TCP is a connection-oriented protocol. You can filter a capture to
follow a TCP stream so you can see how these messages go back and forth for a
single session. Clear your filter box, and then find a TCP message. Right-click it,
point to Follow, and click TCP Stream (see Figure 4-34). Next, click Close to
close the Follow TCP Stream window and notice that Wireshark has filtered the
capture for this stream’s messages.
11. In the Info column, you can see both SYN and ACK flags, which you learned
about in this chapter. What is the purpose of these messages? Scroll to the bottom
of the TCP stream. What flag indicates the stream is ending?
20
12. Click on any message that includes a Source or Destination MAC address on the
Ethernet II line of output in the middle pane. What protocol is listed for the
message you selected? Was Wireshark able to resolve the name of the
manufacturer for this device? If so, what is it?
13. In your wiki, add a new page titled Applications:Wireshark. Indicate the chapter
and project number for this installation, the computer you used for this project, a
brief description of what you learned, and any other information you might find
helpful when using Wireshark later. We’ll return to Wireshark in future chapters.