0% found this document useful (0 votes)
7 views

Network programming Lab 3-2

Uploaded by

omarsherif441212
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Network programming Lab 3-2

Uploaded by

omarsherif441212
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Network programming Lab 3

Topics

console
● Create password for router “Enable password”
● Encrypt password “Enable secret”
● #Enable secret is override the enable password
● Delete enable password
● Create password for console
● Encrypt console password
● Create banner motd “for 24h” or login “forever”
Telnet
● Create vty password
● Create username and password for every user
● Create super user to login into any mode with one password

Commands
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#enable password cisco
Router(config)#exit

Router#show run
Building configuration...
Current configuration : 577 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
enable password cisco
!
!
!
!
!
!
ip cef
no ipv6 cef
--More--

Router(config)#enable secret cisco


Router#show run
Building configuration...
Current configuration : 624 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
enable secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0
enable password cisco
!
!
!
!
!
!
ip cef
--More--

Router>en
Password:
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no enable password
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#show run
Building configuration...
Current configuration : 602 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
enable secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0
!
!
!
!
!
!
ip cef
no ipv6 cef
--More--

Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#line console 0
Router(config-line)#password cisco
Router(config-line)#login

Router#show run

!
!
!
line con 0
password cisco
Login

To encrypt any password


Router(config)#service password-encryption

Save configurations
Router#copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Router#

Banner
Router(config)#banner motd #Hello#
Router(config)#banner login #Hello World#

Banner login disappears when delete passwords


Router>en
Password:
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no enable secret
Router(config)#line console 0
Router(config-line)#no password
Router(config-line)#^Z
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#exit
Router con0 is now available
Press RETURN to get started.
Hello
Router>

Telnet commands
We should to connect with console at the first time, and write the basic configurations then we
can use telnet after that.

cisco>en
cisco#config t
Enter configuration commands, one per line. End with CNTL/Z.
cisco(config)#line vty 0 4
cisco(config-line)#password cisco
cisco(config-line)#login

From any PC go to Desktop => command prompt and write the following
C:\>telnet 10.0.0.1
Trying 10.0.0.1 ...Open
User Access Verification
Password:
cisco>en
% No password set.
cisco>

# you should to write privilege password to access router


cisco(config)#enable secret cisco
And the in the PC
cisco>en
Password:
cisco#

Create username and password


In Router
cisco(config)#username ali password cisco1
cisco(config)#username ahmed password cisco2
cisco(config)#line vty 0 4
cisco(config-line)#login local
cisco(config-line)#exit
In the PC
C:\>telnet 10.0.0.1
Trying 10.0.0.1 ...Open
User Access Verification
Username: ali
Password:
cisco>

Create super user


In the first when there is no privilege password, we can not login to router, so we want to create
super user to login anyway with single password

cisco(config)#no enable secret


cisco(config)#username mohamed privilege 15 password cisco
cisco(config)#line vty 0 4
cisco(config-line)#login local

In PC

With super user


C:\>telnet 10.0.0.1
Trying 10.0.0.1 ...Open
User Access Verification
Username: mohamed
Password:
cisco#

With normal user


C:\>telnet 10.0.0.1
Trying 10.0.0.1 ...Open
User Access Verification
Username: ali
Password:
cisco>en
% No password set.

You might also like