Professional Documents
Culture Documents
Topology:
Add 2 PCs, 2 Switches (2960) and Router (1941) to the workplace.
Cabling:
Select copper straight through to connect PC s to the Switches.
Select copper straight through to connect Switches to the Router.
IP Address:
PC0: Router (GigabyteEthernet0/0)
IP Address: 192.168.2.2 192.168.2.1
Subnet mask:255.255.255.0 255.255.255.0
Default Gateway: 192.168.2.1
PC1: Router (GigabyteEthernet0/1)
IP Address: 192.168.1.2 192.168.1.1
Subnet mask:255.255.255.0 255.255.255.0
Default Gateway: 192.168.1.1
Step 1: To provide an IP address to a host (PC) just select that PC→
Desktop → IP Configuration → IPv4 Addresses and provide an IP address
then ENTER, the Subnet Mask will be provided by default and add default
gateway as shown in the table above.
Router Configuration:
To provide an IP address to the router interfaces just click on the router and
select CLI
Router>enable
Router# config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface g0/0
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed
state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#interface g0/1
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed
state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet0/1, changed state to up
Router(config-if)#exit
Telnet Configuration:
Router(config)# enable secret cisco
Router(config)#username admin2 password cisco2
Router(config)#line vty 0 4
Router(config-line)# login local
Router(config-line)#end
Telnet Test:
Note:
Then now you can access to the Router remotely from the PC
SSH Configuration:
Router>
Router>enable
Password:
Router# config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#ip domain-name cisco.com
R1(config)#crypto key generate rsa
The name for the keys will be: R1.cisco.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may
take a few minutes.
Password: cisco3
R1>enable
Password: cisco
R1#
Note that:
- Now you can access to the Router remotely from the PC.
- But after SSH configuration you cannot access to the Router
remotely from the PC by using Telnet
C:\>telnet 192.168.2.1
Trying 192.168.2.1 ...Open
[Connection to 192.168.2.1 closed by foreign host]
C:\>