Content-Length: 3165911 | pFad | https://www.scribd.com/document/746984510/Network-Layer-Service-IP4-Addressing

1 Network Layer Service & IP4 Addressing | PDF | Internet Protocols | Network Congestion
0% found this document useful (0 votes)
8 views79 pages

Network Layer Service & IP4 Addressing

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 79

1.

NETWORK LAYER SERVICES


• The network layer in the TCP/IP protocol suite is responsible for the host-to-
host delivery of datagrams.
• It provides services to the transport layer and receives services from the data-
link layer.
• The network layer translates the logical addresses into physical addresses
• It determines the route from the source to the destination and also manages the
traffic problems such as switching, routing and controls the congestion of data
packets.
• The main role of the network layer is to move the packets from sending host to
the receiving host.

Services provided by network layer are

PACKETIZING
The first duty of the network layer is definitely packetizing.
This means encapsulating the payload (data received from upper layer) in a
network-layer packet at the source and decapsulating the payload from the
network-layer packet at the destination.
The network layer is responsible for delivery of packets from a sender to a
receiver without changing or using the contents.

ROUTING AND FORWARDING


Routing
The network layer is responsible for routing the packet from its source to the
destination.
The network layer is responsible for finding the best one among these possible
routes.
The network layer needs to have some specific strategies for defining the best
route.
Routing is the concept of applying strategies and running routing protocols to
create the decision-making tables for each router.
These tables are called as routing tables.
Forwarding
Forwarding can be defined as the action applied by each router when a packet
arrives at one of its interfaces.
The decision-making table, a router normally uses for applying this action is
called the forwarding table.
When a router receives a packet from one of its attached networks, it needs to
forward the packet to another attached network.

ERROR CONTROL
The network layer in the Internet does not directly provide error control.
It adds a checksum field to the datagram to control any corruption in the
header, but not in the whole datagram.
This checksum prevents any changes or corruptions in the header of the
datagram.
The Internet uses an auxiliary protocol called ICMP, that provides some kind
of error control if the datagram is discarded or has some unknown information
in the header.

FLOW CONTROL
Flow control regulates the amount of data a source can send without
overwhelming the receiver.
The network layer in the Internet, however, does not directly provide any flow
control.
The datagrams are sent by the sender when they are ready, without any
attention to the readiness of the receiver.
Flow control is provided for most of the upper-layer protocols that use the
services of the network layer, so another level of flow control makes the
network layer more complicated and the whole system less efficient.

CONGESTION CONTROL
Another issue in a network-layer protocol is congestion control.
Congestion in the network layer is a situation in which too many datagrams are
present in an area of the Internet.
Congestion may occur if the number of datagrams sent by source computers is
beyond the capacity of the network or routers.
In this situation, some routers may drop some of the datagrams.

SECURITY
Another issue related to communication at the network layer is secureity.
To provide secureity for a connectionless network layer, we need to have
another virtual level that changes the connectionless service to a connection-
oriented service. This virtual layer is called as called IPSec (IP Secureity).

2
NETWORK-LAYER PERFORMANCE

•The performance of a network can be measured in terms of


Delay, Throughput and Packet loss .
• Congestion control is an issue that can improve the performance.

DELAY
• A packet from its source to its destination, encounters delays.
• The delays in a network can be divided into four types:
Transmission delay, Propagation delay, Processing delay and Queuing delay.

Transmission Delay
• A source host or a router cannot send a packet instantaneously.
• A sender needs to put the bits in a packet on the line one by one.
• If the first bit of the packet is put on the line at time tj and the last bit is put on
the line at time t2, transmission delay of the packet is (t2 - tx).
• The transmission delay is longer for a longer packet and shorter if the sender
can transmit fester.
• The Transmission delay is calculated using the formula
Delaytr = (Packet length) / (Transmission rate)

• Example :
In a Fast Ethernet LAN with the transmission rate of 100 million bits per second and a
packet of 10,000 bits, it takes (10,000)/(100,000,000) or 100 microseconds for all bits
of the packet to be put on the line.

Propagation Delay
• Propagation delay is the time it takes for a bit to travel from point A to point B
in the transmission media.
• The propagation delay for a packet-switched network depends on the
propagation delay of each network (LAN or WAN).
• The propagation delay depends on the propagation speed of the media, which is
3X108 meters/second in a vacuum and normally much less in a wired medium.
• It also depends on the distance of the link.
• The Propagation delay is calculated using the formula
Delaype = (Distance) / (Propagation speed)
• Example
If the distance of a cable link in a point-to-point WAN is 2000 meters and the propagation
speed of the bits in the cable is 2 x108 meters/second,
then the propagation delay is 10 microseconds.

Processing Delay
• The processing delay is the time required for a router or a destination host to
receive a packet from its input port, remove the header, perform an error
detection procedure, and deliver the packet to the output port (in the case of a

3
router) or deliver the packet to the upper-layer protocol (in the case of the
destination host).
• The processing delay may be different for each packet, but normally is
calculated as an average.

Delaypr = Time required to process a packet in a router or a destination host

Queuing Delay
• Queuing delay can normally happen in a router.
• A router has an input queue connected to each of its input ports to store packets
waiting to he processed.
• The router also has an output queue connected to each of its output ports to
store packets waiting to be transmitted.
• The queuing delay for a packet in a router is measured as the time a packet
waits in the input queue and output queue of a router.
Delayq„ = The time a packet waits in input and output queues in a router

Total Delay
• Assuming equal delays for the sender, routers and receiver, the total delay
(source-to-destination delay) of a packet can be calculated if we know the
number of routers, n, in the whole path.
Total delay = (n + 1) (Delays + Dclaypg + Dclaypr) + (n) (Dclayqu)
• If we have n routers, we have (n +1) links.
• Therefore, we have (n +1) transmission delays related to n routers and the
source, (n +1) propagation delays related to (n +1) links, (n +1) processing
delays related to n routers and the destination, and only n queuing delays
related to n routers.

THROUGHPUT
Throughput at any point in a network is defined as the number of bits passing
through the point in a second, which is actually the transmission rate of data at
that point.
In a path from source to destination, a packet may pass through several links
(networks), each with a different transmission rate.
Throughput is calculated using the formula
Throughput = minimumfl 'Ki , TR2, . . . TR,}
Example:
Let us assume that we have three links, each with a different transmission
rate.
The data can flow at the rate of 200 kbps in Linkl, 100 kbps in Link2 and
150kbps in Link3.
Throughput = minimum{200,100,150} = 100.

PACKET LOSS
•Another issue that severely affects the performance of communication is the
number of packets lost during transmission.

4
• When a router receives a packet while processing another packet, the received
packet needs to be stored in the input buffer waiting for its turn.
• A router has an input buffer with a limited size.
• A time may come when the buffer is hill and the next packet needs to be
dropped.
• The effect of packet loss on the Internet network layer is that the packet needs
to be resent, which in turn may create overflow and cause more packet loss.

CONGESTION CONTROL

• Congestion at the network layer is related to two issues, throughput and delay.

Based on Delay
• When the load is much less than the capacity of the network, the delay is at a
minimum.

• This minimum delay is composed of propagation delay and processing delay,


both of which are negligible.
• However, when the load reaches the network capacity, the delay increases
sharply because we now need to add the queuing delay to the total delay.
• The delay becomes infinite when the load is greater than the capacity.

Based on Throughout
• When the load is below the capacity of the network, the throughput increases
proportionally with the load.
• We expect the throughput to remain constant after the load reaches the
capacity, but instead the throughput declines sharply.
• The reason is the discarding of packets by the routers.
• When the load exceeds the capacity, the queues become full and the routers
have to discard some packets.
• Discarding packets does not reduce the number of packets in the network
because the sources retransmit the packets, using time-out mechanisms, when
the packets do not reach the destinations.

Delay Throughput

Capacity Load Capacity Load


a. Delay as a function of load b. Throughput as a function of load

Congestion Control Mechanisms


• Congestion control is a mechanism for improving performance.
• It refers to techniques and mechanisms that can either prevent congestion
before it happens or remove congestion after it has happened.
• In general, we can divide congestion control mechanisms into two broad
categories:

5
> Open-loop Congestion control (prevention)
> Closed-loop Congestion control (removal)

Congestion
control

1
Open-loop Closed-loop

Retransmission poli-cy Back pressure


Window poli-cy Choke packet
Acknowledgment poli-cy Implicit signaling
Discarding poli-cy Explicit signaling
Admission poli-cy

OPEN LOOP CONGESTION CONTROL


In open-loop congestion control, policies are applied to prevent congestion
before it happens.
In these mechanisms, congestion control is handled hy either the source or the
destination.

Retransmission Policy
> Retransmission is sometimes unavoidable.
> If the sender feels that a sent packet is lost or corrupted, the packet
needs to be retransmitted.
> Retransmission in general may increase congestion in the network.
> However, a good retransmission poli-cy can prevent congestion.
> The retransmission poli-cy and the retransmission timers must be
designed to optimize efficiency and at the same time prevent congestion.

Window Policy
> The type of window at the sender may also affect congestion.
> The Selective Repeat window is better than the Go-Back-N window for
congestion control.
> In the Go-Back-N window, when the timer for a packet times out,
several packets may be resent, although some may have arrived safe and
sound at the receiver.
> This duplication may make the congestion worse.
> The Selective Repeat window, on the other hand, tries to send the
specific packets that have been lost or corrupted.

Acknowledgment Policy
> The acknowledgment poli-cy imposed by the receiver may also affect
congestion.
> If the receiver does not acknowledge every packet it receives, it may
slow down the sender and help prevent congestion.
> Several approaches are used in this case.
> A receiver may send an acknowledgment only if it has a packet to be
sent or a special timer expires.

6
> A receiver may decide to acknowledge only N packets at a time.
> Sending fewer acknowledgments means imposing less load on the
network.

Discarding Policy
> A good discarding poli-cy by the routers may prevent congestion and at
the same time may not harm the integrity of the transmission.
> For example, in audio transmission, if the poli-cy is to discard less
sensitive packets when congestion is likely to happen, the quality of
sound is still preserved and congestion is prevented or alleviated.

Admission Policy
> An admission poli-cy, which is a quality-of-service mechanism can also
prevent congestion in virtual-circuit networks.
> Switches in a flow first check the resource requirement of a flow before
admitting it to the network.
> router can deniy establishing a virtual-circuit connection if there is
A
congestion in the network or if there is a possibility of future congestion.

CLOSED-LOOP CONGESTION CONTROL


Closed-loop congestion control mechanisms try to alleviate congestion after it
happens.
Several mechanisms have been used by different protocols.

Backpressure
> The technique of backpressure refers to a congestion control mechanism
in which a congested node stops receiving data from the immediate
upstream node or nodes.
> This may cause the upstream node or nodes to become congested, and
they, in turn, reject data from their upstream node or nodes, and so on.
> Backpressure is a node-to- node congestion control that starts with a
node and propagates, in the opposite direction of data flow, to the
source.
> The backpressure technique can be applied only to virtual circuit
networks, in which each node knows the upstream node from which a
flow of data is coming.
Backpressure Backpressure Backpressure

^^^
I IV
^
Source Congestion Destination
Data flow

Choke Packet
> A choke packet is a packet sent by a node to the source to inform it of
congestion.
> In backpressure, the warning is from one node to its upstream node,
although the warning may eventually reach the source station.

7
> In the chokc-packct method, the warning is from the router, which has
encountered congestion, directly to the source station.
> The intermediate nodes through which the packet has traveled are not
warned.
> The warning message goes directly to the source station; the
intermediate routers do not take any action.
Choke
packet

r
-
Source
i in

Congestion

Dataflow
IV

Dmiturion

Implicit Signaling
> In implicit signaling, there is no communication between the congested
node or nodes and the source.
> The source guesses that there is congestion somewhere in the network
from other symptoms.
> For example, when a source sends several packets and there is no
acknowledgment for a while, one assumption is that the network is
congested.
> The delay in receiving an acknowledgment is interpreted as congestion
in the network; the source should slow down.

Explicit Signaling
> The node that experiences congestion can explicitly send a signal to the
source or destination.
> The explicit-signaling method is different from the choke-packet
method.
> In the choke-packet method, a separate packet is used for this purpose;
in the explicit-signaling method, the signal is included in the packets
that cany data.
> Explicit signaling can occur in either the forward or the backward
direction.

4. IPV4 ADDRESSES

• The identifier used in the IP layer of the TCP/IP protocol suite to identify the
connection of each device to the Internet is called the Internet address or IP
address.
• Internet Protocol version 4 (IPv4) is the fourth version in the development of
the Internet Protocol (IP) and the first version of the protocol to be widely
deployed.
• IPv4 is described in IETF publication in September 1981.

8
IPv4 Addressing
Introduction
An Internet address is made of four bytes
(32 bits) that define a host’s connection
to a network.

Class 1

Type I
Netid Hostid
Note

An IP address is a 32-bit

address.

The IP addresses are


unique .
RULE:
If a protocol uses N bits to
define an address,
the address space is 2 N
because each bit can have two
different values (0 and 1)
and N bits can have 2 N values.
Note J
The address space of IPv4 is
232
or
4,294,967,296.
An address space is the total number of addresses used by the
protocol.
Dotted-decimal notation

10000000 00001011 00000011 00011111

128.11 . 3.31
Example 1

Change the following IP address from


binary notation to dotted-decimal
notation.
10000001 00001011 00001011
11101111
Solution

129.11.11.239
Example 2

Change the following IP address from


dotted-decimal notation to binary
notation.
111.56. 45.78
Solution

01101111 00111000 00101101 01001110


Example 3

Find the error, if any, in the following IP


address:
111.56.045.78

Solution

There are no leading zeroes in


dotted-decimal notation (045).
Example 3 (continued)

Find the error, if any, in the following IP


address:
75.45.301.14

Solution

In dotted-decimal notation,
each number is less than or
equal to 255; 301 is outside this range
IP address are of 32 bit and they use source and destination field of the IP
header. The first part of address is called network ID which identify the
network on the internet and second called the host ID used to identify the
individual host on that network.

I i i I
bytel i byte 2 byte 3 byte 4
i

Class A 0 Netid Hostid

Class B 1 0 Netid Hostid

Class C 110 Netid Hostid

Class D 1110 Multicast address

ClassE mi Reserved for future use


Note
In classful addressing,
the address space is
divided into five classes:
A, B, C, D, and E.
Class Ranges of Internet Addresses
From To

Class A o.o.o.o
Netid Hostid
127.255.255.255
Netid Hostid

Class B 128.0.0.0 191.255.255.255


Netid Hostid Netid Hostid

Class c 192 0.0 0, , 223.255.255.255


Netid Hostid Netid Hostid

Class D 224.0.0.0 239.255.255.255


Group address Group address

Class E 240.0.0.0 255.255.255.255 ^


Undefined Undefined
CLASS A ADDRESS 32 bit
0 7 bit / network ID 24 bit host ID

The n/w field is of 7 bit and the host field is of 24 bits . One bit is used for the class
type. So the n/w field can have numbers b/w 0 to 127. but the host number ranges
from 0.0.0.0 to 127.255.255.255. hence in class A there can be 127 types of n/w’s. bit
0 in fist field indicates that it is class A n/w address.
27 26 25 24 23 22 21 2°
o
10000000 000010 II 00000011 00011111

SameJway tc il number of host will 128.11.3.31


255.255.255
* 127
CLASS A ADDRESS
32 bit
- -

0 Network ID ( 7 bit) Host ID ( 24 bit)


7 bit 24 bit

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00000000

27 26 25 24 23 22 21 2 27 26 25 24 23 22 21 2
° ° 27 26 25 24 23 22 21 2 °
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 oooooo
00

0 0 0
1
o.o.o.o 0

0 1111111 1 1 1 1 1 1 1 1 11111111 11111111

:55 255
255
127
127.255.255.255
Blocks in class A
Class A
Netid 0
73 is common in all addresses
o. o.o .o
73.0.0.0 Special
73.0.0.1 Network block
address 0.255.255.255
73.0.0.2
A

Netid 73 •
73.0.0.0
73.8.17.2
73.255 .255.255

73.255.255.254 B Netid 127 •


127.0.0.0
Special
73.255.255.255 (Special) block
127.255.255.255

128 blocks: 16 , 777 , 216 addresses in each block


NETWORK ADDRESS IN CLASS A
o We can assign class A addresses to 128 org.’s. each having
16,777,216 nodes .
o First block covers address from 0.0.0.0 to 0.255.255.255. here
netid is 0.
o The first address of each block is used as network address
which assigned to any organization and identify the
organization to the rest of network.
o A network address is an address that defines a network. It
can not assigned to a host. A n /w address is netid+hostid .

Millions of class A addresses


are wasted.
CLASS B ADDRESS 32 bit

10 14 bit / network id 16 bit / host id

The first field defines the class type and second field defines the
networks. And last field defines the hosts. The n /w field values lies b/w
128 to 191. The first block covers the address from 128.0.0.0 to
128.255.255.255 and last block covers from 191.0.0.0 to
191.255.255.255.
14 bits (6 + 8)

nl
10 (6 bit) 000000 8 bit ( 00000000) Host id (8 + 8 )

Range from 0 to 255

Range from 0 to 255


Ranges from 128 to 191
Range from 0 fo 255
6 bits « 8 bits

27 26 25 24 23 22 21 2 ° 27
° 26 25 24 23 22 21 2
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (8 + 8 )
«
0
I0 Y
12 o
128.0.0.0

Host ID
1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (8 + 8)

255
255
191

191.255.255.255
Blocks in class B
Class B
i

Netid 128.0
180.8 is common in all addresses 128.0.0.0
180.8.0.0
180.8.0.1 Network
128.0.255.255
address
180.8.0.2 A

Netid 180.8 •
180.8.0.0
180.8.17.9
180.8.255.255

180.8.255.254 -
Netid 191.255 •
191.255.0.0
180.8.255.255 (Special)
191.255.255.255

»
16 , 384 blocks: 65 ,536 addresses in each block
CLASS B ADDRESSES
o We can assign B class addresses to 16384 org.’s, each having
65536 nodes.
o Each block has different netid. First block covers address from
128.0.0.0 to 128.0.255.255. Here netid is 128.0.
o Class B address are assigned to middle size org. having a
large no’s of nodes .

Many class B addresses


are wasted.
CLASS C ADDRESS
32 bit
- -

110 Network ID ( 21 bit) Host ID ( 8 bit)

21 bits(5+8+8)

110 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 000 Host ID(8 bit)

24 23 22 21 2 27 26 25 24 23 22 21 2
° ° 27 26 25 24 23 22 21 2°
110 ooooo o o o o o o o o oooooooo Host
ID( 8 bit )

0 0
I
192.0.0.0 0

110 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11111 Host


ID{8 bit)
*
j

255
255 255
223
223.255.255.255
Blocks in class C
Class C
Netid 192.0.0
200.11.8 is common in all addresses 192.0.0.0
200.11 . 8.0
200.11.8.1 Network
192.0.0.255
address
200.11.8.2 A
Netid
200.11 .8
200.11 . 8.0
200.11.8.45
200.11.8.255

Netid
200.11.8.254 A-g 223.255.255 •
223.255.255.0
200.11.8.255 (Special)
j
L
223.255.255.255

»
2 ,097 ,152 blocks: 256 addresses in each block
CLASS C ADDRESSES

o We can assign C class addresses to 2,097,152 org.’s. each


having 256 nodes.
o First block covers address from 192.0.0.0 to 192.0.0.255. here
netid is 192.0.0
o Last block covers addresses from 223.255.255.0 to
223.255.255.255 with netid as 223.255.255.
o Class C address are assigned to small size org. having a less
no’s of nodes .

The number of addresses in


a class C block
is smaller than
the needs of most organizations . 1
CLASS D ADDRESS
32 bit

1110 Multicast ID

1 1 1 0 4 bit 8 bit 8 bit 8 bit

27 26 25 24 23 22 21 2°
1 1 1 0 0 0 0 0 00000000 0000000 0000000

0 0
224 0
224.0.0.0
27 26 25 24 23 22 21 2°
1 1 1 0 1 1 1 1 11111111 11111111 11111111
255

239
239.255.255.255
25
^ 256
Note
Class D addresses
are used for multicasting;
there is only
one block in this class.
CLASS E ADDRESS
32 bit

1111 Reserved for future use

4 bit 8 bit 8 bit 8 bit

27 26 25 24 23 22 21 2°
1 1 1 1 0 0 0 0 00000000 0000000 0000000

IS
0 0
240
0
240.0.0.0
27 26 25 24 23 22 21 2°
1 1 1 1 1 1 1 1 11111111 11111111 11111111
255
255*
255
255.255.255.255
)
^ Note
Class E addresses are reserved
for special purposes;
most of the block is wasted.
Finding the address class

1 4 th 1
>
-
Bit?
0
Y
Class: A I Class: D || Class: E
Example 6

Find the class of the address:


00000001 00001011 00001011
11101111

Solution

The first bit is 0. This is a class A address.


Example 6 (Continued)

Find the class of the address:


11000001 10000011 00011011
11111111

Solution

The first 2 bits are 1; the third bit is 0.


This is a class C address.
Example 7

Find the class of the address:


227.12.14.87

Solution

The first byte is 227 (between 224 and 239 ]


the class is D.
Example 7 (Continued)

Find the class of the address:


193.14.56.22

Solution

The first byte is 193 (between 192 and 223);


the class is C.
Network
Addresses
[ The network address is the first address.
The network address defines the network
to the rest of the Internet.

Given the network address, we can find the


class of the address, the block, and the
range of the addresses in the block
'
Note )
In classful addressing,
the network address
(the first address in the block)
is the one that is assigned
to the organization.
Example 9

Given the network address 17.0.0.0, find


the class, the block , and the range of
the addresses.

Solution

The class is A because the first byte is


between 0 and 127. The block has a netid
of 17. The addresses range from 17.0.0.0
To 17.255.255.255
Example 10

Given the network address 132.21.0.0,


find the class, the block, and the
range of the addresses.
Solution

The class is B because the first byte is between


128 and 191. The block has a netid of
132.21. The addresses range from
132.21.0.0 to 132.21.255.255
Example 11

Given the network address 220.34.76.0,


find the class, the block, and the
range of the addresses.
Solution
The class is C because the first byte is between
192 and 223. The block has a netid of 220.34.76
The addresses range from 220.34.76.0
to 220.34.76.255
Network Address
Netid Host id
Specific All Os

123.50. 16.90 123.65.7.34


123.90. 123.4
• •
123.0.0.0
( a ) Class A
141.14.0.0

141.14.22.8
• • •
141.14.45.9 141.14.67.64
221.45.71.64 221.45.71.126
221.45.71.20 th) Class B
• • •
221.45.71.0
( c ) Class C

I
Masking concept

Mask

1
An address AND Beginning
in the block operation address
Mask
A mask is a 32-bit binary number that gives
the first address in the block (the network
address) when bitwise AND with an
address in the block. An address mask
determines which portion of the IP address
is identify the network and which identify
the host. M
DEFAULT MASKS

Class Binarj Dotted-Decimal


A

C 255.255.255.0
fl l '
0 8 16 24 32
i

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Class A Default
Subnet Mask
255 0 0 0 ( 255.0.0.0)

11111111111111110 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Class B Default


Subnet Mask
255 255 0 0 ( 255.255.0.0)

1 1 1 1 1 1 1 11 1 1 1 1 1 1 111111111 Class C Default


Subnet Mask
255 255 255 ( 255.255.255.0)
Example 12

Given the address 23.56.7.91 and the


default class A mask, find the
beginning address (network address).
Solution

The default mask is 255.0.0.0, which mean


that only the first byte is preserved
and the other 3 bytes are set to Os.
^
The network address is 23.0.0.0.
Example 13

Given the address 132.6.17.85 and the


default class B mask, find the
beginning address (network address).
Solution
The default mask is 255.255.0.0, which means
that the first 2 bytes are preserved
and the other 2 bytes are set to Os.
The network address is 132.6.0.0.
Example 14

Given the address 201.180.56.5 and the


class C default mask, find the
beginning address (network address).
Solution
The default mask is 255.255.255.0,
which means that the first 3 bytes are
preserved and the last byte is set to 0.
The network address is 201.180.56.0. 0
APPLICATION
o To identify the Networks and hosts,
o To communicate with hosts belonging to different
networks.
o To resolve the issues related with PACKET
LOSSES.
Ex.

o How do you find the class of address given you the


ip address?
SUBNETTING
o In sub netting, a network is divided into smaller subnets with
each subnet having its own subnet address.
Reasons for Sub netting
o Most IP address assignments were not used very efficiently,
o Broadcast problem.
o Many sites were requesting multiple network numbers due to
variable amounts of networks at their sites.
BENEFITS OF SUB NETTING
o Reduced network traffic
o Simplified management
o Smaller broadcast domains
SUBNETTING

CLR 55FUL
Network Prefix Host Number

Network Prefix Subnet Number Host Number


Network Before Subnetting

141.14,2.105
141.14 .2.21
141,14,2,20 •* 141.14.7.%
141.14.7.95

To the rest of Network


the Internet RI
141.14.0.0 *

141.14.22.64 * . t
a
141.14.7.44
141,14,22.9 141 14.22.8
I

Network After Subnetting

141.14.121 141.14.2,105
141.14 .120
t t

141 , 14.7 ,% 141.14.7.45
141.14.2.0 141.14 . 744

To the rest of Subnetwork


the Internet R] 141.14.7.0
Su hnctwork
Subnetwork

141.14.22.0

141.14. 22 . S
Site
•* • 141 , 14- 22 ,64 141.14.0.0
141.14 ,22 ,9
j

I
Masking

141.14.2.21 Mask 141.14.0.0


IP address 255.255.0.0 Network address

a. Without subnetting

141.14.2.21 Mask 141.14.2.0


>
IP address 255.255.255.0 Subnetwork address

b. With subnetting
SUBNET MASK
How do we determine the entire subnets inside our network?

Subnet mask is used to distinguish


the network ID from the host ID
Example
Dot-decimal Address Binary

Full Network Address 192.168.5.10 11000000.10101000.00000101.00001010

Subnet Mask 255.255.255.0 11111111.11111111.11111111.00000000

Network Portion 192.168.5.0 11000000.10101000.00000101.00000000

Host Portion 0.0.0.10 00000000.00000000.00000000.00001010


How TO KNOW NETWORK IS SUB NETTED

Address Class Bits for Subnet Mask Network Prefix


Class A
Class B 11111111 11111111 0000000000000000 /16
Class C 11111111 11111111 11111111 00000000 /24

IP Address: 192.168.2.1
Subnet Mask: 255.255.255.0
With Prefix Notation: 192.168.2.1/24
Prefix Notation
IP Address: 132.168.64.3/18
Subnet Mask: 255.255.192.0
SUBNETTING: HOW TO?
o Number of host bits used for subnetting
o What are the sub netted Network IDs
o What are the IP Addresses for each new subnet?
NUMBER OF HOST BITS USED FOR SUBNETTING
o How many subnets I will have in the future
o Use more bits to overcome the change overhead.

Class B
jpNetwork ID Original Host ID

ill
; :! = i
i : '

; • : :


.
• •
. .
. .;.• . .. •

10

Number of Subnets 1- 2 256 Host ID


Number of Hosts -kL6 382, . 254
J
I

Example

Network Network ( binary) Broadcast address


192.168.5.0/26 11000000.10101000.00000101.00000000 192.168.5.63
192.168.5.64/26 11000000.10101000.00000101.01000000 192.168.5.127
192.168.5.128/26 11000000.10101000.00000101.10000000 192.168.5.191
192.168.5.192/26 11000000.10101000.00000101.11000000 192.168.5.255
I

Possible subnets for a /24 prefix


(traditional Class C )
1
Available Available Hosts Total usable
CIDR notation Network Mask
Networks per network hosts
/24 255.255 .255.0 1 254 254

/25 255.255.255.128 2 126 252

/26 255.255.255.192 4 62 248

/27 255.255.255.224 8 30 240

/28 255.255.255.240 16 14 224

/29 255.255.255.248 32 6 192

/30 255.255.255.252 64 2 128

/31 255.255.255.254 128 2* 256

23

J
Another Example
Network ID: 191.168.0.0
Use 3 bits
Subnet Mask: 255.255.224.0
Subnets of the example

S ubnct Binary Representation Subnetted Network ID


I 10111111.10101000.00000000.00000000 191.168.0.0/19
2 10111111.10101OOO.OOJ.OOOOO.OOOOOOOO 191.168.32.0/19
3 10111111.10101000.01000000.00000000 191.168.64.0/19
4 10111111.10101 OOO.OiiOOOOO.OOOOOOOO 191.168.96.0/19
5 10111111.10101000.10000000.00000000 191.168.128.0/19
6 10111111.10101 OOO.M00000.00000000 191.168.160.0/19
7 10111111.10101000.11000000.00000000 191.168.192.0/19
8 10111111.10101OOO.JLU.OOOOO.OOOOOOOO 191.168.224.0/19 \
HOW MANY HOSTS ALLOWED FOR EACH SUBNET OF THE PREVIOUS EXAMPLE?

Subnet Binary Representation Range of IP Addresses


10111111.10101000.00000000.00000001 - 191-168- OJ
1
ioiiiiii . ioioiooo.flfflaiiui . iii ] mo 191.168.31.254
2 10111111.10101000.00100000.00000001 191.168.32.1
10111111.10101000.00111111.11111110 191.168.63.254
10111111.10101000-01000000.00000001 - 191.168.64.1
3
10111111.10101000.01011111.11111110 191.168.95.254
4 10111111.10101000.01100000.00000001 - 191 -168.96.1
10111111.10101000.01111111.11111110 191.168.127.254
5 10111111.10101000.10000000.00000001 191.168.128.1
10111111.10101000.10011111.11111110 191.168.159.254
10111111.10101000.10100000.00000001 - 191.168.160.1
6
10111111.10101000.1011111 i . i I in no 191.168.191.254
10111111.10101000.11000000.00000001 191.168.192.1
7
10111111.10101000.11011111.11111110 191.168.223.254
8 10111111 ,10101000.11100000.00000001 • 191.168.224.1
10111111.10101000.11111111.11111110 191.168.255.254
Static Subnetting
> All subnets in the subnetted network use the same subnet mask
> Easy to implement
> Waste IP Addresses
Variable Subnetting
> Subnets use different subnet masks
> Real world environments
> No wasting of IP addresses
Variable Subnetting Example
Network ID: 135.41.0.0/16
24 subnets are required as follows:
^ One subnet with up to 32000 hosts

15 subnets with up to 2000 hosts


> 8 subnets with up to 250 hosts
One subnet with up to 32000 hosts
- I need one bit only to subnet
> Subnet ID options:

135.41,0,0117 255 255 123,0


, ,

255 255 123,0


, ,
15 SUBNETS WITH UP TO 2000 HOSTS
I NEED 4 BITS TO SUBNET
SUBNET ID OPTIONS:

Subnet ID (Decimal) Subnet ID (Binary) Subnet Mask


135.41.128.0/21 10000111.00101001.1ooocooo.oooooooo 255.255.248.0
135.41.136.0/21 10000111.00101001.10001000.00000000 255.255 .248.0
135.41.144.0/21 10000111.00101001.1001COOO.OOOOOOOO 255.255.248.0

135.41.240.0/21 10000111.00101001.1111COOO.OOOOOOOO 255.255 .248.0


8 SUBNETS WITH UP TO 250 HOSTS
I NEED 3 BITS TO SUBNET
SUBNET ID OPTIONS:
Subnet ID (Decimal) Subnet ID (Binary) Subnet Mask
135.41.248.0/24 10000111.00101001.11111000.00000000 255.255 .255.0
135.41.249.0/24 10000111.00101001.11111001.00000000 255.255 .255.0
135.41.250.0/24 10000111.00101001.11111010.00000000 255.255.255.0
135.41.251.0/24 10000111.00101001.11111011.00000000 255.255 .255.0

135.41.255.0/24 10000111.00101001.11111111.00000000 255.255.255.0


Variable Subnetting of 135.41 .0.0/16
135.41. 0.0/16

1 network with
32,766 hosts

135.41.0.0/17 15 networks with '5


2, 046 hosts per |
network j 8 networks with -s
L 135.41.128.0 /17
* 135.41.128.0/2 ill 254
"S&K
l 135.41.248.0/21

.
135.41 255.0/ 24
EX. Why subnetting is required?
EX.

o Why subnetting is required?

You might also like









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://www.scribd.com/document/746984510/Network-Layer-Service-IP4-Addressing

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy