29 August 2011

KEYBOARD SHORTCUTS FOR HYPERTERMINAL

The keyboard shortcuts for Windows Hyperterminal..

ctrl-A = moves the cursor to the beginning of the line
ctrl-E= moves the cursor to the end of the line.
esc , B=moves the cursor back one word.
esc , F=moves the cursor forward one word.
ctrl-B=moves the cursor back one character.
ctrl-F=moves the cursor forward one character.
ctrl-D=deletes a single character.
ctrl-R=redisplay a line.
ctrl-U=erases a line.
ctrl-W=erases a word.
ctrl-Z=ends configuration mode and returns to the EXEX.
TAB= completes a partially entered command if enough characters have been entered to make it unambiguous.
and finally
backspace= removes one character to the left of the cursor

12 August 2011

World's simplest 2 step subnetting(-continued)

Please read Subnetting explained  before you proceed
.
So what is Subnetting??? 
Mr.qwerty bought a class-b network   162.10.0.0 for his company. So  that means he bought a total of 256*256 ip addresses. The first address 162.10.0.0 is the network  address and the last one 162.10.255.255 is the broadcast address .
1.       Hence the total no. of ip addresses available for assigning to hosts is {(256*256)-2} and wow! that is a very big address range.
2.       Managing data traffic between these no. of hosts under a single network is not desirous.
3.       He wishes to make sure that these ip addresses are redistributed to different departments according to the requirement and  wishes to place group policies –restrictions –etc… on some departments , avoid some hosts from eating up the network bandwidth of the entire company, providing more bandwidth to some hosts like file servers, mail servers etc.,.
4.       What he needs finally is the better management of the ip addresses . So he has to split the total range of addresses of the available network into sub-networks i.e. subnet it.

Subnetting in the logical division of an available network’s ip adrress  range into multiple sub-networks for better management of ip addresses.
UNDERSTANDING SUBNETTING AND SUBNET MASK:
Subnet mask of an ip address defines the network to which the ip address belongs to.
 Take a class –c ip address 192.168.10.25. The default subnet mask for this ip address is 255.255.255.0
Obtaining the network :
1.Perform AND OPERATION  on both the ip address and subnet mask  .
2.what we get as a result is the network address
                   Ip address =192.168.10.25    =11000000.10101000.00001010.00011001
Default subnet mask=255.255.255.0        =11111111.11111111.11111111.00000000
Performing  AND  what  we get is           =11000000.10101000.00001010.00000000
                                                                 =192.168.10.0 is the network to which 192.168.10.25 belongs to.
This is because, as this is a class –c ip address the entire range of 192.168.10.0 to 192.168.10.255 belong to a single network  i.e. entire class-c default network   defined by the subnet mask   255.255.255.0 called default subnet mask.
Now if we want to divide this network into 4 different networks (for various reasons), we understand that we have 256 ip addresses and these are to be divided into 4 groups, one for each sub –network /subnet.

How we divide is the tricky one. All we need to do is to find the right subnet mask

We divide the address range in binary notation rather than decimal donation.
The available space which can be divided is the last octet, since that is the left out portion of the ip address after assigning the first 3 octet to the original network (this is a class –c ip address).
Consider the  filled last octet   11111111.Out of the 8 bits if I redistribute some bits to the network portion of the subnet and the left out bits to host portion, I am actually dividing the available pool of addresses.

Now as we wish to have four networks , convert 4 to binary value. 4 = 11.
“Wrong! Totally wrong! “ . 11=(1*2^0+1*2^1)=3. Right!??!
Let me recall that if I want 4 values it would be {00, 01, 10, 11}.
So what I found out is the fourth value/fourth binary number and I need four networks for which a number is to be assigned which are 00,01,10,11. So I start calculating this binary value’s decimal equivalent starting with 2^1 instead of 2^0 which we usually use (this is because we are adding 1 which is equal to 2^0).
Always remember that in sub netting (basic) we always divide the network into no. of subnets which are always the powers of 2. So we can divide the network  into 2^0,2^1, 2^2, 2^3, 2^4,2^5, 2^6, 2^7subnets i.e.
1, 2,4,8,16,32,64,128 subnets.

Good! you got the doubt. 
What if I wanted to divide it into 28 subnets? You would have to divide the network into 32 subnets as 8 subnets would not satisfy the requirement but 32 subnets would .
Now I  need 4 networks , so network portion is 11 or 2 bits.
8-2=6 so we have 6 bits for hosts. Thus our last octer is split into n.p and h.p as (2+6) bits
In binary value 11111111 (1=network bit and 1=host bit).
The no. of ip addresses  per network  =2^6 =64. This is called the BLOCK VALUE. The no. of available ip addresses for allocation to hosts =(2^6)-2=64-2=62 (the two subtracted addresses are the network address and broadcast address).

So for my last octet of the subnet mask I assign first 2 bits for network portion and I fill the left out bits for host i.e. 11000000. Because of this the values 00000000, 01000000, 10000000, 110000 would mean the beginnings of the logically formed subnets once the AND OPERATION is performed .
The  resultant subnets for a network
192.168.10.0 = 11000000.10101000.00001010.00000000 are
1.       11000000.10101000.00001010.00000000  =192.168.10.0
2.       11000000.10101000.00001010.01000000  =192.168.10.64
3.       11000000.10101000.00001010.10000000  =192.168.10.128
4.       11000000.10101000.00001010.11000000  =192.168.10.192
And the subnet for all these four networks is
11111111.11111111.11111111.11000000  =255.255.255.192.
Remember that (current case)addresses like 192.168.10.64 are not host ip addresses. They are network addresses.

Sider notation:
So if I have to specify the complete details of an ip address in a sub netted network I need both the ip address and the subnet mask,and this is tedious .
 I wish to reduce the burden  by simply specifying the total no. of bits assigned for the network portion out of the total 32 bits. In the above case (class –c )I assigned a total of (8+8+8+2) bits for the networks  and that sums to be 26 bits.
So it simply becomes 192.168.10.0/26 and an ip address 192.168.10.45/26 clearly means it belongs to the first subnet. Now I don’t have to specify the subnet mask every time.
Understanding Block Value:
The no.of ip addresses obtained after removing a particular no. of bits in the sharing octet is called BLOCK VALUE.
For class -c  subnet mask the sharing octet is the 4th octet,
for class-b it is 3rd octet and for class-a it is   2nd octet.
Examples:
Class-C :11111111. 11111111. 11111111.{11111111}
Class-B :11111111. 11111111.{11111111}.11111111
Class-A:11111111. {11111111}.11111111.11111111

MORE UNDERSTANDING ON  SUBNETTING:

Part1:
Consider the network 220.12.15.0.
I need to divide it into 5 partitions
NEAREST powers of 2=4,8 and 4<5<8
It means I need to divide the network into 8 subnets=111=3 network bits
ð  So division of  fourth octet =(3+5) and
 so network mask =255.255.255.11100000=255.255.255.224
ð  Slider notation =/(3*8+3)=/(24+3)=/27
ð  Block Size= 2^5=32; No.of available ip addresses=32-2=30
So the network ranges will be 220.12.{15.0-15.31},{15.32-15.63},{15.64-15.95}……………….
And in detail
1.       network address   =220.12.15.0 /27
2.       1st ip address          =220.12.15.1 /27
3.       Last ip address       =220.12.15.30/27
4.       Broadcast address=220.12.15.31/27
5.       Next network         =220.12.15.32/27
6.       No.of subnets =2^3=8
7.       No.of hosts per subnet = 2^5 – 2 =30
8.       Block Size =2^5 =32

Now we understand the most important point in subnetting.
“Subnetting is the division of the sharing octet either using the value of no. of required subnets or no.of hosts per subnet”
Oh! I didn’t know that! You did not tell me about the no. of hosts thing!
Please let me introduce
Part-2 :
Consider the network 195.167.45.0 where I need 75 hosts per subnet.
The closest power of 2 to 75 is 128=block size=2^6=6 bits= last 111111 bits=6 host bits and 2 (8-6) network bits.
So no. of possible networks =2^3 = 8 and subnet mask =11111111.11111111.11111111.11000000
=255.255.255.192 or/ 26.
The corresponding networks will be 195.16.45.0/26 ,  195.16.45.64/26 ,192.16.45.128/26, 192.16.45.192/26.
The common rule for any kind of subnetting  always  is to divide the sharing octet only.
Consider the following examples

1.Class-C :
Q: Find the details of the network of 192.168.50.98 /25.
A: /25 =/24+1=(1 network bits +7 host bits) [dividing the fourth octet]
Method 1: 1 network bit =2 possible values= 2 subnets=192.168.50.0,192.168.50.128
So 192.168.50.98/25 belongs to 192.168.50.0/25 network.
Here network address =192.168.50.0/25 .
1st address in the network =192.168.50.1/25
Last address in the network =192.168.50.126/25
Broadcat address of the network =192.168.50.127/25
Network address of the next network =192.168.50.128/25
Method 2: 7 host bits = 2^7=128 ip addresses/block
98/128=0 . so this address belongs to the first subnet 192.168.50.0/25
No.of networks=2^1=2.
No.of host per network =2^7=128
And network address =192.168.50.0/25 .
1st address in the network =192.168.50.1/25
Last address in the network =192.168.50.126/25
Broadcat address of the network =192.168.50.127/25
Network address of the next network =192.168.50.128/25

2.Class-B:
Same Q: Find the details of the network of
a )169.10.10.152/25
b)169.10.10.152/21
A: a) /25=division of 4th octet=/24+1=(1 network bit+7 host bits)
The method-1 used earlier is useful only for class –c  .However, method -2 based on no.of hosts  is useful for any class. So here onwards I will be using method -2 (mostly).
2^7=128
152/128=1. So the ip address surpassed the first network and entered the second network.
no.of networks =2^3 =8
Block size =2^7 =128
So  the network=169.10.10.128/25
 first ip:169.10.10.129/25,
last ip:169.10.10.254,
 broadcast:169.10.10.255.

b)/21=division of the 3rd octet=/18+3=(3 network bits and 5 host bits)
no.of networks =2^3 =8
Block size =2^5 =32
Divide 3rd octet’s value 10/32=0 so 169.10.10.152/21 belongs to  169.10.0.0
Network: 169.10.0.0
1st network address:169.10.0.1
Last ip address :169.10.31.254
Broadcast address: 169.10.31.255
Next network :169.10.32.0

Class-A:
Same Q: Find the details of the network of
1.       15.128.10.72/26
2.       15.128.10.72/20
3.       15.128.10.72/15
A: 1)/26= /24+2=sharing in 4th octet=2 network bits and 6 host bits
no.of networks =2^(2+8+8)=2^20
Block size =2^6 =64
Divide 4th octet’s value 72/64=1
So the ip address surpassed the first network and entered the second network
Network: 15.128.10.64/26
1st ip address:15.128.10.65
Last ip address : 15.128.10.126
Broadcast address: 15.128.10.127
Next network : 15.128.10.128
2)/20=/16+4 =sharing in 3rd octet=4 network bits and 4 host bits
no.of networks =2^(4+8)=2^12
Block size =2^4 =16
Divide 3rd octet’s value 10/16= 0
so this address belongs to the first subnet
Network: 15.128.0.0/16
1st ip address: 15.128.0.1
Last ip address : 15.128.15.254
Broadcast address: 15.128.15.255
Next network : 15.128.16.0
3)/15=/8+7=division of 2nd octet=7 network bits and 1 host bit
no.of networks =2^(7)=2^7
Block size =2^1 =2
Divide 2nd  octet’s value 128/2= 5
so this address belongs to the sixth network
Network: 15.128.0.0/16
1st ip address: 15.128.0.1
Last ip address : 15.128.255.254
Broadcast address: 15.129.255.255
Next network : 15.130.0.0

Now comes the world’s simplest 2 step subnettingof an ip address :
I am explaining it with an example. In fact it is just the shortened form of my second method being used in the previous examples. So please be sure to have good understanding about it, especially identifying the right octet which gets shared for host and network portions . 

Example:
Q: 192.168.15.45/26

A:  Step 1: 45/[2^(32-26)]= 45/64 = 0 so it belongs to first subnet.
     Step2: So the network is

{192.168.15.0,192.168.15.1,....192.168.15.62,192.168.15.63}

Subnetting explained

World’s simplest 2 step IPv4 subnetting - for all classes.
Before we get to know what these steps are we need to understand the following:
·         Each and every IPv4 address consists of 4 octets in the form of W. X .Y . Z, each containing 8 bits and that means a total of 32 bits .
·         These four octets are divided into 2 portions called NETWORK PORTION (N.P) and HOST PORTION (H.P).
·         Based on the no. of octets divided for both N.P and H.P we have
CLASS –A:  W. X .Y . Z   i.e.  1 network octet and 3 host octets
CLASS –B :  W . X .Y . Z   i.e.  2 network octets and 2 host octets
CLASS –C :  W . X .Y . Z   i.e.  3 network octet and 1 host octet
(Here the underlined part represents the network portion and the rest is host portion)
·         W,X,Y and Z are decimal equivalents of  any  octet (set of 8 bits)  and the octet’s value ranges from  00000000 to  11111111 i.e  from 0 to 255 (total of 256 values)in decimals.
(We are not discussing ipv4 in detail and hence only the necessary points are being considered )
·         The default subnet mask for each class are :
CLASS –A: 255. 0 . 0 . 0    /8          =11111111.00000000.00000000.00000000
CLASS –B: 255 .255 . 0. 0 /16       =11111111.11111111.00000000.00000000
CLASS –C: 255 .255 .255 .0 /24    =11111111.11111111.11111111.00000000
Let us move to subnetting