We can assign lot's of different password in Router but  mostly  we use two password

1 user-execution ( login ) password

2 privilege password


let's see..

Q :- how to set user-execution password

R1#conf
R1#configure ter
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#lin
R1(config)#line con
R1(config)#line console 0
R1(config-line)#pas
R1(config-line)#password CISCO
R1(config-line)#login
R1(config-line)#login
R1(config-line)#exit
R1(config)#exit
R1#

Q :- how to set privilege level password

R1#configure ter
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#
R1(config)#
R1(config)#ena
R1(config)#enable pas
R1(config)#enable password CISCO
R1(config)#exit


Output :-



R1 con0 is now available



Press RETURN to get started.



***********************************
 Welcome to my Network blog
***********************************

Username -   XyZ
password -   Xyz

***********************************

User Access Verification

Password:  !! TYPE PASSWORD  CISCO !!
Password:   !! HERE PASS WILL BE HIDDEN !!
R1#
R1#

Q : - how to encrypt all password

R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#
R1(config)#
R1(config)#serv
R1(config)#service pas
R1(config)#service password-encryption
R1(config)#