思科LAB(一)
基本配置:
Switch>en??????????????????????? //進入特權(quán)模式
Switch#conf t???????????????????? //進入全局配置模式
Enter configuration commands, one per line.? End with CNTL/Z.
Switch(config)#line co 0??????????????????? //進入console接口配置模式
Switch(config-line)#logging synchronous ??????//開啟自動換行
Switch(config-line)#exec-t 0 0 ???????????????//關(guān)閉時間超時退出
Switch(config-line)#password cisco??????????? //密碼“cisco”
Switch(config-line)#login??????????????????? //允許登陸
Switch(config-line)#exit???????????????????? //退出子模式
Switch(config)#line vty 0 4????????????????? //進入虛擬終端配置模式
Switch(config-line)#password ciscocisco?????? //密碼“ciscocisco”
Switch(config-line)#login?????????????????? //允許登陸
Switch(config-line)#exit??????????????????? //退出子模式
Switch(config)#no ip domain lo???? ?????????//關(guān)閉命令打錯時尋找DNS
Switch(config)#enable secret cisco123???????? //enable 密碼“cisco 123”
Switch(config)#banner login #?????????????? //設(shè)置登陸信息
Enter TEXT message.? End with the character '#'.
Login Information #
Switch(config)#Service password-encryption??? //使用7級安全加密
SSH
SSH配置:
Switch#conf t
Enter configuration commands, one per line.? End with CNTL/Z.
Switch(config)#host Rack1R1????????????????????? //修改名字
Rack1Sw1(config)#enable secret cisco123?????????????
Rack1Sw1(config)#username ccie secret cisco ??????????//配置用戶名密碼
Rack1Sw1(config)#ip domain-name studyccie.com?????? //配置域名字
Rack1Sw1(config)#crypto key generate rsa ????????????//配置安全加密
The name for the keys will be: Rack1R1.studyccie.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]:
% Generating 512 bit RSA keys, keys will be non-exportable...[OK]
Rack1Sw1(config)#ip ssh ver 2????????????????????? ??//配置SSH版本2
*?? 1 0:3:46.284:? RSA key size needs to be at least 768 bits for ssh version 2
*?? 1 0:3:46.284:? %SSH-5-ENABLED: SSH 1.5 has been enabled
Please create RSA keys (of at least 768 bits size) to enable SSH v2.
Rack1Sw1(config)#line vty 0 4
Rack1Sw1(config-line)#login local??????????????? //使用本地認(rèn)證
Rack1Sw1(config-line)#transport input ssh ????????//指定使用SSH登陸
Rack1Sw1(config-line)#end
?
Configuring Port security(配置安全)
Switchport mode access
Switchport port-security
Switchport port-security maximum “數(shù)量”
Switchport port-security mac-address {“綁定的MAC地址” | Sticky(黏性地址)}
Switchport port-security violation
↑{protect (丟棄)| restrict (丟棄在發(fā)出錯誤信息)| shutdown(進入 錯誤Down)}
Errdisable recovery cause all
Errdisable recovery Interval “恢復(fù)時間”
?
交換機與HUB比較:
????????? ????HUB??????????????????????????????????? 交換機
它們的區(qū)別在與:
HUB是直線共享、半雙工工作、一個沖突域以及需要CSMA/CD。
交換機可以在背板上建立一條單獨的虛擬鏈路、全雙工、多個沖突域以及在全雙工模式下無需CSMA/CD。
?
2層交換機的 Troubleshooting:
需要檢查
l? 線纜
l? 干擾
l? 傳輸模式
l? 新增加設(shè)備
檢查以下信息:
[1]
第一個UP是:物理是否有電信號
第二個UP是:邏輯協(xié)議
[2]
數(shù)據(jù)包的錯誤信息
Input errors 進入接口錯誤
CRC 校驗錯誤
[3]
交換機輸出錯誤
[4]
Collisions 重傳(沖突重傳)
[5]
Restarts 以太網(wǎng)控制器重啟(不是交換機)
轉(zhuǎn)載于:https://www.cnblogs.com/vlion2012/archive/2012/09/05/2672071.html
總結(jié)
- 上一篇: 未来科技风口:ABCD
- 下一篇: 不受企业重视的原因