Chapter 6. Network Layer

Objectives

Upon completion of this chapter, you will be able to answer the following questions:

Image What is the purpose of the network layer in data communication?

Image Why does the IPv4 protocol require other layers to provide reliability?

Image What is the role of the major header fields in IPv4 and IPv6 packets?

Image How does a host device use routing tables to direct packets to itself, a local destination, or a default gateway?

Image How does a host routing table compare to a routing table in a router?

Image What are the common components and interfaces of a router?

Image What is the boot process of a Cisco IOS router?

Image How do you configure the initial settings on a Cisco IOS router?

Image How do you configure two active interfaces on a Cisco IOS router?

Image How do you configure the default gateway on a network device?

Key Terms

This chapter uses the following key terms. You can find the definitions in the Glossary.

routing page 213

Internet Protocol version 4 (IPv4) page 214

Internet Protocol version 6 (IPv6) page 214

media independent page 215

maximum transmission unit (MTU) page 217

fragmentation page 217

IP header page 218

payload page 218

Version page 219

Differentiated Services (DS) page 219

Time-to-Live (TTL) page 219

Protocol page 219

Source IP Address page 220

Destination IP Address page 220

Traffic Class page 224

Flow Label page 224

Hop Limit page 225

local host page 226

remote host page 226

local network route page 226

local default route page 226

router page 227

metric page 231

directly connected routes page 232

remote routes page 232

route source page 235

administrative distance page 235

route timestamp page 236

outgoing interface page 236

next hop page 236

branch page 241

WAN page 241

service provider page 241

RAM page 241

running configuration file page 242

ARP cache page 242

packet buffer page 242

dynamic random-access memory (DRAM) page 242

dual in-line memory module (DIMM) page 242

ROM page 242

NVRAM page 242

flash memory page 243

console ports page 244

LAN interface page 244

EHWIC slots page 244

management ports page 245

inband router interfaces page 245

Ethernet LAN interfaces page 246

serial WAN interfaces page 246

startup configuration file page 247

Power-On Self Test (POST) page 248

TFTP server page 249

description text page 253

show ip interface brief command page 253

Introduction (6.0.1.1)

Network applications and services on one end device can communicate with applications and services running on another end device. How is this data communicated across the network in an efficient way?

The protocols of the OSI model network layer specify addressing and processes that enable transport layer data to be packaged and transported. The network layer encapsulation enables data to be passed to a destination within a network (or on another network) with minimum overhead.

This chapter focuses on the role of the network layer. It examines how it divides networks into groups of hosts to manage the flow of data packets within a network. It also covers how communication between networks is facilitated. This communication between networks is called routing.


Image

Class Activity 6.0.1.2: The Road Less Traveled...or Is It?

In this activity you will visualize how a hop-by-hop routing paradigm, with correct path selection at each hop, results in a successful delivery of packets. You will recognize that each router on the path must have correct knowledge about the destination network, and the path toward that network, to deliver packets over the shortest path.


Network Layer Protocols (6.1)

In this section you will learn how network layer protocols find a path for data across networks.

Network Layer in Communication (6.1.1)

Network layer protocols add network addressing and route information to data from the upper layers.

The Network Layer (6.1.1.1)

The network layer, or OSI Layer 3, provides services to allow end devices to exchange data across the network. To accomplish this end-to-end transport, the network layer uses four basic processes:

Image Addressing end devices: In the same way that a phone has a unique telephone number, end devices must be configured with a unique IP address for identification on the network. An end device with a configured IP address is referred to as a host.

Image Encapsulation: The network layer receives a protocol data unit (PDU) from the transport layer. In a process called encapsulation, the network layer adds IP header information such as the IP address of the source (sending) and destination (receiving) hosts. After header information is added to the PDU, the PDU is called a packet.

Image Routing: The network layer provides services to direct packets to a destination host on another network. To travel to other networks, the packet must be processed by a router. The role of the router is to select paths for and direct packets toward the destination host in a process known as routing. A packet may cross many intermediary devices before reaching the destination host. Each route the packet takes to reach the destination host is called a hop.

Image De-encapsulation: When the packet arrives at the destination host, the host checks the IP header of the packet. If the destination IP address within the header matches its own IP address, the IP header is removed from the packet. This process of removing headers from lower layers is known as de-encapsulation. After the packet is de-encapsulated by the network layer, the resulting Layer 4 PDU contained in the packet is passed up to the appropriate service at the transport layer.

Unlike the transport layer (OSI Layer 4), which manages the data transport between the processes running on each host, network layer protocols specify the packet structure and processing used to carry the data from one host to another host. Operating without regard to the data carried in each packet allows the network layer to carry packets for multiple types of communications between multiple hosts.


Image

Video 6.1.1.1:

View the video in the online course for a demonstration of the exchange of data.


Network Layer Protocols (6.1.1.2)

There are several network layer protocols in existence; however, only the following two are commonly implemented:

Image Internet Protocol version 4 (IPv4)

Image Internet Protocol version 6 (IPv6)

Other legacy network layer protocols that are not widely used include

Image Novell Internetwork Packet Exchange (IPX)

Image AppleTalk

Image Connectionless Network Service (CLNS/DECNet)

Discussion of these legacy protocols will be minimal.

Characteristics of the IP Protocol (6.1.2)

This section explores the Internet Protocol (IP portion of the TCP/IP protocol stack). This is the most common networking protocol in use on the Web.

Characteristics of IP (6.1.2.1)

IP is the network layer service implemented by the TCP/IP protocol suite. IP was designed as a protocol with low overhead. It provides only the functions that are necessary to deliver a packet from a source to a destination over an interconnected system of networks. The protocol was not designed to track and manage the flow of packets. These functions, if required, are performed by other protocols in other layers.

The basic characteristics of IP are

Image Connectionless: No connection with the destination is established before sending data packets.

Image Best effort (unreliable): Packet delivery is not guaranteed.

Image Media independent: Operation is independent of the medium carrying the data.

IP – Connectionless (6.1.2.2)

The role of the network layer is to transport packets between hosts while placing as little burden on the network as possible. The network layer is not concerned with, or even aware of, the type of communication contained inside of a packet. IP is connectionless, meaning that no dedicated end-to-end connection is created before data is sent. Connectionless communication is conceptually similar to sending a letter to someone without notifying the recipient in advance.

The postal service uses the information on a letter to deliver the letter to a recipient. The address on the envelope does not provide information as to whether the receiver is present, whether the letter arrives, or whether the receiver can read the letter. In fact, the postal service is unaware of the information contained within the contents of the packet that it is delivering and, therefore, cannot provide any error correction mechanisms.

Connectionless data communications work on the same principle. IP is connectionless and, therefore, requires no initial exchange of control information to establish an end-to-end connection before packets are forwarded. IP also does not require additional fields in the PDU header to maintain an established connection. This process greatly reduces the overhead of IP. However, with no pre-established end-to-end connection, senders are unaware whether destination devices are present and functional when sending packets, nor are they aware whether destination devices receive the packet or are able to access and read the packet. Figure 6-1 shows an example of connectionless communication.

Image

Figure 6-1 IP: a Best Effort Protocol

IP – Best-Effort Delivery (6.1.2.3)

IP is often referred to as an unreliable or best-effort delivery protocol. This does not mean that IP works properly sometimes and does not function well at other times, nor does it mean that it is a poor data communications protocol. “Unreliable” simply means that IP does not have the capability to manage and recover from undelivered or corrupt packets. This is because IP packets are sent with information about the location of delivery, but they contain no information that can be processed to inform the sender whether delivery was successful. There is no synchronization data included in the packet header for tracking the order of packet delivery. There are also no acknowledgments of packet delivery with IP, and there is no error control data to track whether packets were delivered without corruption. Packets may arrive at the destination corrupted, out of sequence, or not at all. Based on the information provided in the IP header, there is no capability for packet retransmissions if errors such as these occur.

If out-of-order or missing packets create problems for the application using the data, then upper-layer services, such as TCP, must resolve these issues. This allows IP to function very efficiently. If reliability overhead were included in IP, then communications that do not require connections or reliability would be burdened with the bandwidth consumption and delay produced by this overhead. In the TCP/IP suite, the transport layer can use either TCP or UDP based on the need for reliability in communication. Leaving the reliability decision to the transport layer makes IP more adaptable and accommodating for different types of communication.

Figure 6-1 shows an example of IP communications. Connection-oriented protocols, such as TCP, require that control data be exchanged to establish the connection. To maintain information about the connection, TCP also requires additional fields in the PDU header.

IP – Media Independent (6.1.2.4)

The network layer is also not burdened with the characteristics of the media on which packets are transported. IP operates independently of the media that carry the data at lower layers of the protocol stack. As shown in Figure 6-2, any individual IP packet can be communicated electrically over cable, as optical signals over fiber, or wirelessly as radio signals.

Image

Figure 6-2 Media Independence

It is the responsibility of the OSI data link layer to take an IP packet and prepare it for transmission over the communications medium. This means that the transport of IP packets is not limited to any particular medium.

There is, however, one major characteristic of the media that the network layer considers: the maximum size of the PDU that each medium can transport. This characteristic is referred to as the maximum transmission unit (MTU). Part of the control communication between the data link layer and the network layer is the establishment of a maximum size for the packet. The data link layer passes the MTU value up to the network layer. The network layer then determines how large packets should be.

In some cases, an intermediate device, usually a router, must split up a packet when forwarding it from one medium to a medium with a smaller MTU. This process is called fragmenting the packet, or fragmentation.

Encapsulating IP (6.1.2.5)

IP encapsulates, or packages, the transport layer segment or datagram by adding an IP header. This header is used to deliver the packet to the destination host. The IP header remains in place from the time the packet leaves the network layer of the source host until it arrives at the network layer of the destination host. Figure 6-3 shows the process for creating the network layer PDU.

Image

Figure 6-3 Network Layer PDU

The process of encapsulating data layer by layer enables the services at the different layers to develop and scale without affecting other layers. This means that transport layer segments can be readily packaged by IPv4 or IPv6 or by any new protocol that might be developed in the future.

Routers can implement these different network layer protocols to operate concurrently over a network to and from the same or different hosts. The routing performed by the intermediate devices only considers the contents of the packet header that encapsulates the segment. In all cases, the data portion of the packet, that is, the encapsulated transport layer PDU, remains unchanged during the network layer processes.


Image

Activity 6.1.2.6: IP Characteristics

Go to the online course and perform the network layer protocol exercise.


IPv4 Packet (6.1.3)

This section will explain the IPv4 packet header fields and their functions.

IPv4 Packet Header (6.1.3.1)

IPv4 has been in use since 1983 when it was deployed on the Advanced Research Projects Agency Network (ARPANET), which was the precursor to the Internet. The Internet is largely based on IPv4, which is still the most widely used network layer protocol.

An IPv4 packet has two parts:

Image IP header: Identifies the packet characteristics

Image Payload: Contains the Layer 4 segment information and the actual data

As shown in Figure 6-4, an IPv4 packet header consists of fields containing important information about the packet. These fields contain binary numbers that are examined by the Layer 3 process. The binary values of each field identify various settings of the IP packet.

Image

Figure 6-4 IPv4 Packet Header

Significant fields in the IPv4 header include

Image Version: Contains a 4-bit binary value identifying the IP packet version. For IPv4 packets, this field is always set to 0100.

Image Differentiated Services (DS): Formerly called the Type of Service (ToS) field, the DS field is an 8-bit field used to determine the priority of each packet. The first 6 bits identify the Differentiated Services Code Point (DSCP) value that is used by a quality of service (QoS) mechanism. The last 2 bits identify the Explicit Congestion Notification (ECN) value that can be used to prevent dropped packets during times of network congestion.

Image Time-to-Live (TTL): Contains an 8-bit binary value that is used to limit the lifetime of a packet. It is specified in seconds but is commonly referred to as hop count. The packet sender sets the initial TTL value, which is decreased by one each time the packet is processed by a router, or hop. If the TTL field decrements to 0, the router discards the packet and sends an Internet Control Message Protocol (ICMP) Time Exceeded message to the source IP address. The traceroute command uses this field to identify the routers used between the source and destination.

Image Protocol: This 8-bit binary value indicates the data payload type that the packet is carrying, which enables the network layer to pass the data to the appropriate upper-layer protocol. Common values include ICMP (0x01), TCP (0x06), and UDP (0x11).

Image Source IP Address: Contains a 32-bit binary value that represents the source IP address of the packet.

Image Destination IP Address: Contains a 32-bit binary value that represents the destination IP address of the packet.

The two most commonly referenced fields are Source IP Address and Destination IP Address. These fields identify where the packet is from and where it is going. Typically these addresses do not change while the packet is travelling from the source to the destination.

IPv4 Header Fields (6.1.3.2)

The remaining fields are used to identify and validate the packet, or to reorder a fragmented packet.

The fields used to identify and validate the packet include

Image Internet Header Length (IHL): Contains a 4-bit binary value identifying the number of 32-bit words in the header. The IHL value varies due to the Options and Padding fields. The minimum value for this field is 5 (i.e., 5×32 = 160 bits = 20 bytes) and the maximum value is 15 (i.e., 15×32 = 480 bits = 60 bytes).

Image Total Length: Sometimes referred to as the Packet Length, this 16-bit field defines the entire packet (fragment) size, including header and data, in bytes. The minimum-length packet is 20 bytes (20-byte header + 0 bytes data) and the maximum is 65,535 bytes.

Image Header Checksum: This 16-bit field is used for error checking of the IP header. The checksum of the header is recalculated and compared to the value in the header’s checksum field. If the values do not match, the packet is discarded.

A router may have to fragment a packet when forwarding it from one medium to another medium that has a smaller MTU. When this happens, fragmentation occurs and the IPv4 packet uses the following fields to keep track of the fragments:

Image Identification: This 16-bit field uniquely identifies the fragment of an original IP packet.

Image Flag: This 3-bit field identifies how the packet is fragmented. It is used with the Fragment Offset and Identification fields to help reconstruct the fragment into the original packet.

Image Fragment Offset: This 13-bit field identifies the order in which to place the packet fragment in the reconstruction of the original unfragmented packet.


Note

The Options and Padding fields are rarely used and are beyond the scope of this chapter.


Sample IPv4 Headers (6.1.3.3)

Wireshark is a useful network monitoring tool for anyone working with networks and can be used with most labs in the Cisco Certified Network Associate (CCNA) courses for data analysis and troubleshooting. It can be used to view sample values contained in IP header fields.


Image

Activity 6.1.3.3: IPv4 Packet Captures

Go to the online course and click through the three Wireshark captures for examples of various IP packets.



Image

Activity 6.1.3.4: IPv4 Header Fields

Go to the online course and click through the activity exploring IPv4 header fields.


IPv6 Packet (6.1.4)

This section will explain the need for IPv6 and then describe the IPv6 header and fields and their functions.

Limitations of IPv4 (6.1.4.1)

Through the years, IPv4 has been updated to address new challenges. However, even with changes, IPv4 still has three major issues:

Image IP address depletion: IPv4 has a limited number of unique public IP addresses available. Although there are approximately 4 billion IPv4 addresses, the increasing number of new IP-enabled devices, the increasing reliance on always-on connections, and the potential growth of less-developed regions have increased the need for more addresses.

Image Internet routing table expansion: As the number of servers (nodes) connected to the Internet increases, so too does the number of network routes. These IPv4 routes consume a great deal of memory and processor resources on Internet routers.

Image Lack of end-to-end connectivity: Network Address Translation (NAT) is a technology commonly implemented within IPv4 networks. NAT provides a way for multiple devices to share a single public IP address. However, because the public IP address is shared, the IP address of an internal network host is hidden. This can be problematic for technologies that require end-to-end connectivity.

Introducing IPv6 (6.1.4.2)

In the early 1990s, the Internet Engineering Task Force (IETF) grew concerned about the issues with IPv4 and began to look for a replacement. This activity led to the development of IPv6. IPv6 overcomes the limitations of IPv4 and is a powerful enhancement with features that better suit current and foreseeable network demands.

Improvements that IPv6 provides include

Image Increased address space: IPv6 addresses are based on 128-bit hierarchical addressing, as opposed to IPv4 with 32 bits. This dramatically increases the number of available IP addresses.

Image Improved packet handling: The IPv6 header has been simplified with fewer fields. This improves packet handling by intermediate routers and also provides support for extensions and options for increased scalability/longevity.

Image Eliminates the need for NAT: With such a large number of public IPv6 addresses, NAT is not needed. Customer sites, from the largest enterprises to single households, can get a public IPv6 network address. This avoids some of the NAT-induced application problems experienced by applications requiring end-to-end connectivity.

Image Integrated security: IPv6 natively supports authentication and privacy capabilities. With IPv4, additional features had to be implemented to do this.

The 32-bit IPv4 address space provides approximately 4,294,967,296 unique addresses. Of these, only 3.7 billion addresses are assignable, because the IPv4 addressing system separates the addresses into classes, and reserves addresses for multicasting, testing, and other specific uses.

As shown in Figure 6-5, IPv6 address space provides 340,282,366,920,938,463,463,374,607,431,768,211,456, or 340 undecillion, addresses, which is roughly equivalent to every grain of sand on Earth.

Image

Figure 6-5 IPv6 Provides Address Space for the Foreseeable Future.

Encapsulating IPv6 (6.1.4.3)

One of the major design improvements of IPv6 over IPv4 is the simplified IPv6 header.

The IPv4 header consists of 20 octets (up to 60 bytes if the Options field is used) and 12 basic header fields, not including the Options field and Padding field.

The IPv6 header consists of 40 octets (largely due to the length of the source and destination IPv6 addresses) and eight header fields (three IPv4 basic header fields and five additional header fields).

Figures 6-6 and 6-7 demonstrate the differences between an IPv4 header and an IPv6 header. In IPv6, some fields have remained the same, some fields are not used, and some fields have changed names and positions.

Image

Figure 6-6 IPv4 Headers

In addition, a new field (Flow Label) has been added to IPv6 that is not used in IPv4. The IPv6 simplified header is shown in Figure 6-7.

Image

Figure 6-7 IPv6 Header

The IPv6 simplified header offers several advantages over IPv4:

Image Better routing efficiency for performance and forwarding-rate scalability

Image No requirement for processing checksums

Image Simplified and more efficient extension header mechanisms (as opposed to the IPv4 Options field)

Image A Flow Label field for per-flow processing with no need to open the transport inner packet to identify the various traffic flows

IPv6 Packet Header (6.1.4.4)

The fields in the IPv6 packet header include

Image Version: This field contains a 4-bit binary value identifying the IP packet version. For IPv6 packets, this field is always set to 0110.

Image Traffic Class: This 8-bit field is equivalent to the IPv4 Differentiated Services (DS) field in the IPv4 header. It also contains a 6-bit Differentiated Services Code Point (DSCP) value used to classify packets and a 2-bit Explicit Congestion Notification (ECN) used for traffic congestion control.

Image Flow Label: This 20-bit field provides a special service for real-time applications. It can be used to inform routers and switches to maintain the same path for the packet flow so that packets are not reordered.

Image Payload Length: This 16-bit field is equivalent to the Total Length field in the IPv4 header. It defines the entire packet (fragment) size, including header and optional extensions.

Image Next Header: This 8-bit field is equivalent to the IPv4 Protocol field. It indicates the data payload type that the packet is carrying, enabling the network layer to pass the data to the appropriate upper-layer protocol. This field is also used if there are optional extension headers added to the IPv6 packet.

Image Hop Limit: This 8-bit field replaces the IPv4 TTL field. This value is decremented by one by each router that forwards the packet. When the counter reaches 0 the packet is discarded and an ICMPv6 message is forwarded to the sending host, indicating that the packet did not reach its destination.

Image Source IP Address: This 128-bit field identifies the IPv6 address of the sending host.

Image Destination IP Address: This 128-bit field identifies the IPv6 address of the receiving host.

An IPv6 packet may also contain extension headers (EHs), which provide optional network layer information. EHs are optional and are placed between the IPv6 header and the payload. EHs are used for fragmentation, security, to support mobility, and more.

Sample IPv6 Headers (6.1.4.5)

Wireshark is a useful network monitoring tool for anyone working with networks and can be used with most labs in the Cisco Certified Network Associate (CCNA) courses for data analysis and troubleshooting. It can be used to view sample values contained in IP header fields.


Image

Activity 6.1.4.5: IPv6 Packet Captures

Go to the online course and click through the three Wireshark captures for examples of various IPv6 packets.



Image

Activity 6.1.4.6: IPv6 Header Fields

Go to the online course and click through the activity exploring IPv6 header fields.


Routing (6.2)

Routing is the process of finding an appropriate path for packets across a network. This section explains ways in which network information is stored in order to perform path selection.

Host Routing Tables (6.2.1)

This section explains the local routing tables kept by host devices.

Host Packet Forwarding Decision (6.2.1.1)

Another role of the network layer is to provide routing of packets between hosts. A host could send a packet to

Image Itself: This is a special IP address of 127.0.0.1, which is referred to as the loopback interface. This loopback address is automatically assigned to a host when TCP/IP is running. The ability for a host to send a packet to itself using network functionality is useful for testing purposes. Any IP within the network 127.0.0.0/8 refers to the local host.

Image Local host: This is a host on the same network as the sending host. The hosts share the same network address.

Image Remote host: This is a host on a remote network. The hosts do not share the same network address.

Hosts require a local routing table to ensure that network layer packets are directed to the correct destination network. The local table of the host typically contains

Image Direct connection: This is a route to the loopback interface.

Image Local network route: The network to which the host is connected is automatically populated in the host routing table.

Image Local default route: The default gateway is added to the host routing table and represents all other routes. The default gateway is either configured manually or learned dynamically and creates the local default route.

The default gateway is the device that routes traffic from the local network to devices on remote networks. It is often used to connect a local network to the Internet. The network is determined by the IP address and subnet mask combination. If a host is sending a packet to a device that is configured with the same IP network as the host device, the packet is simply forwarded out of the host interface to the destination device directly. A default gateway is not needed in this situation.

However, if the host is sending a packet to a device on a different IP network, then the host must forward the packet to the default gateway because a host device cannot communicate directly with devices outside of the local network. The default gateway, which is most often a router, maintains routing table entries for all of its directly connected networks, as well as entries for remote networks it may know about. The router is responsible for determining the best path to reach all of those destinations. The default gateway address is the IP address of the router’s network interface connected to the local network.

Figure 6-8 highlights areas associated with the entries in the local host routing table. In this example, the default gateway address is 192.168.10.1.

Image

Figure 6-8 Elements of a Local Network Route

IPv4 Host Routing Table (6.2.1.2)

On a Windows host, the route print or netstat -r command can be used to display the host routing table. Both commands generate the same output. The output may seem overwhelming at first, but is fairly simple to understand.

Entering the netstat -r command, or the equivalent route print command, displays three sections related to the current TCP/IP network connections:

Image Interface List: Lists the Media Access Control (MAC) address and assigned interface number of every network-capable interface on the host, including Ethernet, Wi-Fi, and Bluetooth adapters.

Image IPv4 Route Table: Lists all known IPv4 routes, including direct connections, local networks, and local default routes.

Image IPv6 Route Table: Lists all known IPv6 routes, including direct connections, local networks, and local default routes.


Note

Command output varies, depending on how the host is configured and the interface types it has.


Figure 6-9 displays the IPv4 Route Table section of the output. Notice the output is divided into five columns:

Image Network Destination: Lists the reachable networks.

Image Netmask: Lists a subnet mask that informs the host how to determine the network and the host portions of the IP address.

Image Gateway: Lists the address used by the local computer to get to a network destination. If a destination is directly reachable, it will show as “On-link” in this column.

Image Interface: Lists the address of the physical interface used to send the packet to the gateway that is used to reach the network destination.

Image Metric: Lists the cost of each route and is used to determine the best route to a destination.

Image

Figure 6-9 Output from the netstat -r Command on a Host

IPv4 Host Routing Entries (6.2.1.3)

To help simplify the output, the destination networks can be grouped into five sections, as identified by the highlighted areas in Figure 6-9.

0.0.0.0

The local default route; that is, all packets with destinations that do not match other specified addresses in the routing table are forwarded to the gateway. Therefore, all nonmatching destination routes are sent to the gateway with IP address 192.168.10.1 (R1) exiting from the interface with IP address 192.168.10.10. Note that the final destination address specified in the packet does not change; rather, the host simply knows to forward the packet to the gateway for further processing.

127.0.0.0–127.255.255.255

These loopback addresses all relate to the direct connection and provide services to the local host.

192.168.10.0–192.168.10.255

These addresses all relate to the host and local network. All packets with destination addresses that fall into this category will exit out of the 192.168.10.10 interface.

Image 192.168.10.0: The local network route address; represents all computers on the 192.168.10.x network

Image 192.168.10.10: The address of the local host

Image 192.168.10.255: The network broadcast address; sends messages to all hosts on the local network route

224.0.0.0–239.255.255.255

These are special multicast class D addresses reserved for use through either the loopback interface (127.0.0.1) or the host IP address (192.168.10.10).

255.255.255.255

The last two addresses represent the limited broadcast IP address values for use through either the loopback interface (127.0.0.1) or the host IP address (192.168.10.10). These addresses can be used to find a DHCP server before the local IP is determined.

Sample IPv4 Host Routing Table (6.2.1.4)

For example, as shown in Figure 6-10, if PC1 wanted to send a packet to 192.168.10.20, it would take the following steps:

1. Consult the IPv4 Route Table.

2. Match the destination IP address with the 192.168.10.0 Network Destination entry to reveal that the host is on the same network (On-link).

3. Send the packet toward the final destination using its local interface (192.168.10.10).

Image

Figure 6-10 Finding a Route on a Local Network

As shown in Figure 6-11, if PC1 wanted to send a packet to a remote host located at 10.10.10.10, it would take these steps:

1. Consult the IPv4 Route Table.

2. Find that there is no exact match for the destination IP address.

3. Choose the local default route (0.0.0.0) to reveal that it should forward the packet to the 192.168.10.1 gateway address.

4. Forward the packet to the gateway to use its local interface (192.168.10.10). The gateway device then determines the next path for the packet to reach the final destination address of 10.10.10.10.

Image

Figure 6-11 Finding a Route on a Remote Network Using the Default Gateway

Sample IPv6 Host Routing Table (6.2.1.5)

The output of the IPv6 Route Table differs in column headings and format due to the longer IPv6 addresses.

The IPv6 Route Table section displays four columns:

Image If: Lists the interface numbers from the Interface List section of the netstat –r command. The interface numbers correspond to the network-capable interfaces on the host, including Ethernet, Wi-Fi, and Bluetooth adapters.

Image Metric: Lists the cost of each route to a destination. Lower numbers indicate preferred routes.

Image Network Destination: Lists the reachable networks.

Image Gateway: Lists the address used by the local host to forward packets to a remote network destination. On-link indicates that the host is currently connected to it.

For example, Figure 6-12 displays the IPv6 Route Table section generated by the netstat –r command to reveal the following network destinations:

Image

Figure 6-12 IPv6 Host Routing Table

Image ::/0: This is the IPv6 equivalent of the local default route.

Image ::1/128: This is equivalent to the IPv4 loopback address and provides services to the local host.

Image 2001::/32: This is the global unicast network prefix.

Image 2001:0:9d38:953c:2c30:3071:e718:a926/128: This is the global unicast IPv6 address of the local computer.

Image fe80::/64: This is the link local network route address and represents all computers on the local link in an IPv6 network.

Image fe80::2c30:3071:e718:a926/128: This is the link local IPv6 address of the local computer.

Image ff00::/8: These are special reserved multicast class D addresses equivalent to the IPv4 224.x.x.x addresses.


Note

Interfaces in IPv6 commonly have two IPv6 addresses: a link local address and a global unicast address. Also, notice that there are no broadcast addresses in IPv6.



Image

Activity 6.2.1.6: Identify Elements of a Host Routing Table Entry

Go to the online course and perform the host routing table exercise.


Router Routing Tables (6.2.2)

This section explains the elements of routing tables that routers use to choose paths for packets.

Router Packet Forwarding Decision (6.2.2.1)

When a host sends a packet to another host, it uses its routing table to determine where to send the packet. If the destination host is on a remote network, the packet is forwarded to the address of a gateway device.

What happens when a packet arrives on a router interface? The router looks at its routing table to determine where to send the packet.

The routing table of a router stores information about

Image Directly connected routes: These routes come from the active router interfaces. Routers add a directly connected route when an interface is configured with an IP address and is activated. Each of the router’s interfaces is connected to a different network segment. Routers maintain information about the network segments that they are connected to within the routing table.

Image Remote routes: These routes come from remote networks connected to other routers. Routes to these networks can be either manually configured on the local router by the network administrator or dynamically configured by enabling the local router to exchange routing information with other routers using dynamic routing protocols.

Figure 6-13 identifies the directly connected networks and remote networks of router R1.

Image

Figure 6-13 Directly Connected and Remotely Connected Networks

IPv4 Router Routing Table (6.2.2.2)

A host routing table includes information about directly connected networks. A host requires a default gateway to send packets to a remote destination. The routing table of a router contains similar information, and it can also identify specific remote networks.

The routing table of a router is similar to the routing table of a host. They both identify

Image Destination network

Image Metric associated with the destination network

Image Gateway to get to the destination network

On a Cisco IOS router, the show ip route command can be used to display the routing table of a router. A router also provides additional route information, including how the route was learned, when it was last updated, and which specific interface to use to get to a predefined destination.

When a packet arrives at the router interface, the router examines the packet header to determine the destination network. If the destination network matches a route in the routing table, the router forwards the packet using the information specified in the routing table. If there are two or more possible routes to the same destination, the metric is used to decide which route appears on the routing table.

Unlike the host routing table, there are no column headings identifying the information contained in a routing table entry. Therefore, it is important to learn the meaning of the different types of information included in each entry.

Directly Connected Routing Table Entries (6.2.2.3)

Two routing table entries are automatically created when an active router interface is configured with an IP address and subnet mask. Figure 6-14 displays the routing table entries on R1 for the directly connected network 192.168.10.0. These entries were automatically added to the routing table when the Gigabit Ethernet 0/0 interface was configured and activated. The entries contain the following information:

Image

Figure 6-14 Partial Routing Table Output

Image Route source: Labeled “A” in Figure 6-14, it identifies how the route was learned. Directly connected interfaces have two route source codes:

Image C: Identifies a directly connected network. Directly connected networks are automatically created when an interface is configured with an IP address and activated.

Image L: Identifies that this is a link local route. Link local routes are automatically created when an interface is configured with an IP address and activated.

Image Destination network: Labeled “B” in Figure 6-14, it identifies the address of the destination network.

Image Outgoing interface: Labeled “C” in Figure 6-14, it identifies the exit interface to use when forwarding packets to the destination network.


Note

Link local routing table entries did not appear in routing tables prior to Cisco IOS Release 15.


A router typically has multiple interfaces configured. The routing table stores information about both directly connected routes and remote routes. As with directly connected networks, the route source identifies how the route was learned. For example, common codes for remote networks include

Image S: Identifies that the route was manually created by an administrator to reach a specific network. This is known as a static route.

Image D: Identifies that the route was learned dynamically from another router using the Enhanced Interior Gateway Routing Protocol (EIGRP).

Image O: Identifies that the route was learned dynamically from another router using the Open Shortest Path First (OSPF) routing protocol.


Note

Other codes are beyond the scope of this chapter.


Remote Network Routing Table Entries (6.2.2.4)

Figure 6-15 displays a routing table entry on R1 for the route to remote network 10.1.1.0. The entry identifies the following information:

Image

Figure 6-15 A Learned Route in a Routing Table

Image Route source: Identifies how the route was learned.

Image Destination network: Identifies the address of the destination network.

Image Administrative distance: Identifies the trustworthiness of the route source.

Image Metric: Identifies the value assigned to reach the destination network. Lower values indicate preferred routes.

Image Next-hop: Identifies the IP address of the next router to forward the packet.

Image Route timestamp: Identifies when the route was last heard from.

Image Outgoing interface: Identifies the exit interface to use to forward a packet toward the final destination.

Next-Hop Address (6.2.2.5)

A next hop is the address of the device that will process the packet next. For a host on a network, the address of the default gateway (router interface) is the next hop for all packets that must be sent to another network. In the routing table of a router, each route to a remote network lists a next hop.

When a packet destined for a remote network arrives at the router, the router matches the destination network to a route in the routing table. If a match is found, the router forwards the packet to the IP address of the next hop router using the interface identified by the route entry.

A next hop router is the gateway to remote networks.

Referring again to Figure 6-15 for an example, a packet arriving at R1 destined for either the 10.1.1.0 or 10.1.2.0 network is forwarded to the next-hop address 209.165.200.226 using the Serial 0/0/0 interface.

Networks directly connected to a router have no next-hop address, because a router can forward packets directly to hosts on these networks using the designated interface.

Packets cannot be forwarded by the router without a route for the destination network in the routing table. If a route representing the destination network is not in the routing table, the packet is dropped (that is, not forwarded).

However, just as a host can use a default gateway to forward a packet to an unknown destination, a router can also be configured to use a default static route to create a gateway of last resort. The gateway of last resort will be covered in more detail in the CCNA Routing course.

Sample Router IPv4 Routing Table (6.2.2.6)

Assume PC1 with IP address 192.168.10.10 wants to send a packet to another host on the same network. PC1 would check the IPv4 routing table based on the destination IP address. Then, PC1 would discover that the host is on the same network and simply send it out of its interface (On-link).


Note

R1 is not involved in the transfer of the packet if the PC1 and the destination host is on the same local network. If PC1 forwards a packet to any network other than its local network, then it must use the services of router R1, and forward the packet to its local default route (192.168.10.1).


The following examples illustrate how a host and a router make packet routing decisions by consulting their respective routing tables: Some router output is omitted from the examples for clarity.

Example 1: The sending host and receiving host are on the same local network. PC1 wants to verify connectivity to its local default gateway at 192.168.10.1 (the router interface):

1. PC1 consults the IPv4 route table based on the destination IP address.

2. PC1 discovers that the host is on the same network and simply sends a ping packet out of its interface (On-link).

3. R1 receives the packet on its Gigabit Ethernet 0/0 (G0/0) interface and looks at the destination IP address.

4. R1 consults its routing table.

5. R1 matches the destination IP address to the L 192.168.10.1/32 routing table entry and discovers that this route points to its own local interface, as shown in Figure 6-16.

6. R1 opens the remainder of the IP packet and responds accordingly.

Image

Figure 6-16 Example 1: Sending Host and Receiving Host Are on the Same Local Network.

Example 2: The sending host and receiving host are not on the same local network but are connected to the same router. PC1 wants to send a packet to PC2 (192.168.11.10):

1. PC1 consults the IPv4 route table and discovers that there is no exact match.

2. PC1 therefore uses the all route network (0.0.0.0) and sends the packet using the local default route (192.168.10.1).

3. R1 receives the packet on its Gigabit Ethernet 0/0 (G0/0) interface and looks at the destination IP address (192.168.11.10).

4. R1 consults its routing table and matches the destination IP address to the C 192.168.11.0/24 routing table entry, as shown in Figure 6-17.

Image

Figure 6-17 Example 2: Sending Host and Receiving Host Are Not on the Same Local Network But Are Connected to the Same Router.

5. R1 forwards the packet out of its directly connected Gigabit Ethernet 0/1 interface (G0/1).

6. PC2 receives the packet and consults its host IPv4 routing table.

7. PC2 discovers that the packet is addressed to it, opens the remainder of the packet, and responds accordingly.

Example 3: The sending host and receiving host are not on the same local network and are not on the same router. PC1 wants to send a packet to 209.165.200.226:

1. PC1 consults the IPv4 route table and discovers that there is no exact match.

2. PC1 therefore uses the default route (0.0.0.0/0) and sends the packet using the default gateway (192.168.10.1).

3. R1 receives the packet on its Gigabit Ethernet 0/0 (G0/0) interface and looks at the destination IP address (209.165.200.226).

4. R1 consults its routing table and matches the destination IP address to the C 209.165.200.224/30 routing table entry, as shown in Figure 6-18.

Image

Figure 6-18 Example 3: Sending Host and Receiving Host Are Not on the Same Local Network and Are Not on the Same Router.

5. R1 forwards the packet out of its directly connected Serial 0/0/0 interface (S0/0/0).

Example 4: The sending host and receiving host are not on the same local network and not connected to the same router. PC1 wants to send a packet to the host with IP address 10.1.1.10:

1. PC1 consults the IPv4 route table and discovers that there is no exact match.

2. PC1 therefore uses the all route network (0.0.0.0) and sends it to its local default route (192.168.10.1).

3. R1 receives the packet on its Gigabit Ethernet 0/0 (G0/0) interface and looks at the destination IP address (10.1.1.10).

4. R1 consults its routing table and matches the destination IP address to the D 10.1.1.0/24 routing table entry, as shown in Figure 6-19.

Image

Figure 6-19 Example 4: Sending Host and Receiving Host Are Not on the Same Local Network and Are Not Connected to the Same Router.

5. R1 discovers it has to send the packet to the next-hop address 209.165.200.226.

6. R1 again consults its routing table and matches the destination IP address to the C 209.165.200.224/30 routing table entry, as shown in Figure 6-19.

7. R1 forwards the packet out of its directly connected Serial 0/0/0 interface (S0/0/0).


Image

Activity 6.2.2.7: Identify Elements of a Router Routing Table Entry

Go to the online course and perform the routing table elements exercise.



Image

Lab 6.2.2.8: View Host Routing Tables

In this lab you will access a host routing table, an IPv4 routing table, and an IPv6 routing table.


Routers (6.3)

Routers are specialized computers made to perform path selections for communication between networks.

Anatomy of a Router (6.3.1)

In this section you will learn about the physical characteristics of a router.

A Router Is a Computer (6.3.1.1)

There are many types of infrastructure routers available. In fact, Cisco routers are designed to address the needs of

Image Branch: Teleworkers, small businesses, and medium-size branch sites. Includes Cisco 800, 1900, 2900, and 3900 Integrated Series Routers (ISR) G2 (2nd generation).

Image WAN: Large businesses, organizations, and enterprises. Includes the Cisco Catalyst 6500 Series Switches and the Cisco Aggregation Service Router (ASR) 1000.

Image Service Provider: Large service providers. Includes Cisco ASR 1000, Cisco ASR 9000, Cisco XR 12000, Cisco CRS-3 Carrier Routing System, and 7600 Series routers.

The focus of CCNA certification is on the branch family of routers.

Regardless of their function, size, or complexity, all router models are essentially computers. Just like computers, tablets, and smart devices, routers also require

Image An operating system (OS)

Image A central processing unit (CPU)

Image Random-access memory (RAM)

Image Read-only memory (ROM)

A router also has special memory that includes flash and non-volatile RAM (NVRAM).

Router CPU and OS (6.3.1.2)

Like all computers, tablets, and smart devices, Cisco devices require a CPU to execute OS instructions, such as system initialization, routing functions, and switching functions.

The CPU requires an OS to provide routing and switching functions. The Cisco Internetwork Operating System (IOS) is the system software used for most Cisco devices, regardless of the size and type of the device. It is used for routers, LAN switches, small wireless access points, large routers with dozens of interfaces, and many other devices.

Router Memory (6.3.1.3)

A router has access to four types of memory: RAM, ROM, NVRAM, and flash.

RAM

RAM is used to store various applications and processes, including

Image Cisco IOS: The IOS is copied into RAM during bootup.

Image Running configuration file: This is the configuration file that stores the configuration commands that the router IOS is currently using. It is also known as the running-config.

Image IP routing table: This file stores information about directly connected networks and remote networks. It is used to determine the best path to use to forward packets.

Image ARP cache: This cache contains the IPv4 address to MAC address mappings, similar to the ARP cache on a PC. The ARP cache is used on routers that have LAN interfaces, such as Ethernet interfaces.

Image Packet buffer: Packets are temporarily stored in a buffer when received on an interface or before they exit an interface.

Like computers, Cisco routers actually use dynamic random-access memory (DRAM). DRAM is a very common kind of RAM that stores the instructions and data needed to be executed by the CPU. Unlike ROM, RAM is volatile memory and requires continual power to maintain its information. It loses all of its content when the router is powered down or restarted.

By default, Cisco 1941 routers come with 512 MB of DRAM soldered on the main system board (onboard) and one dual in-line memory module (DIMM) slot for memory upgrades of up to an additional 2.0 GB. Cisco 2901, 2911, and 2921 models come with 512 MB of onboard DRAM. Note that first-generation ISRs and older Cisco routers do not have onboard RAM.

ROM

ROM is firmware embedded on an integrated circuit inside the router and does not lose its contents when the router loses power or is restarted Cisco routers use ROM to store the following:

Image Bootup instructions: Provides the startup instructions.

Image Basic diagnostic software: Performs the Power-On Self Test (POST) of all components.

Image Limited IOS: Provides a limited backup version of the OS, in case the router cannot load the full-featured IOS.

NVRAM

NVRAM is used by the Cisco IOS as permanent storage for the startup configuration file (startup-config). Like ROM, NVRAM does not lose its contents when power is turned off.

Flash Memory

Flash memory is non-volatile computer memory used as permanent storage for the IOS and other system-related files. The IOS is copied from flash into RAM during the bootup process.

Cisco 1941 routers come with two external CompactFlash slots. Each slot can support high-speed storage densities upgradeable to 4GB in density.

Figure 6-20 summarizes the four types of memory.

Image

Figure 6-20 Four Types of Memory in a Router

Inside a Router (6.3.1.4)

Although there are several different types and models of routers, every router has the same general hardware components.


Image

Activity 6.3.1.4: Inside a Router

The interactive graphic shows the inside of a Cisco 1841 first-generation ISR. Click the components to see a brief description of each. Note that the graphic also includes highlights of other components found in a router, such as the power supply, cooling fan, heat shields, and an advanced integration module (AIM), which are beyond the scope of this chapter.



Note

A networking professional should be familiar with and understand the function of the main internal components of a router, rather than the exact location of those components inside a specific router. Depending on the model, those components are located in different places inside the router.


Router Backplane (6.3.1.5)

A Cisco 1941 router includes the following connections:

Image Console ports: Two console ports for the initial configuration and command-line interface (CLI) management access using a regular RJ-45 port and a new USB Type-B (mini-B USB) connector

Image AUX port: An RJ-45 port for remote management access; similar to the console port

Image Two LAN interfaces: Two Gigabit Ethernet interfaces for LAN access

Image Enhanced high-speed WAN interface card (EHWIC) slots: Two slots that provide modularity and flexibility by enabling the router to support different types of interface modules, including serial, digital subscriber line (DSL), switch port, and wireless

The Cisco 1941 ISR also has storage slots to support expanded capabilities. Dual-CompactFlash memory slots are capable of supporting a 4-GB CompactFlash card each for increased storage space. Two USB host ports are included for additional storage space and secure token capability.

CompactFlash can store the Cisco IOS software image, log files, voice configuration files, HTML files, backup configurations, or any other file needed for the system. By default, only slot 0 is populated with a CompactFlash card from the factory, and it is the default boot location.

Figure 6-21 identifies the location of these connections and slots.

Image

Figure 6-21 Router Ports and Interfaces

Connecting to a Router (6.3.1.6)

Cisco devices, routers, and switches typically interconnect many devices. For this reason, these devices have several types of ports and interfaces. These ports and interfaces are used to connect cables to the device.

The connections on a Cisco router can be grouped into two categories:

Image Management ports: These are the console and auxiliary ports used to configure, manage, and troubleshoot the router. Unlike LAN and WAN interfaces, management ports are not used for packet forwarding.

Image Inband router interfaces: These are the LAN and WAN interfaces configured with IP addressing to carry user traffic. Ethernet interfaces are the most common LAN connections, while common WAN connections include serial and DSL interfaces.

Like many networking devices, Cisco devices use light emitting diode (LED) indicators to provide status information. An interface LED indicates the activity of the corresponding interface. If an LED is off when the interface is active and the interface is correctly connected, this may be an indication of a problem with that interface. If an interface is extremely busy, its LED is always on, and may be blinking very fast.

LAN and WAN Interfaces (6.3.1.7)

Similar to a Cisco switch, there are several ways to access the CLI environment on a Cisco router. The most common methods are

Image Console: Uses a low-speed serial or USB connection to provide direct connect, out-of-band management access to a Cisco device

Image Telnet or SSH: Two methods for remotely accessing a CLI session across an active network interface

Image AUX port: Used for remote management of the router using a dial-up telephone line and modem

The console and AUX port are located on the router.

In addition to these ports, routers also have network interfaces to receive and forward IP packets. Routers have multiple interfaces that are used to connect to multiple networks. Typically, the interfaces connect to various types of networks, which means that different types of media and connectors are required.

Every interface on the router is a member or host on a different IP network. Each interface must be configured with an IP address and subnet mask of a different network. The Cisco IOS does not allow two active interfaces on the same router to belong to the same network.

Router interfaces can be grouped into two categories:

Image Ethernet LAN interfaces: Used for connecting cables that terminate with LAN devices, such as computers and switches. This interface can also be used to connect routers to each other. Several conventions for naming Ethernet interfaces are popular: the older Ethernet, Fast Ethernet, and Gigabit Ethernet. The name used depends on the device type and model.

Image Serial WAN interfaces: Used for connecting routers to external networks, usually over a larger geographical distance. Similar to LAN interfaces, each serial WAN interface has its own IP address and subnet mask, which identifies it as a member of a specific network.

Figure 6-22 shows the LAN Interfaces and serial interfaces on the router.

Image

Figure 6-22 WAN and LAN Interfaces on a Router


Image

Activity 6.3.1.8: Identify Router Components

Go to the online course and perform the interactive exercise.



Image

Lab 6.3.1.9: Exploring Router Physical Characteristics

In this lab you will examine a router’s internal and external characteristics.



Image

Packet Tracer Activity 6.3.1.10: Exploring Internetworking Devices

In this activity you will explore the different options available on internetworking devices. You will also be required to determine which options provide the necessary connectivity when connecting multiple devices. Finally, you will add the correct modules and connect the devices.


Router Bootup (6.3.2)

This section will explore what happens when a Cisco IOS router boots up.

Cisco IOS (6.3.2.1)

The Cisco IOS operational details vary on different internetworking devices, depending on the device’s purpose and feature set. However, Cisco IOS for routers provides the following:

Image Addressing

Image Interfaces

Image Routing

Image Security

Image QoS

Image Resources management

The IOS file itself is several megabytes in size, and similar to the files for Cisco IOS switches, is stored in flash memory. Using flash allows the IOS to be upgraded to newer versions or to have new features added. During bootup, the IOS is copied from flash memory into RAM. DRAM is much faster than flash; therefore, copying the IOS into RAM increases the performance of the device.

Bootset Files (6.3.2.2)

A router loads the following two files into RAM when it is booted:

Image IOS image file: The IOS facilitates the basic operation of the device’s hardware components. The IOS image file is stored in flash memory.

Image Startup configuration file: The startup configuration file contains commands that are used to initially configure a router and create the running configuration file stored in RAM. The startup configuration file is stored in NVRAM. All configuration changes are stored in the running configuration file and are implemented immediately by the IOS.

The running configuration is modified when the network administrator performs device configuration. When changes are made to the running-config file, it should be saved to NVRAM as the startup configuration file, in case the router is restarted or loses power.

Router Bootup Process (6.3.2.3)

There are three major phases to the bootup process, as shown in Figure 6-23:

1. Perform the POST and load the bootstrap program.

2. Locate and load the Cisco IOS software.

3. Locate and load the startup configuration file or enter setup mode.

Image

Figure 6-23 Three Phases in the Router Boot Process

Step 1. Perform POST and Load Bootstrap Program

The Power-On Self Test (POST) is a common process that occurs on almost every computer during bootup. The POST process is used to test the router hardware. When the router is powered on, software on the ROM chip conducts the POST. During this self-test, the router executes diagnostics from ROM on several hardware components, including the CPU, RAM, and NVRAM. After the POST has been completed, the router executes the bootstrap program.

After the POST, the bootstrap program is copied from ROM into RAM. Once in RAM, the CPU executes the instructions in the bootstrap program. The main task of the bootstrap program is to locate the Cisco IOS and load it into RAM.


Note

At this point, if you have a console connection to the router, you begin to see output on the screen.


Step 2. Locate and Load Cisco IOS

The IOS is typically stored in flash memory and is copied into RAM for execution by the CPU. After the IOS begins to load, a string of pounds signs (#) will be displayed while the image decompresses.

If the IOS image is not located in flash, then the router may look for it using a TFTP server. If a full IOS image cannot be located, a scaled-down version of the IOS is copied from ROM into RAM. This version of IOS is used to help diagnose any problems and can be used to load a complete version of the IOS into RAM.

Step 3. Locate and Load the Configuration File

The bootstrap program then searches for the startup configuration file (also known as startup-config) in NVRAM. This file has the previously saved configuration commands and parameters. If it exists, then it is copied into RAM as the running configuration file, running-config. The running-config file contains interface addresses, starts routing processes, configures router passwords, and defines other characteristics of the router.

If the startup-config file does not exist in NVRAM, the router may search for a TFTP server. If the router detects that it has an active link to another configured router, it sends a broadcast searching for a configuration file across the active link.

If a TFTP server is not found, then the router displays the setup mode prompt. Setup mode is a series of questions prompting the user for basic configuration information. Setup mode is not intended to be used to enter complex router configurations, and it is not commonly used by network administrators.


Note

Setup mode is not used in this course to configure the router. When prompted to enter setup mode, always answer no. If you answer yes and enter setup mode, press Ctrl-C at any time to terminate the setup process.


Show Version Output (6.3.2.4)

You can use the show version command to verify and troubleshoot some of the basic hardware and software components of the router. The command displays information about the version of the Cisco IOS software currently running on the router, the version of the bootstrap program, and information about the hardware configuration, including the amount of system memory.

The output from the show version command includes

Image IOS version: Version of the Cisco IOS software in RAM and that is being used by the router.

Image ROM Bootstrap Program: Displays the version of the system bootstrap software, stored in ROM, that was initially used to boot up the router.

Image Location of IOS: Displays the version and location of the bootstrap program and the complete filename of the IOS image.

Image CPU and Amount of RAM: The first part of this line displays the type of CPU on this router. The last part of this line displays the amount of DRAM. Some series of routers, such as the Cisco 1941 ISR, use a fraction of DRAM as packet memory. Packet memory is used for buffering packets. To determine the total amount of DRAM on the router, add both numbers.

Image Interfaces: Displays the physical interfaces on the router. In this example, the Cisco 1941 ISR has two Gigabit Ethernet interfaces and two low-speed serial interfaces.

Image Amount of NVRAM and Flash: This is the amount of NVRAM and the amount of flash memory on the router. NVRAM is used to store the startup-config file, and flash is used to permanently store the Cisco IOS.

The last line of the show version command displays the current, configured value of the software configuration register in hexadecimal. If there is a second value displayed in parentheses, it denotes the configuration register value that is used during the next reload.

The configuration register has several uses, including password recovery. The factory default setting for the configuration register is 0x2102. This value indicates that the router attempts to load a Cisco IOS software image from flash memory and load the startup configuration file from NVRAM.


Image

Video 6.3.2.5:

View the video in the online course for a demonstration of the IOS boot process.



Image

Activity 6.3.2.6: The Router Boot Process

Go to the online course and perform the interactive exercise.


Configuring a Cisco Router (6.4)

Networks differ greatly in their design and complexity. Routers can be configured to meet the needs of the network.

Configure Initial Settings (6.4.1)

A router needs to know about the network it will belong to. This essential information must be provided before a router can perform routing tasks.

Router Configuration Steps (6.4.1.1)

Cisco routers and Cisco switches have many similarities. They support a similar modal operating system, support similar command structures, and support many of the same commands. In addition, both devices have identical initial configuration steps when implementing them in a network.

Similar to configuring a switch, the following steps should be completed when configuring initial settings on a router:

1. Assign a device name using the hostname global configuration command.

2. Set passwords:

Image Secure privileged EXEC mode access using the enable secret command.

Image Secure EXEC mode access for console using the login command on the console port, and the password command to set the password.

Image Secure virtual access similar to securing EXEC access mode for console, except on the vty port.

Image Use the service password-encryption global configuration command to prevent passwords from displaying as plain text in the configuration file.

3. Provide legal notification using the banner motd (message of the day [MOTD]) global configuration command.

4. Save the configuration using the copy run start command.

5. Verify the configuration using the show run command.


Image

Activity 6.4.1.1: Configuring a Cisco Router

Go to the online course and click through panels 1 through 4 to see examples of the commands in this section. On panel 5, try your hand at entering the commands in the syntax checker.



Image

Packet Tracer Activity 6.4.1.2: Configure Initial Router Settings

In this activity you will perform basic router configurations. You will secure access to the CLI and console port using encrypted and plain text passwords. You will also configure messages for users logging into the router. These banners also warn unauthorized users that access is prohibited. Finally, you will verify and save your running configuration.


Configure Interfaces (6.4.2)

In this section you will practice configuring LAN and serial interfaces.

Configure LAN Interfaces (6.4.2.1)

For routers to be reachable, router interfaces must be configured. Therefore, to enable a specific interface, enter interface configuration mode using the interface type-and-number global configuration mode command.

There are many different types of interfaces available on Cisco routers. In the example in Figure 6-24, the Cisco 1941 router is equipped with two Gigabit Ethernet interfaces and a serial WAN interface card (WIC) consisting of two interfaces; the interfaces are named as follows:

Image Gigabit Ethernet 0/0 (G0/0)

Image Gigabit Ethernet 0/1 (G0/1)

Image Serial 0/0/0 (S0/0/0)

Image Serial 0/0/1 (S0/0/1)

Image

Figure 6-24 Configuring LAN Interfaces

To enable a router interface, configure the following:

Image IPv4 address and subnet mask: Configures the IP address and subnet mask using the ip address subnet-mask interface configuration command.

Image Activate the interface: By default, LAN and WAN interfaces are not activated. The interface must be activated using the no shutdown command. This is similar to powering on the interface. The interface must also be connected to another device (a hub, a switch, or another router) for the physical layer to be active.

Although not required, it is good practice to configure a description on each interface to help document the network information. The description text is limited to 240 characters. On production networks, a description can be helpful in troubleshooting by providing information about the type of network that the interface is connected to and if there are any other routers on that network. If the interface connects to an ISP or service carrier, it is helpful to enter the third-party connection and contact information.


Image

Activity 6.4.2.1: Configuring a LAN Interface

Go to the online course and click panel 2 to practice entering the commands in the syntax checker. Note that command abbreviations are used for the configuration of Gigabit Ethernet 0/1.


Verify Interface Configuration (6.4.2.2)

There are several commands that can be used to verify interface configuration. The most useful of these is the show ip interface brief command. The output generated displays all interfaces, their IP address, and their current status. The configured and connected interfaces should display a Status of “up” and Protocol of “up.” Anything else would indicate a problem with either the configuration or the cabling.

You can verify connectivity from the interface using the ping command. Cisco routers send five consecutive pings and measure minimal, average, and maximum round-trip times. Exclamation marks verify connectivity.


Image

Activity 6.4.2.2: Commands to Test and Display Active Links and Routes

Go to the online course and click panel 1 to observe output from the show ip interface brief command, the ping command, and the show ip route command.

Note how the show ip interface brief command reveals that the LAN interfaces and the WAN link are all active and operational. Notice that the ping command generated five exclamation marks verifying connectivity to R2.

Panel 2 displays the output of the show ip route command. Notice the three directly connected network entries and the local link interface entries.


Other interface verification commands include

Image show ip route: Displays the contents of the IPv4 routing table stored in RAM

Image show interfaces: Displays statistics for all interfaces on the device

Image show ip interface: Displays the IPv4 statistics for all interfaces on a router

Remember to save the configuration using the copy running-config startup-config (or just type copy run start) command.

Configuring the Default Gateway (6.4.3)

For devices that need to communicate beyond the local network, a default gateway must be identified.

Default Gateway on a Host (6.4.3.1)

Most routers have, at a minimum, two interfaces. Each interface is configured with a separate IP address in a separate network.

For an end device to communicate over the network, it must be configured with the correct IP address information, including the default gateway address. The default gateway is only used when the host wants to send a packet to a device on another network. The default gateway address is generally the router interface address attached to the local network of the host. Although it does not matter what address is actually configured on the router interface, the IP address of the host device and the router interface address must be in the same network.

Figure 6-25 displays a topology of a router with two separate interfaces. Each interface is connected to a separate network. G0/0 is connected to network 192.168.10.0, and G0/1 is connected to network 192.168.11.0. Each host device is configured with the appropriate default gateway address.

Image

Figure 6-25 Local LANs Do Not Use the Default Gateway to Forward Messages.

In Figure 6-25, PC1 sends a packet to PC2. In this example, the default gateway is not used; rather, PC1 addresses the packet with the IP address of PC2 and forwards the packet directly to PC2 through the switch.

In Figure 6-26, PC1 sends a packet to PC3. In this example, PC1 addresses the packet with the IP address of PC3, but then forwards the packet to the router. The router accepts the packet, accesses its route table to determine the appropriate exit interface based on the destination address, and then forwards the packet out of the appropriate interface to reach PC3.

Image

Figure 6-26 Hosts on a LAN Use the Default Gateway to Forward Messages to Remote Networks.

Default Gateway on a Switch (6.4.3.2)

A default gateway is used by all devices that require the use of a router to determine the best path to a remote destination. End devices require default gateway addresses, but so do intermediate devices, such as the Cisco IOS switch.

The IP address information on a switch is only necessary to manage the switch remotely. In other words, to be able to telnet to the switch, the switch must have an IP address to telnet to. If the switch is only accessed from devices within the local network, only an IP address is required.

Configuring the IP address on a switch is done on the switch virtual interface (SVI):

S1(config)# interface vlan1

S1(config-vlan)# ip address 192.168.10.50 255.255.255.0

S1(config-vlan)# no shut

However, if the switch must be accessible by devices in a different network, the switch must be configured with a default gateway address, because packets that originate from the switch are handled just like packets that originate from a host device. Therefore, packets that originate from the switch and are destined for a device on the same network are forwarded directly to the appropriate device. Packets that originate from the switch and are destined for a device on a remote network must be forwarded to the default gateway for path determination.

To configure a default gateway on a switch, use the following global configuration command:

S1(config)# ip default-gateway 192.168.10.1

Figure 6-27 shows an administrator connecting to a switch on a remote network. For the switch to forward response packets to the administrator, the default gateway must be configured.

Image

Figure 6-27 Using the Default Gateway for Remote Connections

A common misconception is that the switch uses its configured default gateway address to determine where to forward packets originating from hosts connected to the switch and destined for hosts on a remote network. Actually, the IP address and default gateway information is only used for packets that originate from the switch. Packets originating from hosts connected to the switch must already have default gateway information configured to communicate on remote networks.


Image

Activity 6.4.3.2: Configuring a Default Gateway on a Switch

Go to the online course and practice configuring a default gateway on a switch.



Image

Packet Tracer Activity 6.4.3.3: Connect a Router to a LAN

In this activity you will use various show commands to display the current state of the router. You will then use the routing table to configure router Ethernet interfaces. Finally, you will use commands to verify and test your configurations.



Image

Packet Tracer Activity 6.4.3.4: Troubleshooting Default Gateway Issues

In this activity you will finish documenting a network. You will then verify the network documentation by testing end-to-end connectivity and troubleshooting issues.



Image

Lab 6.4.3.5: Initializing and Reloading a Router and Switch

In this lab you will set up a topology and initialize devices. You will then configure the devices and verify connectivity. You will finish by displaying device information.


Summary (6.5)


Image

Class Activity 6.5.1.1: Can You Read This Map?

In this activity you will build a network using information from a show ip route command.



Image

Packet Tracer Activity 6.5.1.2: Skills Integration Challenge

In this scenario your network manager is impressed with your performance in your job as a LAN technician. She would like you to now demonstrate your ability to configure a router connecting two LANs. Your tasks include configuring basic settings on a router and a switch using the Cisco IOS. You will then verify your configurations, as well as configurations on existing devices, by testing end-to-end connectivity.


The network layer, or OSI Layer 3, provides services to allow end devices to exchange data across the network. To accomplish this end-to-end transport, the network layer uses four basic processes: IP addressing for end devices, encapsulation, routing, and de-encapsulation.

The Internet is largely based on IPv4, which is still the most widely used network layer protocol. An IPv4 packet contains the IP header and the payload. However, IPv4 has a limited number of unique public IP addresses available. This led to the development of IPv6. The IPv6 simplified header offers several advantages over IPv4, including better routing efficiency, simplified extension headers, and capability for per-flow processing. Plus, IPv6 addresses are based on 128-bit hierarchical addressing as opposed to IPv4 with 32 bits. This dramatically increases the number of available IP addresses.

In addition to hierarchical addressing, the network layer is also responsible for routing. Hosts require a local routing table to ensure that packets are directed to the correct destination network. The local table of a host typically contains the direct connection, the local network route, and the local default route. The local default route is the route to the default gateway.

The default gateway is the IP address of a router interface connected to the local network. When a host needs to forward a packet to a destination address that is not on the same network as the host, the packet is sent to the default gateway for further processing.

When a router, such as the default gateway, receives a packet, it examines the destination IP address to determine the destination network. The routing table of a router stores information about directly connected routes and remote routes to IP networks. If the router has an entry in its routing table for the destination network, the router forwards the packet. If no routing entry exists, the router may forward the packet to its own default route, if one is configured, or it will drop the packet.

Routing table entries can be configured manually on each router to provide static routing, or the routers may communicate route information dynamically between each other using a routing protocol.

In order for routers to be reachable, the router interface must be configured. To enable a specific interface, enter interface configuration mode using the interface type-and-number global configuration mode command.

Practice

The following activities provide practice with the topics introduced in this chapter. The Labs and Class Activities are available in the companion Networking Basics Lab Manual (978-1-58713-313-8). The Packet Tracer Activities PKA files are found in the online course.

Image

Class Activities

Class Activity 6.0.1.2: The Road Less Traveled...or Is It?

Class Activity 6.5.1.1: Can You Read This Map?

Image

Labs

Lab 6.2.2.8: View Host Routing Tables

Lab 6.3.1.9: Exploring Router Physical Characteristics

Lab 6.4.3.5: Initializing and Reloading a Router and Switch

Image

Packet Tracer Activities

Packet Tracer Activity 6.3.1.10: Exploring Internetworking Devices

Packet Tracer Activity 6.4.1.2: Configure Initial Router Settings

Packet Tracer Activity 6.4.4.3: Connect a Router to a LAN

Packet Tracer Activity 6.4.3.4: Troubleshooting Default Gateway Issues

Packet Tracer Activity 6.5.1.2: Skills Integration Challenge

Check Your Understanding

Complete all the review questions listed here to test your understanding of the topics and concepts in this chapter. The appendix, “Answers to the ‘Check Your Understanding’ Questions,” lists the answers.

1. Which device is responsible for determining the path to another network?

A. Switch

B. Router

C. Hub

D. Modem

2. What is true about OSI Layer 3? (Choose two.)

A. It uses data encapsulated in the transport layer.

B. It removes IP information before sending the Layer 3 PDU to the next level.

C. Layer 3 addresses are permanent.

D. Layer 3 addresses are 32 bits in length.

3. Which network protocol is not considered legacy?

A. IPX

B. IPv6

C. AppleTalk

D. DECNet

4. Which protocol provides connectionless network layer services?

A. IP

B. TCP

C. DNS

D. OSI

5. Which of the following are not functions of the network layer? (Choose two.)

A. Routing

B. Addressing packets with an IP address

C. Delivery reliability

D. Application data analysis

E. Encapsulation

F. De-encapsulation

6. Which of the following are true about IP? (Choose three.)

A. It is connection oriented.

B. It is the most common network layer protocol.

C. It analyzes presentation layer data.

D. It operates at OSI Layer 2.

E. It encapsulates transport layer segments.

F. It is media independent.

G. Packet delivery is assured.

7. Which commands can be used to view a host’s routing table? (Choose two.)

A. show ip interface brief

B. route print

C. show ip route

D. show run

E. netstat-r

8. Select three pieces of information about a route that a routing table contains.

A. Next-hop

B. Source address

C. Metric

D. Destination network address

E. Last hop

F. Destination MAC address

9. What kinds of problems are caused by excessive broadcast traffic on a network segment? (Choose three.)

A. Consumes network bandwidth

B. Increases overhead on network

C. Requires complex address schemes

D. Interrupts other host functions

E. Divides networks based on ownership

F. Advanced hardware required

10. Which is a characteristic of the IP protocol?

A. Media dependent

B. Reliable

C. Connectionless

D. Addresses give segments with IP addresses

11. Which of the following are not functions of the network layer? (Choose two.)

A. Routing

B. Addressing packets with an IP address

C. Delivery reliability

D. Application data analysis

E. Encapsulation

F. De-encapsulation

12. Which of the following are true about IP? (Choose two.)

A. IP stands for International Protocol.

B. It is the most common network layer protocol.

C. It analyzes presentation layer data.

D. It operates at OSI Layer 2.

E. It encapsulates transport layer segments.

13. What is the name of the process of removing the OSI Layer 2 information from an IP packet?

A. Frame fragmenting

B. Bit dropping

C. De-encapsulation

D. De-segmenting

14. Which of the following is true about IP?

A. It is connection oriented.

B. It uses application data to determine the best path.

C. It is used by both routers and hosts.

D. It is reliable.

15. Which of the following are true about the network layer encapsulation process? (Choose two.)

A. It adds a header to a segment.

B. It can happen many times on the path to the destination host.

C. It is performed by the last router on the path.

D. Both source and destination IP addresses are added.

E. It encapsulates transport layer information into a frame.

16. Which of the following are true about TCP and IP? (Choose two.)

A. TCP is connectionless and IP is connection oriented.

B. TCP is reliable and IP is unreliable.

C. IP is connectionless and TCP is connection oriented.

D. TCP is unreliable and IP is reliable.

E. IP operates at the transport layer.

17. Why is IP “media independent”?

A. It encapsulates Layer 1 instructions.

B. It works the same on all Layer 1 media.

C. It carries both video and voice data.

D. It works without Layer 1 media.

18. TCP is an OSI Layer __________ protocol.

A. 3

B. 5

C. 4

D. 6

E. 7

19. How many bits are in an IPv4 address?

A. 20

B. 8

C. 32

D. 64

E. 128

20. Which statement is true about local default routes?

A. They forward LAN traffic to the proper local host.

B. They are configured on the first physical interface of a switch.

C. They are configured on router interfaces.

D. They send packets that do not match in the routing table to the default gateway.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.240.80