軟考中級(jí)網(wǎng)絡(luò)工程師之交換機(jī)與路由器的配置(一)
?
交換機(jī)配置要點(diǎn)
交換機(jī)的基本配置
1. 配置enable口令、密碼和主機(jī)名
Switch> (用戶執(zhí)行模式提示符)
Switch>enable (進(jìn)入特權(quán)模式)
Switch# (特權(quán)模式提示符)
Switch#config terminal (進(jìn)入配置模式)
Switch(config)#enable password cisco (設(shè)置enable password為cisco)
Switch(config)#enable secret cisco1 (設(shè)置enable secret為sisco1)
Switch(config)#hostname C2950 (設(shè)置主機(jī)名為C2950)
C2950(config)#end (退回到特權(quán)模式)
C2950#
2. 配置交換機(jī)IP地址、默認(rèn)網(wǎng)關(guān)、域名和域名服務(wù)器
C2950(config)#ip address 192.168.1.1 255.255.255.0 (設(shè)置交換機(jī)IP)
C2950(config)#ip default-gateway 192.168.1.254 (設(shè)置默認(rèn)網(wǎng)關(guān))
C2950(config)#ip domain-name cisco.com (設(shè)置域名)
C2950(config)#ip name-server 200.0.0.1 (設(shè)置域名服務(wù)器)
C2950(config)#end
3. 配置交換機(jī)的端口屬性
C2950(config )#interface fastethernet0/1 (進(jìn)入接口0/1的配置模式)
C2950(config-if)#speed ? (查看speed命令的子命令)
C2950(config-if)#speed 100 (設(shè)置該端口速率為100Mbps)
C2950(config-if)#duplex ? (查看duplex命令的子命令)
C2950(config-if)#duplex full (設(shè)置該端口為全雙工)
C2950(config-if)#description TO_PC1 (設(shè)置該端口描述為T(mén)O_PC1)
C2950(config-if)#^Z (返回到特權(quán)模式,同end)
C2950#show interface fastethernet0/1 (查看端口0/1的配置結(jié)果)
C2950#show interface fastethernet0/1 status (查看端口0/1的狀態(tài))
4. 配置和查看MAC地址表
C2950(config)#mac-address-table ? (查看mac-address-table的子命令)
C2950(config)#mac-address-table aging-time 100 (設(shè)置超時(shí)時(shí)間為100s)
C2950(config)#mac-address-table permanent 0000.0c01.bbcc f0/3 (加入永久地址)
C2950(config)#mac-address-table restricted static 0000.0c02.bbcc f0/3 f0/7
(加入靜態(tài)地址)
C2950(config)#end
C2950#show mac-address-table (查看整個(gè)MAC地址表)
C2950#clear mac-address-table restricted static (清除限制性地址)
?
通過(guò)系統(tǒng)化學(xué)習(xí)與實(shí)戰(zhàn)演練,我們的宗旨是協(xié)助每位考生構(gòu)筑起堅(jiān)實(shí)的網(wǎng)絡(luò)工程基礎(chǔ),從而從容應(yīng)對(duì)軟件資格考試中的各類挑戰(zhàn)。此刻,請(qǐng)即刻開(kāi)啟您的沖刺之旅,朝著成功的彼岸奮勇邁進(jìn)!