Skip to content

作业

image-20240430122732543

交换机

Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#host
Switch(config)#hostname SW01
SW01(config)#ip domain-name ljy.com
SW01(config)#no ip domain-lookup
SW01(config)#int
SW01(config)#interface vlan 1
SW01(config-if)#ip ad
SW01(config-if)#ip address 192.168.2.1 255.255.255.0
SW01(config-if)#no sh
SW01(config-if)#no shutdown 

SW01(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

SW01(config-if)#crypto key generate rsa
The name for the keys will be: SW01.ljy.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.

How many bits in the modulus [512]: 2048
% Generating 2048 bit RSA keys, keys will be non-exportable...[OK]

SW01(config)#ip ssh version 2
*3? 1 0:1:57.210:  %SSH-5-ENABLED: SSH 1.99 has been enabled 
SW01(config)#ip ssh version 2
SW01(config)#line vty 0 15
SW01(config-line)#tran
SW01(config-line)#transport input ssh
SW01(config-line)#ex
% Ambiguous command: "ex"
SW01(config-line)#login local
SW01(config-line)#username admin password 123
SW01(config)#enab
SW01(config)#enable pas
SW01(config)#enable password 123
SW01(config)#write
             ^
% Invalid input detected at '^' marker.
	
SW01(config)#ex
SW01#
%SYS-5-CONFIG_I: Configured from console by console

SW01#write
Building configuration...
[OK]
SW01#

路由器

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host
Router(config)#hostname R1
R1(config)#ip domain
R1(config)#ip domain-
R1(config)#int
R1(config)#interface fa0/0\
                         ^
% Invalid input detected at '^' marker.
	
R1(config)#interface fa0/0
R1(config-if)#ip ad
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#no shutdown 

R1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

R1(config-if)#ex
R1(config)#
R1(config)#cry
R1(config)#crypto key generate rsa
% Please define a domain-name first.
R1(config)#ip dom
R1(config)#ip domin-
R1(config)#ip domin-name ljy.com
                 ^
% Invalid input detected at '^' marker.
	
R1(config)#ip doma
R1(config)#ip domain-name ljy.com
R1(config)#no ip domain-lookup
R1(config)#crypto key gen
R1(config)#crypto key generate rsa
The name for the keys will be: R1.ljy.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.

How many bits in the modulus [512]: 2048
% Generating 2048 bit RSA keys, keys will be non-exportable...[OK]

R1(config)#ip ssh version 2
*3? 1 0:5:37.737:  %SSH-5-ENABLED: SSH 1.99 has been enabled 
R1(config)#ip ssh version 2
R1(config)#line vty 0 15
R1(config-line)#tr
R1(config-line)#transport input ssh
R1(config-line)#login local
R1(config-line)#username admin pas
R1(config-line)#username admin password 123
R1(config)#ena
R1(config)#enable pas
R1(config)#enable password 123
R1(config)#write
           ^
% Invalid input detected at '^' marker.
	
R1(config)#e
% Ambiguous command: "e"
R1(config)#
R1(config)#ex
R1#
%SYS-5-CONFIG_I: Configured from console by console

R1#write
Building configuration...
[OK]
R1#