Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 34

7 Layer OSI Model

Seven layers of the OSI model

Encapsulation
Data exists at each layer contained within a unit called a Protocol Data Unit (PDU) The process by which data moves between PDU types is called Encapsulation PDU move through interfaces between layers using Service Access Points (SAP)

PDUs And the OSI Model


Layer 7.) Application PDU Name Data

6.) Presentation Data

5.) Session
4.) Transport 3.) Network 2.) Data Link 1.) Physical

Data
Segment Packet Frame Bits

IP Addresses

An IP address is 32-bit binary address that

Uniquely & universally defines connection of a host or router on Internet Internet address are usually written in decimal notation with decimal point separating the bytes

Classful Addressing - IP Classes

IP address is divided into 5 classes

A, B, C, D, & E

Finding Class in Binary Notation

Finding Class in Dotted-Decimal Notation


First byte -> determine class of address Each class -> specific range of numbers

Netid and Hostid


Claas A, B & C -> divided into netid & hostid Class D & E -> not divided into netid & hostid

Classes and Blocks


Each class is divided into fixed number of blocks with each block having a fixed size Class A -> divided into 128 blocks

Each block have a different netid 1st block -> addresses from 0.0.0.0 to 0.255.255.255 (netid 0) 2nd block -> addresses from 1.0.0.0 to1.255.255.255 (netid 1) Last block -> addresses from 127.0.0.0 to 127.255.255.255 (netid 127)

first & last block in each class is reserved for special purposes. In addition One block (netid 10) -> private addresses total number of organizations that can have class A is only 125
Each block in a class contains 16,777,216 address . Millions of class A addresses are wasted . Next slide shows blocks in class A graphically

Blocks in Class A
An organization granted a block with netid 73 uses its addresses First address in block used to identify organization from rest of Internet -> address is called network address

It defines network of organizations not individual hosts

Class B

Divided into 16, 384 blocks with each block having different netid

Sixteen blocks reserved for private addresses leaving


16,368 blocks for assignment to organizations

1st block -> addresses from 128.0.0.0 to 128.0.255.255


(netid 128.0) Last block -> addresses from 191.255.0.0 to 191.255.255.255 (netid 191.255)

Total number of organizations that can have class B is 16,368


Each block in a class contains 65,536 classes Next slide shows blocks in class B graphically

Blocks in Class B

Organization granted block with netid 180.8

First address is network address

Class C

Divided into 2,097,152 blocks with each block having different netid

256 blocks used for private addresses leaving

2096,896 blocks for assignment to organzations

1st block -> addresses from 192.0.0.0 to


128.0.0.255 (netid 192.0.0) Last block -> addresses from 223.255.255.0 to 223.255.255.255 (netid 223.255.255) Next slide shows blocks in class C graphically

Blocks in Class C

Network Address

Network address is one that is assigned to organization

Range of addresses can automatically be inferred from network address

Example -> given network address 17.0.0.0, find the class, the block, and range of addresses
This is class A address -> first byte is between 0 & 127 Block has a netid of 17

Range of addresses range from 17.0.0.0 to 17.255.255.255

Mask

Mask is 32-bit binary number that gives first address in block i.e., network address when
ANDed bitwise with an address in block

Default Masks
The network address is the beginning address of each block It can be found by applying the default mask to any of the addresses in the block (including itself). It retains the netid of the block and sets the hostid to zero

Class A

Mask in binary 11111111 00000000 00000000 00000000

Mask in-dotted decimal 255.0.0.0

B C

11111111 11111111 00000000 00000000 11111111 11111111 1111111100000000

255. 255.0.0 255. 255. 255.0

Applying the Mask

Given address is 23.56.7.91 & default class A mask, find the network address?

Given address 201.180.56.5 & class C default mask, find network address?

Example - Network Address

Multihomed Devices

Multihomed -> A computer connected to different networks

Will have more than one address, each possibly belonging to a different class

A router must be connected to more than one network otherwise -> it cannot route

Router has more than one IP address, one for each interface Figure shows one multihomed computer & one router

Special IP addresses

IP address 0.0.0.0 is used by hosts when they are booted IP addresses with 0s as network number refer to the current network Address with all 1s allows broadcasting on local network All address of form 127.xx.yy.zz are reserved for loop back testing

Example - This Host on This Network

Example - Specific Host on This Network

Example - Broadcast on Local Network

Example - Broadcast on Distant Network

Example - Loopback Address

Private Addresses

Number of blocks in each class are assigned for private use

Not recognized globally

class Netids A B C 10.0.0.0 172.16 to 172.31 192.168.0 to 192.168.255

Blocks 1 16 256

Example - Sample Internet with Classful Addresses

Practice Question 3

Suppose that instead of using 16 bits for network part of a class B address originally, 20 bits had been used. How many class B networks would there have been?

Solution Practice Question 3

With a 2-bit prefix, there would have been 18 bits left over to indicate the network

Consequently, the number of networks would have been 218 or 262,144.

However, all 0s and all 1s are special, so only 262,142 are available.

Practice Question 4

A network on Internet has a subnet mask of 255.255.240.0. What is maximum no. of hosts it can handle?

Solution Practice Question 4

The mask is 20 bits long, so the network part is 20 bits

The remaining 12 bits are for the host, so 4096 host addresses exist

THE END

You might also like