Thursday, September 29, 2016

Notepad Tricks, Hacks & Commands

Notepad is the simplest text editor provided by Microsoft in every version of Windows. It is helpful when we want to create a quick note. The files created by Notepad are saved in .txt format which is supported by every text editor. So, the files created by Notepad are compatible to open, edit and modify everywhere.
People generally consider Notepad simpler than what it is. But readers, Notepad is light-weight text-editor but saying it “simpler” would be wrong because it can open many unknown extensions files and Notepad itself hold many amazing commands, tricks and hacks to make it more productive for you.
Today, I am going to share 10 amazing Notepad Tricks & Hacks that you can use to get most out of Notepad and amaze your friends.

1. Create Diary on Notepad

This Notepad trick will allow you to create Notepad note in such a format that whenever you edit your note, it will get saved with date and timestamp automatically. To do this, follow these steps:
  1. Open Notepad
  2. Type .LOG in first line.
  3. Save the file as Log.txt
  4. Now, write something to the file and it will automatically get saved with edited date and time.

2. Create Fake Windows Errors With Notepad
This is another very cool Notepad trick that allows you to create Fake error messages. You can create Fake error message with any message. To do this, follow these steps:
  1. Open Notepad
  2. Type X=Msgbox(“Message Here”,0+16,”Title Here”)
  3. Replace Message Here and Title Here with your Error Message and Error-Window Title respectively.
  4. Save the file with error.vbs.
  5. Now, click the file and you’ll get your custom-made Windows error message.

notepad trick 2

3. Force Shutdown Your Windows

This trick will let you force shutdown your Windows in a single-click. So, if you don’t want to waste three clicks (Start >> Turn Off Computer >> Turn Off), this trick will help you in that. To do this:
  1. Open Notepad
  2. Paste @echo off in first line.
  3. Paste msg * Shutdown computer in second line.
  4. Paste shutdown -c “Sleep Tight” -s in third line
  5. Save the file with .BAT extension. For example, shutdown.bat
  6. Click on your file and it will automatically shutdown your Windows.

3rd Notepad Trick

You can imagine the disaster that may happen if you’ll put this file at Windows Startup

4. Create Password-protected Folder using Notepad

Why to use any folder-locking software when your simple text editor, Notepad can lock your folders? To use this Notepad tricks, follow these steps:
  • Open Notepad
  • Copy the following code:
title Folder Private
if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Private goto MDLOCKER
echo Are you sure you want to lock the folder(Y/N)
set/p “cho=>”
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
ren Private “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
echo Folder locked
goto End
echo Enter password to unlock folder
set/p “pass=>”
if NOT %pass%== techparadise goto FAIL
attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Private
echo Folder Unlocked successfully
goto End
echo Invalid password
goto end
md Private
echo Private created successfully
goto End
  • techparadise written in red is password. Change it to your own password.
  • Save the file as private.bat with File Type As All Files (*.*).
  • Now, when you click private.bat, it will create a Private folder. Move your private files, documents and folders here.
  • Close Private folder.
  • Now, no one will be able to open the folder without the password.


5. Make Computer To Speak Your Sentence

This Notepad trick will make computer to speak whatever you type in the provided text-box. To use this trick, follow these steps:
  1. Open Notepad
  2. Copy & paste this command:
Dim message, sapi
message=InputBox(“What do you want me to say?”,”Speak to Me”)
Set sapi=CreateObject(“sapi.spvoice”)
sapi.Speak message
  1.  Save the file as speak.vbs.
  2. Double-click the file and it will open a prompt. Enter the sentence you want your computer to speak
  3. Click OK and Notepad will speak the sentence for you.

Speak Notepad Trick

Note – In case, if you encounter error, re-type all the quotes and this notepad trick will work fine.
6. Make CD Drive Open & Close Again and again
This notepad prank will make your CD drive open and close again and again continually. To use this notepad trick, use these following steps:
  1. Open Notepad
  2. Enter following command:
Set oWMP = CreateObject(“WMPlayer.OCX.7”)
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count – 1
For i = 0 to colCDROMs.Count – 1
End If
wscript.sleep 5000
  1. Save your notepad file as cdopen.vbs
  2. Now, open cdopen.vbs and it will start the process to continuously open and close CD drive.
To stop the process, open Task Manager by pressing Alt+Ctrl+Del and stop cdopen.vbs process.

7. Create Matrix Raining Code Screen

Have you watched the movie, “Matrix”? You might have seen string of green characters appearing at the screen randomly. We are going to do something similar with the help of Notepad. To use this Notepad trick, follow these steps:
  1. Open Notepad.
  2. Type this command:
@echo off
color 02
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
goto start
  1. Save the file as Matrix.bat
  2. Click on Matrix.bat and the show begins.


 Alternatively, you can use this code for different effect:
@echo off
color 2
echo 1 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 1 0 0 1 0 0 0 1 1 0 1 0 1 0 0 0 1 1 1 1
ping localhost -n 1 > nul
echo 1 1 0 1 1 1 0 0 0 1 0 1 a f h 0 0 0 1 0 1 1 0 0 1 1 1 0 0 1 0 1 0 0 1 1 0
echo 1 0 0 1 1 0 9 8 1 2 0 1 9 9 2 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 1 1
ping localhost -n 1 > nul
echo 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 0 0 01 0 1 0 0 1 0
ping localhost -n 1 > nul
echo 1 0 1 1 1 0 1 1 0 9 1 1 2 1 1 0 9 1 0 5 7 7 8 7 8 1 3 2 1 2 1 2 3 2 1 3 4
ping localhost -n 1 > nul
echo 1 1 1 0 1 0 0 1 0 0 0 1 1 1 0 0 1 1 1 4 1 2 1 1 2 0 1 0 1 2 2 1 0 1 1 0 1
goto a

8. Make Your Keyboard LED Dance

Your keyboard has three LEDs above numpad of Scroll Lock, Caps Lock and Num Lock. This Notepad trick will make those three LED continually on and off, creating dancing effects. To do this, follow these steps:
  1. Open Notepad
  2. Enter following code
Set wshShell =wscript.CreateObject(“WScript.Shell”)
wscript.sleep 100
wshshell.sendkeys “{CAPSLOCK}”
wshshell.sendkeys “{NUMLOCK}”
wshshell.sendkeys “{SCROLLLOCK}”
  1. Save the file as Dance.vbs
  2. Click the file and your all three LED lights will start dancing.
To stop, Shut down or Log off your PC.


9. EICAR Test File: Test Your Antivirus

Do you want to check if your Antivirus’ real-time protection is working correctly or not? Then this European Institute for Computer Antivirus Research (EICAR) code will help you in that.
  1. Open Notepad
  2. Copy this code: X5O!P%@AP[4PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
  3. Save the with .COM extension. For example,
If your antivirus’ real-time protection is working perfectly, it will show you alert and quarantine the file by considering it malware.

antivirus test

10. Bush Hid The Facts
This is very simple but the most popular Notepad trick. To use this notepad trick, follow these steps:
  1. Open Notepad
  3. Save that file
  4. Open it again & see. Amazing?
Alternatively, you can use this app can break.

4-3-3-5 notepad trick

What happens?
You might have seen that reopening the file will get show you some unicode characters instead of what you typed (Bush hid the facts or this app can break).
Why this happens?
Both the patterns have characters string of length 4-3-3-5 which seems to cause bug in Windows PC. So, this trick works

Remotely Control Your Smartphone’s Camera

As smartphone is becoming our day-to-day admirer and helps us in a number of ways. Like making phone call, sending text messages, establishing connection with Internet, watching videos, listening music and capturing images. With each passing day people have shown a huge interest in images.
You might have seen a number of photos floating on your Facebook timeline of your Facebook friends. Yes, it is true photos acts as a remainder of a particular moment. But before clicking photos, make sure your mobile camera is good enough. Since many cameras also come with a wide range of remote control capabilities.
If you are Android user then there is good news for you. There exists an app called Camera Remote that you can easily download from Google Play store on your Android smartphone.

How to Remotely Control Your Smartphone’s Camera

Camera Remote app takes control of remote camera and allows you to take remote photo, download photos, play recording instantly, record preview frames and more right from your remote Android desktop, notebook or PC.
Camera Remote is composed of many amazing and existing features. Let’s have a look.

1. Screen Recording

Camera Remote provides you the ability to capture anything and everything that display on your phone as video file.
  • Once you open the app, you will find screen recording option at the right corner.

  • Click on this and choose the screen record quality from high quality, medium quality and low quality.

  • Once the permission is granted, Camera Remote will capture everything that displays on your phone.

  • Once you are done with recording you can record the recording anything you want to. And it will automatically save video files as the recording.

2. Remote Camera Control
Camera Remote allows you to control it from another device including Android Wear Watch, Notebook, Desktop PC and from Web as well. For this, it comes with Camera Remote PC which is a windows application used as remote android device controller. It is basically designed for Desktop PC, notebook, enabled with Wi-Fi or Bluetooth.

All the functions provided by Camera Remote PC is exactly same as original Camera Remote Android application.

3. Camera Remote Tools

Camera Remote is provided with different modes as its tool including Camera Mode, Remote Mode, Remote Sync, Wi-Fi Direct Mode and Image Video Utility. Remote Mode allows you to record screen.
Camera Mode start camera and connect it via remote mode. You can change front and rear camera between remote and camera modes. It also allows you to change preview frame rates, sound status (whether you want to keep it ON/OFF), to play recorder frames instantly.
Remote Sync controls multiple remote cameras.

4. Bluetooth Mode and Wi-Fi Mode

There are two control modes available called Bluetooth and Wi-Fi mode. This means you can control your remote camera through Wi-Fi mode and Bluetooth mode. For Wi-Fi mode your Android device must be connected to local network and accessible through remote Android and other remote computers.

Thursday, September 15, 2016

Top 70 CCNA Interview Questions And Answers

1) What is Routing?
Routing is the process of finding a path on which data can pass from source to destination. Routing is done by a device called routers, which are network layer devices.
2) What is the purpose of the Data Link?
The job of the Data Link layer is to check messages are sent to the right device. Another function of this layer is framing.
3) What is the key advantage of using switches?
When a switch receives a signal, it creates a frame out of the bits that was extracted from that signal. With this process, it gains access and reads the destination address, after which it forwards that frame to the appropriate port. This is a very efficient means of data transmission, instead of broadcasting it on all ports.
4) When does network congestion occur?
Network congestion occurs when too many users are trying to use the same bandwidth. This is especially true in big networks that do not resort to network segmentation.
5) What is a Window in networking terms?
A Window refers to the number of segments that is allowed to be sent from source to destination before an acknowledgement is sent back.
6) Does a bridge divide a network into smaller segments?
Not really. What a bridge actually does is to take the large network and filter it, without changing the size of the network.
7) Which LAN switching method is used in CISCO Catalyst 5000?
This model uses the Store-and-forward switching method. It stores the entire frame to its buffers and performs a crc check before deciding whether or not to forward that data frame.
8 ) What is the role of the LLC sublayer?
The LLC sublayer, short for Logical Link Control, can provide optional services to an application developer. One option is to provide flow control to the Network layer by using stop/start codes. The LLC can also provide error correction.
9) How does RIP differ from IGRP?
RIP relies on the number of hops in order to determine the best route to a network. On the other hand, IGRP takes consideration many factors before it decides the best route to take, such as bandwidth, reliability, MTU and hop count.
10) What are the different memories used in a CISCO router?
– NVRAM stores the startup configuration file
– DRAM stores the configuration file that is being executed
– Flash Memory – stores the Cisco IOS.
11) What is BootP?
BootP is a protocol that is used to boot diskless workstations that are connected to the network. It is short for Boot Program. Diskless workstations also use BootP in order to determine its own IP address as well as the IP address of the server PC.
12) What is the function of the Application Layer in networking?
The Application Layer supports the communication components of an application and provides network services to application processes that span beyond the OSI reference model specifications. It also synchonizes applications on the server and client.
13) Differentiate User Mode from Privileged Mode
User Mode is used for regular task when using a CISCO router, such as to view system information, connecting to remote devices, and checking the status of the router. On the other hand, privileged mode includes all options that are available for User Mode, plus more. You can use this mode in order to make configurations on the router, including making tests and debugging.
14) What is 100BaseFX?
This is Ethernet that makes use of fiber optic cable as the main transmission medium. The 100 stands for 100Mbps, which is the data speed.
15) Differentiate full-duplex from half-duplex.
In full-duplex, both the transmitting device and the receiving device can communicate simultaneously, that is, both can be transmitting and receiving at the same time. In the case of half-duplex, a device cannot receive while it is transmitting, and vice versa.
16) What is MTU?
MTU stands for Maximum Transmission Unit. It refers to the maximum packet size that can be sent out onto the data line without the need to fragment it.
17) How does cut-through LAN switching work?
In Cut-Through LAN switching, as soon as the router receives the data frame, it will immediately send it out again and forward it to the next network segment after reading the destination address.
18) What is latency?
Latency is the amount of time delay that measures the point from which a network device receives a data frame to the time it sends it out again towards another network segment.
19) Utilizing RIP, what is the limit when it comes to number of hops?
The maximum limit is 15 hop counts. Anything higher than 15 indicates that the network is considered unreachable.
20) What is a Frame Relay?
Frame Relay is a WAN protocol that provides connection-oriented communication by creating and maintaining virtual circuits. It has a high performance rating and operates at the Data Link and Physical Layers.
21) How do you configure a Cisco router to route IPX?
The initial thing to do is to enable IPX routing by using the “ipx routing” command. Each interface that is used in the IPX network is then configured with a network number and encapsulation method.
22) What are the different access lists?
There are two access lists: Standard and Extended. Standard Access List can only filter the source or destination IP address. An Extended Access List uses the source and destination IP addresses, port, socket and protocol when filtering a network.
23) Explain the benefits of VLANs.
VLANs allow the creation of collision domains by groups other than just physical location. Using VLANs, it is possible to establish networks by different means, such as by function, type of hardware, protocol, among others. This is a big advantage when compared to conventional LANs wherein collision domains are always tied to physical location.
24) What is subnetting?
Subnetting is the process of creating smaller networks from a big parent network. Being a part of a network, each subnet is assigned some additional parameters or identifier to indicate its subnet number.
25) What are the advantages of a layered model in the networking industry?
A layered network offers many advantages. It allows administrators to make changes in one layer without the need to make changes in the other layers. Specialization is encouraged, allowing the network industry to make progress faster. A layered model also lets administrators troubleshoot problems more efficiently.
26) Why is UDP lease favored when compared to TCP?
It’s because UDP is unreliable and unsequenced. It is not capable of establishing virtual circuits and acknowledgements.
27) What are some standards supported by the Presentation layer?
Presentation layer supports many standards, which ensures that data is presented correctly. These include PICT, TIFF and JPEG for graphics, MIDI, MPEG and QuickTime for Video/Audio.
28) What’s the simplest way to remotely configure a router?
In cases when you need to configure a router remotely, the most convenient is to use the Cisco AutoInstall Procedure. However, the router must be connected to the WAN or LAN through one of the interfaces.
29) What does the show protocol display?
– routed protocols that is configured on the router
– the address assigned on each interface
– the encapsulation method that was configured on each interface
30) How do you depict an IP address?
It can be done in three possible ways:
– using Dotted-decimal. For example:
– using Binary. For example: 10000010.00111011.01110010.01110011
– using Hexadecimal. For example: 82 1E 10 A1
31) How do you go to privileged mode? How do you switch back to user mode?
To access privileged mode, you enter the command “enable” on the prompt. In order to get back to user mode, enter the command “disable”
32) What is HDLC?
HDLC is short for High Level Data Link Control protocol, and is a propriety protocol of CISCO. It is the default encapsulation operated within CISCO routers.
33) How are internetworks created?
Internetworks are created when networks are connected using routers. Specifically, the network administrator assigns a logical address to every network that connects to the router.
34) What is Bandwidth?
Bandwidth refers to the transmission capacity of a medium. It is a measure of how much volume a transmission channel can handle, and is measured in Kbps.
35) How does Hold-downs work?
Hold-downs prevent regular update messages from reinstating a downed link by removing that link from update messages. It uses triggered updates to reset the hold-down timer.
36) What are packets?
Packets are the results of data encapsulation. These are data that has been wrapped under the different protocols of the OSI layers. Packets are also referred to as datagrams.
37) What are segments?
Segments are sections of a data stream that comes from the upper OSI layers and ready for transmission towards the network. Segments are the logic units at the Transport Layer.
38) Give some benefits of LAN switching.
– allows full duplex data transmission and reception
– media rate adaption
– easy and efficient migration
39) What is Route Poisoning?
Route Poisoning is the process of inserting a table entry of 16 to a route, making it unreachable. This technique is used in order to prevent problems caused by inconsistent updates on a route.
40) How do you find valid hosts in a subnet?
The best way to go about this is to use the equation 256 minus the subnet mask. The hosts that are considered valid are those that can be found between the subnets.
41) What is DLCI?
DLCI, or Data Link Connection Identifiers, are normally assigned by a frame relay service provider in order to uniquely identify each virtual circuit that exists on the network.
42) Brielfly explain the conversion steps in data encapsulation.
From a data transmitter’s point of reference, data from the end user is converted to segments. Segments are then passed on to the other layers and converted into packets or datagrams. These packets are then converted into frames before passing on to the network interface. Finally, frames are converted to bits prior to actual data transmission.
43) What are the different types of passwords used in securing a CISCO router?
There are actually five types of passwords that can be used. These are enable secret, enable, virtual terminal, console, and auxiliary.
44) Why is network segmentation a good idea when managing a large network?
For a network administration, segmenting a network would help ease network traffic and ensures that high bandwidth is made available at all times for all users. This translates to better performance especially for a growing network.
45) What are the things that can be accessed in a CISCO router’s identifying information?
The hostname and the Interfaces. The hostname is the name of your router. The Interfaces are fixed configurations that refer to the router ports.
46) Differentiate Logical Topology from Physical Topology
Logical Topology refers to the signal path through the physical topology. Physical Topology is the actual layout of the network medium.
47) What causes a triggered update to reset the router hold-down timer?
This may happen when the hold-down timer has already expired, or when the router received a processing task that incidentally was proportional to the number of links in the internetwork.
48) In configuring a router, what command must be used if you want to delete the configuration data that is stored in the NVRAM?
A. erase running-config
B. erase startup-config
C. erase nvram
D. delete nvram
Correct Answer: B. erase startup-config
49) Referring to the commands shown, what command must next be used on the branch router prior to traffic being sent to the router router?
Hostname: Branch Hostname: Remote
PH# 123-6000, 123-6001 PH# 123-8000, 123-8001
SPID1: 32055512360001 SPID1: 32055512380001
SPID2: 32055512360002 SPID2: 32055512380002
isdn switch-type basic ni
username Remote password cisco
interface bri0
ip address
encapsulation ppp
ppp authentication chap
isdn spid1 41055512360001
isdn spid2 41055512360002
dialer map ip name Remote 1238001
dialer-list 1 protocol ip permit
Correct Answer: (config-if)# dialer-group 1
50) When configuring a router utilizing both physical and logical interfaces, what factor must be considered in determining the OSPF router ID?
A. The highest IP address of any physical interface.
B. The lowest IP address of any logical interface.
C. The middle IP address of any logical interface..
D. The lowest IP address of any physical interface.
E. The highest IP address of any interface.
F. The highest IP address of any logical interface.
G. The lowest IP address of any interface.
Correct Answer: A. The highest IP address of any physical interface.

51) Mention what is the difference between the switch, hub, and router?

Hub has single broadcast domain and collision domain. Anything comes in one port is sent out to the others. It is a device that filters and forwards packets between LAN segments. Switches have single broadcast domain and multiple collision domains. It supports any packet protocol, as such it operates at the data link layer 2 and layer 3 Router is a device which transmits data packets along networks.

 52. Mention what is the size of IP address?
Size of IP address is 32 bit for IPv4 and 128 bit for IPv6.

53. Mention what does data packets consist of?
A data packet consists of sender’s information, recipient’s information, and the data contained.  It also has the numeric identification number that defines the packet number and order.  When data is send across the network, that information is segmented into data packets.  In short, data packets carry the information and routing configuration for your transferred message.

54. Mention what is DHCP?
DHCP stands for Dynamic Host Configuration Protocol.  DHCP assigns an IP address automatically to a given workstation client.  You can also make static IPS for machines like printers, servers, routers and scanners.

55. Mention what is BOOTP?
BOOTP is a computer networking protocol used to deploy an IP address to network devices from a configuration server.

56. Explain why is UDP lease favored when compared to TCP?
It is because UDP is un-sequenced and unreliable. It is not capable of creating virtual circuits and acknowledgments

57. Mention what is the difference between dynamic IP and static IP addressing?
Dynamically IP addresses are provided by DHCP server and static IP address are given manually.

58. Mention what are the ranges for the private IPS?
Ranges for private IPS are
  • Class A: –
  • Class B: –
  • Class C: –

59. In how many ways you can access router?
You can access it in three ways
  • Telnet (IP)
  • AUX (Telephone)
  • Console (Cable)
60. Explain what is EIGRP?
EIGRP stands for Enhanced Interior Gateway Routing Protocol; it is a routing protocol designed by Cisco Systems.  It is availed on a router to share routes with other routers within the same autonomous system. Unlike other routers like RIP, EIGRP only sends incremental updates, decreasing the workload on the router and the amount of data that needs to be transferred.

61. Mention what is the matric of EIGRP protocol?
EIGRP protocol consists of
  • Bandwidth
  • Load
  • Delay
  • Reliability
  • MTU
  • Maximum Transmission Unit

62. Mention what does the clock rate do?
Clockrate enables the routers or DCE equipment to communicate properly.

63. Mention what command you must use if you want to delete or remove the configuration data that is stored in the NVRAM?
Erase startup- coding is the command you must use if you want to delete the configuration data that is stored in the NVRAM

64. Mention what is the difference between TCP and UDP?

TCP and UDP both are protocols for sending files across computer network

           TCP (Transmission Control Protocol)              UDP (User Datagram Protocol)
TCP is connection oriented protocol. When connection lost during transferring files, the server would request the lost part.  While transferring a message, there is no corruption while transferring a message UDP is based on connectionless protocol. When you send data, there is no guarantee whether your transferred message will reach there without any leakage
 The message will deliver in the order it is sent The message you sent may not be in the same order
 Data in TCP is read as a stream, where one packet ends, and another begins Packets are transmitted individually and are guaranteed to be whole if they arrive
 Example of TCP includes World Wide Web, file transfer protocol, e-mail, Example for UDP are VOIP (Voice Over Internet Protocol) TFTP ( Trivial File Transfer Protocol),

 65. Explain the difference between half-duplex and full-duplex?
Full duplex means that the communication can occur in both directions at the same time, while half duplex means that the communication can occur in one direction at time.

66.Mention the conversion steps of data encapsulation?
Conversion steps of data encapsulation includes

  • Layer one, two and Three ( Application/presentation/session) : Alphanumeric input from the user is converted into Data
  • Layer Four (Transport): Data is converted into small segments
  • Layer Five (Network): Data converted into packets or datagrams and Network header is added
  • Layer Six (Data Link): Datagrams or packets are built into frames
  • Layer Seven (Physical): Frames are converted into bits

 67. What command do we give if router IOS is stucked?
Cntrl+Shift+F6 and X is the command we give if router IOS is stucked.

 68.Explain what is route poisoning?
Route poisoning is a technique of preventing a network from transmitting packets through a route that has become invalid.

 69. What route entry will be assigned to dead or invalid route in case of RIP?
In the case of RIP table entry 16 hops will be assigned to dead or invalid route making it unreachable.
70. What is STP and RSTP
Spanning Tree Protocol, and its improved versions(RSTP), are required mainly for two reasons – To prevent network loops (due to multiple paths to the same destination) & to introduce redundancy in the link connections (if one link fails, the data is still routed through a different link/route).
With STP, the detection and reconfiguration of network topology changes (when a cable is cut/ new switch is added) takes some time – like 30-50 seconds. Since, a lot of critical / time sensitive applications are running on the LAN, this inactive period may not be acceptable. So, Rapid Spanning Tree Protocol (RSTP) was conceived to overcome this problem (RSTP takes 5-6 seconds to update and re-configure the new network topology/ routes).
In RSTP, link status of each port are monitored pro-actively (instead of waiting for the BPDU messages) to detect network topology changes. RSTP is backward compatible with STP switches.