Sie sind auf Seite 1von 64

Chapter 5 - OSI Network Layer

CCNA Exploration version 4.0


Overview

• Identify the role of the Network Layer, as it describes


communication from one end device to another end device
• Examine the most common Network Layer protocol, Internet
Protocol (IP), and its features for providing connectionless and
best-effort service
• Understand the principles used to guide the division or grouping
of devices into networks
• Understand the hierarchical addressing of devices and how this
allows communication between networks
• Understand the fundamentals of routes, next hop addresses and
packet forwarding to a destination network

Học viện mạng Bách khoa - Website: www.bkacad.com 2


Network Layer Protocols and Internet Protocol (IP)

• Define the basic role of the Network Layer in data networks


• 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 allows its contents to be
passed to the destination within a network or on another network with
minimum overhead.
Học viện mạng Bách khoa - Website: www.bkacad.com 3
Network Layer – Communication from Host to Host

• Layer 3 uses four basic processes:


1. Addressing
2. Encapsulation
3. Routing: Intermediary devices that connect the networks are called
routers. The role of the router is to select paths for and direct packets
toward their destination. This process is known as routing.
4. Decapsulation
( Refer to 5.1.1 )

Học viện mạng Bách khoa - Website: www.bkacad.com 4


Network Layer Protocols

• Protocols implemented at the Network layer that carry user


data include:
– Internet Protocol version 4 (IPv4)*
– Internet Protocol version 6 (IPv6)*
– Novell Internetwork Packet Exchange (IPX).
– AppleTalk.
– Connectionless Network Service (CLNS/DECNet).

Học viện mạng Bách khoa - Website: www.bkacad.com 5


The roles of IPv4 protocol

• IPv4 is currently the most widely-used version of IP


• The Internet Protocol 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 are performed by other protocols in
other layers.
• IPv4 basic characteristic
– Connectionless.
– Best-effort.
– Media Independent.

Học viện mạng Bách khoa - Website: www.bkacad.com 6


The IPv4 protocol – Connectionless

• Describe the implications for the use of the IP protocol


as it is connectionless.

Học viện mạng Bách khoa - Website: www.bkacad.com 7


The IPv4 protocol – Best Effort

• Describe the implications for


the use of the IP protocol as it
is considered an unreliable
protocol
• Unreliable means simply that
IP does not have the
capability to manage, and
recover from, undelivered or
corrupt packets.
• Since protocols at other
layers can manage reliability,
IP is allowed to function very
efficiently at the Network
layer.

Học viện mạng Bách khoa - Website: www.bkacad.com 8


The IPv4 protocol – Media independent

• Describe the implications for the


use of the IP as it is media
independent
• One major characteristic of the
media that the Network layer
considers: the maximum size of
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.

Học viện mạng Bách khoa - Website: www.bkacad.com 9


IPv4 packet – Packaging the Transport layer PD

• In some cases, an intermediary device - usually a router - will


need to split up a packet when forwarding it from one media to a
media with a smaller MTU. This process is called fragmenting the
packet or fragmentation.

Học viện mạng Bách khoa - Website: www.bkacad.com 10


IPv4 packet header

• Identify the major header fields in the IPv4 protocol


and describe each field's role in transporting packets

Học viện mạng Bách khoa - Website: www.bkacad.com 11


Network Layer Fields

• 4 bits
• Indicates version of IP used
• IPv4: 0100; IPv6: 0110

Học viện mạng Bách khoa - Website: www.bkacad.com 12


Network Layer Fields

• 4 bits
• Indicates datagram header length in 32 bit words

Học viện mạng Bách khoa - Website: www.bkacad.com 13


Network Layer Fields

• 8 bits
• Specifies the level of importance that has been
assigned by upper-layer protocol

Học viện mạng Bách khoa - Website: www.bkacad.com 14


Network Layer Fields

• 16 bits
• Specifies the length of the entire packet in bytes,
including data and header

Học viện mạng Bách khoa - Website: www.bkacad.com 15


Network Layer Fields

• 16 bits
• Identifies the current datagram

Học viện mạng Bách khoa - Website: www.bkacad.com 16


Network Layer Fields

• 3 bits(R, DF. MF)


– R(reserved): set to 0.
– DF(Don’t fragment):
• 0: Fragment if necessary.
• 1: Do not fragment.
– MF(More fragment):
• 0: This is the last fragment.
• 1: More fragment follow this fragment.
Học viện mạng Bách khoa - Website: www.bkacad.com 17
Network Layer Fields

• 13 bits
• Used to help piece together datagram
fragments

Học viện mạng Bách khoa - Website: www.bkacad.com 18


Network Layer Fields

• 8 bits
• Specifies the number of hops a packet may travel. This
number is decreased by one as the packet travels through a
router

Học viện mạng Bách khoa - Website: www.bkacad.com 19


Network Layer Fields

• 8 bits
• Indicates which upper-layer protocol, such as TCP(6) or
UDP(17), receives incoming packets after IP processing has
been completed

Học viện mạng Bách khoa - Website: www.bkacad.com 20


Network Layer Fields

• 16 bits
• Helps ensure IP header integrity
• Not caculated for the encapsulation data

Học viện mạng Bách khoa - Website: www.bkacad.com 21


Network Layer Fields

• 32 bits
• Specifies the sending node IP address

Học viện mạng Bách khoa - Website: www.bkacad.com 22


Network Layer Fields

• 32 bits
• Specifies the receiving node IP address

Học viện mạng Bách khoa - Website: www.bkacad.com 23


Network Layer Fields

• Variable length
• Allows IP to support various options, such as security

Học viện mạng Bách khoa - Website: www.bkacad.com 24


Network Layer Fields

• Variable length
• Extra zeros are added to this field to ensure that the
IP header is always a multiple of 32 bits.

Học viện mạng Bách khoa - Website: www.bkacad.com 25


Network Layer Fields

• Variable length up to 64 Kb
• Contains upper-layer information

Học viện mạng Bách khoa - Website: www.bkacad.com 26


Grouping Devices into Networks

• Reasons for grouping devices into sub-networks and


define several terms used to identify the sub-networks
– Geographic

Học viện mạng Bách khoa - Website: www.bkacad.com 27


Grouping Devices into Networks

• Reasons for grouping devices into sub-networks and


define several terms used to identify the sub-networks
– Purpose

Học viện mạng Bách khoa - Website: www.bkacad.com 28


Grouping Devices into Networks

• List several different reasons for grouping devices into


sub-networks and define several terms used to identify
the sub-networks
– Ownership

Học viện mạng Bách khoa - Website: www.bkacad.com 29


Grouping Devices into Networks

• Reasons for grouping devices into sub-networks and


define several terms used to identify the sub-networks
– Ownership

Học viện mạng Bách khoa - Website: www.bkacad.com 30


Broadcast domain ? - Performance

• A broadcast is a message sent from one host to all


other hosts on the network.
• Managing the size of broadcast domains by dividing a
network into subnets or replace switch by router.

Học viện mạng Bách khoa - Website: www.bkacad.com 31


Why separate hosts into networks ? - Security

• List several ways in which dividing a large network can


increase network security

Học viện mạng Bách khoa - Website: www.bkacad.com 32


Grouping Devices into Networks
• Explain the communication problems that emerge
when very large numbers of devices are included in
one large network.

Học viện mạng Bách khoa - Website: www.bkacad.com 33


Hierarchical Addressing

• Hierarchical addressing solves the problem of devices


communicating across networks of networks.

Học viện mạng Bách khoa - Website: www.bkacad.com 34


Hierarchical Addressing

• Router only need to know network portion(network


address) to indicate the best path to reach the
network.

Học viện mạng Bách khoa - Website: www.bkacad.com 35


Routing Protocols

• Routing is an OSI Layer 3


function. It is a hierarchical
scheme and allows individual
addresses to be group
together.

• Routing is the process of


finding the most efficient path
from one device to another.

Học viện mạng Bách khoa - Website: www.bkacad.com 36


Routing Metrics

• Two key functions of a router:


– Maintain routing tables and make sure other routers know of changes in
the network topology.
– Use the routing table to determine where to send them
• Routing metrics are values used in determining the advantage of one route
over another. They use various combinations of metrics for determining the
best path for data.
Học viện mạng Bách khoa - Website: www.bkacad.com 37
Routing vs Switching

• Switching occurs at
Layer 2, routing
occurs at Layer 3.

• Routing and switching


use different
information in the
process of moving
data from source to
destination.
Học viện mạng Bách khoa - Website: www.bkacad.com 38
Routing and Layer 2 Switching

Học viện mạng Bách khoa - Website: www.bkacad.com 39


Router and Switch

• Each computer and router interface maintains an ARP table for Layer 2
communication. The ARP table is only effective for the broadcast
domain (or LAN) that it is connected to
• MAC addresses are not logically organized, but IP addresses are
organized in a hierarchical manner.

Học viện mạng Bách khoa - Website: www.bkacad.com 40


Routed versus Routing

• Routed protocol: used at the network layer that transfer data from one host
to another across a router.
• Routing protocols: allow routers to choose the best path for data from
source to destination
Examples: Internet Protocol (IP); Novell's Internetwork Packet Exchange
(IPX); DECnet, AppleTalk, Banyan VINES, and Xerox Network Systems
(XNS). Học viện mạng Bách khoa - Website: www.bkacad.com 41
Routing protocol

• Provides processes for sharing route information.


• Allows routers to communicate with other routers to update and maintain
the routing tables
• Examples: Routing Information Protocol (RIP), Interior Gateway Routing
Protocol (IGRP), Open Shortest Path First (OSPF), Border Gateway
Protocol (BGP) and Enhanced IGRP (EIGRP).
Học viện mạng Bách khoa - Website: www.bkacad.com 42
Default Gateway Address

• Default Gateway address is used by hosts in local


network to communicate with another ones in remote
network.
• Netstat –r and route print command.

Học viện mạng Bách khoa - Website: www.bkacad.com 43


IP packet – Carrying Data End to End

• Trace the steps of an IP packet as it traverses


unchanged via routers from sub network to sub-
network.
• Refer to 5.3.2.1

Học viện mạng Bách khoa - Website: www.bkacad.com 44


IP packet – Carrying Data End to End

Học viện mạng Bách khoa - Website: www.bkacad.com 45


IP packet – Carrying Data End to End

Học viện mạng Bách khoa - Website: www.bkacad.com 46


IP packet – Carrying Data End to End

Học viện mạng Bách khoa - Website: www.bkacad.com 47


IP packet – Carrying Data End to End

Học viện mạng Bách khoa - Website: www.bkacad.com 48


IP packet – Carrying Data End to End

Học viện mạng Bách khoa - Website: www.bkacad.com 49


Manually configure default gateway on PC

Học viện mạng Bách khoa - Website: www.bkacad.com 50


A gateway – the way out of our network

Học viện mạng Bách khoa - Website: www.bkacad.com 51


Routes, Next Hop Addresses and Packet Forwarding ?

• Describe the role of a gateway and the use of a simple


route table in directing packets toward their ultimate
destinations

Học viện mạng Bách khoa - Website: www.bkacad.com 52


Routes, Next Hop Addresses and Packet Forwarding ?

• Define a route and its three key parts

Học viện mạng Bách khoa - Website: www.bkacad.com 53


Routes, Next Hop Addresses and Packet Forwarding ?

• Routes in routing table include 3 main


features(Destination Network, Next-Hop and Metric)
• Use “show ip route” to display routing table in Cisco
CLI.

Học viện mạng Bách khoa - Website: www.bkacad.com 54


Routes, Next Hop Addresses and Packet Forwarding ?

• Describe the purpose and use of the next hop in a


route.

Học viện mạng Bách khoa - Website: www.bkacad.com 55


Default route

Refer to
5.3.5.2

• A router can be configured to have a default route. A default route


is a route that will match all destination networks.
• In IPv4 networks, the address 0.0.0.0 is used for this purpose.
The default route is used to forward packets for which there is no
entry in the routing table for the destination network.
• Packets with a destination network address that does not match a
more specific route in the routing table are forwarded to the next-
hop router associated with the default route.
Học viện mạng Bách khoa - Website: www.bkacad.com 56
Host Routing Table

• A host creates the routes used


to forward the packets it
originates. These routes are
derived from the connected
network and the configuration
Route print
of the default gateway.
• Hosts automatically add all
connected networks to the
host’s routing table. These
routes for the local networks
allow packets to be delivered
to hosts that are connected to
these networks.

Học viện mạng Bách khoa - Website: www.bkacad.com 57


Routes, Next Hop Addresses and Packet Forwarding ?

• Tracert example

Học viện mạng Bách khoa - Website: www.bkacad.com 58


Static route

• Two types of route:


– Static route.
– Dynamic route.

Học viện mạng Bách khoa - Website: www.bkacad.com 59


Dynamic routing

Học viện mạng Bách khoa - Website: www.bkacad.com 60


IGP and EGP

• Autonomous system is a network or set of networks under common


administrative control. An autonomous system consists of routers that present
a consistent view of routing to the external world.
• Interior Gateway Protocols (IGP): route data within an autonomous system. Eg:
RIP and RIPv2; IGRP; EIGRP; OSPF; IS-IS;
• Exterior Gateway Protocols (EGP): route data between autonomous systems.
Eg: BGP Học viện mạng Bách khoa - Website: www.bkacad.com 61
Labs

Học viện mạng Bách khoa - Website: www.bkacad.com 62


Học viện mạng Bách khoa - Website: www.bkacad.com 63
Học viện mạng Bách khoa - Website: www.bkacad.com 64

Das könnte Ihnen auch gefallen