SlideShare a Scribd company logo
19.1
Network Layer:
Logical Addressing
19.2
19-1 IPv4 ADDRESSES
An IPv4 address is a 32-bit address that uniquely and
universally defines the connection of a device (for
example, a computer or a router) to the Internet.
Address Space
Notations
Classful Addressing
Classless Addressing
Network Address Translation (NAT)
19.3
An IPv4 address is 32 bits long.
Note
19.4
The IPv4 addresses are unique
and universal.
Note
19.5
The address space of IPv4 is
232 or 4,294,967,296.
Note
19.6
Figure 19.1 Dotted-decimal notation and binary notation for an IPv4 address
Example 19.1
Change the following IP addresses from binary notation to dotted-decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11111001 10011011 11111011 00001111
Solution
We replace each group of 8 bits with its equivalent decimal number and add dots for
separation:
a. 129.11.11.239
b. 249.155.251.15
Example 19.2
Change the following IP addresses from dotted-decimal notation to binary notation.
a. 111.56.45.78
b. 75.45.34.78
Solution
We replace each decimal number with its binary equivalent :
a. 01101111 00111000 00101101 01001110
b. 01001011 00101101 00100010 01001110
Types of Addressing
There are two type of addressing. They are
 Classful addressing
 Classless addressing
19.9
19.10
In classful addressing, the address
space is divided into five classes:
A, B, C, D, and E.
Note
19.11
Figure 19.2 Finding the classes in binary and dotted-decimal notation
 Class A address: designed for large organizations with a large number of attached
hosts or routers. (Wasted and not used)
 Class B address: designed for midsize organizations with tens of thousands of
attached hosts or routers (too large for many organizations)
 Class C address: designed for small organizations with a small number of attached
hosts or routers. (too small for many organizations)
 Class D address: designed for multicasting. (Waste of addresses)
 Class E address: reserved for future use (waste of addresses)
The following IP address ranges belong to Google:
 64.233.160.0 - 64.233.191.255
 66.102.0.0 - 66.102.15.255
 66.249.64.0 - 66.249.95.255
 72.14.192.0 - 72.14.255.255
 74.125.0.0 - 74.125.255.255
 209.85.128.0 - 209.85.255.255
 216.239.32.0 - 216.239.63.255
Netid and Hostid
 The address is divided into netid and hostid.
 These parts are of varying lengths, depending on the class.
19.12
Blocks in class A
19.13
19.14
In classful addressing, a large part of the
available addresses were wasted.
Note
19.15
Find the class of each address.
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111
Example 19.4
Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C
address.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.
19.16
Table 19.1 Number of blocks and block size in classful IPv4 addressing
Mask
 It can help us to find the netid and hostid.
 It is 32-bit number made of contiguous 1s followed by contiguous 0s.
CIDR (Classless Interdomain Routing) or slash notation:
 It is used to show the mask in the form /n (n=8, 16, 24)
 In classful addressing, a large part of the available addresses were wasted.
19.17
Table 19.2 Default masks for classful addressing
Sub netting
 If an organization was granted a large block in class A or B, it could divide
the addresses into several contiguous groups and assign each group to
smaller networks (subnets) .
 It increases the number of 1s in the mask.
Super netting
 Although class A and B addresses are almost depleted, class C addresses
are still available (size of block= 256 so address did not satisfy the needs).
 In super netting, an organization can combine several class C blocks to
create a larger range of addresses.
 Several networks are combined to create a super network (super net).
E.g. Organization needs 1000 address can be granted 4 contiguous class C
blocks. Create one super network. It decreases the number of 1s in the
mask.
Address Depletion
 Class C block is too small for most mid size organizations. So the solution is
Classless addressing.
 Classful addressing, which is almost obsolete, is replaced with classless
addressing.
19.18
19.19
Classful addressing, which is almost
obsolete, is replaced with classless
addressing.
Note
Classless addressing
 To overcome address depletion and give more organizations
access to the internet, classless addressing was designed.
 There are no classes, but the addresses are still granted in
blocks.
 The size of the block (the number of addresses) varies based
on the nature and size of the entity.
• Household: 2 addresses
• Large organization: thousands of addresses.
• ISP: thousands or hundreds of thousands based on the number of
customers it may serve.
19.20
19.21
Figure 19.3 A block of 16 addresses granted to a small organization
19.22
In IPv4 addressing, a block of
addresses can be defined as
x.y.z.t /n
in which x.y.z.t defines one of the
addresses and the /n defines the mask.
Note
19.23
The first address in the block can be
found by setting the rightmost
32 − n bits to 0s.
Note
19.24
A block of addresses is granted to a small organization.
We know that one of the addresses is 205.16.37.39/28.
What is the first address in the block?
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32−28 rightmost bits to 0, we get
11001101 00010000 00100101 0010000
or
205.16.37.32.
This is actually the block shown in Figure 19.3.
Example 19.6
19.25
The last address in the block can be
found by setting the rightmost
32 − n bits to 1s.
Note
19.26
Find the last address for the block in Example 19.6.
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32 − 28 rightmost bits to 1, we get
11001101 00010000 00100101 00101111
or
205.16.37.47
This is actually the block shown in Figure 19.3.
Example 19.7
19.27
The number of addresses in the block
can be found by using the formula
232−n.
Note
19.28
Find the number of addresses in Example 19.6.
Example 19.8
Solution
The value of n is 28, which means that number
of addresses is 2 32−28 or 16.
19.29
Another way to find the first address, the last address, and
the number of addresses is to represent the mask as a 32-
bit binary (or 8-digit hexadecimal) number. This is
particularly useful when we are writing a program to find
these pieces of information. In Example 19.5 the /28 can
be represented as
11111111 11111111 11111111 11110000
(twenty-eight 1s and four 0s).
Find
a. The first address
b. The last address
c. The number of addresses.
Example 19.9
19.30
Solution
a. The first address can be found by ANDing the given
addresses with the mask. ANDing here is done bit by
bit. The result of ANDing 2 bits is 1 if both bits are 1s;
the result is 0 otherwise.
Example 19.9 (continued)
19.31
b. The last address can be found by ORing the given
addresses with the complement of the mask. ORing
here is done bit by bit. The result of ORing 2 bits is 0 if
both bits are 0s; the result is 1 otherwise. The
complement of a number is found by changing each 1
to 0 and each 0 to 1.
Example 19.9 (continued)
19.32
c. The number of addresses can be found by
complementing the mask, interpreting it as a decimal
number, and adding 1 to it.
Example 19.9 (continued)
19.33
NETWORK ADDRESS:
The first address in a block is normally not
assigned to any device; it is used as the network
address that represents the organization to the
rest of the world.
Note
Example:
 Given the address 23.56.7.91, find the network address.
Solution:
 The class is A. Only the first byte defines the netid. We can find the
network address by replacing the hostid bytes (56.7.91) with 0s.
Therefore, the network address is 23.0.0.0.
Example:
 Given the address
 132.6.17.85 and 23.56.7.91, find the network address?
Solution
 1. The class is B. The first 2 bytes defines the netid. We can find the
network address by replacing the hostid bytes (17.85) with 0s.
132.6.0.0.
 2. The class is A. Only the first byte defines the netid. We can find
the network address by replacing the hostid bytes (56.7.91) with 0s.
Therefore, the network address is 23.0.0.0.
19.34
Hierarchy:
Two-level Hierarchy: No sub netting
 An IP address can define only two levels of hierarchy when not sub netted.
 Prefix: the leftmost n bits define the network
 Suffix: the rightmost 32  n bits define the host (computer or router).
 Prefix is common to all network address.
Three-level hierarchy in an IPv4 address (Sub netted)
 An organization that is granted a large block of addresses may want to create
clusters of networks (called subnets) and divide the addresses between the
different subnets.
 Addresses in a network with and without sub netting
 The network address can be found by applying the default mask to any address in
the block (including itself).It retains the netid of the block and sets the hostid to
0s.
19.35
19.36
Figure 19.5 Two levels of hierarchy in an IPv4 address
IP address, like other address, has levels of hierarchy.
For example: telephone network in North America
19.37
Figure 19.6 A frame in a character-oriented protocol
19.38
Figure 19.8 Three-level hierarchy in an IPv4 address
19.39
Figure 19.10 A NAT implementation
Network Address Translation (NAT)
NAT enables a user to have a large set of addresses internally and one address, or a small set of
addresses, externally.
The traffic inside can use the large set; the traffic outside, the small set.
19.40
Figure 19.11 Addresses in a NAT
Address translation
All the outgoing packets go through the NAT router, which replaces the source address in the
packet with the global NAT address.
All incoming packets also pass through the NAT router, which replaces the destination address
in the packet (the NAT router global address) with the appropriate private address.
19.41
Figure 19.12 NAT address translation
19.42
19-2 IPv6 ADDRESSES
Despite all short-term solutions, address depletion is
still a long-term problem for the Internet. This and
other problems in the IP protocol itself have been the
motivation for IPv6.
Structure
Address Space
Topics discussed in this section:
19.43
An IPv6 address is 128 bits long.
Note
19.44
Figure 19.14 IPv6 address in binary and hexadecimal colon notation
19.45
Figure 19.15 Abbreviated IPv6 addresses
19.46
Expand the address 0:15::1:12:1213 to its original.
Example 19.11
Solution
We first need to align the left side of the double colon to
the left of the original pattern and the right side of the
double colon to the right of the original pattern to find
how many 0s we need to replace the double colon.
This means that the original address is.
19.47
Table 19.5 Type prefixes for IPv6 addresses
19.48
Table 19.5 Type prefixes for IPv6 addresses (continued)
19.49
Figure 19.16 Prefixes for provider-based unicast address
19.50
Figure 19.17 Multicast address in IPv6
19.51
Figure 19.18 Reserved addresses in IPv6
19.52
Figure 19.19 Local addresses in IPv6
Routing Table
 Static routing table: created manually
 Dynamic routing table: updated periodically by using one of the dynamic
routing protocols such as RIP, OSPF, or BGP.
Routing Protocols
 A router consults a routing table when a packet is ready to be forwarded
 The routing table specifies the optimum path for the packet: static or
dynamic
 Internet needs dynamic routing tables to be updated as soon as there is a
change
 There are two routing: Unicast routing and multicasting routing
 RIP (Routing Information Protocol), OSPF (Open Shortest Path First), BGP
(Border Gateway Protocol)
Optimization
 Which of the available pathways is the optimum pathway ?
 One approach is to assign a cost for passing through a network, called
metric
 Total metric is equal to the sum of the metrics of networks that comprise
the route
Router chooses the route with shortest (smallest) metric
RIP (Routing Information Protocol):
 The cost of passing each network is one hop count.
 If a packet passes through 10 networks to reach the destination, the total cost is
10 hop counts.
OSPF (Open Shortest Path First):
 Administrator can assign cost for passing a network based on type of service
required.
 OSPF allows each router to have more than one routing table based on required
type of service. Such as Maximum throughput or minimum delay.
BGP (Border Gateway Protocol):
 Criterion is the policy, which is set by the administrator(speaker node).
Intra- and Interdomain Routing
 AS (autonomous system): A group of networks and routers under the
authority of a single administration
 Intradomain routing: inside an AS
 Interdomain routing: between ASs
 R1, R2, R3, and R4 use a intradomain and an interdomain routing protocol.
 The other routes use only intradomain routing protocols
Popular (Unicast) Routing Protocols
Routing Algorithm classification
1. Distance vector algorithms: router knows physically-connected
neighbors, link costs to neighbors, iterative process of computation,
exchange of partial information with neighbors.
2. Link state algorithms: all routers have complete topology, link cost
information.
Metric of different routing protocols
 Metric is the cost assigned for passing through a network.
 The total metric of a particular route is equal to the sum of the metrics of
networks that comprise the route.
 A router chooses the route with smallest metric.
RIP (Routing Information Protocol):
 The cost of passing each network is one hop count.
 If a packet passes through 10 networks to reach the destination, the total
cost is 10 hop counts.
19.57
OSPF (Open Shortest Path First):
 Administrator can assign cost for passing a network
based on type of service required.
 OSPF allows each router to have more than one
routing table based on required type of service. Such
as Maximum throughput or minimum delay.
BGP (Border Gateway Protocol):
 Criterion is the policy, which is set by the
administrator(speaker node).
19.58
DISTANCE VECTOR ROUTING
 Each node maintains a set of triples
(Destination, Cost, NextHop)
 Node knows the cost to each neighbor.
 Directly connected neighbors exchange updates
 Periodically (normally every 30 secs)
 whenever table changes (called triggered update)
 Each update is a list of pairs:
(Destination, Cost)
19.59
Routing Table
 Neighbors exchange table entries
 Determine current best next hop
 For each destination list:
Next Node
Distance
 “In distance vector routing, each node shares its routing table with its immediate
neighbors periodically and when there is a change.”
 The least-cost route between any two nodes is the route with minimum
distance.
 Each node maintains a vector(table) of minimum distances to every node
19.60
Example
19.61
To Cost nex
t
A 0 -
B 5 -
C 2 -
D 3 -
E 6 C
19.62
A
C
D
B
E
5
2
3
4
4
3
A’s Table
T
o
Cost ne
xt
A 3 -
B 8 A
C 5 A
D 0 -
E 9 A
T
o
Cos
t
ne
xt
A 2 -
B 4 -
C 0 -
D 5 A
E 4 -
D’s Table
C’s Table
T
o
Cos
t
ne
xt
A 6 C
B 3 -
C 4 -
D 9 C
E 0 -
E’s Table
B’s Table
T
o
Cos
t
ne
xt
A 5 -
B 0 -
C 4 -
D 8 A
E 3 -
Distance vector routing tables
The least-cost route between any two nodes is the route with minimum distance.
Each node maintains a vector(table) of minimum distances to every node
Initialization of tables in DV Routing
19.63
A B
C
D
E
5
2
3
3
4
4
 At the beginning, each node can know only the distance between itself and its
immediate neighbors
22-64
Distance Vector Routing:
Sharing
 In distance vector routing, each node shares its routing table with its
immediate neighbors periodically and when there is a change
Updating in Distance Vector Routing
19.65
When a node receives a two-column table from a neighbor, it need to update its routing table
Updating rule:
Choose the smaller cost. If the same, keep the old one
If the next-node entry is the same, the receiving node chooses the new row
22-66
When to Share
 Periodic update: A node sends its routing table, normally every 30 s
 Triggered update: Anode sends its two-column routing table to its
neighbors anytime there is a change in its routing table
Link State Routing
 Each node has the entire topology of the domain- the list of nodes and links,
how they are connected including type, cost, and condition of the links(up
or down)
 Node can use Dijkstra’s algorithm to build a routing table
Link State Knowledge
 Each node has partial knowledge: it know the state (type, condition, and
cost) of its links. The whole topology can be compiled from the partial
knowledge of each node
Building Routing Table
1. Creation of the states of the links by each node, called the link state packet
(LSP)
2. Dissemination of LSPs to every other router, called flooding, in an efficient
and reliable way
3. Formation of a shortest path tree for each node
4. Calculation of a routing table based on the shortest path tree
1.Creation of LSP
 LSP contains node identity, the list of links (to make the topology),
sequence number (to facilitate flooding and distinguish new LSPs from old
ones)
 LSPs are generated (1) when there is a change in the topology of the domain, (2)
on a periodic basis, normally 60 min or 2 h
Building Routing Table
2.Flooding of LSPs
 The creating node sends a copy of the LSP out of each interface
 A node compares it with the copy it may already have. If the newly arrived LSP
is older than the one it has, it discards the LSP. If it is newer,
1. It discards the old LSP and keeps the new one
2. It sends a copy of it out of each interface except the one from which the packet
arrived
3.Formation of shortest path tree: Dijkstra Algorithm
 After receiving all LSPs, each node will have a copy of the whole topology. Need
to find the shortest path to every other node
 The Dijkstra algorithm creates a shortest path tree from a graph
Calculation of path using
Dijkstra Algorithm
Example of Dijkstra Algorithm
Strategy
 send to all nodes (not just neighbors)
 information about directly connected links (not entire routing table)
Building Routing Tables:
Link State Packet (LSP)
 id of the node that created the LSP
 cost of link to each directly connected neighbor
 sequence number
 Time-to-live (TTL) for this packet.
Reliable flooding
 Store most recent LSP from each node
 Forward LSP to all nodes but the one that sent it.
 generate new LSP periodically
 Increment sequence number
 Start sequence number at 0 when reboot.
19.73
Route Calculation
 Dijkstra’s shortest path algorithm (Dijkstra algorithm)
 Calculates the shortest path between two points on a network,
using a graph made up of nodes and edges.
 Algorithm divides the nodes into two sets: tentative and permanent.
It chooses current node, makes them tentative, examines them, and
if they pass the criteria, makes them permanent.
Dijkstra Algorithm
1. Start with the local node (router) as the root of the tree.
2. Assign a cost of 0 to this node and make it the first permanent node.
3. Examine each neighbor of the node that was the last permanent
node.
4. Assign a cumulative cost to each node and make it tentative.
5. Among the list of tentative nodes
Find the node with the smallest cost and make it permanent.
If a node can be reached from more than one route, then select the
route with the shortest cumulative cost.
6. Repeat steps 3 to 5 until every node becomes permanent.
19.74
Shortest Paths in Dijkstra’s Algorithm
19.75
Execution of Dijkstra’s algorithm
19.76
Shortest Path Calculation, Part I
Shortest Path Calculation, Part II
Shortest Path Calculation, Part III
Shortest Path Calculation, Part IV
Shortest Path Calculation, Part V
Shortest Path Calculation, Part VI
Shortest Path Calculation, Part VII
Shortest Path Calculation, Part VIII
Shortest Path Calculation, Part IX
Shortest Path Calculation, Part X
Shortest Path Calculation, Part XI
Shortest Path Calculation, Part XII
Shortest Path Calculation, Part XIII
Routing Table for Router A

More Related Content

What's hot

Ch22
Ch22Ch22
Chapter 19
Chapter 19Chapter 19
Chapter 19
Faisal Mehmood
 
Chapter 26 - Remote Logging, Electronic Mail & File Transfer
Chapter 26 - Remote Logging, Electronic Mail & File TransferChapter 26 - Remote Logging, Electronic Mail & File Transfer
Chapter 26 - Remote Logging, Electronic Mail & File Transfer
Wayne Jones Jnr
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
Faisal Mehmood
 
Subnetting Basics Tutorial
Subnetting Basics TutorialSubnetting Basics Tutorial
Subnetting Basics Tutorial
mikem801
 
Ipv4
Ipv4Ipv4
Addressing
AddressingAddressing
Addressing
Gichelle Amon
 
Ipv4 and Ipv6
Ipv4 and Ipv6Ipv4 and Ipv6
Ipv4 and Ipv6
Rishav Bhurtel
 
Classless addressing
Classless addressingClassless addressing
Classless addressing
Iqra Abbas
 
Ch19
Ch19Ch19
Internet Protocol version 6
Internet Protocol version 6Internet Protocol version 6
Internet Protocol version 6
Rekha Yadav
 
Sub Netting
Sub NettingSub Netting
Sub Netting
Lilesh Pathe
 
Subnetting
SubnettingSubnetting
Subnetting
selvakumar_b1985
 
Subnetting
SubnettingSubnetting
Subnetting
Gichelle Amon
 
Subnet Mask
Subnet MaskSubnet Mask
Subnet Mask
NetProtocol Xpert
 
Mac addresses(media access control)
Mac addresses(media access control)Mac addresses(media access control)
Mac addresses(media access control)
Ismail Mukiibi
 
Arp and rarp
Arp and rarpArp and rarp
Icmp
IcmpIcmp
Ip addressing classful
Ip addressing classfulIp addressing classful
Ip addressing classful
Abhishek Kesharwani
 
CCNA IP Addressing
CCNA IP AddressingCCNA IP Addressing
CCNA IP Addressing
Dsunte Wilson
 

What's hot (20)

Ch22
Ch22Ch22
Ch22
 
Chapter 19
Chapter 19Chapter 19
Chapter 19
 
Chapter 26 - Remote Logging, Electronic Mail & File Transfer
Chapter 26 - Remote Logging, Electronic Mail & File TransferChapter 26 - Remote Logging, Electronic Mail & File Transfer
Chapter 26 - Remote Logging, Electronic Mail & File Transfer
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Subnetting Basics Tutorial
Subnetting Basics TutorialSubnetting Basics Tutorial
Subnetting Basics Tutorial
 
Ipv4
Ipv4Ipv4
Ipv4
 
Addressing
AddressingAddressing
Addressing
 
Ipv4 and Ipv6
Ipv4 and Ipv6Ipv4 and Ipv6
Ipv4 and Ipv6
 
Classless addressing
Classless addressingClassless addressing
Classless addressing
 
Ch19
Ch19Ch19
Ch19
 
Internet Protocol version 6
Internet Protocol version 6Internet Protocol version 6
Internet Protocol version 6
 
Sub Netting
Sub NettingSub Netting
Sub Netting
 
Subnetting
SubnettingSubnetting
Subnetting
 
Subnetting
SubnettingSubnetting
Subnetting
 
Subnet Mask
Subnet MaskSubnet Mask
Subnet Mask
 
Mac addresses(media access control)
Mac addresses(media access control)Mac addresses(media access control)
Mac addresses(media access control)
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarp
 
Icmp
IcmpIcmp
Icmp
 
Ip addressing classful
Ip addressing classfulIp addressing classful
Ip addressing classful
 
CCNA IP Addressing
CCNA IP AddressingCCNA IP Addressing
CCNA IP Addressing
 

Similar to Forouzan-ch19-Network-Layer-Logical-Addressing.ppt

4a logical laddressing
4a logical laddressing4a logical laddressing
4a logical laddressing
kavish dani
 
ch19 (1).ppt
ch19 (1).pptch19 (1).ppt
ch19 (1).ppt
ssuser7547cf
 
20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks 20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks
Kathirvel Ayyaswamy
 
Ch19
Ch19Ch19
Ch19
marwanwk
 
Ch19 network layer-logical add
Ch19 network layer-logical addCh19 network layer-logical add
Ch19 network layer-logical add
Mohammed Romi
 
network Addressing
network Addressingnetwork Addressing
network Addressing
Tauseef khan
 
ch19new.ppt
ch19new.pptch19new.ppt
ch19new.ppt
RITIKAKAPOOR54
 
Chapter 19: Logical Addressing
Chapter 19: Logical AddressingChapter 19: Logical Addressing
Chapter 19: Logical Addressing
Shafaan Khaliq Bhatti
 
19 Network Layer_Logical_Addressing
19 Network Layer_Logical_Addressing19 Network Layer_Logical_Addressing
19 Network Layer_Logical_Addressing
Ahmar Hashmi
 
Ch19
Ch19Ch19
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree BhadraSubnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Sovonesh Pal
 
CN Unit 3
CN Unit 3 CN Unit 3
CN Unit 3
Shrikant Kokate
 
Subnetting in network layer in computer networks
Subnetting in network layer in computer networksSubnetting in network layer in computer networks
Subnetting in network layer in computer networks
karthiktyagi2
 
IP-address trial.ppt
IP-address trial.pptIP-address trial.ppt
IP-address trial.ppt
sol zem
 
Lecture 03 networking
Lecture 03 networkingLecture 03 networking
Lecture 03 networking
HNDE Labuduwa Galle
 
Network_layer_addressing.pptx
Network_layer_addressing.pptxNetwork_layer_addressing.pptx
Network_layer_addressing.pptx
laiba29012
 
class 10_internetworking.ppt
class 10_internetworking.pptclass 10_internetworking.ppt
class 10_internetworking.ppt
prashant554034
 
Ch 19
Ch 19Ch 19
IPv4 Address uploading.ppt
IPv4 Address uploading.pptIPv4 Address uploading.ppt
IPv4 Address uploading.ppt
SanthiS10
 
IP addressing and subnetting.pptx
IP addressing and subnetting.pptxIP addressing and subnetting.pptx
IP addressing and subnetting.pptx
naseerahmad707715
 

Similar to Forouzan-ch19-Network-Layer-Logical-Addressing.ppt (20)

4a logical laddressing
4a logical laddressing4a logical laddressing
4a logical laddressing
 
ch19 (1).ppt
ch19 (1).pptch19 (1).ppt
ch19 (1).ppt
 
20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks 20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks
 
Ch19
Ch19Ch19
Ch19
 
Ch19 network layer-logical add
Ch19 network layer-logical addCh19 network layer-logical add
Ch19 network layer-logical add
 
network Addressing
network Addressingnetwork Addressing
network Addressing
 
ch19new.ppt
ch19new.pptch19new.ppt
ch19new.ppt
 
Chapter 19: Logical Addressing
Chapter 19: Logical AddressingChapter 19: Logical Addressing
Chapter 19: Logical Addressing
 
19 Network Layer_Logical_Addressing
19 Network Layer_Logical_Addressing19 Network Layer_Logical_Addressing
19 Network Layer_Logical_Addressing
 
Ch19
Ch19Ch19
Ch19
 
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree BhadraSubnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
 
CN Unit 3
CN Unit 3 CN Unit 3
CN Unit 3
 
Subnetting in network layer in computer networks
Subnetting in network layer in computer networksSubnetting in network layer in computer networks
Subnetting in network layer in computer networks
 
IP-address trial.ppt
IP-address trial.pptIP-address trial.ppt
IP-address trial.ppt
 
Lecture 03 networking
Lecture 03 networkingLecture 03 networking
Lecture 03 networking
 
Network_layer_addressing.pptx
Network_layer_addressing.pptxNetwork_layer_addressing.pptx
Network_layer_addressing.pptx
 
class 10_internetworking.ppt
class 10_internetworking.pptclass 10_internetworking.ppt
class 10_internetworking.ppt
 
Ch 19
Ch 19Ch 19
Ch 19
 
IPv4 Address uploading.ppt
IPv4 Address uploading.pptIPv4 Address uploading.ppt
IPv4 Address uploading.ppt
 
IP addressing and subnetting.pptx
IP addressing and subnetting.pptxIP addressing and subnetting.pptx
IP addressing and subnetting.pptx
 

More from Jayaprasanna4

ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Human computer Interaction ch1-the human.pdf
Human computer Interaction ch1-the human.pdfHuman computer Interaction ch1-the human.pdf
Human computer Interaction ch1-the human.pdf
Jayaprasanna4
 
computer Networks Error Detection and Correction.ppt
computer Networks Error Detection and Correction.pptcomputer Networks Error Detection and Correction.ppt
computer Networks Error Detection and Correction.ppt
Jayaprasanna4
 
HUman computer Interaction Socio-organizational Issues.ppt
HUman computer Interaction Socio-organizational Issues.pptHUman computer Interaction Socio-organizational Issues.ppt
HUman computer Interaction Socio-organizational Issues.ppt
Jayaprasanna4
 
human computer Interaction cognitive models.ppt
human computer Interaction cognitive models.ppthuman computer Interaction cognitive models.ppt
human computer Interaction cognitive models.ppt
Jayaprasanna4
 
World wide web and Hyper Text Markup Language
World wide web and Hyper Text Markup LanguageWorld wide web and Hyper Text Markup Language
World wide web and Hyper Text Markup Language
Jayaprasanna4
 
CI-Monte-Carlo.ppt
CI-Monte-Carlo.pptCI-Monte-Carlo.ppt
CI-Monte-Carlo.ppt
Jayaprasanna4
 
Activity planning.ppt
Activity planning.pptActivity planning.ppt
Activity planning.ppt
Jayaprasanna4
 
Cost effort.ppt
Cost effort.pptCost effort.ppt
Cost effort.ppt
Jayaprasanna4
 
Activity planning.ppt
Activity planning.pptActivity planning.ppt
Activity planning.ppt
Jayaprasanna4
 
unit-1.ppt
unit-1.pptunit-1.ppt
unit-1.ppt
Jayaprasanna4
 
BGP.ppt
BGP.pptBGP.ppt
BGP.ppt
Jayaprasanna4
 
Lecture 19- Multicasting.ppt
Lecture 19- Multicasting.pptLecture 19- Multicasting.ppt
Lecture 19- Multicasting.ppt
Jayaprasanna4
 
line coding.ppt
line coding.pptline coding.ppt
line coding.ppt
Jayaprasanna4
 
error detection.ppt
error detection.ppterror detection.ppt
error detection.ppt
Jayaprasanna4
 
connecting LANs.pptx
connecting LANs.pptxconnecting LANs.pptx
connecting LANs.pptx
Jayaprasanna4
 
CS1302 06NOV.pdf
CS1302 06NOV.pdfCS1302 06NOV.pdf
CS1302 06NOV.pdf
Jayaprasanna4
 
session and cookies.ppt
session and cookies.pptsession and cookies.ppt
session and cookies.ppt
Jayaprasanna4
 
JDBC.ppt
JDBC.pptJDBC.ppt
JDBC.ppt
Jayaprasanna4
 

More from Jayaprasanna4 (20)

ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Human computer Interaction ch1-the human.pdf
Human computer Interaction ch1-the human.pdfHuman computer Interaction ch1-the human.pdf
Human computer Interaction ch1-the human.pdf
 
computer Networks Error Detection and Correction.ppt
computer Networks Error Detection and Correction.pptcomputer Networks Error Detection and Correction.ppt
computer Networks Error Detection and Correction.ppt
 
HUman computer Interaction Socio-organizational Issues.ppt
HUman computer Interaction Socio-organizational Issues.pptHUman computer Interaction Socio-organizational Issues.ppt
HUman computer Interaction Socio-organizational Issues.ppt
 
human computer Interaction cognitive models.ppt
human computer Interaction cognitive models.ppthuman computer Interaction cognitive models.ppt
human computer Interaction cognitive models.ppt
 
World wide web and Hyper Text Markup Language
World wide web and Hyper Text Markup LanguageWorld wide web and Hyper Text Markup Language
World wide web and Hyper Text Markup Language
 
CI-Monte-Carlo.ppt
CI-Monte-Carlo.pptCI-Monte-Carlo.ppt
CI-Monte-Carlo.ppt
 
Activity planning.ppt
Activity planning.pptActivity planning.ppt
Activity planning.ppt
 
Cost effort.ppt
Cost effort.pptCost effort.ppt
Cost effort.ppt
 
Activity planning.ppt
Activity planning.pptActivity planning.ppt
Activity planning.ppt
 
unit-1.ppt
unit-1.pptunit-1.ppt
unit-1.ppt
 
BGP.ppt
BGP.pptBGP.ppt
BGP.ppt
 
Lecture 19- Multicasting.ppt
Lecture 19- Multicasting.pptLecture 19- Multicasting.ppt
Lecture 19- Multicasting.ppt
 
line coding.ppt
line coding.pptline coding.ppt
line coding.ppt
 
error detection.ppt
error detection.ppterror detection.ppt
error detection.ppt
 
connecting LANs.pptx
connecting LANs.pptxconnecting LANs.pptx
connecting LANs.pptx
 
CS1302 06NOV.pdf
CS1302 06NOV.pdfCS1302 06NOV.pdf
CS1302 06NOV.pdf
 
session and cookies.ppt
session and cookies.pptsession and cookies.ppt
session and cookies.ppt
 
JDBC.ppt
JDBC.pptJDBC.ppt
JDBC.ppt
 

Recently uploaded

BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
Roger Rozario
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
amsjournal
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))
shivani5543
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
MiscAnnoy1
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 

Recently uploaded (20)

BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 

Forouzan-ch19-Network-Layer-Logical-Addressing.ppt

  • 2. 19.2 19-1 IPv4 ADDRESSES An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device (for example, a computer or a router) to the Internet. Address Space Notations Classful Addressing Classless Addressing Network Address Translation (NAT)
  • 3. 19.3 An IPv4 address is 32 bits long. Note
  • 4. 19.4 The IPv4 addresses are unique and universal. Note
  • 5. 19.5 The address space of IPv4 is 232 or 4,294,967,296. Note
  • 6. 19.6 Figure 19.1 Dotted-decimal notation and binary notation for an IPv4 address
  • 7. Example 19.1 Change the following IP addresses from binary notation to dotted-decimal notation. a. 10000001 00001011 00001011 11101111 b. 11111001 10011011 11111011 00001111 Solution We replace each group of 8 bits with its equivalent decimal number and add dots for separation: a. 129.11.11.239 b. 249.155.251.15
  • 8. Example 19.2 Change the following IP addresses from dotted-decimal notation to binary notation. a. 111.56.45.78 b. 75.45.34.78 Solution We replace each decimal number with its binary equivalent : a. 01101111 00111000 00101101 01001110 b. 01001011 00101101 00100010 01001110
  • 9. Types of Addressing There are two type of addressing. They are  Classful addressing  Classless addressing 19.9
  • 10. 19.10 In classful addressing, the address space is divided into five classes: A, B, C, D, and E. Note
  • 11. 19.11 Figure 19.2 Finding the classes in binary and dotted-decimal notation
  • 12.  Class A address: designed for large organizations with a large number of attached hosts or routers. (Wasted and not used)  Class B address: designed for midsize organizations with tens of thousands of attached hosts or routers (too large for many organizations)  Class C address: designed for small organizations with a small number of attached hosts or routers. (too small for many organizations)  Class D address: designed for multicasting. (Waste of addresses)  Class E address: reserved for future use (waste of addresses) The following IP address ranges belong to Google:  64.233.160.0 - 64.233.191.255  66.102.0.0 - 66.102.15.255  66.249.64.0 - 66.249.95.255  72.14.192.0 - 72.14.255.255  74.125.0.0 - 74.125.255.255  209.85.128.0 - 209.85.255.255  216.239.32.0 - 216.239.63.255 Netid and Hostid  The address is divided into netid and hostid.  These parts are of varying lengths, depending on the class. 19.12
  • 13. Blocks in class A 19.13
  • 14. 19.14 In classful addressing, a large part of the available addresses were wasted. Note
  • 15. 19.15 Find the class of each address. a. 00000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 c. 14.23.120.8 d. 252.5.15.111 Example 19.4 Solution a. The first bit is 0. This is a class A address. b. The first 2 bits are 1; the third bit is 0. This is a class C address. c. The first byte is 14; the class is A. d. The first byte is 252; the class is E.
  • 16. 19.16 Table 19.1 Number of blocks and block size in classful IPv4 addressing
  • 17. Mask  It can help us to find the netid and hostid.  It is 32-bit number made of contiguous 1s followed by contiguous 0s. CIDR (Classless Interdomain Routing) or slash notation:  It is used to show the mask in the form /n (n=8, 16, 24)  In classful addressing, a large part of the available addresses were wasted. 19.17 Table 19.2 Default masks for classful addressing
  • 18. Sub netting  If an organization was granted a large block in class A or B, it could divide the addresses into several contiguous groups and assign each group to smaller networks (subnets) .  It increases the number of 1s in the mask. Super netting  Although class A and B addresses are almost depleted, class C addresses are still available (size of block= 256 so address did not satisfy the needs).  In super netting, an organization can combine several class C blocks to create a larger range of addresses.  Several networks are combined to create a super network (super net). E.g. Organization needs 1000 address can be granted 4 contiguous class C blocks. Create one super network. It decreases the number of 1s in the mask. Address Depletion  Class C block is too small for most mid size organizations. So the solution is Classless addressing.  Classful addressing, which is almost obsolete, is replaced with classless addressing. 19.18
  • 19. 19.19 Classful addressing, which is almost obsolete, is replaced with classless addressing. Note
  • 20. Classless addressing  To overcome address depletion and give more organizations access to the internet, classless addressing was designed.  There are no classes, but the addresses are still granted in blocks.  The size of the block (the number of addresses) varies based on the nature and size of the entity. • Household: 2 addresses • Large organization: thousands of addresses. • ISP: thousands or hundreds of thousands based on the number of customers it may serve. 19.20
  • 21. 19.21 Figure 19.3 A block of 16 addresses granted to a small organization
  • 22. 19.22 In IPv4 addressing, a block of addresses can be defined as x.y.z.t /n in which x.y.z.t defines one of the addresses and the /n defines the mask. Note
  • 23. 19.23 The first address in the block can be found by setting the rightmost 32 − n bits to 0s. Note
  • 24. 19.24 A block of addresses is granted to a small organization. We know that one of the addresses is 205.16.37.39/28. What is the first address in the block? Solution The binary representation of the given address is 11001101 00010000 00100101 00100111 If we set 32−28 rightmost bits to 0, we get 11001101 00010000 00100101 0010000 or 205.16.37.32. This is actually the block shown in Figure 19.3. Example 19.6
  • 25. 19.25 The last address in the block can be found by setting the rightmost 32 − n bits to 1s. Note
  • 26. 19.26 Find the last address for the block in Example 19.6. Solution The binary representation of the given address is 11001101 00010000 00100101 00100111 If we set 32 − 28 rightmost bits to 1, we get 11001101 00010000 00100101 00101111 or 205.16.37.47 This is actually the block shown in Figure 19.3. Example 19.7
  • 27. 19.27 The number of addresses in the block can be found by using the formula 232−n. Note
  • 28. 19.28 Find the number of addresses in Example 19.6. Example 19.8 Solution The value of n is 28, which means that number of addresses is 2 32−28 or 16.
  • 29. 19.29 Another way to find the first address, the last address, and the number of addresses is to represent the mask as a 32- bit binary (or 8-digit hexadecimal) number. This is particularly useful when we are writing a program to find these pieces of information. In Example 19.5 the /28 can be represented as 11111111 11111111 11111111 11110000 (twenty-eight 1s and four 0s). Find a. The first address b. The last address c. The number of addresses. Example 19.9
  • 30. 19.30 Solution a. The first address can be found by ANDing the given addresses with the mask. ANDing here is done bit by bit. The result of ANDing 2 bits is 1 if both bits are 1s; the result is 0 otherwise. Example 19.9 (continued)
  • 31. 19.31 b. The last address can be found by ORing the given addresses with the complement of the mask. ORing here is done bit by bit. The result of ORing 2 bits is 0 if both bits are 0s; the result is 1 otherwise. The complement of a number is found by changing each 1 to 0 and each 0 to 1. Example 19.9 (continued)
  • 32. 19.32 c. The number of addresses can be found by complementing the mask, interpreting it as a decimal number, and adding 1 to it. Example 19.9 (continued)
  • 33. 19.33 NETWORK ADDRESS: The first address in a block is normally not assigned to any device; it is used as the network address that represents the organization to the rest of the world. Note
  • 34. Example:  Given the address 23.56.7.91, find the network address. Solution:  The class is A. Only the first byte defines the netid. We can find the network address by replacing the hostid bytes (56.7.91) with 0s. Therefore, the network address is 23.0.0.0. Example:  Given the address  132.6.17.85 and 23.56.7.91, find the network address? Solution  1. The class is B. The first 2 bytes defines the netid. We can find the network address by replacing the hostid bytes (17.85) with 0s. 132.6.0.0.  2. The class is A. Only the first byte defines the netid. We can find the network address by replacing the hostid bytes (56.7.91) with 0s. Therefore, the network address is 23.0.0.0. 19.34
  • 35. Hierarchy: Two-level Hierarchy: No sub netting  An IP address can define only two levels of hierarchy when not sub netted.  Prefix: the leftmost n bits define the network  Suffix: the rightmost 32  n bits define the host (computer or router).  Prefix is common to all network address. Three-level hierarchy in an IPv4 address (Sub netted)  An organization that is granted a large block of addresses may want to create clusters of networks (called subnets) and divide the addresses between the different subnets.  Addresses in a network with and without sub netting  The network address can be found by applying the default mask to any address in the block (including itself).It retains the netid of the block and sets the hostid to 0s. 19.35
  • 36. 19.36 Figure 19.5 Two levels of hierarchy in an IPv4 address IP address, like other address, has levels of hierarchy. For example: telephone network in North America
  • 37. 19.37 Figure 19.6 A frame in a character-oriented protocol
  • 38. 19.38 Figure 19.8 Three-level hierarchy in an IPv4 address
  • 39. 19.39 Figure 19.10 A NAT implementation Network Address Translation (NAT) NAT enables a user to have a large set of addresses internally and one address, or a small set of addresses, externally. The traffic inside can use the large set; the traffic outside, the small set.
  • 40. 19.40 Figure 19.11 Addresses in a NAT Address translation All the outgoing packets go through the NAT router, which replaces the source address in the packet with the global NAT address. All incoming packets also pass through the NAT router, which replaces the destination address in the packet (the NAT router global address) with the appropriate private address.
  • 41. 19.41 Figure 19.12 NAT address translation
  • 42. 19.42 19-2 IPv6 ADDRESSES Despite all short-term solutions, address depletion is still a long-term problem for the Internet. This and other problems in the IP protocol itself have been the motivation for IPv6. Structure Address Space Topics discussed in this section:
  • 43. 19.43 An IPv6 address is 128 bits long. Note
  • 44. 19.44 Figure 19.14 IPv6 address in binary and hexadecimal colon notation
  • 46. 19.46 Expand the address 0:15::1:12:1213 to its original. Example 19.11 Solution We first need to align the left side of the double colon to the left of the original pattern and the right side of the double colon to the right of the original pattern to find how many 0s we need to replace the double colon. This means that the original address is.
  • 47. 19.47 Table 19.5 Type prefixes for IPv6 addresses
  • 48. 19.48 Table 19.5 Type prefixes for IPv6 addresses (continued)
  • 49. 19.49 Figure 19.16 Prefixes for provider-based unicast address
  • 50. 19.50 Figure 19.17 Multicast address in IPv6
  • 51. 19.51 Figure 19.18 Reserved addresses in IPv6
  • 52. 19.52 Figure 19.19 Local addresses in IPv6
  • 53. Routing Table  Static routing table: created manually  Dynamic routing table: updated periodically by using one of the dynamic routing protocols such as RIP, OSPF, or BGP. Routing Protocols  A router consults a routing table when a packet is ready to be forwarded  The routing table specifies the optimum path for the packet: static or dynamic  Internet needs dynamic routing tables to be updated as soon as there is a change  There are two routing: Unicast routing and multicasting routing  RIP (Routing Information Protocol), OSPF (Open Shortest Path First), BGP (Border Gateway Protocol)
  • 54. Optimization  Which of the available pathways is the optimum pathway ?  One approach is to assign a cost for passing through a network, called metric  Total metric is equal to the sum of the metrics of networks that comprise the route Router chooses the route with shortest (smallest) metric RIP (Routing Information Protocol):  The cost of passing each network is one hop count.  If a packet passes through 10 networks to reach the destination, the total cost is 10 hop counts. OSPF (Open Shortest Path First):  Administrator can assign cost for passing a network based on type of service required.  OSPF allows each router to have more than one routing table based on required type of service. Such as Maximum throughput or minimum delay. BGP (Border Gateway Protocol):  Criterion is the policy, which is set by the administrator(speaker node).
  • 55. Intra- and Interdomain Routing  AS (autonomous system): A group of networks and routers under the authority of a single administration  Intradomain routing: inside an AS  Interdomain routing: between ASs  R1, R2, R3, and R4 use a intradomain and an interdomain routing protocol.  The other routes use only intradomain routing protocols
  • 57. Routing Algorithm classification 1. Distance vector algorithms: router knows physically-connected neighbors, link costs to neighbors, iterative process of computation, exchange of partial information with neighbors. 2. Link state algorithms: all routers have complete topology, link cost information. Metric of different routing protocols  Metric is the cost assigned for passing through a network.  The total metric of a particular route is equal to the sum of the metrics of networks that comprise the route.  A router chooses the route with smallest metric. RIP (Routing Information Protocol):  The cost of passing each network is one hop count.  If a packet passes through 10 networks to reach the destination, the total cost is 10 hop counts. 19.57
  • 58. OSPF (Open Shortest Path First):  Administrator can assign cost for passing a network based on type of service required.  OSPF allows each router to have more than one routing table based on required type of service. Such as Maximum throughput or minimum delay. BGP (Border Gateway Protocol):  Criterion is the policy, which is set by the administrator(speaker node). 19.58
  • 59. DISTANCE VECTOR ROUTING  Each node maintains a set of triples (Destination, Cost, NextHop)  Node knows the cost to each neighbor.  Directly connected neighbors exchange updates  Periodically (normally every 30 secs)  whenever table changes (called triggered update)  Each update is a list of pairs: (Destination, Cost) 19.59
  • 60. Routing Table  Neighbors exchange table entries  Determine current best next hop  For each destination list: Next Node Distance  “In distance vector routing, each node shares its routing table with its immediate neighbors periodically and when there is a change.”  The least-cost route between any two nodes is the route with minimum distance.  Each node maintains a vector(table) of minimum distances to every node 19.60
  • 62. To Cost nex t A 0 - B 5 - C 2 - D 3 - E 6 C 19.62 A C D B E 5 2 3 4 4 3 A’s Table T o Cost ne xt A 3 - B 8 A C 5 A D 0 - E 9 A T o Cos t ne xt A 2 - B 4 - C 0 - D 5 A E 4 - D’s Table C’s Table T o Cos t ne xt A 6 C B 3 - C 4 - D 9 C E 0 - E’s Table B’s Table T o Cos t ne xt A 5 - B 0 - C 4 - D 8 A E 3 - Distance vector routing tables The least-cost route between any two nodes is the route with minimum distance. Each node maintains a vector(table) of minimum distances to every node
  • 63. Initialization of tables in DV Routing 19.63 A B C D E 5 2 3 3 4 4  At the beginning, each node can know only the distance between itself and its immediate neighbors
  • 64. 22-64 Distance Vector Routing: Sharing  In distance vector routing, each node shares its routing table with its immediate neighbors periodically and when there is a change
  • 65. Updating in Distance Vector Routing 19.65 When a node receives a two-column table from a neighbor, it need to update its routing table Updating rule: Choose the smaller cost. If the same, keep the old one If the next-node entry is the same, the receiving node chooses the new row
  • 66. 22-66 When to Share  Periodic update: A node sends its routing table, normally every 30 s  Triggered update: Anode sends its two-column routing table to its neighbors anytime there is a change in its routing table
  • 67. Link State Routing  Each node has the entire topology of the domain- the list of nodes and links, how they are connected including type, cost, and condition of the links(up or down)  Node can use Dijkstra’s algorithm to build a routing table
  • 68. Link State Knowledge  Each node has partial knowledge: it know the state (type, condition, and cost) of its links. The whole topology can be compiled from the partial knowledge of each node
  • 69. Building Routing Table 1. Creation of the states of the links by each node, called the link state packet (LSP) 2. Dissemination of LSPs to every other router, called flooding, in an efficient and reliable way 3. Formation of a shortest path tree for each node 4. Calculation of a routing table based on the shortest path tree 1.Creation of LSP  LSP contains node identity, the list of links (to make the topology), sequence number (to facilitate flooding and distinguish new LSPs from old ones)  LSPs are generated (1) when there is a change in the topology of the domain, (2) on a periodic basis, normally 60 min or 2 h
  • 70. Building Routing Table 2.Flooding of LSPs  The creating node sends a copy of the LSP out of each interface  A node compares it with the copy it may already have. If the newly arrived LSP is older than the one it has, it discards the LSP. If it is newer, 1. It discards the old LSP and keeps the new one 2. It sends a copy of it out of each interface except the one from which the packet arrived 3.Formation of shortest path tree: Dijkstra Algorithm  After receiving all LSPs, each node will have a copy of the whole topology. Need to find the shortest path to every other node  The Dijkstra algorithm creates a shortest path tree from a graph
  • 71. Calculation of path using Dijkstra Algorithm
  • 72. Example of Dijkstra Algorithm
  • 73. Strategy  send to all nodes (not just neighbors)  information about directly connected links (not entire routing table) Building Routing Tables: Link State Packet (LSP)  id of the node that created the LSP  cost of link to each directly connected neighbor  sequence number  Time-to-live (TTL) for this packet. Reliable flooding  Store most recent LSP from each node  Forward LSP to all nodes but the one that sent it.  generate new LSP periodically  Increment sequence number  Start sequence number at 0 when reboot. 19.73
  • 74. Route Calculation  Dijkstra’s shortest path algorithm (Dijkstra algorithm)  Calculates the shortest path between two points on a network, using a graph made up of nodes and edges.  Algorithm divides the nodes into two sets: tentative and permanent. It chooses current node, makes them tentative, examines them, and if they pass the criteria, makes them permanent. Dijkstra Algorithm 1. Start with the local node (router) as the root of the tree. 2. Assign a cost of 0 to this node and make it the first permanent node. 3. Examine each neighbor of the node that was the last permanent node. 4. Assign a cumulative cost to each node and make it tentative. 5. Among the list of tentative nodes Find the node with the smallest cost and make it permanent. If a node can be reached from more than one route, then select the route with the shortest cumulative cost. 6. Repeat steps 3 to 5 until every node becomes permanent. 19.74
  • 75. Shortest Paths in Dijkstra’s Algorithm 19.75
  • 76. Execution of Dijkstra’s algorithm 19.76
  • 90. Routing Table for Router A