Overview ° Identify the role of the Network Layer, as it describes communication from one end device to another end device e Examine the most common Network Layer protocol, Internet
Trang 1Chapter 5 - OSI Network Layer
_JIIlllllÍllIIIIlll((lIIIIUIl((lIIIUIIllIIIUUIIIlIIIIIUIIIIIIUUIUIII ee NE
CCNA Exploration version 4.0
s1[t1ostj1, Cisco
Trang 2Overview
° Identify the role of the Network Layer, as it describes
communication from one end device to another end device
e Examine the most common Network Layer protocol, Internet
Protocol (IP), and its features for providing connectionless and
best-effort service
e Understand the principles used to guide the division or grouping
of devices into networks
e Understand the hierarchical addressing of devices and how this
allows communication between networks
e Understand the fundamentals of routes, next hop addresses and
packet forwarding to a destination network
Hoc vién mang Bach khoa - Website: www.bkacad.com
Trang 3Network Layer Protocols and Internet Protocol (IP)
/ll((l(lllllllIllllIIlIlIIUIlllIIlllllIIlIIIIIlllI BACHKHOA NETWORKING ACADEMY
BE The Network Layer
_Application } As we communicate our data
—
Network “=———— And the Network layer
Data Link enables devices to reach
each other!
Physical |
Routers connected to each other
° Define the basic role of the Network Layer in data networks
e The protocols of the OSI model Network layer specity,addressing and
processes that enable Transport layer data to be packaged and
transported The Network layer encapsulation allows its contents to be
oassed to the destination within a network or on another network with
minimum overhead
Hoc vién mang Bach khoa - Website: www.bkacad.com
Trang 4Network Layer — Communication from Host to Host
_ ,IllIIlllllllllllIIIlIllIIII(IIIIIlIIIllIIIlIMI BACHKHOA NETWORKING ACADEMY
e 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
Trang 5Network Layer Protocols
SKK TTT Sc RETRO aE
° 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)
Hoc vién mang Bach khoa - Website: www.bkacad.com
Trang 6The roles of IPv4 protocol
EEEREETTTTTTTTTTTTTTTTTTTTTTTTI
e |Pv4 is currently the most widely-used version of IP
e 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
e The protocol was not designed to track and manage the flow of
packets These functions are performed by other protocols in
Trang 7The IPv4 protocol — Connectionless
_. ,IllI(llllllllllIlIlIIlIIIIIIIIIIIIIIllIIIlIU BACHKHOA NETWORKING ACADEMY
° Describe the implications for the use of the IP protocol
as it is connectionless
Connectionless Communication
The receiver doesn't know:
» ifthe receiver is present * when it is coming
¢ ifthe letter arrived
¢ ifthe receiver can read the letter
a1
A packet is sent
The sender doesn"t know: The receiver doesn't know:
« ifthe receiver is present « when it is coming
* ifthe packet arrived
* ifthe receiver can read the
packet
Hoc vién mang Bach khoa - Website: www.bkacad.com
Trang 8The IPv4 protocol — Best Effort
° Describe the implications for
the use of the IP protocol as it
capability to manage, and — |
corrupt packets
layers can manage reliability, cee epssting tet celven
IP is allowed to function very
efficiently at the Network
layer
As an unreliable Network layer protocol, IP does not guarantee
that all sent packets will be received
Hoc vién mang Bach khoa - Website: www.bkacad.com
Trang 9
The IPv4 protocol — Media independent
_,IllÌIÍlllllllllllIlIlIIIIIlIlIIIIIIIIIIlIIIlllU BACHKHOA NETWORKING ACADEMY
° Describe the implications for the
use of the IP as it is media
independent
e One major characteristic of the Media Independence
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
Hoc vién mang Bach khoa - Website: www.bkacad.com 9
Trang 10IPv4 packet - Packaging the Transport layer PD
._„JIlllI(ÍlllllllllIIlIllllIllIIllIIlIIIlIlIIIIIIIIlllI BACHKHOA NETWORKING ACADEMY
e 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
IP Packet
In TCP/IP based networks, the Network layer PDU is the IP packet
Hoc vién mang Bach khoa - Website: www.bkacad.com 10
Trang 11IPv4 packet header
_,IIÍlllllllllIIlllllIIIIlIIII(IIIIIIIlIIIIIIIIIIIIU BACHKHOA NETWORKING ACADEMY
° Identify the major header fields in the IPv4 protocol
and describe each field's role in transporting packets
IPv4 Packet Header Fields
| Byte 1 | Byte 2 | Byte 3 | Byte 4 9
ý*
Học viện mạng Bách khoa - Website: www.bkacad.com 11
Trang 12Network Layer Fields
identification Flags Fragment Offset
Trang 13Network Layer Fields
° Indicates datagram header ref ec bit words
Hoc vién mang Bach khoa - Website: www.bkacad.com 13
Trang 14Network Layer Fields
assigned by upper-layer protocol
Hoc vién mang Bach khoa - Website: www.bkacad.com
oe
° Specifies the level of importance as been
14
Trang 15Network Layer Fields
° Specifies the length of the entire pac! Bet in bytes,
including data and header
Hoc vién mang Bach khoa - Website: www.bkacad.com 15
Trang 16Network Layer Fields
BACHKHOA NETWORKING ACADEMY
° Identifies the current datagra
Hoc vién mang Bach khoa - Website: www.bkacad.com 16
Trang 17Network Layer Fields
- 0: Fragment if necessary 4 o>
- 1: Do not fragment ‡> uP
° Q: This is the last fragment
- 1: More fragment follow this fragment
Hoc vién mang Bach khoa - Website: www.bkacad.com 17
Trang 18Network Layer Fields
identification Flags C | Fragment Offset >
Time to Live Protocol Header Checksum
Trang 19Network Layer Fields
VERS HLEN Service Type Total Lenth
identi Flags Fragment Offset
Cc Time to Live Protocol Header Checksum
- Specifies the number of hops a packet aval: This
number is decreased by one as the packet travels through a
router
Hoc vién mang Bach khoa - Website: www.bkacad.com 19
Trang 20Network Layer Fields
VERS HLEN Service Type Total Lenth
identification Flags Fragment Offset
Time to Live Protocol Header Checksum
° Indicates which upper-layer protocol, su 5 6) or
UDP(17), receives incoming packet ocessing has
been completed
Hoc vién mang Bach khoa - Website: www.bkacad.com 20
Trang 21VERS HLEN Service Type ' TotalLenth
Identification | Flags | Fragment Offset
Time to Live Protocol Header Checksum
°_Helps ensure IP header integri “về
° Not caculated for the encapsul on data
Hoc vién mang Bach khoa - Website: www.bkacad.com
| lÌ BACHKHOA NETWORKING ACADEMY
21
Trang 22
identification Flags Fragment Offset
° Specifies the sending node adress
Hoc vién mang Bach khoa - Website: www.bkacad.com 22
Trang 23Network Layer Fields
identification Flags Fragment Offset
Time to Live Protocol Header Checksum
° Specifies the receiving node IPiadatess
Hoc vién mang Bach khoa - Website: www.bkacad.com 23
Trang 24Network Layer Fields
° Allows IP to support various ctlons Such a security
Học viện mạng Bách khoa - Website: www.bkacad.com 24
Trang 25Network Layer Fields
identification Flags Fragment Offset
e Extra zeros are added to this field to ensure that the
IP header is always a multiple of 32 bits
Hoc vién mang Bach khoa - Website: www.bkacad.com 25
Trang 26Network Layer Fields
VERS HLEN Service Type _| Total Lenth
eet Flags Fragment Offset
Time to Live Protocol Header Checksum
° Variable length up to 64 Kb Miu poe” A4
° Contains upper-layer information®
Hoc vién mang Bach khoa - Website: www.bkacad.com 26
Trang 27Grouping Devices into Networks
e Reasons for grouping devices into sub-networks and
define several terms used to identify the sub-networks
— Geographic
Network designers have to ask: on
what basis should the network be
divided?
Hoc vién mang Bach khoa - Website: www.bkacad.com 27
Trang 28Grouping Devices into Networks
° Reasons for grouping devices into sub-networks and
define several terms used to identify the sub-networks
— Purpose
Network designers have to ask: on what basis should the network be
divided?
Hoc vién mang Bach khoa - Website: www.bkacad.com 28
Trang 29Grouping Devices into Networks
° List several different reasons for grouping devices into
sub-networks and define several terms used to identify the sub-networks
Trang 30Grouping Devices into Networks
° Reasons for grouping devices into sub-networks and
define several terms used to identify the sub-networks
Trang 31Broadcast domain ? - Performance
Am
° 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
All devices in this network are connected in one broadcast domain when the switch is setto the |
factory default settings Since switches forward broadcasts by default, broadcasts are processed =! Replacing the middle switch with a router creates 2 IP subnets, hence, 2 distinct broadcast
by all devices in this network domains, All devices are connected but local broadcasts are contained
Hoc vién mang Bach khoa - Website: www.bkacad.com 31
Trang 32Why separate hosts into networks ? - Security
° List several ways in which dividing a large network can
increase network security
Trang 33Grouping Devices into Networks
_/Í(I(ÍIlllIlllllIlIllIllIIlI(IllIIIIIIlIIllIIIUlI BACHKHOA NETWORKING ACADEMY
° Explain the communication problems that emerge
when very large numbers of devices are included in
one large network
Hosts do not know how to deliver data to devices in a remote
network - this is the role of the gateway
Hoc vién mang Bach khoa - Website: www.bkacad.com 33
Trang 34Hierarchical Addressing
° Hierarchical addressing solves the problem of devices
communicating across networks of networks
Hierarchical Addressing
TO: Jane Doe 170 West Tasman Drive, San Jose, CA 95134, USA
Which Which zip
At each step of delivery, the post office need only examine the next hierarchical level
Hoc vién mang Bach khoa - Website: www.bkacad.com 34
Trang 35Hierarchical Addressing
_,Ill(I(IlllllllIlllIIlIIIUIIlIIIIIlIIIIU( BACHKHOA NETWORKING ACADEMY
° Router only need to know network portion(network
address) to indicate the best path to reach the
N etwo rk Hierarchical IPv4 Address
< 8 bits —> = 8 bits — <— 8 bits —> = 8 bits —>
(Octet) (Octet) (Octet) (Octet)
Network Host
Complete IPv4 Address
Hoc vién mang Bach khoa - Website: www.bkacad.com 35
Trang 36Routing Protocols
° Routing is an OSI Layer 3
7 Application function It is a hierarchical
6 Presentation scheme and allows individual
addresses to be group
3 Network <<— | Routing ° Routing is the process of
2 Data Link finding the most effiefent path
The network layer is responsible for routing packets through a network
Hoc vién mang Bach khoa - Website: www.bkacad.com 36
Trang 37The network layer is responsible for routing packets through a network
e Two key functions of a router:
— Maintain routing tables and make sure other routerS*know‘ef changes in
the network topology
— Use the routing table to determine where to sendthem
° 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
Hoc vién mang Bach khoa - Website: www.bkacad.com 37
Trang 38Routing vs Switching
_. ,IllI(llllllllllIlIlIIlIIIIIIIIIIIIIIllIIIlIU BACHIKHOA NETWORKING ACADEMY
Trang 39Routing and Layer 2 Switching
HH BACHKHOA NETWORKING ACADEMY
ee | LAN Layer 2 switching
based on MAC address based on MAC address
Layer 2 switching takes place within the LAN Layer 3 routing moves traffic between broadcast domains This requires the hierarchical addressing format
that a Layer 3 addressing scheme like IP provides
Hoc vién mang Bach khoa - Website: www.bkacad.com 39
Trang 40Router and Switch
Features Router Switch
OSI =— Layer 3 Layer 2
The speed and security are relative comparisons, and depend on the
configurations of the device
e Each computer and router interface maintains an ARP table for hayer 2 communication The ARP table is only effective for the:broadcast
domain (or LAN) that it is connected to
e MAC addresses are not logically organized,ut IP@ddresses are
organized In a hierarchical manner
Hoc vién mang Bach khoa - Website: www.bkacad.com 40
Trang 41Routed versus Routing
Routed protocol transport data from one end-station to another
° 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 bestath for data from
Trang 42
Network Destination Exit are used between
Protocol Network Interface | oiters to determine paths
1012020 ¬ and maintaining routing tables RIP ni can at After the path is determined
IGRP -10.0 a router can route a routed protocol!
Routing protocol = RIP, IGRP
e Provides processes for sharing route information
° Allows routers to communicate with other routers to-Update and maintain the routing tables
e Examples: Routing Information Protocol (RIP),-<interior Gateway Routing Protocol (IGRP), Open Shortest Path First (OSPF), Border Gateway
Protocol (BGP) and Enhanced IGRP (EIGRP)
Hoc vién mang Bach khoa - Website: www.bkacad.com 42