0% found this document useful (0 votes)
18 views44 pages

Chapter 4

This document covers the network layer services, including IPv4 and IPv6 addressing, subnetting, and IP routing technologies. It explains the functions of the network layer, the significance of IP addresses, and the differences between classful and classless addressing. Additionally, it discusses the governing bodies for IP address management and the structure of IP datagrams.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views44 pages

Chapter 4

This document covers the network layer services, including IPv4 and IPv6 addressing, subnetting, and IP routing technologies. It explains the functions of the network layer, the significance of IP addresses, and the differences between classful and classless addressing. Additionally, it discusses the governing bodies for IP address management and the structure of IP datagrams.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 44

 Covered in this chapter

1.Network Layer services


2.IPv4 Addressing
3.Subnetting
4.IPv6 Addressing
5.IP Routing Technologies
Let’s recall network Layer!
3 layer in the OSI model
Responsible for Host-to-Host delivery

getting packets from the source all the way to the destination

Via Intermediate node
Source node
Accepts '→ encapsulates it in a datagram '→ send to DL Layer
Destination node
the datagram is decapsulated '→ the packet is extracted and delivered to the TL
layer.
is responsible for 3 main functions:
defines logical addresses used at layer-3
Finds paths, based on the network numbers of logical addresses, to reach
destination components
Connects different data link layer types together,

Ethernet, fiber distributed data interface (FDDI), Serial, and Token Ring
Network Services
 Internetworking
refers to the logical gluing of heterogeneous physical networks together to
look like a single network to the upper transport and application layers

the above internetwork is made up of 5 networks: 4 LANs and 1 WAN


Si: switch or router; fi: interface
Data sent from A to D passes through 3 links
nomenclature:
The source and the destinations are usually referred to as hosts
A host or a router is referred to as a hop
Network Services ...
Packetizing: encapsulates packets received from upper-layer protocols and makes new
packets out of them;

Done by the IP protocol in the Internet model
Fragmenting:
A datagram can travel through different networks;
Each router decapsulates the IP datagram from the received frame, processes it, and then
encapsulates it in another frame
The format and size of the
Received frame depends on the protocol used by the physical network from which the
frame has just arrived
Departing frame depends on the protocol used by the physical network to which the
frame is going
Routing: is a process of carrying pieces of information from one network to another
network.
 How does data Know where to go? '→ ”Addressing”

 Addressing

 Via the use of Address specifically


 IP address: Addresses used to identify a packet’s source and destination host
computer UNIQUELY.
 IP defines network layer addresses that identify any host or router interface
that connects to a TCP/IP network.
 IP has different Versions :
 Internet Protocol version 4 (IPv4)
 Internet Protocol version 5 (IPv5)
 Internet Protocol version 6 (IPv6)
 Internet Protocol (IP)
 IP is a connectionless protocol providing routing of datagrams in a best-effort
manner.
 The IP datagram is a combination of a number of bytes (IP header) that
prefixes the data received from the transport (and higher) layer.
 IP addressing is used to identify the end stations involved in the transport of
datagrams for communication.
 Types of IP addresses
Reserved Addresses
That cannot be assigned to a network component
Network ID
The network number assigned to a segment or VLAN
Host ID
The host component of an IP address
Types of IP addresses
Directed Broadcast: The broadcast address of a network ID—these can be routed by
routers
Local Broadcast: The “all hosts” address for everyone on the same segment:
255.255.255.255 (routers will not route this type of address)
Loopback: The internal address of a device used for testing functions
Autoconfigured: An address automatically assigned to a network component (DHCP
is an example of this type of addressing)
Public
An address used to access devices across the Internet or other public networks
Private
An address to access devices in a local network, which cannot be used to access public
networks
A 32-bit address that uniquely and universally defines the connection of devices;
IPv4 has 2 parts:
► Internet Protocol version-4 (IPv4)

Network Address '→ is used to identify the newtwork part of the network.
Host Address '→ is assigned to end devices in the network.
How many address IPv4 provides ; defined by '→ ”Address Space”
The total number of address used by the protocol
For n-bit, 2n addresses
IPv4 has an address apace of

232 = 4,294,967,296
Two different Notations :
Dotted Binary Notation : Employ binary bits for representation.
Eg: v0 000˛z1 010} . v0 000˛z1 010} . v0 001˛z0100} . v1110˛z1001}

Decimal Notation : use decimal number for representation Eg: 192.168.10.4

10
IPv4 has five different classes :
Class A,B,C are the primary addresses for data traffic used over the
Internet.
Class D is used for multicasting.
Class E is Reserved addresses which used on Internet.

Figure 1: Classes of an IP
addresses

11
The number of host bits in the IP address classes
determines how many hosts can be created for
each class of address.
No of host address = 2n - 2
Address ranges in class A, B, and C has address
Private addresses
• used in intranet
Public addresses
• used in on TCP/IP net

12
Any org. who owns Internet
Internet is governed when it comes to domains and addresse
ICANN - Internet Corporation for Assigned Names and Numbers
• A not-for-profit public-benefit corporation
• Dedicated to keeping the Internet secure, stable and interoperable
• Promotes competition and develops policy on the Internet’s unique identifiers
DNS names and Autonomous System (AS) numbers*
IANA - Internet Assigned Numbers Authority
• Maintains a central repository for Internet standards
• Verifies and updates changes to Top Level Domain (TLD) information
• Distributes Internet numbers to regions for Internet use

• responsible for managing IP addresses, ports, protocols, and other essential numbers

13
1
3
CH-04:Network Layer

14
1
4
Governing bodies that responsible for controlling all IP addresses and domain
registrations in their operating region
American Registry for Internet Numbers (ARIN)
U.S., Canada, Antarctica and parts of the Caribbean region
Asia-Pacific Network Information Centre (APNIC)
Asia, Australia, New Zealand
African Network Information Center (AfriNIC) - Africa and the Indian Ocean
Reseaux IP Europeens Network Coordination Centre (RIPE NCC)
Europe, Russia, Central Asia, Middle East
Latin America and Caribbean Network Information Center (LACNIC)
Latin America and parts of the Caribbean

15
• There is no single whois database
Registrars and Registries each maintain their own respective Whois
database
Registrars
• companies and organizations that have ICANN accreditation and
are registry certified to sell domain names
• Also responsible for any resellers under them
Registries
• organizations responsible for maintaining the records of a
specific top level domain (TLD) such as .com, .net, .org, etc.
• ICANN requires that records remain accurate for the life of the
domain registration

16
Any Problem with IP addresses ? '→ Address efficiency

wastage/shortage of IP addresses '→ Solution ?
SUBNETTING: allows to take some of the higher-order host bits in a network
number and use them to create more networks
is a technique usedto break down (or partition) networks into subnets.
SUBNET MASK: Identifies what bits in the IP address are to be used to represent
the network/subnet portion of an IP address.
is to differentiate among the network address, the host addresses, and the directed
broadcast addressits 32 bit long.
1 '→ Network component,
0 '→ Host components
The subnets are created through the use of subnet masks
Subnets are created by borrowing bits from the host portion of the IP address.

The network portion of the IP address and the new subnet bits are used to define the new subnet
17
1
7
Each net Address lose two address from the available address:
Network Address - One address is reserved to that of the network. For Example: 172.16.0.0 /16
Broadcast Address - One address is reserved to address all hosts in that network or subnet.For
Example: 172.16.255.255

How do we subnet a given net address?


By borrowing bits from the host portion
The new subnet
The network portion + The new subnet bits

18
Every network Address looses two address from its address space. Why?
For network address : The first address of the network
broadcast address : the last address of the subnet
Two Kind of subnetting
Classful subnetting
Classless subnetting

Classful Addressing
original method used to divide the IP address space into predefined classes based on
the leading bits of the IP address
Classful addressing divides the IPv4 address space (0.0.0.0-255.255.255.255) into 5
classes
i.e. class A, B, C, D and E
Any problem with classful addressing ? YUP!

Too much waste of hos addresses. → Solution ?

Classless Inter-Domain Routing

19
The first few bits indicate the class of an
address

Figure 2: Binary Notation Figure 3: Decimal


Notation

20
The number of subnets created and the number of hosts/subnet
NO of subnets created = 2x ,
→ where x is Number of bits borrowed from the host bits
NO of hosts/subnet = 2y−x
→ y = Number host bits for the class of netwok.

21
Example:
Given the Network address of 192.168.10.0, find the
network address for 4 different subnetworks?

22
The subnet mask is /24;
 How many bit to borrow ? '→ x = 2
 How many bits left in the host portion ? '→ y = 6
 Determine the number of host addreses /subnet is
 The subnet mask of the new subnet would be /26
So the network address
Subnet-A 192.168.10.0/26
Address Space = 192.168.10.0 - 192.168.10.63
Subnet-B 192.168.10.64/26
Address Space = (192.168.10.64 - 192.168.10.127
Subnet-C 192.168.10.128/26
Address Space = (192.168.10.128 - 192.168.10.191)
Subnet-D 192.168.10.192/26
Address Space = (192.168.10.192 - 192.168.10.255) 23
Classless IP Addressing (CIDR - Classless Inter-Domain Routing)
introduced to address the limitations of classful addressing, particularly
in terms of inefficient address allocation and routing table scalability.
CIDR allows for variable-length subnet masks (VLSM) and supernetting.
variable-length subnet masks (VLSM)
allows you to apply different subnet masks to the same class address
space call it Subnet-of-Subnets*

24
Example:
Given the Network address of 172.16.1.0, find the network
address for 4 different subnetworks?

25
IP version 4 datagaram
format

26
IP datagram field

Version '→ Indicates the version of IP being used


IHL:-is provided to tell how long the header is, in 32-bit words.
Differentiated Services(8 bits)
designed to distinguish between different classes of service - for various
combinations of reliability (e.g. file transfer) and speed (e.g. voice); mostly
ignored by current routers.
Total length (16 bits):
of everything in the datagram, i.e. both header and data (max. length is 216 =
65,536 bytes)
Identification (16 bits):'→ for the destination host to determine which datagram
a newly arrived fragment belongs to
DF (1 bit) '→ Don’t Fragment; It is an order to the routers not to fragment the
packet.
MF: '→ All fragments except the last one have this bit set. 27
IP datagram field
Fragment offset
tells where in the current packet this fragment belongs.
Time to live
field is a counter used to limit packet lifetimes.
The Protocol
field tells it which transport process to give the packet to.
Header checksum
Performs an arithmetic checksum on only the header portion of the packet.
The Source address and Destination address
indicate the IP address of the source and destination network interfaces.
Options
to provide an escape to allow subsequent versions of the protocol to
include information not present in the original design
28
2
8
Internet Protocol v6 (IPv6)
Reason for existence is '→ Rapid Growth of Appliances.
IP version 6 (IPv6) is the proposed solution for expanding the possible number
of users on the Internet.
IPv6 is also called IPng, the next generation IP.
IPv6 uses a 128-bit address.
IPv6 provides for a large number of IP addresses (2128) bit
uses hexadecimal colon notation

Figure 4: IP-version 6
29
Abbreviation: '→ Its very long address.
IPv6 has many zero '→ needs to be omiited or represented by other

The leading zero omitted not the trailing zero

Figure 5: IPv6 Abbreviation

30
IPv6 has huge address space. '→ The designer divided the address in to several categories!
A few leftmost bit called Type prefixes

The Type prefixes is variable length
There are different types and formats of IPv6 addresses
Global unicast
These addresses are routable on the internet and start with ”2001:” as the prefix group.2000::/3
Global unicast addresses are the equivalent of IPv4 public addresses.
Unicast Address
defines single device address : FC00::/7
Two type of Unicast addresses → Geographic-based and Provider-based
Multicast address
Used to define a group of hosts instead of one. '→ FF00::/8
A packet sent to a multi-cast address must be delivered to each member to group.

31
Figure 6: Type prefixes of
IPv6 Addresses

32
Anycast Address
A packet destined for anycast address is delivered to only one of the members of
the anycast group, particularly, the nearest one. '→ 2000::/3
Reserved Addresses
Addresses which start with eight 0s (type prefix is 0000 0000)
Unspecified Address: is used when a host doesn’t know its own address and
sends an inquiry to find its address.

Loopback Address: is used to test itself without going into the network

Compatible Address: used during the transition of from IPv4 to IPv6.

Mapped Address: used in transition. But, when hosts with IPv6 wanna send
packet to IPv4
33
Local address
The other types of IPv6 address FE80::/10
used by Organization wants to use IPv6 protocol without being connected to
Internet.
analogous to Private addresses of IPv4.
Two types:
1.Link Local addresses
2.Site Local addresses

Figure 7: IP version 6 datagram format


34
IP Datagram Header format
•Version (4 bits) '→: is always 6 for IPv6 (and 4 for IPv4)
•Traffic class (4 bits) '→ used to distinguish between packets with different real-time
delivery requirements
•Flow label (24 bits) '→ to provide special handling for a particular flow of data;
•Payload length (16 bits) '→ the total length of the IP datagram excluding the 40-byte
base header
•Next header (8 bits) '→ defines the header that follows the base header; either one of the optional
extension headers (currently six) or the header for an upper-layer protocol such as UDP or TCP
•Hop limit (8 bits) '→ same as the Time to live field in IPv4; a counter used to limit packet
lifetimes
•Source address and Destination address '→ IP addresses for the source and the destination; 16
bytes each

35
4.5. Routing Protocols ⋆ ⋆ ⋆ ⋆ ⋆ ⋆

Recall Routing and Protocols


The most complex and crucial aspects of packet-switching network design is routing
Routing protocols provide a standardized format for route management for
route selection, sharing route status with neighbor routers
calculating alternative routes if the best-path route is down.
The Primary function of Packet Switching

to accept packets from a source station and deliver them to a destination station
W@ does router do ?

36
Routing : a process of conveying packets from one network to another network.
has two processes
Path Establishement '→ Building maps and giving directions
Data Forwarding '→ Moving packets between interfaces according to the directions
A packet may have Several alternative paths, However
Employ the best path stored in Routing table
what if changes in topology or other metrics ?

updated periodically or as topology changes (event driven)
Decisions are based on:
Topology
policies and metrics (hop count, filtering, delay, bandwidth, etc.)

37
Forwarding ...
Router decides which interface a packet has to be sent to
Forwarding table/Routing table populated by routing process
Forwarding decisions:
Destination address
class of service (fair queuing, precedence, others)
local requirements (packet filtering)
A router has routing table with an entry for each destination, or combination of destinations,
to route IP packets.
The routing table can be either static or dynamic.
Routing is Genrally based on 2 Routing Algorithms:
Non-Adaptive or Static Routing
Adaptive or Dynamic Routing

38
Non-Adaptive Routing
also called Static routing.
Do not base their routing decisions on any measurements or estimates of the current
topology and traffic
Static routing is mostly useful for situations in which the routing choice is clear.
Network engineers set the path for the packets. means
Updating the table is Manual.
Can be used for small internet that doesn’t change very often, or in an experimental
internet for troubleshooting.
It is poor strategy to use a static routing table in a big internet such as the Internet
Adaptive Routing
also called Dynamic routing.
Unlike Static, dynamic routing change their routing decisions to reflect changes in the
topology, and sometimes changes in the traffic.

39
Adaptive Routing ...
These dynamic routing algorithms
Where do they get information ?
Locally, from adjacent routers, or from all routers
When they change the routes
When the topology changes, or every seconds as the load changes
What metric is used for optimization
distance, number of hops, or estimated transit time
Routing protocols have been created in response to the demand for dynamic routing
tables.
A routing protocol is a combination of rules and procedures that lets routers in the
internet inform each other of changes.
It allows routers to share whatever they know about the internet or their
neighborhood.
40
Four key issues are associated with dynamic routing protocols:
1.path determination '→ A procedure in the protocol that is used to determine the best route.
2.Metric '→ A numeric measure assigned to routes for ranking the routes best to worst; the
smaller the number, the better.
Hop count, Reliability, Bandwidth, Delay, Cost ...etc
3.Convergence '→ This happens when a router obtains a clear view of the routes in a network.
• The time it takes for the router to obtain a clear view

Convergence time
4.Load balancing '→ A procedure in the protocol that enables routers to use any of the multiple
data paths available from multiple routers to reach the destination
Dynamic RP has Two different Categories:
1.Distance Vector Protocols
2.Link-State Dynamic routing

41
Dynamic Routing
1. Distance Vector Protocols
Distance Vector routing protocols base their decisions on the best path to a given
destination based on the distance.
Distance is usually measured in hops,
If the distance metric is hop, then each time a packet goes through a router, a hop is
considered to have traversed.
The least number of hops to a given network '→ the best route towards that network.
The vector shows the direction to that specific network.
DV protocols '→ send their entire routing table to directly connected neighbors

RIP - Routing Information Protocol (RIPv-1, RIPv-2) IGRP - Interior Gateway Routing
Protocol.

42
Dynamic Routing
2 Link-State Routing
Also called shortest-path-first protocols.
Link state routing protocols have a complete picture of the network topology.

Hence they know more about the whole network than any distance vector protocol.
Three separate tables are created on each link state routing enabled router.
1st Table is used to hold details about directly connected neighbors
2nd Table is used to hold the topology of the entire internetwork of 1st Table
3rd Table is used to hold the actual routing table
Link-state protocols send information about directly connected links to all the routers in the
network.
Protocols such as:
OSPF - Open Shortest Path First
IS-IS - Intermediate System to Intermediate System.
EIGRP - Enhanced Interior Gateway Routing Protocol

is one of those hybrid routing protocols.
43
Thank You

44

You might also like