Upload
muzammil-afsar
View
215
Download
0
Embed Size (px)
Citation preview
8/18/2019 BTIT CN Unit - 1 - IP Addressing
1/29
Friday18 18 / 03 / 20
Subject Name : Computer Networks Subject Code : BTIT 603
Faculty:
Dr. Siddhartha Sankar BiswasAssistant ProfessorDepartment of Computer Science & EngineeringJamia Hamdard University, New Delhi
Branch : B.Tech. (Information Technology) Semester : 6th
IP Addressing (IPv4 Addressing)
T o p i c s
1
•
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)
18 March 2016
An Internet Protocol address (IP address) is a numericallabelassigned 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 IPaddress as a 32-bit number
and this system is known as Internet Protocol Version 4 (IPv4).
IP Address
18 March 2016 2Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
2/29
Friday18 18 / 03 / 20
Due to the enormous growth of the Internet and thepredicted 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 3Dr. Siddhartha Sankar B iswas
IP AddressesIPv4 Addresses
Classfull Addressing
IPv6 Addresses
Classless Inter-Domain Routing (CIDR)informally known as Classless Addressing
Class-A Addressing
Class-B Addressing
Class-C Addressing
Class-D AddressingClass-E Addressing
18 March 2016 4Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
3/29
Friday18 18 / 03 / 20
IANA
RIR RIR RIRRIR RIR
ISP
USER
ISP ISP ISP ISP
USER USER USER USER
Only 5 RIRs around the world
N
n u m b e r s
N
n u m b e r s
N
n u m b e r s
N
n u m b e r s
N
n u m b e r s
M numbers M numbers M numbers M numbers M numbers
Internet Assigned Numbers Authority (IANA)manages the IP address space allocations globallyand 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.
18 March 2016 5Dr. Siddhartha Sankar B iswas
18 March 2016 6Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
4/29
Friday18 18 / 03 / 20
Classfull AddressingA classful addressing architecture was used in the Internetsince 1981 until the introduction of Classless Inter-DomainRouting (CIDR) in 1993.Classful Addressing method divides the address space forIPv4 into five address classes.
Each class defines a different network size, with eachnetwork having different number of hosts.The Classes are classes A, B, C used for uncasting andmulticast network class D.The fifth class (E) address range is reserved for future orexperimental purposes.
Even after its discontinuation, Classfull Addressing termsare often still used erroneously by people working in IT.
Classful network concepts remain in practice only in limitedscope in the default configuration parameters of somenetwork software and hardware components.18 March 2016 7Dr. Siddhartha Sankar B iswas
Notations
01110010111000111100101010101010
114
Binary Notations
Dotted-Decimal Notations
227 202 170
Rough Note:Remember its Dotted Decimal and not simple Decimal.In simple decimal this binary number would be = 1927531178
For representing the binary into dotted decimal,we divide the 32 Bits into 4 octets of 8 Bits each.
18 March 2016 8Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
5/29
Friday18 18 / 03 / 20
8 Bits 8 Bits 8 Bits 8 Bits
32 Bits
1st Octet 2nd Octet 3rd Octet 4th Octet
So, value of each octet can be between 0 – 255By 8 Bits we can represent upto 28 = 256 numbers
0to
255
0to
255
0to
255
0to
255
1 1 1 1 1 1 1 1
= 0
= 255
0 0 0 0 0 0 0 0
18 March 2016 9Dr. Siddhartha Sankar B iswas
Class A Addressing
00
Leading
Bit
24 Bits7 Bits
Network ID(net ID) Host ID
1st Octet 2nd Octet 3rd Octet 4th Octet
0 0 0 0 0 0 0 0
0 1 1 1 1 1 1 1
= 0
= 127
to
0to127
0 - 255 0 - 2550 - 255
Range of Class A IP Addresses
0.0.0.0to 127.255.255.255
Max.No. of possible Networks= 27
= 128
Max. No. of possible Hosts per Network= 224
= 16777216
Range of 1st Octet
18 March 2016 10Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
6/29
Friday18 18 / 03 / 20
Class B Addressing
1
LeadingBits
16 Bits14 Bits
Network ID(net ID) Host ID
1st Octet 2nd Octet 3rd Octet 4th Octet
1 0 0 0 0 0 0 0
1 0 1 1 1 1 1 1
= 128
= 191
to
128 - 191 0 - 255 0 - 2550 - 255
Range of Class B IP Addresses128.0.0.0
to 191.255.255.255
Max. No. of possible Networks= 214
= 16384
Max No. of possible Hosts per Network= 216
= 65536
Range of 1st Octet
1 01 0
18 March 2016 11Dr. Siddhartha Sankar B iswas
Class C AddressingLeadingBits
8 Bits21 Bits
Network ID(net ID) Host ID
1st Octet 2nd Octet 3rd Octet 4th Octet
1 1 0 0 0 0 0 0
1 1 0 1 1 1 1 1
= 192
= 223
to
192 - 223 0 - 255 0 - 2550 - 255
Range of Class C IP Addresses192.0.0.0
to 223.255.255.255
Max. No. of possible Networks= 221
= 2097152
Max No. of possible Hosts per Network= 28
= 256
Range of 1st Octet
11 11 1 01 1 0
18 March 2016 12Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
7/29
Friday18 18 / 03 / 20
Class D Addressing(used for Multicasting)
LeadingBits
28 Bits
Multicast
1st Octet 2nd Octet 3rd Octet 4th Octet
1 1 1 0 0 0 0 0
1 1 1 0 1 1 1 1
= 224
= 239
to
224 - 239 0 - 255 0 - 2550 - 255Range of Class D IP Addresses
224.0.0.0to
239.255.255.255
Max. No. of possible Networks= 20
= 1Max No. of possible Hosts
(for multicasting) per Network= 228
= 268435456
Range of 1st Octet
11 11 1 11 1 1 01 1 1 0
18 March 2016 13Dr. Siddhartha Sankar B iswas
Class E Addressing
(Reserved for Future Use)Leading
Bits
28 Bits
(To be defined in future)
1st Octet 2nd Octet 3rd Octet 4th Octet
1 1 1 1 0 0 0 0
1 1 1 1 1 1 1 1
= 240
= 255
to
240 - 255 0 - 255 0 - 2550 - 255
Range of Class E IP Addresses240.0.0.0
to 255.255.255.255
Max. No. of possible Networksand
Max No. of possible Hosts per Network
Range of 1st Octet
11 11 1 11 1 1 11 1 1 1
Not yet defined18 March 2016 14Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
8/29
Friday18 18 / 03 / 20
Class LeadingBits
N/WIDSize(Bits)
HostIDSize(Bits)
Max. No.of
N/W
Max. No.of Hostsper N/W
IPRange
27 =128
214 =16384
221 =2097152
0224 =
16777216
216 =65536
28 =256
A
B
C
D
E
7 24
10
0.0.0.0
to 127.255.255.255
14 16128.0.0.0
to 191.255.255.255
110 21 8192.0.0.0
to 223.255.255.255
1110 0 28
20 = 1 228 =
268435456224.0.0.0
to 239.255.255.255
1111224.0.0.0
to 239.255.255.255
FutureUse
Reserved for Future Use.Parameters Still Not Defined.
Data is Multicastto all Hosts
18 March 2016 15Dr. Siddhartha Sankar B iswas
A
50%
B
25%
C
13%
D6%
E
6% Total IPv4 Addresses
(232 = 4294967296)
Class A = 128 x 16777216 = 2147483648
Class B = 16384 x 65536 = 1073741824
Class C = 2097152 x 256 = 536870912
Class D = 1 x 268435456 = 268435456
Class E = 268435456
Max. No.of hostsper N/W
Max. No.of IP
addressespossible
% ofaddressesin eachclass
Max. No.of N/W
Let us find the number ofIP addresses available ineach class
18 March 2016 16Dr. Siddhartha Sankar Biswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
9/29
Friday18 18 / 03 / 20
Case 1: If suppose there needs to be 110 sub-networks and each of themwould require to 50,000 to 60,000 hosts?
Ans: ClassA or ClassB
What do you think , which Class of network would a network engineerimplement in a organization
Case 2: If suppose there needs to be 125 sub-networks and each of themwould require to 50,000 to 70,000 hosts?
Ans: Class ACase 3: If suppose there needs to be 200 sub-networks and each of themwould require to 50,000 to 60,000 hosts?
Ans: Class B
Case 4: If suppose there needs to be 500 sub-networks and each of themwould require to 50,000 to 70,000 hosts?
?
Lets do some case study
18 March 2016 17Dr. Siddhartha Sankar B iswas
Classless Inter-Domain Routing (CIDR) Addressing(Classless Addressing)
The flaws in Classful Addressing scheme combined with thefact of fast growth of Internet lead to a situation whereIP addresses were nearly depleted.
Though the number of devices on Internet in mid 80’s orearly 90’s were certainly less than 232
but with due to technical short coming in Classfuladdressing mechanism, there came a situation where
Internet Assigned Numbers Authority (IANA) was facingproblem in allocating IP address,specially Class A and Class B addresses.
Therefore Internet Engineering Task Force (IETF)developed a new IPv4 addressing scheme known asClassless Addressing, technically known asClassless Inter-Domain Routing(CIDR) addressing scheme.
8/18/2019 BTIT CN Unit - 1 - IP Addressing
10/29
Friday18 18 / 03 / 20
Problem Statement
What do you think , which Class of network would a network engineerimplement in a organization
If suppose there needs to be 500 sub-networks and each of themwould require to 50,000 to 70,000 hosts?
Solution : Not possible
Rough Note: Though by some indirect methods this can be implemented in someunconventional fashion,
but no straight forward, simple and conventional solution is possible.
18 March 2016 19Dr. Siddhartha Sankar B iswas
0
LeadingBit
24 Bits7 Bits
Network ID(net ID) Host ID
LeadingBits
16 Bits14 Bits
Network ID(net ID)
Host ID
Class A
Class B
Reason for the Problem
1 0
18 March 2016 20Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
11/29
Friday18 18 / 03 / 20
23 Bits9 Bits
Network ID(net ID) Host ID
Solution to the Problem
Max. No. of possible Networks
= 29= 512
Max. No. of possible Hosts per Network= 223
= 8388608
Let us remove the class system where Net ID and Host ID have fixedno. of bits assigned.
Lets make the no. of bits required for defining Net ID and Host IDmore flexible and as per requirement.
And since we are eliminating class system, we would be able to freethe leading bits which were used as identification purpose.
18 March 2016 21Dr. Siddhartha Sankar B iswas
23 Bits9 Bits
Network ID(net ID) Host ID
Solution to the Problem
Max. No. of possible Networks= 29
= 512Max. No. of possible Hosts per Network
= 223
= 8388608
Let us remove the class system where Net ID and Host ID have fixedno. of bits assigned.
Lets make the no. of bits required for defining Net ID and Host IDmore flexible and as per requirement.
And since we are eliminating class system, we would be able to freethe leading bits which were used as identification purpose.
18 March 2016 22Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
12/29
Friday18 18 / 03 / 20
23 Bits9 Bits
Network ID(net ID)
Host ID
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0
In Binary Notation : 0.0.0.0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1
IP Address RangeStarting IP
Last IP
In Binary Notation : 255.255.255.255
18 March 2016 23Dr. Siddhartha Sankar B iswas
23 Bits9 Bits
Network ID
(net ID)
Host ID
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0
In Binary Notation : 0.0.0.0 / 9
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 01 1 1 1 1 1 1 1
Network Address RangeStarting Network Address
Last Network Address
In Binary Notation : 255.128.0.0 / 918 March 2016 24Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
13/29
Friday18 18 / 03 / 20
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 twoaddresseswhereas a large organisation may be giventhousand of addresses.
18 March 2016 25Dr. Siddhartha Sankar B iswas
RestrictionsTo simplify the handling of addresses,the Internet authorities impose three restrictions onclassless address blocks:
1.The addresses in a block must be contagiousi.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 bythe number of addresses.
18 March 2016 26Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
14/29
Friday18 18 / 03 / 20
Example: A block of address granted to a business house which requires 14 IP addresses
205.16.37.32
205.16.37.47
… …
First
Last
We can see that the restrictions are applied to this block1.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
3440387360 / 16 = 2150124210 (evenly divisible)18 March 2016 27Dr. Siddhartha Sankar B iswas
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 insteadof writing all the numbers.
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 n leftmost bits are 1’s and rest of the (32-n) bits are 0’s.
therefore a better way of defining a block of IPv4classless IP addresses is developed known as masking.
18 March 2016 28Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
15/29
Friday18 18 / 03 / 20
First IP Address of the blockThe first IP address of the block can be found by doingAND operation between the given address and the mask.
(This is by default subnet address of the given Network)
Last IP Address of the blockThe last IP address of the block can be found by doing ORoperation between the given address and the compliment ofthe mask.
Number of Address in the block
Number of addresses in the block can be found byconverting the compliment of the mask from its binaryvalue to decimal valueand then adding it with 1 (decimal).
18 March 2016 29Dr. Siddhartha Sankar B iswas
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 30Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
16/29
Friday18 18 / 03 / 20
Solution
Therefore Mask address is:
11111111 11111111 11111111 11110000
Mask is represented here by /28.
One of the IP address of the block = 205.16.37.39
In binary the IP address will be11001101 00010000 00100101 00100111
Mask Compliment is:
00000000 00000000 00000000 0000111118 March 2016 31Dr. Siddhartha Sankar B iswas
(a) First IP Address of the block
The first IP address of the block can be found by doingAND operation between the given address and the mask.
First IP Addressof the block
11001101 00010000 00100101 00100000
i.e. 205.16.37.32
IP Address 11001101 00010000 00100101 00100111
Mask 11111111 11111111 11111111 11110000
AND
(This is by default subnet address of the given Network)18 March 2016 32Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
17/29
Friday18 18 / 03 / 20
(b) Last IP Address of the block
The last IP address of the block can be found by doing ORoperation between the given address and the compliment of
the mask.
MaskCompliment
00000000 00000000 00000000 00001111
Last IP Addressof the block
11001101 00010000 00100101 00101111
i.e. 205.16.37.47
IP Address 11001101 00010000 00100101 00100111OR
18 March 2016 33Dr. Siddhartha Sankar B iswas
(c) Number of Address in the block
Number of addresses in the block can be found byconverting the compliment of the mask from its binaryvalue to decimal valueand then adding it with 1 (decimal).
MaskCompliment
00000000 00000000 00000000 00001111
Decimal value of the Mask Compliment = 15
Therefore,
Number of addresses in the block = 15 +1= 16
18 March 2016 34Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
18/29
Friday18 18 / 03 / 20
Subnet Addressing
To understand subnet addressing, we must understand thefollowing concepts:
Hierarchy Network Addresses
18 March 2016 35Dr. Siddhartha Sankar B iswas
28 BitsNetwork prefix
4 BitsHost Address
Two-Level Hierarchy
(No Subnetting possible)
18 March 2016 36Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
19/29
Friday18 18 / 03 / 20
Example
An organization is assigned the block 205.16.37.32/28
Design the network configuration for the organization.
18 March 2016 37Dr. Siddhartha Sankar B iswas
Solution
In order to design the network configuration for theOrganization which was granted 205.16.37.32/28
One of the IP = 205.16.37.32Which in binary is: 11001101 00010000 00100101 00100000
And Mask = 28Which in binary is: 11111111 11111111 11111111 11110000
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).
18 March 2016 38Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
20/29
Friday18 18 / 03 / 20
(a) First IP Address of the block
The first IP address of the block can be found by doingAND operation between the given address and the mask.
First IP Addressof the block
11001101 00010000 00100101 00100000
i.e. 205.16.37.32
IP Address 11001101 00010000 00100101 00100000
Mask 11111111 11111111 11111111 11110000
AND
(This is by default subnet address of the given Network)
18 March 2016 39Dr. Siddhartha Sankar B iswas
(b) Last IP Address of the block
The last IP address of the block can be found by doing ORoperation between the given address and the compliment ofthe mask.
MaskCompliment
00000000 00000000 00000000 00001111
Last IP Addressof the block
11001101 00010000 00100101 00101111
i.e. 205.16.37.47
IP Address 11001101 00010000 00100101 00100000OR
18 March 2016 40Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
21/29
Friday18 18 / 03 / 20
(c) Number of Address in the block
Number of addresses in the block can be found byconverting the compliment of the mask from its binary
value to decimal valueand then adding it with 1 (decimal).
MaskCompliment
00000000 00000000 00000000 00001111
Decimal value of the Mask Compliment = 15
Therefore,
Number of addresses in the block = 15 +1= 16
18 March 2016 41Dr. Siddhartha Sankar B iswas
Rest of theInternet
205.16.37.33/28 205.16.37.34/28 205.16.37.46/28 205.16.37.47/28
Routers Internal IP 205.16.37.40/28
Routers External IP x.y.z.t /n
OrganizationNetwork
Range:205.16.37.32
to205.16.37.47
205.16.37.32/28
A network configuration for the block 205.16.37.32/28
18 March 2016 42Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
22/29
Friday18 18 / 03 / 20
26 BitsNetwork prefix
Host Address
Host ID
6 Bits
Three-Level Hierarchy(Subnetting)
Given below is a Two-Level Hierarchy
Let us divide it into Three-Level Hierarchy
18 March 2016 43Dr. Siddhartha Sankar B iswas
26 BitsNetwork prefix
Host Address
Sub-Networkprefix
1Bit
5Bits
1 Bit has been borrowed from host ID
andadded to network prefix to create 27 bit length subnetwork
18 March 2016 44Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
23/29
Friday18 18 / 03 / 20
26 BitsNetwork prefix
Host Address
Sub-Networkprefix
2Bits
4Bits
2 Bits has been borrowed from host IDand
added to network prefix to create 28 bit length subnetwork
18 March 2016 45Dr. Siddhartha Sankar B iswas
Example
An organization is assigned the block 17.12.14.10/26.
The organization has 3 offices.
The network engineer wants to create 3 independentsub-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 46Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
24/29
Friday18 18 / 03 / 20
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 IPAddress 00010001 00001100 00001110 00001010
Subnetmask 11111111 11111111 11111111 11000000
SubnetMask
Compliment00000000 00000000 00000000 00111111
18 March 2016 47Dr. Siddhartha Sankar B iswas
First IP Address of the block
The first IP address of the block can be found by doingAND operation between the given address and the mask.
First IP Addressof the block
00010001 00001100 00001110 00000000
i.e. 17.12.14.0
IP Address 00010001 00001100 00001110 00001010
Mask 11111111 11111111 11111111 11000000
AND
(This is by default subnet address of the given Network)
18 March 2016 48Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
25/29
Friday18 18 / 03 / 20
Last IP Address of the block
The last IP address of the block can be found by doing ORoperation between the given address and the compliment of
the mask.
MaskCompliment
00000000 00000000 00000000 00111111
Last IP Addressof the block
00010001 00001100 00001110 00111111
i.e. 17.12.14.63
IP Address 00010001 00001100 00001110 00001010OR
18 March 2016 49Dr. Siddhartha Sankar B iswas
Number of Address in the block
Number of addresses in the block can be found byconverting the compliment of the mask from its binaryvalue to decimal valueand then adding it with 1 (decimal).
MaskCompliment
00000000 00000000 00000000 00111111
Decimal value of the Mask Compliment = 63
Therefore,
Number of addresses in the block = 63 +1= 64
18 March 2016 50Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
26/29
Friday18 18 / 03 / 20
The range of the block is :
17.12.14.0
to 17.12.14.63
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.
Total = 64 Addresses
This block is needed to be divided among the3 sub-networks having 32,16 and 16 addresses each.
So, before proceeding further,lets find the subnet masks for each of subnets.
18 March 2016 51Dr. Siddhartha Sankar B iswas
Subnet Mask for Subnet-1
Subnet Mask for Subnet-2
Subnet Mask for Subnet-3
Subnet-1 needs 32 addresses.
Therefore Host ID must have = 5 bits.
Therefore Subnet mask = 32 - 5 = 27
Subnet-2 needs 16 addresses.
Therefore Host ID must have = 4 bits.
Therefore Subnet mask = 32 - 4 = 28
Subnet-3 has 16 addresses.
Therefore Host ID must have = 4 bits.
Therefore Subnet mask = 32 - 4 = 2818 March 2016 52Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
27/29
Friday18 18 / 03 / 20
17.12.14.0 / 27
to
17.12.14.31 / 27
Mask = 27
Sub-Network 1
Lets assign the following address sub-block to subnet-1
Lets take any one of the IP from the block = 17.12.14.30
Let us find the subnet address of the sub-network 1
Subnet address ofsubnet 1
00010001 00001100 00001110 00000000
i.e. 17.12.14.0
IP Address 00010001 00001100 00001110 00011110
Mask 11111111 11111111 1111111 11100000
AND
Total = 32 Addresses
18 March 2016 53Dr. Siddhartha Sankar B iswas
17.12.14.32 / 28
to
17.12.14.47 / 28
Mask = 28
Sub-Network 2
Lets assign the following address sub-block to subnet-2
Lets take any one of the IP from the block = 17.12.14.39
Let us find the subnet address of the sub-network 2
Subnet address ofsubnet 1
00010001 00001100 00001110 00100000
i.e. 17.12.14.32
IP Address 00010001 00001100 00001110 00100111
Mask 11111111 11111111 1111111 11110000AND
Total = 16 Addresses
18 March 2016 54Dr. Siddhartha Sankar B iswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
28/29
Friday18 18 / 03 / 20
17.12.14.48 / 28
to
17.12.14.63 / 28
Mask = 28
Sub-Network 3
Lets assign the following address sub-block to subnet-3
Lets take any one of the IP from the block = 17.12.14.55
Let us find the subnet address of the sub-network 3
Subnet address ofsubnet 1
00010001 00001100 00001110 00110000
i.e. 17.12.14.48
IP Address 00010001 00001100 00001110 00110111
Mask 11111111 11111111 1111111 11110000
AND
Total = 16 Addresses
18 March 2016 55Dr. Siddhartha Sankar B iswas
Internet
17.12.14.1/27
17.12.14.30/27
17.12.14.31/27
17.12.14.2/27
17.12.14.0/27Subnet addressOf Subnet -1
17.12.14.32/28Subnet addressOf Subnet -2
17.12.14.33/28
17.12.14.47/28
17.12.14.49/28
17.12.14.63/28
17.12.14.48/28Subnet addressOf Subnet -3
17.12.14.50/28
Network : 17.12.14.10/27
x.y.z.t/n
17.12.14.34/28
Subnet - 1
Subnet - 2
Subnet - 3
18 March 2016 56Dr. Siddhartha Sankar Biswas
8/18/2019 BTIT CN Unit - 1 - IP Addressing
29/29
Friday18 18 / 03 / 20
Internet
172.18.3.1 172.18.3.2 172.18.3.20
172.18.3.30
200.24.5.8NAT Router
25.8.2.10
25.8.3.101
25.40.3.79
25.40.76.56
25.8.49.110
And many more …..
Sender
Responder
Organization’sNetwork
Network Address Translation
(NAT)
18 March 2016 57Dr. Siddhartha Sankar B iswas
Source: 172.18.3.1Destination: 25.8.2.10
Source: 200.24.5.8Destination: 25.8.2.10
Translation Table(maintained atNAT Router)
Private External
Destination: 172.18.3.1Source: 25.8.2.10
Destination: 200.24.5.8Source: 25.8.2.10
25.8.2.10172.18.3.1
Sender to Responder : RequestStep 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 theDatagram and adding its own External Address. Andthen forwards the datagram to the internet.
Step 1.1
Step 1.2
UpdationStep 1.2
Step 1.3
Step 2.1Step 2.2
CheckingStep 2.2
Step 2.3
Responder to Sender : ReplyStep 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 theconcerned Private address.
18 March 2016 58Dr. Siddhartha Sankar Biswas