Appendix Lab – Viewing Host Routing Tables Answers

Appendix Lab – Viewing Host Routing Tables Answers

Lab – Viewing Host Routing Tables (Answers Version)

Answers Note: Red font color or Gray highlights indicate text that appears in the instructor copy only.

Topology

Objectives

Part 1: Access the Host Routing Table

Part 2: Examine IPv4 Host Routing Table Entries

Part 3: Examine IPv6 Host Routing Table Entries

Background / Scenario

To access a resource on a network, your host will determine the route to the destination host using its routing table. The host routing table is similar to that of a router, but is specific to the local host and much less complex. For a packet to reach a local destination, the local host routing table is required. To reach a remote destination, both the local host routing table and the router routing table are required. The netstat –r and route print commands provide insight into how your local host routes packets to the destination.

In this lab, you will display and examine the information in the host routing table of your PC using the netstat –r and route print commands. You will determine how packets will be routed by your PC depending on the destination address.

Note: This lab cannot be completed using Netlab. This lab assumes that you have Internet access.

Required Resources

  • 1 PC (Windows 7, Vista, or XP with Internet and command prompt access)

Part 1: Access the Host Routing Table

Step 1: Record your PC information.

On your PC, open a command prompt window and type the ipconfig /all command to display the following information and record it:

IPv4 Address

Answers will vary. In this example, 192.168.1.11

MAC Address

Answers will vary. In this example, 90:4C:E5:BE:15:63

Default Gateway

Answers will vary. In this example, 192.168.1.1

Step 2: Display the routing tables.

In a command prompt window type the netstat –r (or route print) command to display the host routing table.

netstat_r_cropped

What are the three sections displayed in the output?

_______________________________________________________________________________________

The output has three sections: Interface List, IPv4 Route Table, and IPv6 Route Table.

Step 3: Examine the Interface List.

The first section, Interface List, displays the Media Access Control (MAC) addresses and assigned interface number of every network-capable interface on the host.

netstat-r_interface

The first column is the interface number. The second column is the list of MAC addresses associated with the network-capable interfaces on the hosts. These interfaces can include Ethernet, Wi-Fi and Bluetooth adapters. The third column shows the manufacturer and a description of the interface.

In this example, the first line displays the wireless interface that is connected to the local network.

Note: If you have a PC with an Ethernet interface and a Wireless adapter enabled, both interfaces would be listed in the Interface List.

What is the MAC address of the interface connected to your local network? How does the MAC address compare to the recorded MAC address in Step 1?

_______________________________________________________________________________________

Answers will vary. The MAC address in this example is 90:4C:E5:BE:15:63 The MAC address should be the same as recorded in Step 1 using ipconfig /all.

The second line is loopback interface. The loopback interface is automatically assigned an IP address of 127.0.0.1 when the Transmission Control Protocol/Internet Protocol (TCP/IP) is running on a host.

The last four lines represent transition technology that allows communication in a mixed environment and includes IPv4 and IPv6.

Part 2: Examine IPv4 Host Routing Table Entries

In Part 2, you will examine the IPv4 host routing table. This table is in the second section as a result of the netstat –r output. It lists all the known IPv4 routes, including direct connections, local network, and local default routes.

netstat_r-IPv4

The output is divided in five columns: Network Destination, Netmask, Gateway, Interface, and Metric.

  • The Network Destination column lists the reachable network. The Network Destination is used with Netmask to match the destination IP address.
  • The Netmask lists the subnet mask that the host uses to determine the network and host portions of the IP address.
  • The Gateway column lists the address that the host uses to send the packets to a remote network destination. If a destination is directly connected, the gateway is listed as On-link in the output.
  • The Interface column lists the IP address that is configured on the local network adaptor. This is used to forward a packet on the network.
  • The Metric column lists the cost of using a route. It is used to calculate the best route to a destination. A preferred route has a lower metric number than other routes listed.

The output displays five different types of active routes:

  • The local default route 0.0.0.0 is used when the packet does not match other specified addresses in the routing table. The packet will be sent to the gateway from the PC for further processing. In this example, the packet will be sent to 192.168.1.1 from 192.168.1.11.
  • The loopback addresses, 127.0.0.0 – 127.255.255.255, are related to direct connection and provide services to the local host.
  • The addresses for the subnet, 192.168.1.0 – 192.168.1.255, are all related to the host and the local network. If the final destination of the packet is in the local network, the packet will exit 192.168.1.11 interface.
    • The local route address 192.168.1.0 represents all devices on the 192.168.1.0/24 network.
    • The address of the local host is 192.168.1.11.
    • The network broadcast address 192.168.1.255 is used to send messages to all the hosts on the local network.
  • The special multicast class D addresses 224.0.0.0 are reserved for use through either the loopback interface (127.0.0.1) or the host (192.168.1.11).
  • The local broadcast address 255.255.255.255 can be used through either the loopback interface (127.0.0.1) or host (192.168.1.11).

Based on the contents of the IPv4 routing table, if the PC wanted to send a packet to 192.168.1.15, what would it do and where would it send the packet?

__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

The PC would consult the IPv4 Route Table and match the destination IP address with the 192.168.1.0 Network Destination entry to reveal that the host is on the same network (On-link). The PC would then send the packet toward the final destination using its local interface (192.168.1.11).

If the PC wanted to send a packet to a remote host located at 172.16.20.23, what would it do and where would it send the packet?

___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

The PC would consult the IPv4 Route Table and find that there is no exact match for the destination IP address. It would then choose the local default route (network 0.0.0.0, netmask 0.0.0.0) to reveal that it should forward the packet to the 192.168.1.1 gateway address (address of a gateway device such as a router interface on the local network). The PC would then forward the packet to the gateway using its local interface (192.168.1.11). The gateway device will then determine the next path for the packet to take in order to reach the final destination address of 172.16.20.23.

Part 3: Examine IPv6 Host Routing Table Entries

In Part 3, you will examine the IPv6 routing table. This table is in the third section displayed in the netstat –r output. It lists all the known IPv6 routes including direct connections, local network and local default routes.

route_print-6

The output of the IPv6 Route Table differs in column headings and format because the IPv6 addresses are 128 bits versus only 32 bits for IPv4 addresses. The IPv6 Route Table section displays four columns:

  • The If column lists the interface numbers of the IPv6-enabled network interfaces from the Interface List section of the netstat –r command.
  • The Metric column lists the cost of each route to a destination. The lower cost is the preferred route, and the metric is used to select between multiple routes with the same prefix.
  • The Network Destination column lists the address prefix for the route.
  • The Gateway lists the next-hop IPv6 address to reach the destination. On-link is listed as the next-hop address if it is directly connected to the host.

In this example, the figure displays the IPv6 Route Table section generated by the netstat –r command to reveal the following network destinations:

  • ::/0: This is the IPv6 equivalent of the local default route. The Gateway column provides the link-local address of the default router.
  • ::1/128: This is equivalent to the IPv4 loopback address and provides services to the local host.
  • 2001::/32: This is the global unicast network prefix.
  • 2001:0:9d38:6ab8:1863:3bca:3f57:fef4/128: This is the global unicast IPv6 address of the local computer.
  • fe80::/64: This is the local link network route address and represents all computers on the local-link IPv6 network.
  • fe80::1863:3bca:3f57:fef4/128: This is the link-local IPv6 address of the local computer.
  • ff00::/8: These are special reserved multicast class D addresses equivalent to the IPv4 224.x.x.x addresses.

The host routing table for IPv6 has similar information as the IPv4 routing table. What is the local default route for IPv4 and what is it for IPv6?

_______________________________________________________________________________________

IPv4 is 0.0.0.0 0.0.0.0 (quad zero) and IPv6 is ::/0.

What is the loopback address and subnet mask for IPv4? What is the loopback IP address for IPv6? _______________________________________________________________________________________

IPv4 is 127.0.0.1 0.0.0.0 0.0.0.0 and IPv6 is ::1/128.

How many IPv6 addresses have been assigned to this PC?

_______________________________________________________________________________________

There are two IP addresses. The link-local address and the global unicast address.

How many broadcast addresses does the IPv6 routing table contain?

_______________________________________________________________________________________

None, IPv6 does not use broadcast addresses.

Reflection

  1. How is the number of bits for the network indicated for IPv4. How is it done for IPv6?______________________________________________________________________________________
    IPv4 uses a 32-bit dotted decimal subnet mask in the form of a.b.c.d. IPv6 uses a slash number.
  2. Why is there both IPv4 and IPv6 information in the host routing tables?______________________________________________________________________________________
    Modern day PCs run both protocols and ISPs frequently assign both IPV4 and IPv6 addresses to support access to servers on the Internet that are running either protocol.

Leave a comment

Your email address will not be published. Required fields are marked *