Sie sind auf Seite 1von 3

Internet Address

CPS 422
‰For communication on the Internet, we need to
Computer Networks uniquely identify every device connected to the
Internet.
‰The identifier used in the network layer of the
NETWORK LAYER Internet model to identify each device on the
Internet is called the Internet Address, Internet
Addressing in the Internet Protocol Address or commonly, the IP Address
‰An IP address is a 32-bit binary address that
uniquely and universally defines the connection of
Behrouz A. Forouzan a host or a router to the Internet
‰A host can have multiple IP addresses, but two
hosts cannot have the same IP address on the
Internet
Faisal Amjad CPS 422 Faisal Amjad CPS 422

Internet Address - Notations Internet Address - Notations


‰There are two notations to represent IP
addresses ‰Example of the two Notations
o Binary notation and
o Dotted Decimal notation
10000000 00001011 00000011 00011111
‰Binary Notation
o Written as 32 bits usually with a space after every
Octet (8 bits) e.g. 10101010 01110101 10110100 11011101
o Can also be called as consisting of 4-bytes 128.11.3.31
‰Dotted-Decimal Notation
o To make the IP addresses compact and easier to read,
they are written in decimal form with a decimal point
(dot) separating the bytes
o Because of 8-bits in a byte, every number in the dotted
decimal notation is between 0 and 255
Faisal Amjad CPS 422 Faisal Amjad CPS 422

IP Address - Classes IP – Classful Addressing


‰Initially IP addressing used the concept of classes ‰In classful addressing, the address space is
of address divided into five classes: A,B,C,D and E
‰This architecture is called Classful Addressing ‰The first few bits of an IP address tell the Class
‰Due to some problems (to be discussed later) a of address
new architecture called Classless Addressing was
introduced First Byte Second Byte Third Byte Fourth Byte

‰Systems are slowly migrating to Classless


Class A 0

addressing Class B 10

Class C 110

Class D 1110

Class E 1111

Faisal Amjad CPS 422 Faisal Amjad CPS 422

1
IP Address – Finding the Class IP Address – Finding the Class in
Decimal Notation
Start

First Byte Second Byte Third Byte Fourth Byte


Class A 0 to 127
1 1 1 1 Class B 128 to 191
1st Bit 2nd Bit 3rd Bit 4th Bit
Class C 192 to 223
0 0 0 0
Class A Class B Class C Class D Class D 224 to 239

Class E 240 to 255

Class E

Faisal Amjad CPS 422 Faisal Amjad CPS 422

IP Address – NetID & HostID IP Address – Classes & Blocks


‰ In classful addressing, an IP address is divided into two ‰The division of IP addresses into classes reveals
parts
o NetID and
that every class can have a fixed number of blocks
o HostID of addresses, with a fixed size
‰ These parts are of varying lengths, depending upon the ‰For example, class A is divided into 128 blocks (0
class to 127), with each block having different netID
o All numbers in one byte, from 0 to 127 have the first bit
First Byte Second Byte Third Byte Fourth Byte equal to 0 (Hence these numbers show they belong to a
Class A 0 Net ID Host ------------------------------------- ID class A Address)
Class B 10 Net -------------- ID Host ------------------- ID o Hence, the first block covers addresses from 0.0.0.0 to
Net ----------------------------------- ID Host --- ID
0.255.255.255 with netID = 0
Class C 110
o The second block covers addresses from 1.0.0.0 to
Class D 1110 Multicast ------------- Address
1.255.255.255 with netID = 1
Class E 1111 Reserved for Future Use o The last block of class A covers addresses from
127.0.0.0 to 127.255.255.255 with netID = 127
Faisal Amjad CPS 422 Faisal Amjad CPS 422

IP Address – Classes & Blocks IP Address – Classes & Blocks


‰Note that for each block of addresses (in a class
A address), the first byte (netID) is the same Class Blocks Hosts Too Many

‰The other 3-bytes (hostID) (in a class A A 128 16,777,216


address)can take any value within the given range Too Many
B 16,384 65,536
‰When an organization is given a block of
addresses, the first address in it is used to C 2,097,152 256 Too Less

identify the organization on the Internet, hence it


D 1 For multicasting
is called the Network Address, NOT any individual
host E 1 For Future Use

Result is a lot of address wastage

Faisal Amjad CPS 422 Faisal Amjad CPS 422

2
IP – Network Address Subnetting
‰Network address is an address that defines the ‰A portion of IP address indicates the network
network itself (netID) and a potortion indicates the hosts on the
‰It cannot be assigned to a host network (through hostID)
‰Properties of network address are ‰It means that there is a sense of heirarchy in IP
o All hostID bytes are 0s addressing
o It defines the network to rest of the Internet, helps in ‰To reach a host on the Internet, we must first
efficient routing of packets reach the network by using netID
o It is the first address in the block ‰Then we must reach the host itself by using the
o Given the network address, we can find the class of hostID
address
‰Therefore we can conclude that IP has two levels
of heirarchy
Faisal Amjad CPS 422 Faisal Amjad CPS 422

Subnetting Subnetting Example


‰An organization often needs to assemble its hosts ‰Suppose our college is allotted a single class B
into groups i.e. the network needs to be subdivided Block of IP address 141.14.0.0
into subnetworks (or subnets) ‰Also suppose that there are only four departments
‰As the networks have network address to identify in our college namely CS, EE, IS and Basic
it on the Internet, each subnet has a subnet Sciences (or BS)
address to identify the subnet within the network ‰Logically we would like to create separate subnets
(and not outside it) for each of the departments
‰Subnetting, therefore introduces another level of ‰All departments would also be required to be
hierarchy. Although the subnets in total still inter-connected e.g. with routers
appear as a single network to rest of the Internet

Faisal Amjad CPS 422 Faisal Amjad CPS 422

Subnetting Example
141.14.50.1 141.14.50.254 141.14.115.1 141.14.115.254

IS BS
141.14.115.2

Subnet:
141.14.50.2

141.14.50.0 Subnet:
141.14.115.0
141.14.128.2

141.14.128.1 141.14.128.254
141.14.192.3

141.14.192.1 141.14.192.254

CS EE
Subnet:
141.14.192.0 Subnet:
141.14.128.0

141.14.192.2 141.14.128.3

Network Address:
141.14.0.0
To rest of the Internet
Faisal Amjad CPS 422

Das könnte Ihnen auch gefallen