0% found this document useful (0 votes)
18 views

COMPUTER NETWORK Unit3

The network layer is responsible for host-to-host delivery across networks by using logical IP addresses and routing protocols. It fragments larger packets into smaller fragments and controls congestion using methods like leaky bucket. The document then describes classful and classless addressing in IPv4, including the classes A, B, C, and D and their address ranges and subnet masks. It also covers subnetting and variable length subnetting.

Uploaded by

nishita patidar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

COMPUTER NETWORK Unit3

The network layer is responsible for host-to-host delivery across networks by using logical IP addresses and routing protocols. It fragments larger packets into smaller fragments and controls congestion using methods like leaky bucket. The document then describes classful and classless addressing in IPv4, including the classes A, B, C, and D and their address ranges and subnet masks. It also covers subnetting and variable length subnetting.

Uploaded by

nishita patidar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

COMPUTER NETWORK (UNIT-3)

Network layer is the third layer from below in the OSI Model which takes data from Transport layer
and passes on further to Data Link Layer.

RESPONSIBILITIES / FUNCTIONALITIES OF NETWORK LAYER:

• HOST TO HOST DELIVERY / SOURCE TO DESTINATION DELIVERY:

How a machine in different network can communicate with a machine in a different network.

• Logical address (IP):

It is a combination of 2 things one is a network id and other is the host id. From IP address we will
know in which network to send the message and in that network, there are many hosts, many
machines and many servers. In that network, on which machine to send the messages is the
responsibility of IP Address. And this IP address is used by network layer to send the message.

• ROUTING:

RIP method, OSPF method (different protocols).

PROTOCOL: Set of instructions.

Router is a device we use in a network layer.

Routing is the process of path selection for traffic in a network or between or across multiple
networks.

• FRAGMENTATION:

It is a technique in which gateways break up or divide larger packets into smaller ones called
fragment. Each fragment is then sent as a separate internal packet. Each fragment has its separate
header and trailer.

• CONGESTION CONTROL:

Congestion control is a mechanism that controls the entry of data packets into the network,
enabling a better use of a shared network infrastructure and avoiding congestive collapse.

Leaky Bucket Method and Token Bucket Method.

ICMP or IGMP protocols are also used.

CLASSFULL ADDRESSING: (IPv4)

Classful addressing is an IPv4 addressing architecture that divides address into 5 groups.

1. CLASS A IP ADDRESSING:

IP address consists of 32 bits.

We are using Dotted Decimal Representation.

8 bits 8 bits 8 bits 8 bits

________.________.________.________
First bit is always 0. This is because there are 232 IP addresses are possible. So, to identify that this is
a Class A address we fix the first bit as 0.

IP addresses in Class A = 231.

MSB = Network bits and rest represent Host bits.

1st 8 bits represent Network ID and rest represent Host Id in Class A.

No. of networks in Class A = 27

0 and 127 are not used. Therefore, there are 27 – 2 Network ID.

127 is reserved for loop back and diagnostic functions.

No. of hosts possible in every network: 224 -2. (64.255.255.255 is used as Broadcast address)

Class A range is 0-127.

Default Mask of Class A = 255.0.0.0

E.g.: IP address = 64.0.0.8 and 255.0.0.0

And operation between given IP address and Default Mask tells us that host belongs to which
network.

• CLASS B IP ADDRESSING:

8 bits 8 bits 8 bits 8 bits

________.________.________.________

1 0

1st 2 positions are fixed as 10 to identify that this is a Class B address.

RANGE: 128-191

NO. OF NETWORKS: 1st 2 octets are Network Id and rest 2 are Host Id.

214 Networks are possible.

NO. OF HOSTS: 216 – 2.

Default Mask of Class B is 255.255.0.0

CLASS C IP ADDRESSING:

First 3 positions are fixed as 110 to identify that it is a Class C address.

RANGE: 192 – 223

No. of IP addresses in Class C: 229

No. of Networks possible in Class C: 1st 3 octets are Network ID bits and rest Host ID bits.

221.

No. of hosts possible in a network: 28-2 = 256 - 2.


Default Mask of Class C is 255.255.255.

CLASS D IP ADDRESSING:

1110 are fixed to identify that it is a Class D address.

RANGE: 224-239

No. of IP addresses in Class D: 228.

Multicasting / Group Email Broadcast.

No host ID in Class D.

CLASS E IP ADDRESSING:

1111 are fixed to identify that this is a Class E address.

RANGE: 240 – 255

228. Reserved for military purposes.

LIMITED BROADCAST ADDRESS: 255.255.255.255

DISADVANTAGES OF CLASSFULL ADDRESSING:

1. Wastage of IP addresses.
2. Maintenance is time consuming.
3. More prone to errors.

CLASSLESS ADDRESSING:

Classless addressing is an IPv4 addressing architecture that uses variable length subnet masking.

1. No classes.
2. Only blocks.

BLOCK ID HOST ID

3. Notation:

x.y.z.w / n, where n = mask OR no. of bits to represent network bits.

How to Find Network ID with given IP address.

N number of 1, rest 0. (Default Mask).

Host id ko 0 kar do OR Default Mask se AND operation.

RULES:

• Address should be contiguous.


• No. of addresses in a block must be in power of 2.
• First address of every block must be evenly divisible with size of block.

SUBNETTING IN CLASSFUL ADDRESSING:

SUBNETTING: Dividing the big network into small networks.


e.g.: 200.10.20.0

Don’t change the network ID bits.

VARIABLE LENGTH SUBNETTING (VLSM):

Size of subnets is not fixed. 200.10.20.10_ _ _ _ _ _

200.10.20.0_ _ _ _ _ _ _

S1 200 200.10.20.11_ _ _ _ _ _
SUBNETTING IN CLASSLESS INTERDOMAIN ROUTING (Subnetting in CIDR):

E.g.: 195.10.20.128/26

195.10.20.10|000000

195.10.20.10|0 00000 195.10.20.10| 1 00000

195.10.20.128/27

To

195.10.20.159/27

IPV4 HEADER FORMAT:

1. Connection less protocol

2. Datagram service (any route can be followed, any packet can travel from anywherelpc, therefore
reliability is less , because packets may be lost).

HEADER: header tells how the packet will move and what will be its characteristics.

DSCP: Differentiated services code point

You might also like