SlideShare a Scribd company logo
Computer Networks
LEC #2
Communicating Over the
Network
Computer Networks
LEC #5
Network Layer
Lecture Outlines
2
 Network Layer.
Addressing
Subnetting
Mask (default and subnet)
Routing
Next
Lecture
Network Layer
Network-layer services and protocols
 transport packet from sending to
receiving host
 sender: encapsulates segments into
packet header, passes to datalink layer
 receiver: delivers packet to transport
layer protocol
 network layer protocols in every
Internet device: hosts, routers
mobile network
enterprise
network
national or global ISP
datacenter
network
applicatio
n
transport
network
link
physical
applicatio
n
transport
network
link
physical
networ
k
link
physica
l
networ
k
link
physica
l
networ
k
link
physica
l
networ
k
link
physica
l
networ
k
link
physica
l
 Routers:
 examines header fields in all IP packets passing through it and moves
packet from input ports to output ports to transfer it along end-end
path
 Network layer help to communication from Host to Host through IP
(internet protocol) addressing
Network Layer
Connection Oriented and Connectionless
Connection-oriented protocols, such as TCP, require that control data be
exchanged to establish the connection and additional fields in the PDU
(protocol data unit) header.
 Because IP is connectionless, it requires no initial exchange of control
information to establish an end-to-end connection before packets are
forwarded,
This process greatly reduces the overhead of IP.
Addressing
 IP address (Logical address) :
Internet Protocol (IP) is a numerical label assigned to each
computer (host)
in the network for communication.
 There are two version from IP:
 IP4 : 32 bits (written by binary in 4 parts separated by . 2 32 = 4 294967 296
devices)
 IP6 : 128 bits (written by hex decimal in 8 parts separated by : (2128 )
Decimal notation
1 0
Binary notation
• To convert IP Address from Binary to Decimal
notation
128 64 32 16 8 4 2 1
1 0 0 1 0 0 0 1
 128 + 16 + 1 = 145
First
Byte
Second
Byte
Third
Byte
Fourth
Byte
128 64 32 16 8 4 2 1
0 0 0 0 1 0 1 0
 8 + 2 = 10
128 64 32 16 8 4 2 1
0 0 1 0 0 0 1 0
 32 + 2 = 34
128 64 32 16 8 4 2 1
0 0 0 0 0 0 1 1
 2 + 1 = 3
Addressing
How to convert
binary to decimal
• To convert IP Address from Decimal to Binary
notation
First
Byte
Third
Byte
Fourth
Byte
2 145
2 72
2 36
2 18
2 9
2 4
2 2
1
1
0
0
0
1
0
0
1
10010001
2 10
2 5
2 2
2 1
0
1
0
1
0
0
0
0
Second
Byte
00001010
2 34
2 17
2 8
2 4
2 2
1
0
1
0
0
0
1
0
0
2 3
1
1
1
0
0
0
0
0
0
00100010 00000011
Addressing
How to convert
decimal to binary
1.1
1.2
1.3
2.1
2.2
3.1
3.2
Anatomy of an IPv4 Address
• To identify a path or "route" through a network, the address must be
composed of two parts: 1) Network portion 2) Host portion
IP Address 192. 168. 1. 2
Network portion Host portion
Anatomy of an IPv4 Address
• Network Portion:
 At Layer 3, we define a network as a group of hosts that have identical
bit patterns in the network address portion of their addresses.
192.168.1.2 192 168 1 2
192.168.1.67 192 168 1 67
192.168.1.204 192 168 1 204
Network portion Host portion
• Host Portion:
 There are a variable number of bits that are called the host portion of
the address.
 The number of bits used in this host portion determines the number of
hosts that we can have within the network.
Addressing
Address is divided into 5 classes A, B, C, D, E.
The Class of the address determines which part belongs to the network
address and which part belongs to the host address.
Which class of the following IP?
• 227.12.14.56 ?
• 134.11.78.9 ?
0 to 127
128 to 191 Net ID
192 to 223 Net ID Net ID
224 to 239
Class A
Class B
Class C
Class D
Class E 240 to 255
First Byte Second Byte Third Byte Fourth Byte
Class D
Class B
Used for Multicasting to multiple hosts.
Reserved for research and development.
Addressing
Class
First
Octet
Range
Number
of Network
Bits
Number
of Host
Bits
Number
of
Networks
Number
of Hosts
per Network
A 0-127 8 24 128 16,777,216
B 128-191 16 16 16,384 65,536
C 192-223 24 8 2,097,152 256
For example class A reserve first part which is 8 bits (0-7) 2 7 =128 Networks
and, number of hosts is 16777216 ( reserve 3 parts which is 24 bits 2 24
=16777216.
Generally : The address 127.0.0.1 is reserved for testing NIC (ping 127.0.0.1)
Note that
 Network id + zeros in binary → network address. (Not allocated to a host).
For example in class A :112.0.0.0 is called network address and you can not
use it.
 Network id + ones in binary → broadcast address. (Not allocated to a host).
For example in class A : 112.255.255.255 is called broadcast address and you
can not use it.
 Network id + host-id → host address. For example 112.10.12.13
An IP4 host address: 123.234.210.109
• 123 = network id - in class A
• What is the network address?
• What is the broadcast address?
• Which of the following is valid IP address in the network?
• 123.15.8.9
• 123.234.210.112
• 125.12.15.23
• 123.234.210.109
valid
valid
Invalid : another network
Invalid : duplicate IP
Examples
123.0.0.0
123.255.255.255
Examples
• Given the host address 132.6.17.85, find the network address?
• Answer: The network address is 132.6.0.0.
• How to think: This address lies in class is B. Then the first 2 bytes
defines the net-id. So, we can find the network address by replacing
the host-id bytes (17.85) with 0s. Therefore, The network address is
132.6.0.0.
• Note:
• A network-address is different from a net-id. A network-address has
both net-id and host-id, with 0s for the host-id.
 Find Network address for this IP’s
 23.56.7.91
 132.6.17.85
Class A (0-127) then the network address is 23.0.0.0
Class B (128-191) then the network address is 132.6.0.0
Network Address : Example
123.0.0.0
Class A
123.0.0.1 123.65.7.43
123.255.255.254 141.14.0.0
Class B
141.14.22.8 141.14.76.67
141.14.45.9
221.45.71.20
221.45.71.0
Class C
221.45.71.126
221.45.71.65
17
Ad

More Related Content

Similar to 6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) Routing (20)

chapter 4.pptx
chapter 4.pptxchapter 4.pptx
chapter 4.pptx
aakritii765
 
Ip address
Ip addressIp address
Ip address
Amandeep Kaur
 
Chapter_4 Network Layer-IP datagram and addressing.ppt.pdf
Chapter_4 Network Layer-IP datagram and addressing.ppt.pdfChapter_4 Network Layer-IP datagram and addressing.ppt.pdf
Chapter_4 Network Layer-IP datagram and addressing.ppt.pdf
osama Alshoraihi
 
Ip Addressing Basics
Ip Addressing BasicsIp Addressing Basics
Ip Addressing Basics
tmavroidis
 
IP_ADDRESSING_AND_SUBNETTIN networkG.pptx
IP_ADDRESSING_AND_SUBNETTIN networkG.pptxIP_ADDRESSING_AND_SUBNETTIN networkG.pptx
IP_ADDRESSING_AND_SUBNETTIN networkG.pptx
YazanMohamed1
 
How IP address works
How IP address worksHow IP address works
How IP address works
Sanjeev Kumar Jaiswal
 
1703_anusua_basuclassful addressing_IP_Addressing
1703_anusua_basuclassful addressing_IP_Addressing1703_anusua_basuclassful addressing_IP_Addressing
1703_anusua_basuclassful addressing_IP_Addressing
AnusuaBasu
 
Chap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmpChap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmp
東原 李
 
https://diplomasolutionstudents.blogspot.com/
https://diplomasolutionstudents.blogspot.com/https://diplomasolutionstudents.blogspot.com/
https://diplomasolutionstudents.blogspot.com/
Rathodpradip1
 
IP Address
IP AddressIP Address
IP Address
Sameer Alam
 
Lecture 03 networking
Lecture 03 networkingLecture 03 networking
Lecture 03 networking
HNDE Labuduwa Galle
 
computer network notes in network layer.
computer network notes in network layer.computer network notes in network layer.
computer network notes in network layer.
shivanigarv9115
 
NDC Chapter 1.pptx for all this is veriy importan pwor point for all students
NDC Chapter 1.pptx for all this is veriy importan pwor point for all studentsNDC Chapter 1.pptx for all this is veriy importan pwor point for all students
NDC Chapter 1.pptx for all this is veriy importan pwor point for all students
adisuadmasu42
 
NDC Chapter 1.pptx for all this is veriy importan pwor point for all students
NDC Chapter 1.pptx for all this is veriy importan pwor point for all studentsNDC Chapter 1.pptx for all this is veriy importan pwor point for all students
NDC Chapter 1.pptx for all this is veriy importan pwor point for all students
adisuadmasu42
 
Computer network
Computer networkComputer network
Computer network
Gaurav Rawat
 
Network layer. IP Addressing Part 1.pptx
Network layer. IP Addressing Part 1.pptxNetwork layer. IP Addressing Part 1.pptx
Network layer. IP Addressing Part 1.pptx
MujtabaVlogs
 
Umutima.ppt
Umutima.pptUmutima.ppt
Umutima.ppt
kigaliac
 
data and addressing for internet having new
data and addressing for internet having newdata and addressing for internet having new
data and addressing for internet having new
aashimakundu8
 
15 3
15 315 3
15 3
kranthirekha132
 
Ip address presentation
Ip address presentationIp address presentation
Ip address presentation
muhammad amir
 
Chapter_4 Network Layer-IP datagram and addressing.ppt.pdf
Chapter_4 Network Layer-IP datagram and addressing.ppt.pdfChapter_4 Network Layer-IP datagram and addressing.ppt.pdf
Chapter_4 Network Layer-IP datagram and addressing.ppt.pdf
osama Alshoraihi
 
Ip Addressing Basics
Ip Addressing BasicsIp Addressing Basics
Ip Addressing Basics
tmavroidis
 
IP_ADDRESSING_AND_SUBNETTIN networkG.pptx
IP_ADDRESSING_AND_SUBNETTIN networkG.pptxIP_ADDRESSING_AND_SUBNETTIN networkG.pptx
IP_ADDRESSING_AND_SUBNETTIN networkG.pptx
YazanMohamed1
 
1703_anusua_basuclassful addressing_IP_Addressing
1703_anusua_basuclassful addressing_IP_Addressing1703_anusua_basuclassful addressing_IP_Addressing
1703_anusua_basuclassful addressing_IP_Addressing
AnusuaBasu
 
Chap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmpChap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmp
東原 李
 
https://diplomasolutionstudents.blogspot.com/
https://diplomasolutionstudents.blogspot.com/https://diplomasolutionstudents.blogspot.com/
https://diplomasolutionstudents.blogspot.com/
Rathodpradip1
 
computer network notes in network layer.
computer network notes in network layer.computer network notes in network layer.
computer network notes in network layer.
shivanigarv9115
 
NDC Chapter 1.pptx for all this is veriy importan pwor point for all students
NDC Chapter 1.pptx for all this is veriy importan pwor point for all studentsNDC Chapter 1.pptx for all this is veriy importan pwor point for all students
NDC Chapter 1.pptx for all this is veriy importan pwor point for all students
adisuadmasu42
 
NDC Chapter 1.pptx for all this is veriy importan pwor point for all students
NDC Chapter 1.pptx for all this is veriy importan pwor point for all studentsNDC Chapter 1.pptx for all this is veriy importan pwor point for all students
NDC Chapter 1.pptx for all this is veriy importan pwor point for all students
adisuadmasu42
 
Network layer. IP Addressing Part 1.pptx
Network layer. IP Addressing Part 1.pptxNetwork layer. IP Addressing Part 1.pptx
Network layer. IP Addressing Part 1.pptx
MujtabaVlogs
 
Umutima.ppt
Umutima.pptUmutima.ppt
Umutima.ppt
kigaliac
 
data and addressing for internet having new
data and addressing for internet having newdata and addressing for internet having new
data and addressing for internet having new
aashimakundu8
 
Ip address presentation
Ip address presentationIp address presentation
Ip address presentation
muhammad amir
 

More from ZahouAmel1 (18)

2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
ZahouAmel1
 
1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptx1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptx
ZahouAmel1
 
Lecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType ClassificationtxLecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType Classificationtx
ZahouAmel1
 
Lecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType ClassificationLecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType Classification
ZahouAmel1
 
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
ZahouAmel1
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
ZahouAmel1
 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
ZahouAmel1
 
Lec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptxLec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptx
ZahouAmel1
 
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptxDB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
ZahouAmel1
 
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpyDB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
ZahouAmel1
 
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
ZahouAmel1
 
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
ZahouAmel1
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
ZahouAmel1
 
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
ZahouAmel1
 
7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer
ZahouAmel1
 
8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx
ZahouAmel1
 
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
ZahouAmel1
 
9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer
ZahouAmel1
 
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
ZahouAmel1
 
1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptx1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptx
ZahouAmel1
 
Lecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType ClassificationtxLecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType Classificationtx
ZahouAmel1
 
Lecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType ClassificationLecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType Classification
ZahouAmel1
 
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
ZahouAmel1
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
ZahouAmel1
 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
ZahouAmel1
 
Lec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptxLec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptx
ZahouAmel1
 
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptxDB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
ZahouAmel1
 
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpyDB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
ZahouAmel1
 
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
ZahouAmel1
 
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
ZahouAmel1
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
ZahouAmel1
 
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
ZahouAmel1
 
7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer
ZahouAmel1
 
8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx
ZahouAmel1
 
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
ZahouAmel1
 
9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer
ZahouAmel1
 
Ad

Recently uploaded (20)

AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Social Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTechSocial Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTech
Steve Jonas
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Mastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdfMastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdf
Spiral Mantra
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Unlocking the Power of IVR: A Comprehensive Guide
Unlocking the Power of IVR: A Comprehensive GuideUnlocking the Power of IVR: A Comprehensive Guide
Unlocking the Power of IVR: A Comprehensive Guide
vikasascentbpo
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Social Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTechSocial Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTech
Steve Jonas
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Mastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdfMastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdf
Spiral Mantra
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Unlocking the Power of IVR: A Comprehensive Guide
Unlocking the Power of IVR: A Comprehensive GuideUnlocking the Power of IVR: A Comprehensive Guide
Unlocking the Power of IVR: A Comprehensive Guide
vikasascentbpo
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Ad

6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) Routing

  • 1. Computer Networks LEC #2 Communicating Over the Network Computer Networks LEC #5 Network Layer
  • 2. Lecture Outlines 2  Network Layer. Addressing Subnetting Mask (default and subnet) Routing Next Lecture
  • 4. Network-layer services and protocols  transport packet from sending to receiving host  sender: encapsulates segments into packet header, passes to datalink layer  receiver: delivers packet to transport layer protocol  network layer protocols in every Internet device: hosts, routers mobile network enterprise network national or global ISP datacenter network applicatio n transport network link physical applicatio n transport network link physical networ k link physica l networ k link physica l networ k link physica l networ k link physica l networ k link physica l  Routers:  examines header fields in all IP packets passing through it and moves packet from input ports to output ports to transfer it along end-end path
  • 5.  Network layer help to communication from Host to Host through IP (internet protocol) addressing Network Layer
  • 6. Connection Oriented and Connectionless Connection-oriented protocols, such as TCP, require that control data be exchanged to establish the connection and additional fields in the PDU (protocol data unit) header.  Because IP is connectionless, it requires no initial exchange of control information to establish an end-to-end connection before packets are forwarded, This process greatly reduces the overhead of IP.
  • 7. Addressing  IP address (Logical address) : Internet Protocol (IP) is a numerical label assigned to each computer (host) in the network for communication.  There are two version from IP:  IP4 : 32 bits (written by binary in 4 parts separated by . 2 32 = 4 294967 296 devices)  IP6 : 128 bits (written by hex decimal in 8 parts separated by : (2128 ) Decimal notation 1 0 Binary notation
  • 8. • To convert IP Address from Binary to Decimal notation 128 64 32 16 8 4 2 1 1 0 0 1 0 0 0 1  128 + 16 + 1 = 145 First Byte Second Byte Third Byte Fourth Byte 128 64 32 16 8 4 2 1 0 0 0 0 1 0 1 0  8 + 2 = 10 128 64 32 16 8 4 2 1 0 0 1 0 0 0 1 0  32 + 2 = 34 128 64 32 16 8 4 2 1 0 0 0 0 0 0 1 1  2 + 1 = 3 Addressing How to convert binary to decimal
  • 9. • To convert IP Address from Decimal to Binary notation First Byte Third Byte Fourth Byte 2 145 2 72 2 36 2 18 2 9 2 4 2 2 1 1 0 0 0 1 0 0 1 10010001 2 10 2 5 2 2 2 1 0 1 0 1 0 0 0 0 Second Byte 00001010 2 34 2 17 2 8 2 4 2 2 1 0 1 0 0 0 1 0 0 2 3 1 1 1 0 0 0 0 0 0 00100010 00000011 Addressing How to convert decimal to binary
  • 10. 1.1 1.2 1.3 2.1 2.2 3.1 3.2 Anatomy of an IPv4 Address • To identify a path or "route" through a network, the address must be composed of two parts: 1) Network portion 2) Host portion IP Address 192. 168. 1. 2 Network portion Host portion
  • 11. Anatomy of an IPv4 Address • Network Portion:  At Layer 3, we define a network as a group of hosts that have identical bit patterns in the network address portion of their addresses. 192.168.1.2 192 168 1 2 192.168.1.67 192 168 1 67 192.168.1.204 192 168 1 204 Network portion Host portion • Host Portion:  There are a variable number of bits that are called the host portion of the address.  The number of bits used in this host portion determines the number of hosts that we can have within the network.
  • 12. Addressing Address is divided into 5 classes A, B, C, D, E. The Class of the address determines which part belongs to the network address and which part belongs to the host address. Which class of the following IP? • 227.12.14.56 ? • 134.11.78.9 ? 0 to 127 128 to 191 Net ID 192 to 223 Net ID Net ID 224 to 239 Class A Class B Class C Class D Class E 240 to 255 First Byte Second Byte Third Byte Fourth Byte Class D Class B Used for Multicasting to multiple hosts. Reserved for research and development.
  • 13. Addressing Class First Octet Range Number of Network Bits Number of Host Bits Number of Networks Number of Hosts per Network A 0-127 8 24 128 16,777,216 B 128-191 16 16 16,384 65,536 C 192-223 24 8 2,097,152 256 For example class A reserve first part which is 8 bits (0-7) 2 7 =128 Networks and, number of hosts is 16777216 ( reserve 3 parts which is 24 bits 2 24 =16777216. Generally : The address 127.0.0.1 is reserved for testing NIC (ping 127.0.0.1) Note that  Network id + zeros in binary → network address. (Not allocated to a host). For example in class A :112.0.0.0 is called network address and you can not use it.  Network id + ones in binary → broadcast address. (Not allocated to a host). For example in class A : 112.255.255.255 is called broadcast address and you can not use it.  Network id + host-id → host address. For example 112.10.12.13
  • 14. An IP4 host address: 123.234.210.109 • 123 = network id - in class A • What is the network address? • What is the broadcast address? • Which of the following is valid IP address in the network? • 123.15.8.9 • 123.234.210.112 • 125.12.15.23 • 123.234.210.109 valid valid Invalid : another network Invalid : duplicate IP Examples 123.0.0.0 123.255.255.255
  • 15. Examples • Given the host address 132.6.17.85, find the network address? • Answer: The network address is 132.6.0.0. • How to think: This address lies in class is B. Then the first 2 bytes defines the net-id. So, we can find the network address by replacing the host-id bytes (17.85) with 0s. Therefore, The network address is 132.6.0.0. • Note: • A network-address is different from a net-id. A network-address has both net-id and host-id, with 0s for the host-id.  Find Network address for this IP’s  23.56.7.91  132.6.17.85 Class A (0-127) then the network address is 23.0.0.0 Class B (128-191) then the network address is 132.6.0.0
  • 16. Network Address : Example 123.0.0.0 Class A 123.0.0.1 123.65.7.43 123.255.255.254 141.14.0.0 Class B 141.14.22.8 141.14.76.67 141.14.45.9 221.45.71.20 221.45.71.0 Class C 221.45.71.126 221.45.71.65
  • 17. 17