1 of 25

Module 8: Network Layer &�Module 13: ICMP

CCNA Routing and Switching:

Introduction to Networks v7.0 (ITN)

This Slides is prepared by:

Eng. Rawan Aljamal

​

Cisco Certified CCNA Instructor Trainer

​

1

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

2 of 25

The Network Layer

  • The function of the network layer is to facilitate the transport of data from one network to another.
  • IP version 4 (IPv4) and IP version 6 (IPv6) are the principal network layer communication protocols.
  • The network layer performs four basic operations:
    • Addressing end devices (determine address structure)
    • Encapsulation into packets
    • Routing
    • De-encapsulation

2

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

3 of 25

IP Encapsulation

  • IP encapsulates the transport layer segment.
  • IP can use either an IPv4 or IPv6 packet and not impact the layer 4 segment.
  • IP packet will be examined by all layer 3 devices as it traverses the network.
  • The IP addressing does not change from source to destination.

​

Protocol Data Unit (PDU)

Layer 5 and above, the PDU is referred to as data.

Layer 4, the PDU of the Transport Layer is referred to as a segment.

Layer 3, the PDU of the Network Layer is referred to as a packet.

Layer 2, the PDU of the Data Link Layer is referred to as a frame.

Layer 1, the PDU of the Physical Layer is referred to as bit (1s or 0s).

3

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

4 of 25

IP is Connectionless

  • IP does not establish a connection with the destination before sending the packet.
  • There is no control information needed (synchronizations, acknowledgments, etc.).
  • The destination will receive the packet when it arrives, but no pre-notifications are sent by IP.
  • If there is a need for connection-oriented traffic, then another protocol will handle this (typically TCP at the transport layer).

4

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

5 of 25

IP is Best Effort

  • Best effort mean IP will try its best to deliver your packet, but there is no guarantee for packet delivery.
  • IP has reduced overhead since there is no header fields for reliability, such as error control fields.
  • IP does not know if the destination is present and functional when sending packets. In addition, it is unaware if the destination received the packet or whether packets reaches without errors.

5

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

6 of 25

IP is Unreliable

    • It cannot manage or fix undelivered or corrupt packets.
    • IP cannot retransmit after an error.
    • IP cannot realign out of sequence packets.
    • IP does not expect acknowledgments.
    • IP must rely on upper layer protocols for these functions.

​

6

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

7 of 25

IP is Media Independent

    • IP does not concern itself with the type of frame required at the data link layer or the media type at the physical layer.
    • IP can be sent over any media type: copper, fiber, or wireless.
    • There is, however, one major characteristic of the media that the network layer considers: the PDU maximum size that each medium can transport, i.e., Maximum Transmission Unit (MTU).
    • Fragmentation, which is to split up an IPv4 packet, may occur when the frame need to send to another network segment with smaller MTU.

7

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

8 of 25

IPv4 Packet Header

IPv4 is one of the primary communication protocol for the network layer.

The IPv4 header consists of a variable-length header of 20 octets (up to 60 bytes if the Options field is used).

The network header has many purposes:

    • It ensures the packet is sent in the correct direction (IP addresses).
    • It contains information for network layer processing in various fields.

8

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

9 of 25

IPv4 Packet Header Fields

Function

Description

Version

This will be for v4, as opposed to v6, a 4-bit field= 0100

Differentiated Services

Used for QoS

Header Checksum

Detect corruption in the IPv4 header

Time to Live (TTL)

Layer 3 hop count. Used to prevent a packet from traversing a network endlessly. When it becomes zero the router will discard the packet.

Protocol

I.D.s next level protocol: ICMP, TCP, UDP, etc.

Source IPv4 Address

32-bit source address

Destination IPV4 Address

32-bit destination address

9

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

10 of 25

Limitations of IPv4

IPv4 has three major limitations:

    • IPv4 address depletion استنفاذ. IPv4 addressing has basically run out.

​

    • Lack of end-to-end connectivity. To make IPv4 survive this long, private addressing and NAT were created. This ended direct communications with public addressing.

​

    • Increased network complexity. NAT was meant as temporary solution and creates issues on the network as a side effect of manipulating the network headers addressing. NAT causes latency and troubleshooting issues.

​

10

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

11 of 25

IPv6 Overview

  • IPv6 was developed by Internet Engineering Task Force (IETF).
  • IPv6 overcomes the limitations of IPv4.
  • Improvements that IPv6 provides:
    • Increased address space – based on 128-bit address, not 32 bits.
    • Improved packet handling – simplified header with fewer fields.
    • Eliminates the need for NAT – since there is a huge amount of addressing, there is no need to use private addressing internally and be mapped to a shared public address.

​

11

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

12 of 25

IPv6 Packet Header Fields

  • The IPv6 header is simplified.
  • The IPv6 header is fixed at 40 Bytes.
  • Some IPv4 fields have remained the same, and some fields have changed names and positions.
  • Some IPv4 fields were removed to improve performance:
    • Flag
    • Fragment Offset
    • Header Checksum

​

12

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

13 of 25

IPv6 Packet Header

Significant fields in the IPv6 header:

​

Function

Description

Version

This will be for v6, as opposed to v4, a 4-bit field= 0110

Traffic Class

Used for QoS

Payload Length

This 16-bit field indicates the length of the data portion or payload of the IPv6 packet

Next Header

I.D.s next level protocol: ICMP, TCP, UDP, etc.

Hop Limit

Replaces TTL field Layer 3 hop count

Source IPv4 Address

128 bit source address

Destination IPV4 Address

128 bit destination address

13

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

14 of 25

How a Host Routes

14

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

14

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

14

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

15 of 25

Host Forwarding Decision

  • Each host devices creates their own routing table.
  • A host can send packets to the following:
    • Itself – 127.0.0.1 (IPv4), ::1 (IPv6)

To test if the TCP/IP stack on the device is working correctly.

    • Local Hosts – destination is on the same LAN

Local traffic is dumped out the host interface to be handled by an intermediary device (typically a switch).

    • Remote Hosts – devices are not on the same LAN

Remote traffic is forwarded directly to the default gateway on the LAN.

  • The Source device determines whether the destination is local or remote by the following methods:
    • IPv4 – Source uses its own IP address and Subnet mask, along with the destination IP address
    • IPv6 – Source uses the network address and prefix advertised by the local router

​

15

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

16 of 25

Host IP configuration in Packet Tracer

16

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

16

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

16

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

17 of 25

Introduction to Routing

17

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

17

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

17

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

18 of 25

Router Packet Forwarding Decision

At each hop along the path, a router performs the following steps:

    • Receives a frame from the network medium.
    • Checks the frame for errors using Cyclic Redundancy Check (CRC)
    • Decapsulates the layer 2 header to expose the encapsulated packet.
    • Decrements the TTL value in the layer 3 header by 1, if it reach 0 then the router send ICMP unreachable message to the sending device.
    • Reads the destination IP in the layer 3 header.
    • Searches in the Routing table for a route, if not exist, searching for a last resort route, if not exist the router will drop the packet.
    • After finding a route, the router will recapsulates the packet into a new frame. This frame will fit the network medium of the exit interface that is linked to the route.
    • Forwards the new frame on the medium of the next network segment.

​

​

18

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

19 of 25

IP Router Routing Table

There are types of routes in a router’s routing table:

  • Directly Connected – These routes are automatically added by the router for the interfaces that are configured with IP addresses and activated.
  • Remote – These are the routes that the router does not have a direct connection and may be learned:
    • Manually – with a static route.
    • Dynamically – by using a routing protocol to have the routers share their information with each other.
  • Default Route – this forwards all traffic to a specific direction when there is no match in the routing table.

19

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

20 of 25

ICMP

20

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

20

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

20

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

21 of 25

ICMPv4 and ICMPv6 Messages

  • Internet Control Message Protocol (ICMP) provides feedback about issues related to the processing of IP packets under certain conditions.

​

  • ICMP is available for both IPv4 and IPv6.

​

  • The ICMP messages common to both ICMPv4 and ICMPv6 include:
      • Host reachability: Echo (ping) messages.
      • Destination or Service Unreachable: gateway receives a packet that it cannot deliver.
      • Time exceeded: Time-to-Live (TTL) field of the packet has been decremented to 0.

​

21

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

22 of 25

Host Reachability

  • ICMP Echo Messages are used to test the reachability of a host on an IP network.

In the example:

      • The local host sends an ICMP Echo Request to a host.
      • If the host is available, the destination host responds with an Echo Reply.
  • This use of the ICMP Echo messages is the basis of the ping utility.

22

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

23 of 25

ICMP in Packet Tracer

23

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

23

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

23

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

24 of 25

Suggested Lab Work

Page #

Activity Name

13.2.6

Verify IPv4 and IPv6 Addressing

13.2.7

Use Ping and Traceroute to Test Network Connectivity

13.3.1

Use ICMP to Test and Correct Network Connectivity

24

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

25 of 25

25

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential