Sie sind auf Seite 1von 29

Friday18 18 / 03 / 2016

Subject Name : Computer Networks


Branch : B.Tech. (Information Technology)

Subject Code : BTIT 603


Semester : 6th

Topics

IP Addressing (IPv4 Addressing)

Faculty:

Introduction to IP Addressing

Classful Addressing Concepts


Case Study of Classful Addressing

CIDR Addressing Concepts


Case Study of CIDR Addressing

Subnet addressing
Network Address Translation (NAT)

Dr. Siddhartha Sankar Biswas

Assistant Professor
Department of Computer Science & Engineering
Jamia Hamdard University, New Delhi
18 March 2016

IP Address

An Internet Protocol 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.

An IP address serves two principal functions:


(i) Host or network interface identification and
(ii) Location addressing.
The designers of the Internet Protocol defined an IP
address as a 32-bit number

and
18 March 2016

Dr. Siddhartha Sankar Biswas

this system is known as Internet Protocol Version 4 (IPv4).

Friday18 18 / 03 / 2016

Due to the enormous growth of the Internet and the


predicted depletion of available addresses,
a new version of IP known as IPv6, using 128 bits for the
address, was developed in 1995
and its deployment has been ongoing since the mid-2000s.
IP addresses are binary numbers,
but they are usually stored in text files

and displayed in human-readable notations,

Example: 172.16.254.1 (for IPv4),


and

2001:db8:0:1234:0:567:8:1 (for IPv6).

18 March 2016

Dr. Siddhartha Sankar Biswas

IP Addresses
IPv4 Addresses
Classfull Addressing
Class-A Addressing
Class-B Addressing
Class-C Addressing
Class-D Addressing
Class-E Addressing

Classless Inter-Domain Routing (CIDR)


informally known as Classless Addressing

IPv6 Addresses

18 March 2016

Dr. Siddhartha Sankar Biswas

Friday18 18 / 03 / 2016

Internet Assigned Numbers Authority (IANA)


manages the IP address space allocations globally
and delegates five Regional Internet Registries (RIRs)
which further allocate IP address blocks to Local Internet Registries (LIR)
also known as Internet Service Providers (ISP) and other entities.

IANA
Only 5 RIRs around the world

USER
18 March 2016
M numbers

18 March 2016

USER
M numbers

USER
M numbers

Dr. Siddhartha Sankar Biswas

Dr. Siddhartha Sankar Biswas

ISP

USER
M numbers

RIR
N numbers

ISP

N numbers

ISP

RIR

RIR
N numbers

ISP

RIR
N numbers

N numbers

RIR

ISP

USER
M numbers5

Friday18 18 / 03 / 2016

Classfull Addressing

A classful addressing architecture was used in the Internet


since 1981 until the introduction of Classless Inter-Domain
Routing (CIDR) in 1993.
Classful Addressing method divides the address space for
IPv4 into five address classes.
Each class defines a different network size, with each
network having different number of hosts.
The Classes are classes A, B, C used for uncasting and
multicast network class D.
The fifth class (E) address range is reserved for future or
experimental purposes.
Even after its discontinuation, Classfull Addressing terms
are often still used erroneously by people working in IT.
Classful network concepts remain in practice only in limited
scope in the default configuration parameters of some
18 March 2016
Dr. Siddhartha Sankar Biswas
7
network
software and hardware
components.

Notations

Binary Notations
01110010111000111100101010101010

114

227

. 202 .

170

Dotted-Decimal Notations
For representing the binary into dotted decimal,
we divide the 32 Bits into 4 octets of 8 Bits each.
Rough Note:

Remember its Dotted Decimal and not simple Decimal.


18 March 2016
Dr. Siddhartha Sankar Biswas
8
In simple decimal this binary number would be = 1927531178

Friday18 18 / 03 / 2016

32 Bits

8 Bits

8 Bits

1st Octet

2nd Octet

0
to
255

8 Bits

8 Bits

3rd Octet

0
to
255

0
to
255

0 0 0 0 0 0 0 0

= 0

1 1 1 1 1 1 1 1

= 255

4th Octet

0
to
255

So, value of each octet can be between 0 255


Dr. Siddhartha Sankar Biswas
By 8 Bits we can represent
upto 28 = 256 numbers 9

18 March 2016

Class A Addressing

Leading
Bit
Network ID
(net ID)

Host ID
24 Bits

7 Bits

0
1st Octet

0
to
127

2nd Octet

0 - 255

Range of 1st Octet

0 0 0 0 0 0 0 0 = 0

to
0 1 1 1 1 1 1 1 = 127
18 March 2016

3rd Octet

0 - 255

4th Octet

0 - 255

Range of Class A IP Addresses


0.0.0.0

to

127.255.255.255
Max.No. of possible Networks
= 27
= 128
Max. No. of possible Hosts per Network
= 224
Dr. Siddhartha Sankar Biswas
10
= 16777216

Friday18 18 / 03 / 2016

Leading
Bits

Class B Addressing
Network ID
(net ID)

Host ID
16 Bits

14 Bits

1 0
1st Octet

128 - 191

2nd Octet

3rd Octet

0 - 255

0 - 255

4th Octet

0 - 255

Range of Class B IP Addresses


128.0.0.0

Range of 1st Octet

to

191.255.255.255

1 0 0 0 0 0 0 0 = 128

Max. No. of possible Networks


= 214
= 16384

to
1 0 1 1 1 1 1 1 = 191
18 March 2016

Max No. of possible Hosts per Network


= 216
= 65536
Dr. Siddhartha Sankar Biswas
11

Class C Addressing

Leading
Bits

Network ID
(net ID)

Host ID

21 Bits

8 Bits

1 1 0
1st Octet

192 - 223

2nd Octet

0 - 255

Range of 1st Octet

1 1 0 0 0 0 0 0 = 192

to
1 1 0 1 1 1 1 1 = 223
18 March 2016

3rd Octet

0 - 255

4th Octet

0 - 255

Range of Class C IP Addresses


192.0.0.0

to

223.255.255.255
Max. No. of possible Networks
= 221
= 2097152
Max No. of possible Hosts per Network
= 28
Dr. Siddhartha Sankar Biswas
12
= 256

Friday18 18 / 03 / 2016

Class D Addressing
(used for Multicasting)

Leading
Bits

Multicast
28 Bits

1 1 1 0
1st Octet

224 - 239

2nd Octet

0 - 255

3rd Octet

0 - 255

4th Octet

0 - 255

Range of Class D IP Addresses


224.0.0.0

Range of 1st Octet

to

1 1 1 0 0 0 0 0 = 224

to
1 1 1 0 1 1 1 1 = 239
18 March 2016

239.255.255.255
Max. No. of possible Networks
= 20
= 1
Max No. of possible Hosts
(for multicasting) per Network
= 228
Dr. Siddhartha Sankar Biswas
= 268435456

13

Class E Addressing
(Reserved for Future Use)

Leading
Bits

28 Bits

(To be defined in future)

1 1 1 1
1st Octet

240 - 255

2nd Octet

0 - 255

Range of 1st Octet

1 1 1 1 0 0 0 0 = 240

to
1 1 1 1 1 1 1 1 = 255
18 March 2016

3rd Octet

0 - 255

4th Octet

0 - 255

Range of Class E IP Addresses


240.0.0.0

to

255.255.255.255

Max. No. of possible Networks

and

Max No. of possible Hosts per Network

Not yet defined

Dr. Siddhartha Sankar Biswas

14

Friday18 18 / 03 / 2016

Class

Leading
Bits

N/W
ID
Size
(Bits)

Host
ID
Size
(Bits)

10

110

1110

1111

Max. No.
of Hosts
per N/W

24

27 =
128

16777216

14

16

214 =
16384

216 =
65536

21

221 =
2097152

28 =
256

223.255.255.255

228 =

224.0.0.0

28

224 =

20 = 1

268435456

Data is Multicast
to all Hosts

Reserved for Future Use.

Parameters Still Not Defined.

18 March 2016

Dr. Siddhartha Sankar Biswas

E
D 6%
6%
C
13%
B
25%

18 March 2016

IP
Range

Max. No.
of
N/W

0.0.0.0

to

127.255.255.255
128.0.0.0

to

191.255.255.255
192.0.0.0

to

to

239.255.255.255
224.0.0.0

to

239.255.255.255

Future
Use
15

Total IPv4 Addresses


(232 = 4294967296)

% of
addresses
in each
class

A
50%
Max. No.
of N/W

Let us find the number of


IP addresses available in
each class
Max. No.
of hosts
per N/W

Max. No.
of IP
addresses
possible

Class A = 128 x 16777216 = 2147483648


Class B = 16384 x 65536 = 1073741824
Class C = 2097152 x 256 = 536870912
Class D = 1 x 268435456 = 268435456
Dr. Siddhartha Sankar Biswas
16
Class E = 268435456

Friday18 18 / 03 / 2016

Lets do some case study


What do you think , which Class of network would a network engineer
implement in a organization

Case 1:

If suppose there needs to be 110 sub-networks and each of them


would require to 50,000 to 60,000 hosts?

Ans: ClassA or ClassB

Case 2:
If suppose there needs to be 125 sub-networks and each of them
would require to 50,000 to 70,000 hosts?

Ans: Class A

Case 3:

If suppose there needs to be 200 sub-networks and each of them


would require to 50,000 to 60,000 hosts?

Case 4:

Ans: Class B

If suppose there needs to be 500 sub-networks and each of them


would require to 50,000 to 70,000 hosts?
18 March 2016

Dr. Siddhartha Sankar Biswas

17

Classless Inter-Domain Routing (CIDR) Addressing


(Classless Addressing)

The flaws in Classful Addressing scheme combined with the


fact of fast growth of Internet lead to a situation where
IP addresses were nearly depleted.

Though the number of devices on Internet in mid 80s or


early 90s were certainly less than 232
but with due to technical short coming in Classful
addressing mechanism, there came a situation where
Internet Assigned Numbers Authority (IANA)
problem in allocating IP address,

was facing

specially Class A and Class B addresses.

Therefore
Internet Engineering Task Force (IETF)
developed a new IPv4 addressing scheme known as
Classless Addressing, technically known as
Classless Inter-Domain Routing(CIDR) addressing scheme.

Friday18 18 / 03 / 2016

Problem Statement
What do you think , which Class of network would a network engineer
implement in a organization
If suppose there needs to be 500 sub-networks and each of them
would require to 50,000 to 70,000 hosts?

Solution : Not possible

Rough Note:

Though by some indirect methods this can be implemented in some


unconventional fashion,
but no straight forward, simple and conventional solution is possible.

18 March 2016

Dr. Siddhartha Sankar Biswas

19

Reason for the Problem


Leading
Bit

Class A

Network ID
(net ID)

Host ID
24 Bits

7 Bits

1 0
14 Bits

Network ID
(net ID)
Leading
Bits 18 March 2016

16 Bits

Host ID

Class B
Dr. Siddhartha Sankar Biswas

20

10

Friday18 18 / 03 / 2016

Solution to the Problem

Let us remove the class system where Net ID and Host ID have fixed
no. of bits assigned.
Lets make the no. of bits required for defining Net ID and Host ID
more flexible and as per requirement.
And since we are eliminating class system, we would be able to free
the leading bits which were used as identification purpose.
Network ID
(net ID)

Host ID
23 Bits

9 Bits

Max. No. of possible Networks


= 29
= 512

18 March 2016

Max. No. of possible Hosts per Network


= 223
Dr. Siddhartha
Biswas
=Sankar
8388608

21

Solution to the Problem

Let us remove the class system where Net ID and Host ID have fixed
no. of bits assigned.
Lets make the no. of bits required for defining Net ID and Host ID
more flexible and as per requirement.
And since we are eliminating class system, we would be able to free
the leading bits which were used as identification purpose.
Network ID
(net ID)
9 Bits

Host ID
23 Bits

Max. No. of possible Networks


= 29
= 512
Max. No. of possible Hosts per Network
= 223
= 8388608
18 March 2016

Dr. Siddhartha Sankar Biswas

22

11

Friday18 18 / 03 / 2016

Network ID
(net ID)

Host ID
23 Bits

9 Bits

IP Address Range

Starting IP
0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

In Binary Notation :

0 0 0 0 0 0 0 0

0.0.0.0

Last IP
1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1

In Binary Notation :
18 March 2016

1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1

255.255.255.255
Dr. Siddhartha Sankar Biswas

Network ID
(net ID)

23

Host ID
23 Bits

9 Bits

Network Address Range


Starting Network Address
0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

In Binary Notation :

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0.0.0.0 / 9

Last Network Address

1 1 1 1 1 1 1 1

1 0 0 0 0 0 0 0

In Binary Notation :
18 March 2016

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

255.128.0.0 / 9
Dr. Siddhartha Sankar Biswas

24

12

Friday18 18 / 03 / 2016

Address Blocks
In classless addressing, when an entity, small or
large, needs to be connected to the Internet,
it is always granted a block (range) of addresses.
The size of the block (the number of addresses)
varies based on the nature and size of the entity.

For example,

a household may be given only one or two


addresses
whereas a large organisation may be given
thousand of addresses.
18 March 2016

Dr. Siddhartha Sankar Biswas

25

Restrictions
To simplify the handling of addresses,
the Internet authorities impose three restrictions on
classless address blocks:

1.The addresses in a block must be contagious


i.e. one after another.

2.The number of addresses in a block must be a


power of 2 (1,2,4,8,.,.,.,).
3.The first address must be evenly divisible by
the number of addresses.

18 March 2016

Dr. Siddhartha Sankar Biswas

26

13

Friday18 18 / 03 / 2016

Example:

A block of address granted to a business house which requires 14 IP addresses

205.16.37.32

Last

205.16.37.47

First

We can see that the restrictions are applied to this block

1.We can see that the addresses provided are contiguous.


2.The number of addresses provided are 16 , which is a power of 2.
(24 = 16).
3.The first address when converted to decimal number is
3440387360, which is evenly divisible by total no. of addresses =
16.
Step 1: Dotted Decimal to Binary Value
205.16.37.32 = 11001101 00010000 00100101 00100000

Step 2: Binary Value to Decimal Value


11001101 00010000 00100101 00100000 = 3440387360

Step 3: Divide the Decimal Value by number of addresses


18 March 2016

Dr. Siddhartha Sankar Biswas

3440387360 / 16 = 2150124210

27

(evenly divisible)

Mask
As we know seen that in classless IPv4 addressing,
addresses are given in contiguous block.
But writing the whole block can be time consuming thing,
so there needs a better way of defining the blocks instead
of writing all the numbers.
therefore a better way of defining a block of IPv4
classless IP addresses is developed known as masking.
In IPv4 addressing, a block of addresses can be defined as
x.y.z.t / n , where

In which x.y.z.t defines one of the addresses from

and

/n defines the mask (this is known as CIDR notation)

Which means mask of the block is an IP addresses with

18 March 2016
Dr. Siddhartha Sankar Biswas
28
n leftmost
bits are 1s and
rest of the (32-n) bits are 0s.

14

Friday18 18 / 03 / 2016

First IP Address of the block


The first IP address of the block can be found by doing
AND operation between the given address and the mask.
(This is by default subnet address of the given Network)

Last IP Address of the block


The last IP address of the block can be found by doing OR
operation between the given address and the compliment of
the mask.
Number of Address in the block
Number of addresses in the block can be found by
converting the compliment of the mask from its binary
value to decimal value

and18 then
March 2016

Dr. Siddhartha Sankar Biswas

adding it with 1 (decimal).

29

Example
A block of IP address is granted to an organization.
We know that one of the address is 205.16.37.39/28.

Find the following


(a)The first address of the block.
(b)The last address assigned.
(c)Total IPs that the organization was assigned.

18 March 2016

Dr. Siddhartha Sankar Biswas

30

15

Friday18 18 / 03 / 2016

Solution
One of the IP address of the block = 205.16.37.39
In binary the IP address will be

11001101 00010000 00100101 00100111

Mask is represented here by /28.


Therefore Mask address is:
11111111 11111111 11111111 11110000

Mask Compliment is:


00000000 00000000 00000000 00001111
18 March 2016

Dr. Siddhartha Sankar Biswas

31

(a) First IP Address of the block


The first IP address of the block can be found by doing
AND operation between the given address and the mask.
IP Address

11001101 00010000 00100101 00100111

AND

Mask

First IP Address
of the block

11111111 11111111 11111111 11110000

11001101 00010000 00100101 00100000


i.e. 205.16.37.32

(This is by default subnet address of the given Network)


18 March 2016

Dr. Siddhartha Sankar Biswas

32

16

Friday18 18 / 03 / 2016

(b) Last IP Address of the block

The last IP address of the block can be found by doing OR


operation between the given address and the compliment of
the mask.
IP Address
OR

Mask
Compliment

Last IP Address
of the block

18 March 2016

11001101 00010000 00100101 00100111


00000000 00000000 00000000 00001111

11001101 00010000 00100101 00101111


i.e. 205.16.37.47
Dr. Siddhartha Sankar Biswas

33

(c) Number of Address in the block


Number of addresses in the block can be found by
converting the compliment of the mask from its binary
value to decimal value

and then

adding it with 1 (decimal).

Mask
Compliment

00000000 00000000 00000000 00001111

Decimal value of the Mask Compliment = 15


Therefore,

Number of addresses in the block = 15 +1


= 16
18 March 2016

Dr. Siddhartha Sankar Biswas

34

17

Friday18 18 / 03 / 2016

Subnet Addressing
To understand subnet addressing, we must understand the
following concepts:
Hierarchy
Network Addresses

18 March 2016

Dr. Siddhartha Sankar Biswas

35

Two-Level Hierarchy
(No Subnetting possible)

28 Bits
Network prefix

4 Bits
Host Address

18 March 2016

Dr. Siddhartha Sankar Biswas

36

18

Friday18 18 / 03 / 2016

Example
An organization is assigned the block 205.16.37.32/28
Design the network configuration for the organization.

18 March 2016

Dr. Siddhartha Sankar Biswas

37

Solution
In order to design the network configuration for the
Organization which was granted 205.16.37.32/28

We need to Find the following


(a)The first address of the block.
(b)The last address assigned.

(c) Size of the block


(Total IPs that the organization was assigned).

One of the IP = 205.16.37.32


Which in binary is:

And Mask = 28

Which in binary is:


18 March 2016

11001101 00010000 00100101 00100000

11111111 11111111 11111111 11110000


Dr. Siddhartha Sankar Biswas

38

19

Friday18 18 / 03 / 2016

(a) First IP Address of the block

The first IP address of the block can be found by doing


AND operation between the given address and the mask.
IP Address

11001101 00010000 00100101 00100000

AND

Mask

First IP Address
of the block

11111111 11111111 11111111 11110000

11001101 00010000 00100101 00100000


i.e. 205.16.37.32

(This is by default subnet address of the given Network)


18 March 2016

Dr. Siddhartha Sankar Biswas

39

(b) Last IP Address of the block


The last IP address of the block can be found by doing OR
operation between the given address and the compliment of
the mask.
IP Address
OR

Mask
Compliment

Last IP Address
of the block

18 March 2016

11001101 00010000 00100101 00100000


00000000 00000000 00000000 00001111

11001101 00010000 00100101 00101111

i.e. 205.16.37.47
Dr. Siddhartha Sankar Biswas

40

20

Friday18 18 / 03 / 2016

(c) Number of Address in the block

Number of addresses in the block can be found by


converting the compliment of the mask from its binary
value to decimal value

and then

adding it with 1 (decimal).


Mask
Compliment

00000000 00000000 00000000 00001111

Decimal value of the Mask Compliment = 15


Therefore,

Number of addresses in the block = 15 +1


= 16
18 March 2016

Dr. Siddhartha Sankar Biswas

41

A network configuration for the block 205.16.37.32/28


Range:
205.16.37.32
to
205.16.37.47

Rest of the
Internet

205.16.37.32/28

Organization
Network

205.16.37.33/28

18 March 2016

Routers External IP

x.y.z.t /n

Routers Internal IP
205.16.37.40/28

205.16.37.34/28

Dr. Siddhartha Sankar Biswas

205.16.37.46/28

205.16.37.47/28

42

21

Friday18 18 / 03 / 2016

Three-Level Hierarchy

(Subnetting)

Given below is a Two-Level Hierarchy

Host ID
6 Bits

26 Bits
Network prefix
Host Address

Let us divide it into Three-Level Hierarchy


18 March 2016

Dr. Siddhartha Sankar Biswas

43

1 Bit has been borrowed from host ID

and

added to network prefix to create 27 bit length subnetwork


1
Bit

5
Bits

26 Bits
Network prefix

Sub-Network
prefix

Host Address

18 March 2016

Dr. Siddhartha Sankar Biswas

44

22

Friday18 18 / 03 / 2016

2 Bits has been borrowed from host ID

and

added to network prefix to create 28 bit length subnetwork


2
Bits

4
Bits

26 Bits
Network prefix
Sub-Network
prefix

Host Address

18 March 2016

Dr. Siddhartha Sankar Biswas

45

Example
An organization is assigned the block 17.12.14.10/26.
The organization has 3 offices.
The network engineer wants to create 3 independent
sub-blocks (i.e sub nets)
of size 32,16 and 16 addresses, for the offices.
Design the network configuration for the organization.

18 March 2016

Dr. Siddhartha Sankar Biswas

46

23

Friday18 18 / 03 / 2016

Solution
Assigned block is : 17.12.14.10/26
Therefore one of the IP of this block is : 17.12.14.10

(i.e. Host IP)

And Mask is : 26
Host IP
Address

00010001 00001100 00001110 00001010

Subnet
mask

11111111 11111111 11111111 11000000

Subnet
Mask
Compliment

00000000 00000000 00000000 00111111

18 March 2016

Dr. Siddhartha Sankar Biswas

47

First IP Address of the block


The first IP address of the block can be found by doing
AND operation between the given address and the mask.
IP Address

00010001 00001100 00001110 00001010

AND

Mask

First IP Address
of the block

11111111 11111111 11111111 11000000

00010001 00001100 00001110 00000000


i.e. 17.12.14.0

(This is by default subnet address of the given Network)


18 March 2016

Dr. Siddhartha Sankar Biswas

48

24

Friday18 18 / 03 / 2016

Last IP Address of the block

The last IP address of the block can be found by doing OR


operation between the given address and the compliment of
the mask.
IP Address
OR

Mask
Compliment

Last IP Address
of the block

18 March 2016

00010001 00001100 00001110 00001010


00000000 00000000 00000000 00111111

00010001 00001100 00001110 00111111


i.e. 17.12.14.63
Dr. Siddhartha Sankar Biswas

49

Number of Address in the block


Number of addresses in the block can be found by
converting the compliment of the mask from its binary
value to decimal value

and then

adding it with 1 (decimal).

Mask
Compliment

00000000 00000000 00000000 00111111

Decimal value of the Mask Compliment = 63


Therefore,

Number of addresses in the block = 63 +1


= 64
18 March 2016

Dr. Siddhartha Sankar Biswas

50

25

Friday18 18 / 03 / 2016

The range of the block is :

17.12.14.0

to

Total = 64 Addresses

17.12.14.63
This block is needed to be divided among the
3 sub-networks having 32,16 and 16 addresses each.
Since the organizations needs 3 sub-networks,
so we need to assign 3 subnet address,
one for each of the sub-networks.
But for defining the 3 subnet address
we need to find the masks for each of the subnets.
So, before proceeding further,
lets find the subnet masks for each of subnets.
18 March 2016

Dr. Siddhartha Sankar Biswas

51

Subnet Mask for Subnet-1


Subnet-1 needs 32 addresses.
Therefore Host ID must have = 5 bits.

Therefore Subnet mask = 32 - 5 = 27


Subnet Mask for Subnet-2
Subnet-2 needs 16 addresses.
Therefore Host ID must have = 4 bits.
Therefore Subnet mask = 32 - 4 = 28
Subnet Mask for Subnet-3
Subnet-3 has 16 addresses.
Therefore Host ID must have = 4 bits.
Therefore Subnet mask = 32 - 4 = 28
18 March 2016

Dr. Siddhartha Sankar Biswas

52

26

Friday18 18 / 03 / 2016

Sub-Network 1
Lets assign the following address sub-block to subnet-1
17.12.14.0 / 27

to

Total = 32 Addresses

17.12.14.31 / 27
Let us find the subnet address of the sub-network 1

Mask = 27
Lets take any one of the IP from the block = 17.12.14.30

IP Address

Mask

AND

Subnet address of
subnet 1
18 March 2016

00010001 00001100 00001110 00011110

11111111 11111111 1111111 11100000


00010001 00001100 00001110 00000000

i.e. 17.12.14.0
Dr. Siddhartha Sankar Biswas

53

Sub-Network 2
Lets assign the following address sub-block to subnet-2
17.12.14.32 / 28

to

Total = 16 Addresses

17.12.14.47 / 28
Let us find the subnet address of the sub-network 2
Mask = 28
Lets take any one of the IP from the block = 17.12.14.39

IP Address
Mask

AND

Subnet address of
subnet 1
18 March 2016

00010001 00001100 00001110 00100111


11111111 11111111 1111111 11110000
00010001 00001100 00001110 00100000
i.e. 17.12.14.32
Dr. Siddhartha Sankar Biswas

54

27

Friday18 18 / 03 / 2016

Sub-Network 3
Lets assign the following address sub-block to subnet-3
17.12.14.48 / 28

to

Total = 16 Addresses

17.12.14.63 / 28
Let us find the subnet address of the sub-network 3

Mask = 28
Lets take any one of the IP from the block = 17.12.14.55

IP Address

Mask

00010001 00001100 00001110 00110111

AND

11111111 11111111 1111111 11110000


00010001 00001100 00001110 00110000

Subnet address of
subnet 1

i.e. 17.12.14.48

18 March 2016

Dr. Siddhartha Sankar Biswas

17.12.14.63/28

17.12.14.31/27

17.12.14.30/27

55

17.12.14.0/27
Subnet address
Of Subnet -1

17.12.14.48/28
Subnet address
Of Subnet -3

17.12.14.50/28

Subnet - 3

17.12.14.49/28

Subnet - 1
17.12.14.2/27

17.12.14.1/27

17.12.14.34/28

17.12.14.32/28
Subnet address
Of Subnet -2

x.y.z.t/n

17.12.14.47/28

Subnet - 2

17.12.14.33/28

Network : 17.12.14.10/27

18 March 2016

Internet

Dr. Siddhartha Sankar Biswas

56

28

Friday18 18 / 03 / 2016

172.18.3.1

172.18.3.2

172.18.3.20

Network Address Translation


(NAT)

Sender

Organizations
Network
172.18.3.30

NAT Router

200.24.5.8

25.8.3.101

Responder
25.8.2.10

25.40.76.56
25.40.3.79

And18 March
many
more ..
2016

Source: 172.18.3.1
Destination: 25.8.2.10

Dr. Siddhartha Sankar Biswas

Step 1.1

Translation Table
(maintained at
NAT Router)
Private

External

172.18.3.1

25.8.2.10

Updation
Step 1.2
Checking
Step 2.2

Step 2.3
18 March 2016

25.8.49.110

Internet

Step 1.2

57

Source: 200.24.5.8
Destination: 25.8.2.10

Step 1.3

Sender to Responder : Request


Step 1.1: Datagram is sent to router from the sender.
Step 1.2:Router receives the datagram and UPDATES
the Translation Table.
Step 1.3: Router changes source address field
by deleting the Private address in the
Datagram and adding its own External Address. And
then forwards the datagram to the internet.
Responder to Sender : Reply
Step 2.1: Datagram is received by router from the
internet.
Step 2.2 : Router CHECKS the Translation Table.
Step 2.3 : Router changes the destination address
field from its external address to the
concerned Private address.

Source: 25.8.2.10
Step 2.2
Destination: 172.18.3.1
Dr. Siddhartha Sankar Biswas

Step 2.1

Source: 25.8.2.10
Destination: 200.24.5.8
58

29

Das könnte Ihnen auch gefallen