Packet Tracer - 綜合技能練習
地址分配表
設備 |
接口 |
IP 地址 |
子網(wǎng)掩碼 |
S1 |
VLAN 1 |
10.10.10.2 |
255.255.255.0 |
PC1 |
NIC |
10.10.10.10 |
255.255.255.0 |
PC2 |
NIC |
10.10.10.11 |
255.255.255.0 |
場景
網(wǎng)絡管理員要求您配置新交換機。 在本練習中,您將使用一系列要求配置新交換機的初始設置、SSH 和端口安全。
拓撲圖
?
要求
·?????????使用以下初始設置配置?S1:
-???????主機名
S1(config)#hostname S1
-???????包含?warning?一詞的橫幅
S1(config)#banner motd #Warning,unauthorized access is prohibited#
-???????控制臺端口登錄名和密碼?cisco
S1(config)#line console 0
S1(config-line)#password cisco
S1(config-line)#login
-???????已加密啟用密碼?class
S1(config)#enable secret class
-???????加密純文本密碼
S1(config)#service password-encryption?
-???????管理接口編址
·?????????使用以下設置配置 SSH 保護遠程訪問:
-???????域名?cisco.com
S1(config)#ip domain-name cisco.com
-???????RSA 密鑰對參數(shù),以支持 SSH 版本 2
S1(config)#crypto key generate rsa
How many bits in the modulus [512]: 1024
-???????設置 SSH 版本 2
S1(config)#ip ssh version 2
-???????用戶?admin,加密密碼?ccna
S1(config)#username admin secret ccna
-???????VTY 線路僅接受 SSH 連接并使用本地登錄進行身份驗證
S1(config-line)#line vty 0 4
S1(config-line)#login local
S1(config-line)#transport input ssh
·?????????配置端口安全功能以限制網(wǎng)絡訪問:
-???????禁用所有未使用的端口。
S1(config-if-range)#interface range f0/3-24,g0/1-2
S1(config-if-range)#shutdown
-???????將接口模式設置為接入。
S1(config)#interface range f0/1-2
S1(config-if-range)#switchport mode access
-???????啟用端口安全以僅允許每個端口兩臺主機。
S1(config-if-range)#switchport port-security
S1(config-if-range)#switchport port-security maximum 2
-???????將 MAC 地址記錄在運行配置中。
S1(config-if-range)#switchport port-security mac-address sticky
-???????確保在發(fā)生端口違規(guī)時禁用端口。
S1(config-if-range)#switchport port-security violation shutdown
實驗步驟:
S1:
Switch>en
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S1
S1(config)#banner motd #Warning,unauthorized access is prohibited#
S1(config)#service password-encryption
S1(config)#enable secret class
S1(config)#username admin secret ccna
S1(config)#ip domain-name cisco.com
S1(config)#crypto key generate rsa
The name for the keys will be: S1.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.
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)#interface range f0/1-2
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 mac-address sticky
S1(config-if-range)#switchport port-security violation shutdown
S1(config-if-range)#interface range f0/3-24,g0/1-2
S1(config-if-range)#shutdown
%LINK-5-CHANGED: Interface FastEthernet0/3, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/4, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/5, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/6, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/7, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/8, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/9, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/10, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/11, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/12, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/13, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/14, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/15, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/16, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/17, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/18, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/19, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/20, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/21, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/22, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/23, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/24, changed state to administratively down
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to administratively down
%LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to administratively down
S1(config-if-range)#interface vlan 1
S1(config-if)#ip add 10.10.10.2 255.255.255.0
S1(config-if)#no shutdown
S1(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
S1(config-if)#exit
S1(config)#line console 0
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#line vty 0 4
S1(config-line)#login local
S1(config-line)#transport input ssh
S1(config-line)#end
S1#
%SYS-5-CONFIG_I: Configured from console by console
S1#wr
Building configuration...
[OK]
S1#
實驗鏈接:https://pan.baidu.com/s/1j1PGnOLBkq0va-WegRgzoA?pwd=5312
提取碼:5312文章來源:http://www.zghlxwxcb.cn/news/detail-495561.html
--來自百度網(wǎng)盤超級會員V2的分享文章來源地址http://www.zghlxwxcb.cn/news/detail-495561.html
到了這里,關(guān)于Packet Tracer - 綜合技能練習(配置新交換機的初始設置、SSH 和端口安全)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!