You are on page 1of 22

IP Address

IP Addresses
IP

run at network layer - it must


be
capable
of
providing
communication between hosts on
different kinds of networks.

The

address
must
include
information about what network
the receiving host is on.

IP Addresses
IP

addresses are logical addresses (or


internet address)
IPv4 (version 4)
32 bits.
Includes a network ID and a host ID.
Every host must have a unique IP address.
IP addresses are assigned by a central
authority (American Registry for Internet Numbers
for North America).

IP Address Format
The

32-bit IP address is grouped


eight bits at a time, separated by
dots, and represented in decimal
format (known asdotted decimal
notation).
The minimum value for an octet
is 0, and
The maximum value for an octet
is 255.

Network and Host IDs


A

Network ID is assigned to an
organization by a global authority.

Host

IDs are assigned locally by a


system administrator.

Both

the Network ID and the Host ID


are used for routing.

IP Addresses
IP

Addresses are usually shown in


dotted decimal notation:
1.2.3.4
00000001 00000010 00000011
00000100

cs.rpi.edu

is 128.213.1.1

10000000 11010101 00000001 00000001

CS has a class B network

IP Addressing

Three

fields of variable sizes (dependent on the class of


the address)
Class Type field defines the class (5 possible classes that an
internet address is part off)
Network ID up the class type, this field can be anywhere
between 7 and 24 bits
Host ID up to the class type it can be anywhere between 8 and
24 bits

Internet Classes

Class

A, B are full; class C still has available addresses;


D is reserved for multicasting and class E is reserved
for future use

IP Address
Class
A

High-Order
Bit(s)
0

Address
Range
1.0.0.0 to
126.0.0.0

No. Bits
Network/Host Max. Hosts
7/24
167772142
(224 - 2)

Format
N.H.H.H1

Purpose
Few large
organizations

N.N.H.H

Medium-size
organizations

1, 0

128.1.0.0 to
191.254.0.0

14/16

N.N.N.H

Relatively
small
organizations

1, 1, 0

192.0.1.0 to
21/8
223.255.254.0

254 (28 - 2)

N/A

Multicast
groups (RFC
1112)

1, 1, 1, 0

224.0.0.0 to
N/A (not for
239.255.255.2 commercial
55
use)

N/A

N/A

Experimental

1, 1, 1, 1

240.0.0.0 to
N/A
254.255.255.2
55

N/A

65534 (216 - 2)

IP Broadcast and Network


Addresses
An

IP broadcast addresses has a host


ID of all 1s.

An

IP address that has a host ID of all


0s is called a network address and
refers to an entire network.

Two levels of hierarchy

All

the addresses on Internet have a network id and a


host id
To reach a specific host, first reach to the network using
the first portion of the address;
then reach the host itself using the second portion of
the IP address.

IP Subnet Addressing
IP

networks can be divided into


smaller networks called subnetworks.
Subnetting provides the network
administrator with several benefits
(extra flexibility, more efficient use of
network addresses, and the capability
to contain broadcast traffic).
Subnets are under local
administration.

Three level hierarchy


network

IP Subnet Mask
A

subnet address is created by


"borrowing" bits from the host field
and designating them as the subnet
field. The number of borrowed bits
varies and is specified by the subnet
mask.

Another Practical example

Consider network address 141.14.0.0, create 256 subnets with


254 hosts per subnet

Class B Subnetting
Reference
Chart
Number of Bits
Subnet Mask
Number of Subnets
2

255.255.192.0

Number of Hosts
16382

255.255.224.0

8190

255.255.240.0

14

4094

255.255.248.0

30

2046

255.255.252.0

62

1022

255.255.254.0

126

510

255.255.255.0

254

254

255.255.255.128

510

126

10

255.255.255.192

1022

62

11

255.255.255.224

2046

30

12

255.255.255.240

4094

14

13

255.255.255.248

8190

14

255.255.255.252

16382

Class C Subnetting Reference


Chart
Number
of Bits
Subnet Mask
Number of Subnets Number of Hosts
2

255.255.255.192

62

255.255.255.224

30

255.255.255.240

14

14

255.255.255.248

30

255.255.255.252

62

How Subnet Masks are Used to


Determine the Network Number
First,

the router extracts the IP


destination address and internal
subnet mask. It then performs
alogical ANDoperation to obtain the
network and subnet number.
This causes the host portion of the IP
destination address to be removed,
while the destination network and
subnet number remains.
Finally, it forwards the frame to the
destination IP address.

Masking

Example
Q.
A.

Q.
A.

IP Address: 187.199.127.5
Sub-net mask: 255.255.255.0
Network Class: B
Network ID: 187.199
Result of logical AND operation: 187.199.127
Sub-network ID: 127
Host ID: 5
IP Address: 187.199.127.5
Sub-net mask: 255.255.240.0
Network Class: B
Network ID: 187.199
Result of logical AND operation: 187.199.112.0
Sub-network ID: 112
Host ID: 15.5

Example(Continued..)
Q. IP Address: 187.199.127.5

Sub-net mask: 255.255.128.0


A. Network Class: B

Network ID: 187.199

Result of logical AND operation:


187.199.0.0

Sub-network ID: 0

Host ID: 127.5

You might also like