Saturday, 24 March 2012

OSPF Neighbor States

 
OSPF neighbors go through states before they can begin exchanging LSAs. You can examine the state of an OSPF neighbor with the help of following command:- 
A#show ip ospf neighbor 
 
a. DOWN STATE
This state occurs when configuration is mismatched on both sides e.g. If STUB is configured on one side only. STUB is one of the fields in HELLO packet. HELLO packet contains following information/fields:-
  • The Router-ID of the originating router.
  • The Area-ID of the originating router interface.
  • The address mask of the originating interface.
  • Authentication type and authentication information for the originating interface.
  • The Hello Interval of the originating interface.
  • The Router Dead Interval of the originating interface.
  • The router priority.
  • The Designated Router (DR) and Backup Designated Router (BDR) information.
  • Five flags for options.
  • The Router-ID of the originating router's neighbors.
This is the initial state of the neighbor which also indicates that no hellos were heard from this neighbor within the last dead time interval.
 
b. INIT OR ONE WAY STATE
 
One router (A) sent Hello packet to other router (B) and the information is matched on the other router (B). In response other router (B) sent acknowledgment, but it is in the pipeline. This state indicates that a router has seen its own Router-ID in the neighbor field of the HELLO packet that it received from the neighbor. It also means that bidirectional conversation was established and that DR and BDR election can occur.
 
c. TWO WAY STATE
Router-A sent HELLO Packet and Router-B sent acknowledgment, after that, Router-B sent Hello packet and Router-A sent acknowledgment in response. Then neighbor table is completed and DR/BDR Election process begins. 
 
When an OSPF interface first becomes active, it begins to send hello packets. When two routers receive each other's hello, they place the neighbor in INIT STATUS. When a neighbor is in init status, it places its own Router-ID into the hello packet. When a router receives one of the new hellos with the Router-ID of its neighbor, it places the neighbor in a new state of 2-WAY. The 2-Way state ensures that here is a two-way communication between the routers. The routers must be in this state before they can negotiate a DR/BDR and exchange LSAs. After the routers have achieved the 2-Way state, OSPF enters into its final states:
  
d. EXSTART (MASTER/SLAVE)
 
A simple meaning of this state is "who will initialize the communication first". At this state, another election for the selection of Master and Slave Router begins. The neighbor with the highest IP address becomes the Master and other becomes the Slave to exchange LSA.
e. EXCHANGE (LSA REQUEST) 
The router sends its database description packets to neighbors in the exchange state. The database description packets describe the entire link state database. The link-state database is synchronized after this phase. After synchronization, the router enters one of two final states. Every network in the routing table of a router has a corresponding sequence number. At this state, a router sends the sequence numbers to the neighbor router. In response, as acknowledgment, the neighbor router also sends its sequence numbers.
f. LOADING
The router also sends link state request packets to all neighbors that are in the loading state. The loading phase requests that more recent LSAs be sent. At this state the database table is completed.
g. FULL
At this state, SPF algorithm is applied and best path is calculated. Neighbors in this state are fully adjacent and routing table of neighbors are completed.


Thanks & regards,

"Remember Me When You Raise Your Hand For Dua"
Raheel Ahmed Khan
System Engineer
send2raheel@yahoo.com
send2raheel@engineer.com
sirraheel@gmail.com
send2raheel (skype id)

My Blog Spot
http://raheel-mydreamz.blogspot.com/
http://raheeldreamz.wordpress.com/

My Face book pages
http://www.facebook.com/pages/My-Dreamz-Rebiuld-our-nation/176215539101271    @[176215539101271:0]    
http://www.facebook.com/pages/Beauty-of-islam/223983470988333?sk=wall        @[223983470988333:0]               
http://www.facebook.com/pages/Health-is-wealth/289486761065829?sk=wall        @[289486761065829:0]
      

Friday, 23 March 2012

How to install Router image using TFTP server?

 


 
Today tip will help you to install the router IOS to a Cisco 2500/2600/2800/3800 series routers. First make sure, you have installed and configured any TFTP (Trivial File Transfer Protocol) server over the LAN port. If you are trying to boot up your router without an IOS, the nonworking router will boot up in ROMmom
mode and the router first prompt will look like this:
 
rommon>
 
 
First run the set command to verify the ROMmom default variables.
In this mode all commands are case sensitive.
 
 
rommon1>set
Now run the TFTP download command to start the restore image process then press the enter button. 
rommon 2> tftpdnld 
After running the tftpdnld command, the following information will appear as under:
Now type the following information, for example router ip address, mask and default gateway then tftp server address. 
rommon 3 > IP_ADDRESS=10.1.1.2                            (router ip address)
rommon 4 > IP_SUBNET_MASK=255.0.0.0                  (default subnet mask)
rommon 5 > DEFAULT_GATEWAY=10.1.1.2                (gateway address)
rommon 6 > TFTP_SERVER=10.1.1.1                          (tftp server address)
rommon 7 > TFTP_FILE=12.0(4)t                                  (IOS file name)                                                                                                                 
Now again run the tftpdnld command to start recovery process immediately. 
rommon 8 > tftpdnld 
IP_ADDRESS: 10.1.1.2
IP_SUBNET_MASK: 255.0.0.0
DEFAULT_GATEWAY: 10.1.1.2
TFTP_SERVER: 10.1.1.1
TFTP_FILE: 12.0(4)t 
Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!
Do you wish to continue? y/n:  [n]:  Yes 
Receiving 12.0(4)t from 10.1.1.1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
File reception completed.
Copying file 12.0(4)t to flash.
Erasing flash at 0x60100000 
Now run the reset command to restore router as factory default settings. 
rommon 16 > reset 
Now after some time, your router will boot up with factory default settings.
Thanks & regards, "Remember Me When You Raise Your Hand For Dua" Raheel Ahmed Khan System Engineer send2raheel@yahoo.com send2raheel@engineer.com sirraheel@gmail.com send2raheel (skype id) My Blog Spot http://raheel-mydreamz.blogspot.com/ http://raheeldreamz.wordpress.com/ My Face book pages http://www.facebook.com/pages/My-Dreamz-Rebiuld-our-nation/176215539101271 @[176215539101271:0] http://www.facebook.com/pages/Beauty-of-islam/223983470988333?sk=wall @[223983470988333:0] http://www.facebook.com/pages/Health-is-wealth/289486761065829?sk=wall @[289486761065829:0]

How to configure site-to-site VPN tunnel using ASA?

Site-to-Site secure VPN tunnel using the ASA (Adaptive Security Appliances) enables an encrypted connection between private networks over a public network such as the internet. 
Basic steps for VPN Configuration: 
1- First define the ISAKMP Policy.
For example:
  •  Authentication
  • Hash
  • Encryption
  • Group
2- Establish IPsec transform set.
For example:
 Ã‚·  Esp-des
  • Esp-md5-hmac
  • Esp-aes
  • Asp-sha-hmac
3- Configure crypto access list.
For example:         Define interesting traffics
4- Configure crypto map
     Used to verify the previously defined parameters 
5- Now apply crypto map on the outside interface.
     Used to verify the outgoing interface traffic
Configuration of ASA on side A 
First defined the IKE polices on ASA-A 
ASA-A(config)#crypto isakmp policy 10
(10 is isakmp policy number) 
ASA-A(config-isakmp)#encryption des 
(enable encryption des) 
ASA-A(config-isakmp)#hash md5
(enable algorithm md5 for hashing) 
ASA-A(config-isakmp)#authentication pre-share
(enable Pre-shared method)
ASA-A(config-isakmp)#group 2   
(enable diffie-Helman group 2)    
ASA-A(config-isakmp)#exit  
(Exit from crypto isakmp mode)
  • The next step is to create a pre-shared key (password) on ASA - A.
ASA-A(config)#crypto isakmp key office address 20.1.1.20
(Here Key is "office" and 20.1.1.20 is ASA - B Address)
  • Now create an access list to define only interesting traffic.
ASA-A(config)#access-list 100 permit ip host 20.1.1.10 host 20.1.1.20
(100 is access list number and 20.1.1.10 is source address and 20.1.1.20 is destination address.) 
  • Now create the transform-set for encryption and hashing.
ASA-A(config)#crypto ipsec transform-set ts2 esp-des esp-md5-hmac
(Here encryption type is des and hashing technique is md5-hmac)
ASA-A(config)#crypto map imap 10 ipsec-isakmp 
(crypto map name imap
ASA-A(config)# crypto map imap 10 match address 100   
(apply the access list)
ASA-A(config)# crypto map imap 10 set transform-set ts2
(apply the transform set) 
ASA-A(config)# crypto map imap 10 set peer 20.1.1.20 
(Set remote peer address)
  • Now apply the crypto map to the ASA - A interface
ASA-A(config)# crypto map imap interface outside
 (Apply crypto map on outside interface)
ASA-A(config)# crypto isakmp enable outside
(To enable crypto isakmp on ASA)
 
Configuration of ASA on side B 
First defined the IKE polices on ASA-B 
ASA-B(config)#crypto isakmp policy 10
(10 is isakmp policy number) 
ASA-B(config-isakmp)#encryption des 
(enable encryption des) 
ASA-B(config-isakmp)#hash md5
(enable algorithm md5 for hashing) 
ASA-B(config-isakmp)#authentication pre-share
(enable Pre-shared method)
ASA-B(config-isakmp)#group 2   
(enable diffie-Helman group 2)    
ASA-B(config-isakmp)#exit  
(Exit from crypto isakmp mode)
  • The next step is to create a pre-shared key (password) on ASA - B.
ASA-B(config)#crypto isakmp key office address 20.1.1.10
(Here Key is "office" and 20.1.1.10 is ASA - A Address)
  • Now create an access list to define only interesting traffic.
ASA-B(config)#access-list 100 permit ip host 20.1.1.20 host 20.1.1.10
(100 is access list number and 20.1.1.20 is source address and 20.1.1.10 is destination address.) 
  • Now create the transform-set for encryption and hashing.
ASA-B(config)#crypto ipsec transform-set ts2 esp-des esp-md5-hmac
(Here encryption type is des and hashing technique is md5-hmac)
ASA-B(config)#crypto map imap 10 ipsec-isakmp 
(crypto map name imap
ASA-B(config)# crypto map imap 10 match address 100   
(apply the access list)
ASA-B(config)# crypto map imap 10 set transform-set ts2
(apply the transform set) 
ASA-B(config)# crypto map imap 10 set peer 20.1.1.10 
(Set remote peer address)
  • Now apply the crypto map to the ASA - B outside interface
ASA-B(config)# crypto map imap interface outside 
(Apply crypto map on outside interface)
ASA-B(config)# crypto isakmp enable outside
(To enable crypto isakmp on ASA) 
Now to verify the secure tunnel, ping to other remote location. 
ASA-B(config)# ping 20.1.1.10

Thanks & regards,

"Remember Me When You Raise Your Hand For Dua"
Raheel Ahmed Khan
System Engineer
send2raheel@yahoo.com
send2raheel@engineer.com
sirraheel@gmail.com
send2raheel (skype id)

My Blog Spot
http://raheel-mydreamz.blogspot.com/
http://raheeldreamz.wordpress.com/

My Face book pages
http://www.facebook.com/pages/My-Dreamz-Rebiuld-our-nation/176215539101271    @[176215539101271:0]    
http://www.facebook.com/pages/Beauty-of-islam/223983470988333?sk=wall            @[223983470988333:0]               
http://www.facebook.com/pages/Health-is-wealth/289486761065829?sk=wall            @[289486761065829:0]

Thursday, 22 March 2012

How to Connect "Non Zero Area" to "area 0" via tunnelling in OSPF?

In multi-area OSPF network, all areas should be connected physically with area 0 (backbone area) for exchanging routing information and keeping routing table to date. Under certain cases, it is not possible to connect directly all areas in a network to backbone area. In this case, one can use virtual link to create a connection between backbone area and non backbone area. Virtual link is a logical connection to create virtual adjacency between two areas.
Two conditions must be fulfilled in order to configure a virtual link between different areas. 
  • One area must be area 0 (backbone area).
  • One area must be common between two endpoint routers to create virtual links.  
When we are talking about virtual links then another advanced form of virtual link is tunnelling. Tunnelling is normally being used in the complex network scenarios.
Lets take the example of following topology in Fig 1 in which consists of three routers. We can see how the router interfaces are connected to different areas. Routers R2 and R3 has interfaces which fall under the area 2 and they are not connected to the area 0.
Configuration of Tunnel
Configure and assign IP addresses to all of the router interfaces and configure them under the areas as depicted in the Fig 1.  
When we will run “show ip route” command on router R0, it is not displaying the route to 3.0.0.0 network, shown in the Fig 2.
Fig 2. Result of show IP route and ping to 3.1.1.1
On the other hand, the result of “show ip route” and ping to 1.1.1.2 can be seen on router R3 in the Fig 3. You will notice that show IP route is only displaying the 3.0.0.0 network.
Fig 3: Result of show IP route and ping to 1.1.1.2 on router R3
Configuration of Tunnel needs following series of commands.
R(config)# interface tunnel 0
R(config-if)# ip address {ip address} {net mask}
R(config-if)# tunnel source {source ip address}
R(config-if)#tunnel destination {destination ip address} 
Configure the OSPF for the network addresses of the tunnels.
Fig 4 and Fig 5 shows the configuration of tunnels on the routers R1 and R2 respectively.
Fig 4: Configuration of tunnel on R1
Fig 5 : Configuration of tunnel on R2
After the successful configuration of the tunnelling we will notice in Fig 6 that on the router R3, ping was successful to 1.1.1.2 and R3 was showing all other networks as well, previously it was displaying only 3.0.0.0 network.
Fig 6: Result of “Show ip route” and ping to 1.1.1.2 on router R3


Thanks & regards,

"Remember Me When You Raise Your Hand For Dua"
Raheel Ahmed Khan
System Engineer
send2raheel@yahoo.com
send2raheel@engineer.com
sirraheel@gmail.com
send2raheel (skype id)

My Blog Spot
http://raheel-mydreamz.blogspot.com/
http://raheeldreamz.wordpress.com/

My Face book pages
http://www.facebook.com/pages/My-Dreamz-Rebiuld-our-nation/176215539101271    @[176215539101271:0]    
http://www.facebook.com/pages/Beauty-of-islam/223983470988333?sk=wall        @[223983470988333:0]               
http://www.facebook.com/pages/Health-is-wealth/289486761065829?sk=wall        @[289486761065829:0]
 


 

Point to Point lease line configuration and tips


Point-To-Point Leased Line Implementation

Current configuration:

version 12.0

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname A-cisco

!

username B-cisco password 0 Jonn

!

interface SeriaIO/0

ip address 1.1. I.I 255.0.0.0 encapsulation ppp

ppp authentication chap

!

line con 0

transport input none

line aux 0

line vty 0 4

no login

!

end


Current configuration:

version 12.0

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname B-cisco

!

username A-cisco password 0 Jonn

!

interface SeriaIO/0

ip address 1.1. I.2 255.0.0.0 encapsulation ppp

ppp authentication chap

!

ip classless

no ip http server

!

line con 0

transport input none

line aux 0

line vty 0 4

no login

!

end

Thanks & regards,

"Remember Me When You Raise Your Hand For Dua"
Raheel Ahmed Khan
System Engineer
send2raheel@yahoo.com
send2raheel@engineer.com
sirraheel@gmail.com
send2raheel (skype id)

My Blog Spot
http://raheel-mydreamz.blogspot.com/
http://raheeldreamz.wordpress.com/

My Face book pages
http://www.facebook.com/pages/My-Dreamz-Rebiuld-our-nation/176215539101271    @[176215539101271:0]    
http://www.facebook.com/pages/Beauty-of-islam/223983470988333?sk=wall        @[223983470988333:0]               
http://www.facebook.com/pages/Health-is-wealth/289486761065829?sk=wall        @[289486761065829:0]

Wednesday, 21 March 2012

Routing Information Protocol (RIP) Configuration.

RouterA#show ip route
Gateway of last resort is not set
C         1.0.0.0/8 is directly connected, serial0/1
C         3.0.0.0/8 is directly connected, serial0/0
C         192.168.1.0/24 is directly connected, loopback0
 Configure RIP on Router A
RouterA#configure terminal
RouterA#(config)#router rip
RouterA#(config-router)#network 3.0.0.0
RouterA#(config-router)#network 1.0.0.0
RouterA#(config-router)#network 192.168.1.0
RouterA#(config-router)#exit
RouterA#(config)#

Now verify these configuration on router A with command us under:
RouterA#show ip route
To check the routing protocol with this command.
RouterA#show ip protocols

RouterB#show ip route
Gateway of last resort is not set
C         1.0.0.0/8 is directly connected, serial0/1
C         2.0.0.0/8 is directly connected, serial0/0
C         192.168.1.0/24 is directly connected, loopback0

Configure RIP on Router B

RouterB#configure terminal
RouterB#(config)#router rip
RouterB#(config-router)#network 1.0.0.0
RouterB#(config-router)#network 2.0.0.0
RouterB#(config-router)#network 192.168.2.0
RouterB#(config-router)#exit
RouterB#(config)#

Now verify these configuration on router B with command us under:
RouterB#show ip route 
RouterC#show ip route
Gateway of last resort is not set
C         2.0.0.0/8 is directly connected, serial1
C         3.0.0.0/8 is directly connected, serial0
C         192.168.3.0/24 is directly connected, loopback0

Configure RIP on Router C
RouterC#configure terminal
RouterC#(config)#router rip
RouterC#(config-router)#network 2.0.0.0
RouterC#(config-router)#network 3.0.0.0
RouterC#(config-router)#network 192.168.3.0
RouterC#(config-router)#exit
RouterC#(config)#

Now verify these configuration on router C with command us under:
RouterC#show ip route


Thanks & regards,

"Remember Me When You Raise Your Hand For Dua"
Raheel Ahmed Khan
System Engineer
send2raheel@yahoo.com
send2raheel@engineer.com
sirraheel@gmail.com
send2raheel (skype id)

My Blog Spot
http://raheel-mydreamz.blogspot.com/
http://raheeldreamz.wordpress.com/

My Face book pages
http://www.facebook.com/pages/My-Dreamz-Rebiuld-our-nation/176215539101271    @[176215539101271:0]    
http://www.facebook.com/pages/Beauty-of-islam/223983470988333?sk=wall        @[223983470988333:0]               
http://www.facebook.com/pages/Health-is-wealth/289486761065829?sk=wall        @[289486761065829:0]

Break or recover the router password


  • Turn the power switch off and back on to recycle the power. 
  • Press the Break key or key sequence to put the router into ROM Monitor mode. The break key varies by computer or terminal software. The sequence might be CTRL-D, CTRL-Break or another combination. 
  • At the  > prompt, type 0 to record the current value of the configuration register normally 0x2102, or 0x102.
  • >o
    Configuration register = 0x2102 at last boot
    Bit#    Configuration register option settings:
    15      Diagnostic mode disabled. 
  • Type o/r 0x2142 to tell the router to boot from flash without loading the configuration in NVRAM at the next reload. 
  • Type i to have the router reboot. The router ignores the configuration in NVRAM.
  • The router runs the setup dialog, Type no or press Ctrl-C to skip the initial setup Dialog
  • Type enable ate the Router> prompt to go to privileged exec mode.
  • Copy the startup configuration to the running configuration by using the configure memory or copy startup-config running-config commands. Do not type configure terminal. If you use the configure terminal command, you overwrite the configuration stored in NVRAM.
  • View the configuration by typing write terminal or show running-config. View the configured line, vty and enable passwords. Any encrypted passwords need to be changed. 
  • Enter the configuration mode by typing configure terminal. Change the line of enable passwords as necessary. 
  • All interfaces are in a shutdown state. Issue the no shutdown command on every interface that is to be used.
  • Type config-register 0x2102 to return the router to normal operation at the next reloads.
  • Exit configuration mode by pressing Ctrl-Z
  • Save your changes by typing write memory or copy running-config startup-config.
  • Reload the router and verify the passwords.

    Thanks & regards,

    "Remember Me When You Raise Your Hand For Dua"
    Raheel Ahmed Khan
    System Engineer
    send2raheel@yahoo.com
    send2raheel@engineer.com
    sirraheel@gmail.com
    send2raheel (skype id)

    My Blog Spot
    http://raheel-mydreamz.blogspot.com/
    http://raheeldreamz.wordpress.com/

    My Face book pages
    http://www.facebook.com/pages/My-Dreamz-Rebiuld-our-nation/176215539101271    @[176215539101271:0]    
    http://www.facebook.com/pages/Beauty-of-islam/223983470988333?sk=wall        @[223983470988333:0]               
    http://www.facebook.com/pages/Health-is-wealth/289486761065829?sk=wall        @[289486761065829:0]

what is Juice Jacking SCAM

  Juice Jacking is a cybersecurity threat that occurs when cybercriminals manipulate public charging stations, such as USB charging ports in...