ip addresses: classful addressing ip addresses. introduction 4.1

Post on 18-Jan-2018

252 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

IP address address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for.communication address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for.communicationcomputer networkInternet Protocolcomputer networkInternet Protocol

TRANSCRIPT

IP Addresses:Classful Addressing

IP Addresses

INTRODUCTION

4.14.1

IP addressIP address

address (IP address) is a numerical address (IP address) is a numerical label assigned to each device (e.g., label assigned to each device (e.g., computer, printer) participating in a computer, printer) participating in a computer network that uses the that uses the Internet Protocol for  for ..communicationcommunication

An IP address is a An IP address is a 32-bit 32-bit

address.address.

What is an IP Address?

The IP addresses The IP addresses are are

unique.unique.

Address spaceAddress space rulerule

addr15addr1

addr2

addr41addr31

addr226

…………..…………..

………….. …………..

…………..

…………..…………..

The address space in a protocolThat uses N-bits to define an Address is:

2N

The address space of IPv4 is The address space of IPv4 is

223232 or or

4,294,967,296.4,294,967,296.

IPv4 address spaceIPv4 address space

IP addresses consist of four sectionsIP addresses consist of four sections Each section is 8 bits longEach section is 8 bits long Each section can range from 0 to 255Each section can range from 0 to 255 Written, for example, 128.35.0.72Written, for example, 128.35.0.72

Peter Smith 8

Converting to Decimal (Cont.) Now, for double the money, what is its

equivalent decimal value?

27 26 25 24 23 22 21 20

1 1 1 1 1 1 1 1128 64 32 16 8 4 2 1 The binary number 1111 1111 converts into the decimal number:128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255

01110101 10010101 00011101 11101010

Binary NotationBinary Notation

Figure 4-1

Dotted-decimal notation

Example 1Example 1

Change the following IP address from binary notation to dotted-decimal notation.

10000001 00001011 00001011 11101111

SolutionSolution

129.11.11.239129.11.11.239

Example 2Example 2

Change the following IP address from dotted-decimal notation to binary notation:

111.56.45.78

SolutionSolution

01101111 00111000 00101101 0100111001101111 00111000 00101101 01001110

Example 3Example 3

SolutionSolution

Find the error in the following IP Address111.56.045.78

There are no leading zeroes in Dotted-decimal notation (045)

Example 3 (continued)Example 3 (continued)

SolutionSolution

Find the error in the following IP Address75.45.301.14

In decimal notation each number <= 255301 is out of the range

The network prefix identifies a network and the host number identifies a specific host (actually, interface on the network).

Network prefix and host number

host numbernetwork prefix

CLASSFUL ADDRESSING

In classful addressing the address space is divided into 5 classes:

AA, , BB, , CC, , DD, and , and EE..

18

Are You the Host or the Network?

The 32 bits of the IP address are divided into Network & Host portions, with the octets assigned as a part of one or the other.

Network & Host RepresentationBy IP Address Class

Class Octet1 Octet2 Octet3 Octet4

Class A Network Host Host Host

Class B Network Network Host Host

Class C Network Network Network Host

Figure 4-3

Finding the class in binary notation

Figure 4-4

Finding the address class

Show that Class AA has 231 = 2,147,483,648 addresses

Example 5Example 5

Example 6Example 6

SolutionSolution

Find the class of the following IP addresses 00000001 00001011 00001011 1110111111000001 00001011 00001011 11101111

•00000001 00001011 00001011 111011111st is 0, hence it is Class A

•11000001 00001011 00001011 111011111st and 2nd bits are 1, and 3rd bit is 0 hence, Class C

Figure 4-5

Finding the class in decimal notation

Example 7Example 7

SolutionSolution

Find the class of the following addresses158.223.1.108227.13.14.88

•158.223.1.1081st byte = 158 (128<158<191) class B

•227.13.14.881st byte = 227 (224<227<239) class D

Peter Smith 25

Are You the Host or the Network? (Cont.)

Each Network is assigned a network address & every device or interface (such as a router port) on the network is assigned a host address.

There are only 2 specific rules that govern the value of the address.

Peter Smith 26

Are You the Host or the Network? (Cont.)

A host address cannot be designated by all zeros or all ones.

These are special addresses that are reserved for special purposes.

Peter Smith 27

Class A Addresses (Cont.)

There are 16,777,214 Host addresses available in a Class A address.

Rather than remembering this number exactly, you can use the following formula to compute the number of hosts available in any of the class addresses, where “n” represents the number of bits in the host portion:

(2n – 2) = Number of available hosts

Peter Smith 28

Class A Addresses (Cont.)

For a Class A network, there are:224 – 2 or 16,777,214 hosts.

Half of all IP addresses are Class A addresses. You can use the same formula to determine the

number of Networks in an address class. Eg., a Class A address uses 7 bits to designate

the network, so (27 – 2) = 126 or there can be 126 Class A Networks.

Peter Smith 29

Class B IP Addresses

Class B addresses use the 1st 16 bits (two octets) for the Network address.

The last 2 octets are used for the Host address.

The 1st 2 bit, which are always 10, designate the address as a Class B address & 14 bits are used to designate the Network. This leaves 16 bits (two octets) to designate the Hosts.

Peter Smith 30

Class B IP Addresses (Cont.)

So how many Class B Networks can there be?

Using our formula, (214 – 2), there can be 16,382 Class B Networks & each Network can have (216 – 2) Hosts, or 65,534 Hosts.

Peter Smith 31

Class C IP Addresses

Class C addresses use the 1st 24 bits (three octets) for the Network address & only the last octet for Host addresses.the 1st 3 bits of all class C addresses are set to 110, leaving 21 bits for the Network address, which means there can be 2,097,150 (221 – 2) Class C Networks, but only 254 (28 – 2) Hosts per Network.

Peter Smith 32

Special Addresses (Cont.)

Within each address class is a set of addresses that are set aside for use in local networks sitting behind a firewall or NAT (Network Address Translation) device or Networks not connected to the Internet.

Network AddressesNetwork Addresses

The network address is the first address.

The network address defines the network to the rest of the Internet.

Given the network address, we can find the class of the address, the block, and the range of the addresses in the block

In classful addressing, In classful addressing, the network address the network address

(the first address in the block) (the first address in the block) is the one that is assigned is the one that is assigned

to the organization. to the organization.

Example 8Example 8

SolutionSolution

Given the network address 132.21.0.0, find the class, the block, and the range of the addresses

The 1st byte is between 128 and 191. Hence, Class B

The block has a netid of 132.21. The addresses range from

132.21.0.0 to 132.21.255.255.

Default Mak

Class A default mask is 255.0.0.0 Class B default mask is 255.255.0.0 Class C Default mask 255.255.255.0

Peter Smith 37

A Trial Separation

Subnet masks apply only to Class A, B or C IP addresses.

The subnet mask is like a filter that is applied to a message’s destination IP address.

Its objective is to determine if the local network is the destination network.

Mask Mask

• A mask is a 32-bit binary number.

• The mask is ANDeD with IP address to get• The bloc address (Network address)

• Mask And IP address = Block Address

Figure 4-10

Masking concept

The network address is the The network address is the beginning address of each block.beginning address of each block.

It can be found by applying It can be found by applying the default mask tothe default mask to

any of the addresses in the block any of the addresses in the block (including itself).(including itself).

It retains the It retains the netidnetid of the block of the block and sets the and sets the hostidhostid to zero. to zero.

Example: ellington.cs.virginia.edu

Network address is: 128.143.0.0 (or 128.143)

Host number is: 137.144 Netmask is: 255.255.0.0 (or ffff0000)Prefix or CIDR notation: 128.143.137.144/16

Network prefix is 16 bits long

Example

128.143 137.144

IP address of a network – Host number is set to all zeros, e.g.,

128.143.0.0 Broadcast address

– Host number is all ones, e.g., 128.143.255.255

– Broadcast goes to all hosts on the network

– Often ignored due to security concerns

top related