Lecture6 Network Layer
Lecture6 Network Layer
Chapter 6
Network Layer
Module 8: Topics
What will I learn to do in this module?
IPv6 Packet Explain the role of the major header fields in the IPv6 packet.
Router Routing Tables Explain the function of fields in the routing table of a router.
6.1 Network Layer
Characteristics
Network Layer Characteristics
The Network Layer
• Provides services to allow end devices to exchange
data
• IP version 4 (IPv4) and IP version 6 (IPv6) are the
principle network layer communication protocols.
• The network layer performs four basic operations:
•Addressing end devices
•Encapsulation
•Routing
•De-encapsulation
Network Layer Characteristics
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.
Note: NAT will change addressing,
but will be discussed in a later
module.
Network Layer Characteristics
Characteristics of IP
IP is meant to have low overhead and may be described as:
Connectionless
Best Effort
Media Independent
Network Layer Characteristics
Connectionless
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).
Network Layer Characteristics
Best Effort
IP is Best Effort
• IP will not guarantee delivery of the
packet.
• IP has reduced overhead since there
is no mechanism to resend data that
is not received.
• IP does not expect
acknowledgments.
• IP does not know if the other device
is operational or if it received the
packet.
Network Layer Characteristics
Media Independent
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 must rely on other protocols for these
functions.
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.
Network Layer Characteristics
Media Independent (Contd.)
The network layer will establish the
Maximum Transmission Unit (MTU).
Network layer receives this from control
information sent by the data link layer.
The network then establishes the MTU
size.
Fragmentation is when Layer 3 splits the
IPv4 packet into smaller units.
Fragmenting causes latency.
IPv6 does not fragment packets.
Example: Router goes from Ethernet to a
slow WAN with a smaller MTU
6.2 IPv4 Packet
IPv4 Packet
IPv4 Packet Header
IPv4 is the primary communication protocol for the network layer.
The network header has many purposes:
It ensures the packet is sent in the correct direction (to the destination).
It contains information for network layer processing in various fields.
The information in the header is used by all layer 3 devices that handle the packet
IPv4 Packet
IPv4 Packet Header Fields
The IPv4 network header characteristics:
It is in binary.
Contains several fields of information
Diagram is read from left to right, 4 bytes per line
The two most important fields are the source and
destination.
Function Description
Version This will be for v4, as opposed to v6, a 4 bit field= 0100
Differentiated Services Used for QoS: DiffServ – DS field or the older IntServ – ToS or Type of Service
Time to Live (TTL) Layer 3 hop count. When it becomes zero the router will discard the packet.
Protocol I.D.s next level protocol: ICMP, TCP, UDP, etc.
Flow Label Informs device to handle identical flow labels the same way, 20 bit field
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.
• Directly Connected – These routes are automatically added by the router, provided the interface is active
and has addressing.
• Remote – These are the routes 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 not a match in the routing table
Introduction to Routing
Static Routing
Static Route Characteristics:
• Must be configured manually
• Must be adjusted manually by the
administrator when there is a change
in the topology
• Good for small non-redundant
networks
• Often used in conjunction with a
dynamic routing protocol for
configuring a default route
Introduction to Routing
Dynamic Routing
Dynamic Routes Automatically:
• Discover remote networks
• Maintain up-to-date information
• Choose the best path to the
destination
• Find new best paths when there is a
topology change
Dynamic routing can also share static
default routes with the other routers.
Introduction to Routing
Video – IPv4 Router Routing Tables
This video will explain the information in the IPv4 router routing table.
Introduction to Routing
Introduction to an IPv4 Routing Table
The show ip route command shows the
following route sources:
L - Directly connected local interface IP
address
C – Directly connected network
S – Static route was manually configured by an
administrator
O – OSPF
D – EIGRP
This command shows types of routes:
Directly Connected – C and L
Remote Routes – O, D, etc.
Default Routes – S*
6.6 Practice and Quiz
Module Practice and Quiz
What did I learn in this module?
IP is connectionless, best effort, and media independent.
IP does not guarantee packet delivery.
IPv4 packet header consists of fields containing information about the packet.
IPv6 overcomes IPv4 lack of end-to-end connectivity and increased network complexity.
•A device will determine if a destination is itself, another local host, and a remote host.
•A default gateway is router that is part of the LAN and will be used as a door to other
networks.
The routing table contains a list of all known network addresses (prefixes) and where to
forward the packet.
The router uses longest subnet mask or prefix match.
The routing table has three types of route entries: directly connected networks, remote
networks, and a default route.