Wednesday, August 20, 2008

IPV4 Subnetting






class A 1st octet 0-127: 16m
class B 2nd octet 127-191: 65thou
class C 3rd octet 192-223: 254
class D 4th octet 224-239: Multicast
class E 240 -255 reserve for experiment


Decimal to Hexadecimal
9 - 9
10 - A
11 - B
12 - C
13 - D
14 - E
15 - F

How to get BINARY: using our formula
let say 10.125.4.1

10. 125 4. 1
0000 1010. 0111 1101. 0000 0100. 0000 0001

if you are using our formula in second level you can get the binary.
Using the fingering method in your two hands in one hands you have a for
finger exept the tumbnail. in for finger in left side you have first finger
128, second is 64, third is 32 fourth is 16. and in right finger you have
8,4,2,1 in first, second, third, and last. and look at your finger right now
its look like Binary righ!using this method.

example:
in the last given IP address in first octet is 10 so we are going to used
finger method. look at your finger two hands.in 10 in binary is 0000 1010.
so in finger is:

128 64 32 16 8 4 2 1 second level using finger method
0 0 0 0 1 0 1 0 in binary its look like this. because 8+2= 10

in your finger you need to close 0 in binary and 1 who is raise so
the answer is 10 GET IT!

more example: using 125

128 64 32 16 8 4 2 1
0 1 1 1 1 1 0 1 64+32+16+8+4+1 = 125

look at your finger again do the same thing 0 is close
in your finger and 1 is raise Got IT!

note: you better practice this finger method make it easy to you the subnetting
etc..always remember your finger....:) NO need to have a paper to calculate what
binary of this, awts how can you solve it if you dont have a finger just imagine
hehe. remember no need to have a paper in your exam or interview of solving problem
like this all you need to do is finger and your mind............ :p


Private IP address
A. 10.0.0.0 - 10.x.x.x
B. 172.16.0.0 - 172.31.x.x
C. 192.168.0.0 - 192.168.x.x

HOW TO GET A SUBNET

Using this formula you can subnet all ip that you need to subnet.
Or anything to get subnet and host. And specially route aggregation.

Some Rules:

1.Using those valid mask
2.The next level 128i, 64i, 32i etc. this formula is used to get the
first valid IP address and the last valid IP address.
3.In slash /1 - / 32 this is used to know which mask are you going to
use and which First valid IP. Take a look at the formula

Example: 192.168.4.0/22

If you look at the formula in /22 is class C right, and in line of /22
and its valid mask is 252 and the first valid IP is 4 and the last is 7
like this (192.168.7.254/22) next subnet is 192.168.8.0/22 it because
of this 4, 8, 12, 16, 22 etc. So the next valid IP after using 4-7 is 8
so that’s why the next valid IP for the next subnet is 192.168.8.0/22 to
192.168.11.254/255 got it’?

2nd Formula: how to get subnet and host
/class a,b, or c + /Bits = SUBNET
/32 - /Bits = HOST

172.198.0.0/16 = let say the boss ask you. give me 8 subnet for that IP address.

first using 2nd Formula in SUBNET in a first slash we are going
to use /16 because boss gives us class B.
Second we are going to use /BITS formula of this is:

.................|------------->>> answer: /BITS is 4 so /4
128i 64i 32i 16i 8i 4i 2i 1i

explaination : why we are using 8i to calculate how many bits that are
we going to use it because boss ask for 8 subnet count backward
8,7,6,5,4,3,2,1 so in valid ip the answer is 4BITS.

NOTE: if the given subnet is 7, 15, 31, 63, 127 you are goin
to add 1 Bits like this

let say 7 so 7 is...|-------------->> /4bits again
128i 64i 32i 16i 8i 4i 2i 1i
because i said you need to add 1 Bits in 7,15 etc.


let say 15 is |-------------->> /5bits
128i 64i 32i 16i 8i 4i 2i 1i
because i said you need to add 1 Bits in 7,15 etc.

But if look like this 62,30,29, 126 you do not need to add.
if you follow the rules you can make it..

let say 65 is |-------------------------->> /7bits
________128i 64i 32i 16i 8i 4i 2i 1i
because it is in the range of 64 remember 64 - 126, 32 - 62 and if its 63 you need to add 1 bits.



SECOND: now that we no which Bits we are going to use lets start it.

/16 + /4bits = /20 the in line of /20 again think..... the valid mask
is 240, and the valid IP is 16i right.you can make it, i know you are not an idiot....

what now..

answer:
Network: Subnet & mask Network # Valid Hosts Broadcast
Network A 172.198.16.0 /20 172.198.16.0 172.198.16-31.1-254 172.198.31.255
NETWORK B 172.198.32.0 /20 172.198.32.0 172.198.32-47.1-254 172.198.47.255
NETWORK C 172.198.48.0 /20 172.198.48.0 172.198.48-63.1-254 172.198.63.255
NETWORK D 172.198.64.0 /20 172.198.64.0 172.198.64-79.1-254 172.198.79.255
NETWORK E 172.198.80.0 /20 172.198.80.0 172.198.80-95.1-254 172.198.95.255
NETWORK F 172.198.96.0 /20 172.198.96.0 172.198.32-96.111-254 172.198.111.255
NETWROK G 172.198.112.0 /20 172.198.112.0 172.198.112-127.1-254 172.198.127.255



Using host it is almost the same the procedure the difference between the two is host are
using /32 - /bits unlike subnet /classes + /bits.... the bits that you are going to use is
like in subnet in 8 subnet 8i,4i,2i,1i answer for bits is /4 remember in subnet example..

Example of host..

192.168.21.0/24 for 62 host remember in previous example...


...........|----------------------->>> /6 so answer: /32 - /6 = /26
128i 64i 32i 16i 8i 4i 2i 1i
remember in host always use /32 to minus /bits..


answer: 192.168.21.64 /26 first valid ip mask 255.255.255.192
to
192.168.21.127 /26 last valid ip



how to know route aggregation: aggregation is the whole or total....

letsay you have 16.0.0.0 to 19.0.0.0/8 if you count it 4,8,12,16,20 it
is in the range of 16 right first valid ip so we are using 4i to aggregate
the ip answer is: 252.0.0.0 in mask...

more sample : 172.168.24.0 to 172.168.32.0/24 in 8,16,24,32 in the range of 24 right
answer is 8i for 255.255.248.0

No comments: