Lec10 Network Layer
Lec10 Network Layer
Lec10 Network Layer
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,
when translated by a device
performing Network Address
Translation (NAT) for IPv4.
NAT will be discussed later.
Network Layer Characteristics
Characteristics of IP
IP 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, if required, are performed by other protocols at other layers,
primarily TCP at Layer 4.
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).
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.
Note: As an unreliable network layer protocol, IP does not guarantee that all sent
packets will be received. Other protocols manage the process of tracking packets and
ensuring their delivery.
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.
Unreliable means that IP does not have the capability to manage and recover from
undelivered or corrupt packets.
Network Layer Characteristics
Function Description
Version This will be for v4, as opposed to v6, a 4 bit field=
0100
Differentiated Used for QoS: DiffServ – DS field or the older IntServ –
Services ToS or Type of Service
Header Detect corruption in the IPv4 header
Checksum
Time to Live Layer 3 hop count. When it becomes zero the router
(TTL) will discard the packet.
Protocol I.D.s next level protocol: ICMP, TCP, UDP, etc.
Source IPv4 32 bit source address
Address
Destination IPV4 32 bit destination address
Address
IPv6 Packets
Limitations of IPv4
IPv4 has three major limitations:
IPv4 address depletion – We have basically run out of IPv4 addressing.
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.
IPv6 Packets
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
NAT between a private IPv4 address
and a public IPv4 address is not
needed. This avoids some of the NAT
induced problems experienced by
applications that require end to end
connectivity.
IPv6 Packets
Function Description
Version This will be for v6, as opposed to v4, a 4 bit field=
0110
Traffic Class Used for QoS: Equivalent to DiffServ – DS field
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.
Hop Limit Replaces TTL field Layer 3 hop count
Source IPv4 128 bit source address
Address
Destination IPV4 128 bit destination address
Address
IPv6 Packets
Default Gateway
A router or layer 3 switch can be a default-gateway.
Features of a default gateway (DGW):
• It must have an IP address in the same range as the rest of the LAN.
• It can accept data from the LAN and is capable of forwarding traffic off of the LAN.
• It can route to other networks.
If a device has no default gateway or a bad default gateway, its traffic will
not be able to leave the LAN.
A default gateway is required to send traffic outside the local network.
Traffic cannot be forwarded outside the local network if there is no default
gateway, the default gateway address is not configured, or the default
gateway is down
How a Host Routes
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
A dynamic routing protocol allows
the routers to automatically learn
about remote networks, including a
default route, from other routers.
Routers that use dynamic routing
protocols automatically share
routing information with other
routers and compensate for any
topology changes without involving
the network administrator.