計(jì)算機(jī)網(wǎng)絡(luò)實(shí)驗(yàn)報(bào)告_第1頁(yè)
計(jì)算機(jī)網(wǎng)絡(luò)實(shí)驗(yàn)報(bào)告_第2頁(yè)
計(jì)算機(jī)網(wǎng)絡(luò)實(shí)驗(yàn)報(bào)告_第3頁(yè)
計(jì)算機(jī)網(wǎng)絡(luò)實(shí)驗(yàn)報(bào)告_第4頁(yè)
計(jì)算機(jī)網(wǎng)絡(luò)實(shí)驗(yàn)報(bào)告_第5頁(yè)
已閱讀5頁(yè),還剩15頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

計(jì)算機(jī)網(wǎng)絡(luò)實(shí)驗(yàn)報(bào)告計(jì)算機(jī)網(wǎng)絡(luò)實(shí)驗(yàn)報(bào)告 班級(jí) 班級(jí) 04910020491002 學(xué)號(hào) 學(xué)號(hào) 姓名 姓名 指導(dǎo)教師 指導(dǎo)教師 日期 日期 20122012 年年 5 5 月月 1414 日日 實(shí)驗(yàn)實(shí)驗(yàn) 1 1 跨交換機(jī)實(shí)現(xiàn)跨交換機(jī)實(shí)現(xiàn) VLANVLAN 實(shí)驗(yàn)?zāi)康膶?shí)驗(yàn)?zāi)康?跨交換機(jī)實(shí)現(xiàn) VLAN 實(shí)驗(yàn)拓?fù)鋵?shí)驗(yàn)拓?fù)?上面所選交換機(jī)型號(hào)為 cisco switch2950 上圖線路連接情況為 交換機(jī) Switch1 的 F0 1 F0 2 分別和 PC1 PC2 相連 Switch2 的 F0 1 F0 2 端口分 別和 PC3 PC4 相連 Switch1 的 F0 12 和 Switch2 的 F0 12 端口連接 實(shí)驗(yàn)設(shè)備實(shí)驗(yàn)設(shè)備 Switch2950 2 臺(tái) pc 4 臺(tái) 本實(shí)驗(yàn)所用的命令本實(shí)驗(yàn)所用的命令 1 enable 2 configure terminal 3 vlan database 4 VLAN vlan 號(hào) NAME vlan 名 增加 VLAN 5 VTP DOMAIN domain 名 設(shè)置 VTP 域 6 Vtp server client transparent 設(shè)置 VTP 域的模式 7 IP address 給交換機(jī)設(shè) IP 地址 8 IP default gateway 給交換機(jī)設(shè)默認(rèn)網(wǎng)關(guān) 9 Hostname 給交換機(jī)設(shè)主機(jī)名 10 Switchport mode trunk 給交換機(jī)設(shè) Trunk 11 Switchport mode access 12 Switchport access vlan vlan 把端口放入某個(gè) vlan 13 Show vlan 14 Show vtp status 15 Interface vlan vlan 實(shí)驗(yàn)步驟實(shí)驗(yàn)步驟 1 交換機(jī) s1 配置 Switch enable Switch vlan database 進(jìn)入 Vlan 的配置 Switch vlan vtp domain xyz 設(shè)置 VTP 域 名字為 xyz Switch vlan vtp server 設(shè)置 VTP 域的模式為 server Switch vlan vlan 2 name jsjx 新建一個(gè) Vlan 名字為 jsjx Switch vlan exit Switch configure terminal Switch config hostname S1 S1 config ip default gateway 192 168 1 254 此處可省略 S1 config int vlan 1 S1 config if ip add 192 168 1 10 255 255 255 0 S1 config if no shut S1 config if int F0 2 S1 config if switchport mode access 可省略 S1 config if switchport access vlan 2 S1 config if int f0 12 S1 config if switchport mode trunk S1 config if end S1 2 交換機(jī) s2 配置 Switch enable Switch vlan database Switch vlan vtp domain xyz Switch vlan vtp client Switch vlan exit Switch configure terminal Switch config hostname S2 S2 config ip default gateway 192 168 1 254 此處可省略 S2 config int vlan 1 S2 config if ip add 192 168 1 11 255 255 255 0 S2 config if no shut S2 config if int F0 2 S2 config if switchport mode access 可省略 S2 config if switchport access vlan 2 S2 config if int f0 12 S2 config if switchport mode trunk S2 config if end S2 3 PC 機(jī)設(shè)置 在 Boson netsim 模擬器上請(qǐng)輸入命令 winipcfg 然后可以設(shè)置各參數(shù) Pc1 IP address 192 168 1 1 netmask 255 255 255 0 gateway 192 168 1 254 Pc2 IP address 192 168 1 2 netmask 255 255 255 0 gateway 192 168 1 254 Pc3 IP address 192 168 1 3 netmask 255 255 255 0 gateway 192 168 1 254 Pc4 IP address 192 168 1 4 netmask 255 255 255 0 gateway 192 168 1 254 驗(yàn)證測(cè)試 當(dāng)完成上面這些配置時(shí) VLAN1 內(nèi)的 PC1 PC3 可相互 ping 通 VLAN2 內(nèi)的 PC2 PC4 也可相互 ping 通 但兩個(gè) VLAN 間的用戶無(wú)法相 互 ping 通 PC1 ping PC3 PC2 ping PC4 PC1 ping PC2 PC3 ping PC4 實(shí)驗(yàn)實(shí)驗(yàn) 2 通過(guò)路由器實(shí)現(xiàn)通過(guò)路由器實(shí)現(xiàn) VLAN 間通信間通信 實(shí)驗(yàn)拓?fù)鋵?shí)驗(yàn)拓?fù)?上圖線路連接情況為 Router2621 通過(guò) F0 0 端口和交換機(jī) S1 的 F0 12 端 口相連 交換機(jī) S1 的 F0 11 端口和交換機(jī) S2 的 F0 12 端口相連 S1 的 F0 1 F0 2 分別和 PC1 PC2 相連 S2 的 F0 3 F0 4 分別和 PC3 PC4 相連 實(shí)驗(yàn)?zāi)康膶?shí)驗(yàn)?zāi)康?通過(guò)路由器實(shí)現(xiàn)各個(gè) VLAN 間的互聯(lián)互通 實(shí)驗(yàn)設(shè)備實(shí)驗(yàn)設(shè)備 1 臺(tái) Cisco2621 路由器 要帶有 1 個(gè)快速以太口和 2 臺(tái) 2950 的交換機(jī) Cisco IOS 10 0 版或更高版本 2 4 臺(tái) PC 3 1 根交叉電纜和一根直通電纜 4 一根用于控制端口訪問(wèn) Cisco 扁平電纜 本實(shí)驗(yàn)所用的命令本實(shí)驗(yàn)所用的命令 在上面實(shí)驗(yàn)命令的基礎(chǔ)上 再加上 Encapsulation isl dot1 vlan 封裝 ISL 或 802 1Q 協(xié)議 實(shí)驗(yàn)步驟實(shí)驗(yàn)步驟 1 交換機(jī) s1 配置 Switch enable Switch vlan database Switch vlan vtp domain xyz Switch vlan vtp server Switch vlan vlan 2 name jsjx Switch vlan exit Switch configure terminal Switch config hostname S1 S1 config ip default gateway 192 168 1 254 S1 config int vlan 1 S1 config if ip add 192 168 1 10 255 255 255 0 S1 config if no shut S1 config if int F0 2 S1 config if switchport mode access 可省略 S1 config if switchport access vlan 2 S1 config if int f0 11 S1 config if switchport mode trunk S1 config if int f0 12 S1 config if switchport mode trunk S1 config if end S1 2 交換機(jī) s2 配置 Switch enable Switch vlan database Switch vlan vtp domain xyz Switch vlan vtp client Switch vlan exit Switch configure terminal Switch config hostname S2 S2 config ip default gateway 192 168 1 254 S2 config int vlan 1 S2 config if ip add 192 168 1 11 255 255 255 0 S2 config if no shut S2 config if int F0 4 S2 config if switchport mode access 可省略 S2 config if switchport access vlan 2 S2 config if int f0 12 S2 config if switchport mode trunk S2 config if end S2 3 PC 機(jī)設(shè)置 Pc1 IP address 192 168 1 1 netmask 255 255 255 0 gateway 192 168 1 254 Pc2 IP address 192 168 2 1 netmask 255 255 255 0 gateway 192 168 2 254 Pc3 IP address 192 168 1 2 netmask 255 255 255 0 gateway 192 168 1 254 Pc4 IP address 192 168 2 2 netmask 255 255 255 0 gateway 192 168 2 254 注意 當(dāng)完成上面這些配置時(shí) VLAN1 內(nèi)的 PC1 PC3 可相互 ping 通 VLAN2 內(nèi)的 PC2 PC4 也可相互 ping 通 但兩個(gè) VLAN 間的用戶無(wú)法相互 ping 通 4 路由器配置 Router enable Router conf t Router config int f0 0 Router config if no shut Router config if int f0 0 1 Router config subif encapsulation dot1 1 Router config subif ip add 192 168 1 254 255 255 255 0 Router config subif no shut Router config subif int f0 0 2 Router config subif encapsulation dot1 2 Router config subif ip add 192 168 2 254 255 255 255 0 Router config subif no shut Router config subif end Router 驗(yàn)證測(cè)試 當(dāng)完成上面這些配置時(shí) VLAN1 內(nèi)的 PC1 PC3 可相互 ping 通 VLAN2 內(nèi)的 PC2 PC4 也可相互 ping 通 但兩個(gè) VLAN 間的用戶無(wú)法相 互 ping 通 注 該測(cè)試在模擬器上常出錯(cuò) 心得體會(huì) 正確使用并記住所需要的命令 比方說(shuō)心得體會(huì) 正確使用并記住所需要的命令 比方說(shuō) vlan database 是虛擬局 域網(wǎng)的數(shù)據(jù)庫(kù) 一個(gè) vlan 的任何信息都可以在它里面查到 對(duì)于 vtp domain xyz 在 VTP 中繼 一般是在 VLAN 中設(shè)置相互學(xué)習(xí) 我記得一般就設(shè)置域名 密碼 模 式還有個(gè)開(kāi)啟修剪 VTP 是 Vlan Trunk Protocal 虛擬局域網(wǎng)中繼協(xié)議 VTP Server 命令 的意思是將這臺(tái)交換機(jī)的 VTP 模式設(shè)置為 Server 即服務(wù)器模式 在這臺(tái)交換機(jī)上可以添加 修改 刪除 Vlan 并且會(huì)通過(guò) VTP 協(xié)議傳給本 VTP 域 vtp domain 名稱設(shè)成一樣 下的 配置成 VTP 客戶模式 vtp client 的交換機(jī)上 客戶模式不能添加 修改或刪除 Vlan 信 息 只能學(xué)習(xí) 對(duì)于vlan 2 name jsjx 一個(gè)是 ID 一個(gè)是名字 本實(shí)驗(yàn)的這些協(xié)議比 較多 所以掌握并了解它的含義十分必要 實(shí)驗(yàn)實(shí)驗(yàn) 3 靜態(tài)路由與缺省路由使用 靜態(tài)路由與缺省路由使用 網(wǎng)絡(luò)拓?fù)渚W(wǎng)絡(luò)拓?fù)?實(shí)驗(yàn)?zāi)康膶?shí)驗(yàn)?zāi)康?通過(guò)靜態(tài)路由使不同網(wǎng)段用戶互聯(lián)互通 實(shí)驗(yàn)內(nèi)容及步驟實(shí)驗(yàn)內(nèi)容及步驟 路由器型號(hào)可選為 Cisco router 805 或其它帶有串口和以太網(wǎng)端口的 路由器 A 路由器的配置 一 基本配置 1 配置路由器主機(jī)名 router enable 注 從用戶模式進(jìn)入特權(quán)模式 router configure terminal 注 從特權(quán)模式進(jìn)入全局配置模式 router config hostname A 注 將主機(jī)名配置為 A A config 2 配置路由器遠(yuǎn)程登陸密碼 A config line vty 0 4 注 進(jìn)入路由器 vty0 至 vty4 虛擬終端線路模 式 A config line login A config line password star 注 將路由器遠(yuǎn)程登陸口令設(shè)置為 star 3 配置路由器特權(quán)模式口令 A config enable password star 或 A config enable secret star 注 將路由器特權(quán)模式口令配置為 star 4 為路由器各接口分配 IP 地址 A config interface serial0 A config if ip address 172 16 0 1 255 255 0 0 A config if no shutdown 注 設(shè)置路由器 serial0 的 IP 地址為 172 16 0 1 對(duì)應(yīng)的子網(wǎng)掩碼為 255 255 0 0 并將該端口激活 A config interface ethernet0 A config if ip address 192 168 0 250 255 255 255 0 A config if no shutdown 二 配置接口時(shí)鐘頻率 DCE A config interface serial0 A config if clock rate 64000 注 設(shè)置接口物理時(shí)鐘頻率為 64Kbps 三 配置靜態(tài)路由 A config ip route 10 0 0 0 255 0 0 0 172 16 0 2 默認(rèn)路由為 A config ip route 0 0 0 0 0 0 0 0 172 16 0 2 B 路由器的配置 一 基本配置 1 配置路由器主機(jī)名 router enable router configure terminal router config hostname B B config 2 配置路由器遠(yuǎn)程登陸密碼 B config line vty 0 4 B config line login B config line password star 注 將路由器遠(yuǎn)程登陸口令設(shè)置為 star 3 配置路由器特權(quán)模式口令 B config enable password star 或 B config enable secret star 注 將路由器特權(quán)模式口令配置為 star 4 為路由器各接口分配 IP 地址 B config interface serial0 B config if ip address 172 16 0 2 255 255 0 0 B config if no shutdown B config if interface ethernet0 B config if ip address 10 0 0 250 255 0 0 0 B config if no shutdown 二 配置靜態(tài)路由 B config ip route 192 168 0 0 255 255 255 0 172 16 0 1 默認(rèn)路由為 B config ip route 0 0 0 0 0 0 0 0 172 16 0 1 PC1 ip address 192 168 0 1 netmask 255 255 255 0 default gateway 192 168 0 250 PC2 ip address 10 0 0 1 netmask 255 0 0 0 default gateway 10 0 0 250 驗(yàn)證命令 在路由器特權(quán)用戶模式下可輸入如下命令 show ip int brief show ip route ping 某端口或 PC 機(jī)的 IP 地址 實(shí)驗(yàn)結(jié)果 A B 各路由器應(yīng)該看到全網(wǎng)路由 主機(jī) 192 168 0 1 能夠訪問(wèn) 主機(jī) 10 0 0 1 能 ping 通 2 配置路由器遠(yuǎn)程登陸密碼 B config line vty 0 4 B config line login B config line password star 注 將路由器遠(yuǎn)程登陸口令設(shè)置為 star 3 配置路由器特權(quán)模式口令 B config enable password star 或 B config enable secret star 注 將路由器特權(quán)模式口令配置為 star 4 為路由器各接口分配 IP 地 心得體會(huì) 心得體會(huì) 同樣的 路由器的配置和前面類似 在這里加了靜態(tài)路由 這 時(shí)候需要遠(yuǎn)程登錄密碼 將路由器遠(yuǎn)程登陸口令設(shè)置為 star 配置路由器特 權(quán)模式口令時(shí)將路由器特權(quán)模式口令配置為 star 這一點(diǎn)非常關(guān)鍵 這樣就 可以為路由器分配 IP 地址 從而進(jìn)行靜態(tài)配置 實(shí)驗(yàn)四實(shí)驗(yàn)四 動(dòng)態(tài)路由配置使用動(dòng)態(tài)路由配置使用 實(shí)驗(yàn)?zāi)康膶?shí)驗(yàn)?zāi)康?本實(shí)驗(yàn)主要用來(lái)練習(xí)動(dòng)態(tài)路由 OSPF 協(xié)議 驗(yàn)證該協(xié)議的工作原理 實(shí)驗(yàn)步驟實(shí)驗(yàn)步驟 1 繪制實(shí)驗(yàn)拓?fù)鋱D 首先 利用 Boson Network Designer 繪制實(shí)驗(yàn)網(wǎng)絡(luò)拓?fù)鋱D 繪制好的拓?fù)?圖如圖所示 按照 夠用為度 的原則 這里我們可以選擇 cisco router 805 作為路由器 型號(hào) 同時(shí) 在給兩臺(tái)路由器間布線時(shí)要選擇點(diǎn)到點(diǎn)類型 另外 對(duì)于 DCE 端 可以任意選擇 不過(guò)在實(shí)驗(yàn)配置時(shí) 對(duì)于 DCE 端路由器的接口 serial 0 不 要忘記配置時(shí)鐘信號(hào) 這里我們選用 R1 的 serial 0 接口作為 DCE 端 2 配置路由器基本參數(shù) 在繪制完實(shí)驗(yàn)拓?fù)鋱D后 可以將其保存并裝入 Boson NetSim 中開(kāi)始實(shí)驗(yàn) 配置 通過(guò) Boson NetSim 中的工具欄按鈕 eRouters 選擇 R1 并按照下面的 過(guò)程進(jìn)行路由器基本參數(shù)的配置 Router enable Router configure terminal Router config host R1 R1 config int e0 R1 config if ip add 192 168 1 1 255 255 255 0 R1 config if no shut 配置 e0 端口 R1 config if int s0 R1 config if ip add 10 0 0 1 255 0 0 0 R1 config if clock rate 64000 R1 config if no shut 配置 s0 端口并設(shè)置時(shí)鐘頻率 R1 config if end R1 copy run start 或 write 通過(guò) Boson NetSim 中的工具欄按鈕 eRouters 選擇 R2 并按照下面的 過(guò)程進(jìn)行路由器基本參數(shù)的配置 Router enable Router configure terminal Router config host R2 R2 config int e0 R2 config if ip add 192 168 2 1 255 255 255 0 R2 config if no shut R2 config if int s0 R2 config if ip add 10 0 0 2 255 0 0 0 R2 config if no shut R2 config if end R2 copy run start 或 write 3 配置 PC 機(jī)基本參數(shù) PC1 ip address 192 168 1 2 netmask 255 255 255 0 default gateway 192 168 1 1 PC2 ip address 192 168 2 2 netmask 255 255 255 0 default gateway 192 168 2 1 在 Host 1 的命令提示符下鍵入 ping 192 168 1 1 測(cè)試到默認(rèn)網(wǎng)關(guān) R1 的 接口 ethernet 0 的連通性 在 Host 2 的命令提示符下鍵入 ping 192 168 2 1 測(cè)試到默認(rèn)網(wǎng)關(guān) R1 的 接口 ethernet 0 的連通性 4 配置 測(cè)試動(dòng)態(tài)路由 OSPF 協(xié)議 路由器 R1 配置 R1 configure terminal R1 config router ospf 100 R1 config router network 10 0 0 0 0 255 255 255 area 1 R1 config router network 192 168 1 0 0 0 0 255 area 1 R1 config router end R1 copy run start 路由器 R2 配置 R2 configure terminal R2 config router ospf 100 R2 config router n

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論