Chapter 6 Network layer (4. A router is a computer (Just like computers,…
Chapter 6 Network layer
Configure Router Interfaces
show ip interface
- Displays the IPv4 statistics for all interfaces on a router
- Displays statistics for all interfaces on the device.
show ip route
- Displays the contents of the IPv4 routing table stored in RAM.
show ip interface brief
command output displays all interfaces, their IPv4 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.
Default Gateway for a Switch
Layer 2 switch does not require an IP address to function properly. However, if you wish to connect to the switch and administratively manage it over multiple networks, you will need to configure the SVI with an IPv4 address, subnet mask, and default gateway address.
To configure a default gateway on a switch, use the
global configuration command.
4. A router is a computer
Router Bootup Process
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.
3. Locate and load the startup configuration file or enter setup mode.
The bootstrap program then copies the startup configuration file from NVRAM into RAM. This becomes the running configuration. If the startup configuration file does not exist in NVRAM, the router may be configured to search for a TFTP server. If a TFTP server is not found, then the router displays the setup mode prompt.
2. Locate and load the Cisco IOS software.
The IOS is typically stored in flash memory and is copied into RAM for execution by the CPU. If the IOS image is not located in flash, then the router may look for it using a Trivial File Transfer Protocol (TFTP) server. If a full IOS image cannot be located, a limited IOS is copied into RAM, which can be used to diagnose problems and transfer a full IOS into Flash memory.
1. Perform the POST and load the bootstrap program
(POST), the router executes diagnostics from ROM on several hardware components, including the CPU, RAM, and NVRAM. After the POST, the bootstrap program is copied from ROM into RAM.
The main task of the bootstrap program is to locate the Cisco IOS and load it into RAM.
At this point, if you have a console connection to the router, you begin to see the output on the screen.
Just like computers, tablets, and smart devices, routers also require:
A router has access to volatile or non-volatile memory storage. Volatile memory requires continual power to maintain its information. When the router is powered down or restarted, the content is erased and lost. Non-volatile memory retains its information even when a device is rebooted.
- This non-volatile computer memory used as permanent storage for the IOS and other system related files such as log files, voice configuration files, HTML files, backup configurations, and more. When a router is rebooted, the IOS is copied from flash into RAM.
– This is non-volatile memory is used as the permanent storage for the startup configuration file (startup-config).
- This non-volatile memory is used to store crucial operational instructions and a limited IOS. Specifically, ROM is
on an integrated circuit inside the router which can only be altered by Cisco. Click ROM in the figure to view more information.
- This is volatile memory used in Cisco routers to store applications, processes, and data needed to be executed by the CPU. Cisco routers use a fast type of RAM called synchronous dynamic random access memory (SDRAM)
Operating systems (
): The Cisco Internetwork Operating System (IOS) is the system software used for most Cisco devices
Cisco routers are designed to address the needs of many different types of businesses and networks
- Large service providers. Includes Cisco ASR, Cisco CRS-3 Carrier Routing System, and 7600 Series routers.
- Large businesses, organizations, and enterprises. Includes the Cisco Catalyst Series Switches and the Cisco Aggregation Services Routers (ASR).
- Teleworkers, small businesses, and medium-size branch sites. Includes Cisco Integrated Services Routers (ISR) G2 (2nd generation).
How a host Routes
IPv4 Router Routing Table
R1#show ip route
command can be used to display the router’s IPv4 routing table
If there are two or more possible routes to the same destination, the metric is used to decide which route appears in the routing table.
This route provides routing information for directly-connected networks and remote networks
• Information on how the route was learned
• The trustworthiness and rating of the route
• When the route was last updated
• Which interface to use to reach the requested destination.
Remote Network Routing Table Entries
Directly Connected Routing Table Entries
- Identifies that this is a local interface. This is the IPv4 address of the interface on the router.
- Identifies a directly-connected network. Directly-connected networks are automatically created when an interface is configured with an IP address and activated.
will typically include a default gateway.
Host Routing Tables
When a host sends a packet to another host, it will use 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
When a packet arrives at the default gateway, the router looks at its routing table to determine where to forward packets.
The routing table of a router can store information about:
– Like a host, routers also use a default route as a
if there is no other route to the desired network in the routing table.
- These routes come from remote networks connected to other routers. Routes to these networks can be 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 a dynamic routing protocol.
- 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.
On a Windows host, the
command can be used to display the host routing table. Both commands generate the same output.
- 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
IPv4 Route Table
- Lists all known IPv4 routes, including direct connections, local network, and local default routes.
IPv6 Route Table
- Lists all known IPv6 routes, including direct connections, local network, and local default routes.
A host can send a packet to:
- This is a host on a remote network. The hosts do not share the same network address.
When a source device sends a packet to a remote destination device, then the help of routers and routing is needed
is the process of identifying the best path to a destination.
The router connected to the local network segment is referred to as the
Can take data in and forward data out
It has a local IP address in the same address range as other host on the network
The default gateway is the network device that can route traffic to other networks.
- This is a host on the same local network as the sending host. The hosts share the same network address.
: A host can ping itself by sending a packet to a special IPv4 address of
, which is referred to as the loopback interface. Pinging the
interface tests the TCP/IP protocol stack on the host.
2 Network Layer Protocols
IP was designed as a protocol with
. It provides only the functions that are necessary to
deliver a packet from a source to a destination
over an interconnected system of networks
Unlike IPv4, routers do not fragment routed IPv6 packets.
IPv6 packet headers
An IPv6 packet may also contain extension headers (EH), which provide optional network layer information. Extension headers are optional and are placed between the IPv6 header and the payload. EHs are used for fragmentation, security, to support mobility and more.
Destination IPv6 Address
- This 128-bit field identifies the IPv6 address of the receiving host.
Source IPv6 Address
- This 128-bit field identifies the IPv6 address of the sending host.
- This 8-bit field replaces the IPv4 TTL field. This value is decremented by a value of 1 by each router that forwards the packet. When the counter reaches 0, the packet is discarded, and an ICMPv6 Time Exceeded message is forwarded to the sending host, indicating that the packet did not reach its destination because the hop limit was exceeded.
- 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 16-bit field indicates the length of the data portion or payload of the IPv6 packet.
- This 20-bit field suggests that all packets with the same flow label receive the same type of handling by routers.
- This 8-bit field is equivalent to the IPv4 Differentiated Services (DS) field.
- This field contains a 4-bit binary value set to 0110 that identifies this as an IP version 6 packet.
IPv6 overcomes the limitations of IPv4 and is a powerful enhancement with features that better suit current and foreseeable network demands
Eliminates the need for NAT
- With such a large number of public IPv6 addresses, NAT between a private IPv4 address and a public IPv4 is not needed. This avoids some of the NAT-induced application problems experienced by applications requiring end-to-end connectivity.
Increased address space
- IPv6 addresses are based on
hierarchical addressing as opposed to IPv4 with 32 bits.
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
Improved packet handling
- The IPv6 header has been simplified with fewer fields.
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 IPv4 address. However, because the public IPv4 address is shared, the IPv4 address of an internal network host is hidden. This can be problematic for technologies that require end-to-end connectivity.
Internet routing table expansion
- A routing table is used by routers to make best path determinations. As the number of servers 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
IP address depletion
- IPv4 has a limited number of unique public IPv4 addresses available
IPv4 packet headers
the IPv4 packet uses Identification, Flags, and Fragment Offset fields to keep track of the fragments
The Internet Header Length (IHL), Total Length, and Header Checksum fields are used to identify and validate the packet
Destination IPv4 Address
- Contains a 32-bit binary value that represents the destination IPv4 address of the packet. The destination IPv4 address is a unicast, multicast, or broadcast address.
Source IPv4 Address
- Contains a 32-bit binary value that represents the source IPv4 address of the packet. The source IPv4 address is always a unicast address.
- Field is used to identify the next level protocol. This
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 (1), TCP (6), and UDP (17).
) - Contains an
binary value that is used to limit the lifetime of a packet. The packet sender sets the initial TTL value, and it is decreased by one each time the packet is processed by a router. If the TTL field decrements to zero, the router discards the packet and sends an Internet Control Message Protocol (
) Time Exceeded message to the source IP address
Differentiated Services or
(DS) - Formerly called the Type of Service (
) field, the DS field is an
field used to determine the priority of each packet. The six most significant bits of the DiffServ field is the Differentiated Services Code Point (
) and the last two bits are the Explicit Congestion Notification (
Diffserv is a set of technologies that a allows a services provider to offer diverse levels of Quality of Service (
) to different clients and traffic
4 more items...
- Contains a
binary value set to
that identifies this as an IP version 4 packet.
The protocol was not designed to track and manage the flow of packets
. These functions, if required, are performed by other protocols at other layers, primarily TCP at Layer 4.
: Operation is independent of the medium carrying the data.
, one major characteristic of the media that the network layer considers: the
maximum size of the PDU
that each medium can transport.
In some cases, an intermediate device, usually a router, must split up a packet when forwarding it from one medium to another medium with a smaller MTU. This process is called fragmenting the packet or
The data link layer passes the MTU value up to the network layer. The network layer then determines how large packets can be.
This characteristic is referred to as the maximum transmission unit (
: IP is inherently unreliable because packet delivery is not guaranteed.
: No connection with the destination is established before sending data packets.
Layer 3 provides services to allow end devices to exchange data across the network.
Unlike the transport layer, 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.
- When the packet arrives at the network layer of 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. After the packet is de-encapsulated by the network layer, the resulting Layer 4 PDU is passed up to the appropriate service at the transport layer.
- 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 the best path 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 router a packet crosses to reach the destination host is called a hop.
- The network layer encapsulates the protocol data unit from the transport layer into a packet. The encapsulation process adds IP header information, such as the IP address of the source (sending) and destination (receiving) hosts.
Addressing end devices
- End devices must be configured with a unique IP address for identification on the network.