Lesson 06
Lesson 06
Network Layer
&
Logical Addressing
Network Layer application
transport
network
physical
application
network transport
data link network network
network physical data link data link
data link physical physical
physical
2
Network Layer
Segments
3
Network Layer functions
• Primary function is to transport packets from source to
destination via multiple data link layer networks
0111 1
2
3
4
Network Layer functions
● What is the address of the destination?
● Globally unique address
5
Network Layer functions
• Individual routing algorithm components in each and every router interact in
the control plane
Routing
Algorithm
control
plane
data
plane
0111 1
2
3
6
Network Layer
7
Network Layer:
8
IP Datagram
● Data transmitted over an internet using IP is carried in messages
called IP datagrams.
● Like all network protocol messages
9
IP Datagram header format 32 bit
10
IP Address format
12
IP Address classes
● The first set of bits used to the network and the remaining
bits for the host into that network.
13
IP Address classes
14
IP Address class A
● The first 8 bits (called the first octet) used to the network and the
remaining have 24 bits for the host into that network.
● The first bit of the first octet is always set to 0 (zero)
15
IP Address class A
• Class A addresses only include IP starting from 0.0.0.0 to
127.255.255.255 only.
• The address 0.0.0.0 is a non-routable meta-address used to an
invalid or non-applicable.
• The IP range 127.255.255.255 is reserved for loopback IP addresses
17
IP Address class B
● The first 16 bits used to the network and the remaining have 16 bits
for the host into that network.
● The first two bits of the first octet is always set to 1 and 0
● The network Address Range
10000000 – 10111111
128 - 191
18
IP Address class B
• Class B addresses only include IP starting from 128.0.0.0 to
191.255.255.255 only.
• 128.0.0.0 to 191.255.255.255
• Number of Hosts Per Network = 2^16 -2 = 65534
• Network addresses = 2^14 = 16384
Network addresses
Host addresses
19
IP Address class C
● The first 24 bits used to the network and the remaining have 8 bits
for the host into that network.
● The first three bits of the first octet is always set to 110
● The network Address Range
11000000 – 11011111
192 - 223
20
IP Address class C
• Class C addresses only include IP starting from 192.0.0.0 to
223.255.255.255 only.
• 192.0.0.0 to 223.255.255.255
• Number of Hosts Per Network = 2^8 -2 = 254
• Network addresses = 2^21 = 2097152
Network addresses
Host addresses
21
IP Address class D
● The first four bits of the first octet is always set to 1110
● The network Address Range
11100000 – 11101111
224 - 239
22
IP Address class D
• Class D addresses only include IP starting from 224.0.0.0 to
239.255.255.255
• Class D is reserved for Multicasting.
• Multicast is a method of group communication where the sender
sends data to multiple receivers or nodes present in the network
simultaneously.
• An example of a Class B address is 233.168.212.226.
Network addresses
Ex: IPTV
23
IP Address class E
● The first four bits of the first octet is always set to 1111
● The network Address Range
11110000 – 11111111
240 - 255
24
IP Address class E
• Class E addresses only include IP starting from 240.0.0.0 to
255.255.255.255
• This IP Class is used for experimental purposes only for Study.
Network addresses
25
Classless Addressing
26
What is a Subnet?
● Network ID, also known as Network Prefix, in classful addressing
extended by adding bits from Host ID to form an random Network ID
called Subnet ID
● Subnet ID <-> Extended Network Prefix
● Can have multiple levels of addressing within an assigned classfull address block
● Better control and manageable over addresses.
31
Routing and subnets
Routing table
32
How do we get an IP address?
● Host: IP address
● IP Address is configured on a network interface
● Static: Manually configured / Dynamic: From a DHCP Server
33
IP Address Aggregation
Organization 0
200.23.16.0/23
Organization 1 “Send me anything
200.23.18.0/23 with addresses
beginning
Organization 2
200.23.16.0/20”
200.23.20.0/23 . ISP #1
.
. . Internet
.
Organization 7 .
200.23.30.0/23
“Send me anything
ISP #2 with addresses
beginning
199.31.0.0/16”
35
Use of Private IP addresses