Sunday, August 22, 2010

Calculatin aRoute Summarization !!!!

lets look at the following four networks :

172.20.0.0/16                                                                                           
172.21.0.0/16
172.22.0.0/16                                                                                                     
172.23.0.0/16

1st Step you should convert all octet to binary :

  128    64    32   16   8    4   2   1


172.20.0.0          1 0 1 0 1 1 0 0 . 0 0 0 1 0 1 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0

172.21.0.0          1 0 1 0 1 1 0 0 . 0 0 0 1 0 1 0 1 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0

172.22.0.0          1 0 1 0 1 1 0 0 . 0 0 0 0 0 1 1 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0

172.23.0.0          1 0 1 0 1 1 0 0 . 0 0 0 0 0 1 1 1 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0




                                                            


count the number of left-most matching bits to determine the mask 14 matching bits its mean by CIDR /14  or by Subnet mask 255.252.0.0



so about 

172.20.0.0/16                                         
172.21.0.0/16
172.22.0.0/16
172.23.0.0/16


can be summarized into the single network address and prefix 172.20.0.0/14 




Saturday, August 21, 2010

Variable Length Subnetmask






Variable Length Subnetmask !!!!!!!!!!!!!



IP ADDRESS : 192.168.20.0/24 Class C Network !!!


Network A : 50 Hosts 

Network B : 27 Hosts

Network c : 12 Hosts

Network D : 12 Hosts

Network E : 2 Hosts

Network F : 2 Hosts                                                                                         

Network G : 2 Hosts

Network H : 2 Hosts                                                                       

So the Number of Networks = 8 Networks

192.168.20. 0
1 1 1 1 1 1 1 1

NN HHHHHH

h
2 - 2 = --

6
2 - 2 = 62

n
2 = Nummber of Subnets

2
2 = 4 Subnets


00 000000 = 0

01 000000 = 64 => this is for Network A

10 000000 = 128

11 000000 = 192

N N 

128 64 32 16 8 4 2 1

Subnet masks for Network A 255.255.255.192 or by CIDr 192.168.20.0/26
( borrowed 2 N from Hosts )
so Network A from 192.168.20.64 to 192.168.20.127




2nd we will subnetting for Network B from 192.168.20.128 to 192.168.20.191


its mean 10 000000 = 128

h
2 - 2 = -- 


5
2 - 2 = 30                                                                                                                

NNN HHHHH

but in Network A we used 2 N

but in Network B we using 3 N so 

1 0 N HHHHH


this N for 0 and for 1

1 0 0 HHHHH so Network B 128

1 0 1 HHHHH

Subnetmask for Network B = 255.255.255.224 or by CIDR = 26 + 1 Extra bit 

192.168.20.128/27

( borrowed 3 N from Hosts )



so its still found two Networks from 128 to 159 and from 160 to 191



Next 2 Network c and d 

from 160 to 191

it means 1 0 1 N HHHH

for Network C = 12 Hosts

its mean
h
2 - 2 = ---                                        
4
2 - 2 = 14 Hosts


NNNN HHHH


1 0 1 0 HHHH 160 this is for Network C to 175

1 0 1 1 HHHH 176 this is for Network D to 191


Subnet mask 255.255.255.240 and by CIDR /28 = 27 + 1 Extra bit

because C and D in the same value of Number of Hosts

Network c : 12 Hosts

Network D : 12 Hosts



about A , B , C , D


this is my Network 

00000000 192.168.20.0/26     Network Address Unvalid

01000000 192.168.20.64/24   Network A

10000000 192.168.20.128/27 Network B

10100000 192.168.20.160/28 Network C

10110000 192.168.20.176/28 Network D

11000000 192.168.20.192/26 Broadcast Address Unvalid


but about this Range from 192.168.20.1 to 192.168.20.63 its Valid IP Addresses

and can use it so we can use this point to point Networks for Network E , Network F , Network G 
Network H

so now lets make network for E, F, G, H

h
2 - 2 = --

2
2 - 2 = 2 we just need 2 hosts so its valid

about first ip 192.168.20.0/26 00000000

00 NNNN 00

but we need just 2 H


so NNNN for represent 4 Extra bits like this :



00 000000 = 0

01 000000 = 64 

10 000000 = 128 001 010 011 0010 0001 0011 00001 00010 00011 ..etc

11 000000 = 192


represent 2 Hosts bits

and about 4N bits u can give it 16 Subnets


its mean you can subnet it for

0000 0000 0/30 0 - 3 first host 1 last one 2

0000 0100 4/30 4 - 7 first host 5 last host 6

0000 1000 8/30 8 - 12 first host 9 last 10 

0000 1100 12/30

0001 0000 16/30
-
-
-
-
0011 1000 56/30

0011 1100 60/30



this is My All Networks

0000 0000 192.168.20.0/30      Network E

0000 0100 192.168.20.4/30     Network F

0000 1000 192.168.20.8/30     Network G

0000 1100 192.168.20.12/30   Network H

0001 0000 192.168.20.16/30   For future Growth

01000000 192.168.20.64/24 Network A

10000000 192.168.20.128/27 Network B

10100000 192.168.20.160/28 Network C

10110000 192.168.20.176/28 Network D


Enjoy !!!                                                                                       

Thursday, August 19, 2010

How to Recover Router Password !!!!!!



Router Password Recovery

1. you can connect your router with consol port to configure it .
2.Then turn on and turn off and turn on your router .
3.Then when the IOS decompressed press Ctrl + Puase break key .
(you are now in the Rommon>)
4.Then change confreg to 0x2142 then press Enter
(so what is the meaning of this 0x2142 Value this is meaning Router behavioures
this Value Translated to ( Causes system softwareto ignore NVRAM contents )
this is mean we ignore the NVRAM which contains startup-configeration )
5.Then type reset to restart your router then press enter to restart your router without the NVRAM or Startup-Configeration .
6. then the router enter to default mode like this

--- System Configuration Dialog ---
Continue with configuration dialog? [yes/no] : n

7.Then type enable to enter to the privellege mode # .

8. Then type copy copy startup-config running-config (you should make that causes you ignored your NVRAM which contain startup-config so you should copy your startup-config to running-config )

9. Then type configure terminal to enter to the global config .

10. you can enter to your passwords to change it or remove all passwords like (line console 0 or line vty 0 4 ..etc ).

11. after you made that go to Router(config)# then restore the config-register value to the default value ( 0x2102 ) .


12. Then type exit .

13.Then type in privellege # mode copy running-config startup-config .

14.Then type reload and you are Done !!!!!



practical Tutorial Example on Packet tracer :



    

  1. Press RETURN to get started !
                          2. then press enter ..


    Router > enable
    Router # configure terminal
    Router (config) # line console 0
    Router(config-line)#password ( bla bla bla bla bla bla bla )
    Router(config-line)#login
    Router(config-line)#exit
    Router(config)#line vty 0 4
    Router(config-line)#password (bla bla bla bla bla bla bla bla bla)
    Router(config-line)#login
    Router(config-line)#end
    Router#copy running-config startup-config
    Destination filename [startup-config]? Press enter
    Building configuration...
    [OK]
    Router#reload
    Proceed with reload? [confirm] Press enter to reload




















    cumonto Recover your passwords :

    1. turn off and turn on the router




    2. while the router decompress the IOS like this



                    




    3. press on CTRL + Pause break





    4.you will enter to the Rommon Mode


    monitor: command "boot" aborted due to user interrupt

    rommon 1 > confreg 0x2142 then press enter

    rommon 2 > reset

    the router reset now and decompress the IOS and enter to

    the normal default router mode


    5. press (n) then enter


    6.Router >enable

    7.Router#copy startup-config running-config

    Destination filename [running-config]?
                                                                                                
    513 bytes copied in 0.416 secs (1233 bytes/sec)

    8.Router #config terminal

    9.Router(config)#line console 0

    10.Router(config-line)#no password i remove line console 0 password
    11.Router(config-line)#exit

    12. Router(config)#line vty 0 4

    13.Router(config-line)#no password i remove line vty 0 4 (telnet)

    14.Router(config-line)#exit

    15.Router(config)#config-register 0x2102 i restore config-register value to default 0x2102

    16.Router(config)#end

    17.Router#copy running-config startup-config
    Destination filename [startup-config]?
    Building configuration...
    [OK]

    18.Router#reload to take effect

    19.You Are Done !!!!!!!!!!!!!!!!!!!!!!!!!!!