ip addresses and subnetting

22
IP Addresses and Subnetting By Kr. Rajeev Ranjan 07438 NIT Hamirpur, HP

Upload: kumar-r-ranjan

Post on 16-Nov-2014

866 views

Category:

Documents


5 download

DESCRIPTION

A presentation on IP Addresses and Subnetting delivered @ NIT Hamirpur

TRANSCRIPT

IP Addresses and Subnetting

ByKr. Rajeev Ranjan 07438NIT Hamirpur, HP

Introduction

The Internet Protocol (IP) is a protocol used for communicating data across a packet-switched internetwork using the Internet Protocol Suite.

IPv4 ( IP version 4) Addresses are 32 bits long.IPv6 ( IP version 6) addresses are 128 bits long.

Version of IP Addresses: IPv0 to IPv15 (Only IPv4 and Ipv6 used in Networking)

Characteristics of IPv4

32 bit binary number(4 octet) is used to specify IP address(Hierarchical).

Specifies both network and host. Number of bits allocated to specify network varies.Total no. of IP addresses in IPv4 is 4.3 billion.

172.16.20.143

network 32-bits host

Classification: Classfull IP Address Classless IP Address Public IP Private IP

Classfull IP address classes

IP divided into 5 Classes.

Class A: (0-127).(0-255).(0-255).(0-255)Class B: (128-191).(0-255).(0-255).(0-255)Class C: (192-223).(0-255).(0-255).(0-255)Class D: (224-239).(0-255).(0-255).(0-255)Class E: (140-225). 0-255).(0-255).(0-255)

#Network, Host.

IP Classes

A EDCB

Class A IP Address

Identify :

The first (leftmost) bit of a Class A address is always 0

Example of a Class A IP address is 124.95.10.50

The first octet, 124 is assigned by ARIN

The administrators assign the remaining 24 bits.

The first octet of its IP address range from 0-126.

127 is reserved for special purpose

N H H H

Class A IP Address

Features :All Class A IP addresses use only the first 8 bits to identify the network part

of the address

The remaining three octets can be used for the host portion of the address

Class A network IP up to 2 to-the-power of 24 (224) (minus 2), or

16,777,214, possible IP addresses to devices that are attached to its

network

Valid Host Range 10.0.0.1 to 10.255.255.254

10.0.0.0 is Network address & 10.255.255.255 is Broadcast Address

Class B IP Address

Identify :

The first 2 bits of a Class B address are always 10 (one and zero).

The first two octets identify the network number assigned by ARIN

The internal administrators of the network assign the remaining 16 bits

Class B IP addresses always have values ranging from 128 to 191 in their

first octet

N N H H

Class B IP Address

Features :All Class A IP addresses use only the first 16 bits to identify the network

part of the address

The remaining two octets can be used for the host portion of the address

A Class B IP address can have up to 2 to-the-power of 16 (216) (minus 2

again!), or 65,534, possible IP addresses to devices that are attached to its

network

Valid Host Range 172.16.0.1 to 172.16.255.254

172.16.0.0 is Network address & 172.16.255.255 is Broadcast Address

Class C IP Address

Identify :

The first 3 bits of a Class C address are always 110 (one,one and zero).

The first three octets identify the network number assigned by ARIN

The internal administrators of the network assign the remaining 8 bits

Class c IP addresses always have values ranging from 192 to 223 in their

first octet

N N N H

Class C IP Address

Features :

All Class C IP addresses use the first 24 bits to identify the network

part of the address

The remaining one octets can be used for the host portion of the

address

A Class C IP address can have up to 28 (minus 2), or 254,

possible IP addresses to devices that are attached to its network

Valid Host Range 192.168.100.1 to 192.168.100.254

192.168.100.0 is Network address & 192.168.100.255 is Broadcast

Address

IP Address Space

Originally, 3 Classes

– A, B, C

Problem

– Classes too rigid (C too small, B too big)

Solution

– Subnetting (e.g. within Stanford)

– Classless Interdomain Routing (CIDR)

Subnetting

What it is?

Especially large networks need to be divided into smaller networks.

These smaller divisions are called subnetworks and provide addressing

flexibility. Most of the time subnetworks are simply referred to as subnets.

Similar to the host number portion of Class A, Class B, and Class C

addresses, subnet addresses are assigned locally, usually by the network

administrator

Like other IP addresses, each subnet address is unique

NETWORK SUBNET HOST

Host/subnet Schemes

Important DecisionTo determine the optimal number of subnets and hosts

For Class C IP Address

If 2 or 6 bits for subnetting then total hosts 124 (49 % used).

If 3 or 5 bits for subnetting then total hosts 180 (71 % used).

If 4 bits for subnetting then total hosts 196 (77 % used).

Subnetting analogy

NETWORK SUBNET HOST

Area Code Exchanges Subscribers

Subnetting

Telephony

Subnetting

Real Purpose

A primary reason for using subnets is to reduce the size of a broadcast

domain.

Explanation

When broadcast traffic begins to consume too much of the available

bandwidth, network administrators may choose to reduce the size of the

broadcast domain.

Subnet Mask

What it is?

Not an address

It determines which part of an IP address is the network field and which

part is the host field.

A subnet mask is 32 bits long and has 4 octets, just like an IP address

Subnet Mask

Determine the subnet mask ?

Express the subnetwork IP address in binary form.

Replace the network and subnet portion of the address with all 1s.

Replace the host portion of the address with all 0s.

As the last step convert the binary expression back to dotted-

decimal notation.

Subnet Mask

Default :

Class B Address

Default Class B Subnet Mask

8-bit Subnet Mask

172 16 20 143

255 255 0 0

255 255 255 0

The Anding Operation

For What ?

For routing a data packet, the router first determines the destination

network/subnet address by performing a logical AND using the

destination host's IP address and the subnet mask. The result will be

the network/subnet address.

131.108.2.2 10000011 01101100 00000010 00000010&

255.255.255.0 11111111 11111111 11111111 00000000

131.108.2.0 10000011 01101100 00000010 00000000

Sending A Message through IP:

Computer Centre