Accessing Router Remotely Lab6
Accessing Router Remotely Lab6
Jauharabad Campus
Laboratory Exercises
For
Network Design & Management
Lab
Semester 8
WAN:
wideareanetwork(WAN)isatelecommunicationsnetworkorcomputernetworkthatextends
A
over a large geographical distance. Wide area networks often are established with leased
telecommunication circuits.
Business, education and government entities usewideareanetworkstorelaydataamongstaff,
students, clients, buyers, and suppliers from various geographical locations.
VTYstands for Virtual Teletype. I’m sure you alreadyknow the virtual interfaces, so the “vty”
is a kind of virtual interface that is used to get CLI access to a Cisco Router or Switch over
Telnet/SSH. All the connections are remotely over the network, so there is no hardware
associated with it.
he command, line vty 0 4, will open 5 virtual interfaces, i.e. (0,1,2,3,4) for remote access. That
T
means, 5 different administrators/connections can access the Cisco Router/Switch
simultaneously using Telnet or SSH. Cisco hardware supports a maximum of 16 line virtual
interfaces, i.e. (0,1,2,3,…,15).
Telnet:
elnet is a user command and an underlyingTCP/IPprotocolforaccessingremotecomputers,
T
routersorswitches.ThroughTelnet,anadministratororanotherusercanaccesssomeoneelse's
computer, router or switch remotely.With Telnet, you log on as a regular user with whatever
privileges you may have been granted to the specific application and data on that computer,
router or switch. Telnet uses VTY lines on Cisco IOS. Telnet is less secure and not encrypted.
SSH:
ecureShell(SSH),isaprotocolforsecurelygettingaccesstoaremoterouter.Itiswidelyused
S
bynetworkadministratorstocontrolroutersremotely.SSHcommandsareencryptedandsecure
in several ways. Both ends of the client/server connection are authenticated using a digital
certificate, and passwords are protected by being encrypted.
Router>enable
Router#config t
outer(config-line)#passwordPass123
R //The“password”commandsetthe“P
ass123”as
password for telnet. You can set your own password.
outer(config-line)#login
R //The“login”commandauthenticateandaskyou
the password of telnet. If you type “n
o login” command,thetelnetneverauthenticatesforthe
password which is not a good practice in a real network environment.
outer(config-line)#loggingsynchronous //The“loggingsynchronous”commandstopsany
R
message output from splitting your typing.
Router(config-line)#exec-timeout 40 //The “exec-timeout” command just sets the
time-out limit on the line from the default to “40″minutes.
outer(config-line)#motd-banner
R //Themotd-bannerforcesabannermessageto
appear when logging in.
outer(config-line)#exit
R
OK, the Telnet services enabled successfully. But you must set the enable password for the
router in order to control it remotely.
Router(config)#exit
Testing Telnet Connectivity:
Co
nnect the PC to the router using an Ethernet cableand assign IP address 192.168.10.1 to the
PC.
Assign IP address to router interface using the following commands:
Router>enable
Router#config t
Router(config-if)#interface GigabitEthernet 0/0/0
Router(config-if)# ip address 192.168.10.3 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)#exit
Router(config)#exit
Ensure that the PC and router are on the same network.
Open Command Prompt on the PC.
ype the Telnet command followed by the IP address of the router (e.g., 192.168.10.3) to test
T
connectivity,then enter the telnet password. Nexttype enable command and press enter, then
type the router password
SSH Configuration:
ecure Shell or SSH is a secure protocol and the replacement for Telnet and other insecure
S
remote shell protocols. So for secure communication between network devices, I strongly
recommend using SSH instead of Telnet.
IP : 192.168.10.3
Subnet : 255.255.255.0
PC
IP : 192.168.10.2
Subnet : 255.255.255.0
Router(config-if)#exit
e need to change the default router name to generate an rsa key. Here, the default
W
name is Router, let’s change this name toAdmin.
Router(config)#hostname Admin
I nthisstep,wewillsetthedomainname.OurdomainnamewillbeSSHabc.Andafterthat,we
will encrypt the data in it with the “crypto key generatersa” command.
dmin(config)#enable password admin //here password is admin you can use any
A
password of your choice
Now connect to the VTY lines of the switch and configure SSH on the lines.
Admin(config-line)#login local
hat’s all for SSH configuration on the switch. Move on andtrytoaccesstherouterremotely
T
from the PC.
So then:
nthecommandpromptoftheAdminPC,openaSSHsessiontotheswitchusingthecommand
O
ssh -l Admin 192.168.10.3
References:
1. h ttps://computernetworking747640215.wordpress.com/2018/07/05/configuring-telnet-on-a-swi
tch-and-a-router-in-packet-tracer/
2. https://ipcisco.com/lesson/ssh-configuration-on-packet-tracer/
3. https://linuxtiwary.com/2017/03/05/ssh-configuration-on-cisco-router-ccna-lab/
4. https://www.gns3network.com/cisco-line-vty-0-4/