拓扑图:
题目要求:
(1)Configure S1 with the following initial settings:
- Hostname
- Banner that includes the word warning
- Console port login and password cisco
- Encrypted enable password of class
- Encrypt plain text passwords
- Management interface addressing
(2)Configure SSH to secure remote access with the following settings:
- Domain name of cisco.com
- RSA key-pair parameters to support SSH version 2
- Set SSH version 2
- User admin with password ccna
- VTY lines only accept SSH connections and use local login for authentication
(3)Configure the port security feature to restrict network access.
- Disable all unused ports.
- Set the interface mode to access.
- Enable port security to allow only two hosts per port.
- Record the MAC address in the running configuration.
- Ensure that port violations disable ports.
S1上的配置命令:
(1)Switch>enable
Switch#configure terminal
Switch(config)#hostname S1
S1(config)#banner motd ‘warning‘
S1(config)#line console 0
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#exit
S1(config)#enable secret class
S1(config)#service password-encryption
S1(config)#interface vlan 1
S1(config-if)#ip address 10.10.10.2 255.255.255.0
(2)S1(config-if)#no shutdown
S1(config-if)#exit
S1(config)#ip domain-name cisco.com
S1(config)#crypto key generate rsa
The name for the keys will be: S1.cisco.com
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
S1(config)#ip ssh version 2
S1(config)#username admin password ccna
S1(config)#line vty 0 15
S1(config-line)#transport input ssh
S1(config-line)#login local
S1(config-line)#exit
(3)S1(config)#interface range gigabitEthernet 0/1-2
S1(config-if-range)#sh
S1(config-if-range)#shutdown
S1(config-if-range)#exit
S1(config)#interface range fastEthernet 0/1-24
S1(config-if-range)#sh
S1(config-if-range)#shutdown
S1(config-if-range)#switchport mode access
S1(config-if-range)#switchport port-security
S1(config-if-range)#switchport port-security maximum 2
S1(config-if-range)#switchport port-security violation shutdown
S1(config-if-range)#switchport port-security mac-address sticky