【正文】
onfig)interface range fastEthernet 0/12 – 15 //將端口1215加入到vlan中Switch(configifrange)switchport mode access Switch(configifrange)switchport access vlan 3 Switch(configifrange)interface range fastethernet 0/1618 Switch(configifrange)switchport mode access Switch(configifrange)switchport access vlan 4 Switch(config)interface fastethernet 0/24 //將一個端口加入到vlan中,單端口模式 Switch(configif)switchport mode access Switch(configif)switchport access vlan 5(3)返回到特權(quán)模式,用 show vlan查看vlan情況。交換機VLAN設(shè)定(1)在Cisco 2950上定義三個VLAN,分別取名為engineer , account, manager。缺省情況下,系統(tǒng)會保存10條命令,最大可以設(shè)置256條命令??梢酝ㄟ^全局命令將明文口令加密。Switch2950(config)line console 0 //進入接口模式 Switch2950(configline)login //會提示設(shè)置密碼Switch2950(configline)password cisco(5)接口模式下,設(shè)定遠程登陸口令為cisco Switch2950(config)line vty 0 4 Switch2950(config)login Switch2950(config)password cisco 注:vty 0 4 是5個不同的虛擬終端連接。Switch2950(config)enable password cisco(3)全局模式下,設(shè)定加密口令Cisco,此口令可以限制對特權(quán)模式的訪問。(2)全局模式下,設(shè)定明文口令cisco,此口令可以限制對特權(quán)模式的訪問。這個命令可以用來從特權(quán)模式中退出交換機。(8)退出特權(quán)模式,使用命令(disable)從特權(quán)模式會到用戶模式。s network name interface Select an interface to configure ip Global IP configuration submands line Configure a terminal line macaddresstable Configure the MAC address table no Negate a mand or set its defaults service Modify use of network based services spanningtree Spanning Tree Subsystem username Establish User Name Authentication vlan Vlan mands vtp Configure global VTP state(7)退出全局配置模式,使用快捷鍵(Ctrl+Z)退出全局配置模式,進入特權(quán)模式。提示符顯示如下:Switch(config)(6)使用命令(?)查看在全局配置模式下所支持的配置命令。undebug39。注意現(xiàn)在的提示符和用戶模式的差別,Switch(4)使用命令(?)查看在特權(quán)模式下所支持的命令,注意和用戶模式下的區(qū)別。Exec mands: Session number to resume connect Open a terminal connection disconnect Disconnect an existing network connection enable Turn on privileged mands exit Exit from the EXEC logout Exit from the EXEC ping Send echo messages resume Resume an active network connection show Show running system information telnet Open a telnet connection terminal Set terminal line parameters traceroute Trace route to destination(3)進入特權(quán)模式,輸入(enable)。請注意現(xiàn)在交換機上的顯示符號。交換機工作模式切換(1)登陸交換機,進入用戶模式。(3)進入超級終端程序后,單擊“回車”鍵,系統(tǒng)將收到交換機的回送信息,如圖3?;蛘咧苯狱c擊“還原為默認值”即可;如圖2所示。圖1 Pcaket Tracer仿真實驗圖(1)“開始”菜單“程序”→“附件”→“通信”→“超級終端”打開超級終端。試驗后按規(guī)定要求寫出實驗報告。2 軟件環(huán)境 Windows xp操作系統(tǒng),Packet Tracer 5仿真軟件四、實驗要求熟練掌握Cisco交換機基本配置命令及各命令的作用。二、實驗屬性驗證性實驗。掌握利用超級終端對交換機配置的過程。第三篇:計算機網(wǎng)絡(luò)實驗三報告實驗三 交換機配置一、實驗?zāi)康恼莆战粨Q機在網(wǎng)絡(luò)中的作用及交換機設(shè)備的選型。(5)如果先運行客戶端程序,程序會有什么現(xiàn)象,為什么會有這一現(xiàn)象?答:程序跳出運行,并顯示”can not creat connect!”因為沒有相應(yīng)的服務(wù)器與之創(chuàng)立鏈接。(4)如果服務(wù)器程序中沒有memset(, 0, sizeof())。應(yīng)用程序或DLL只能在一次成功的WSAStartup()調(diào)用之后才能調(diào)用進一步的Windows Sockets API函數(shù)。提供了對某些網(wǎng)絡(luò)相關(guān)API的支持,若使用其中的API,如果不加入pragma ment(lib,“”),則不能使用其中的API,即得不到相關(guān)API的支持。:(1)?答:Windows網(wǎng)絡(luò)編程至少需要兩個頭文件:。,并修改服務(wù)器的功能(自己思考),改寫成多線程web服務(wù)器(選作),附上源代碼,并加關(guān)鍵代碼注釋。理解socket編程模型及其原理。2.實驗環(huán)境:連入局域網(wǎng)絡(luò)的主機一臺。(8)上述服務(wù)器是串行處理多個客戶端的請求,如何該成并發(fā)處理的服務(wù)器?答:用父進程調(diào)用accept,然后調(diào)用fork,這樣,已連接套接口就