




已閱讀5頁,還剩15頁未讀, 繼續(xù)免費閱讀
版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
計算機網(wǎng)絡實驗報告計算機網(wǎng)絡實驗報告 班級 班級 04910020491002 學號 學號 姓名 姓名 指導教師 指導教師 日期 日期 20122012 年年 5 5 月月 1414 日日 實驗實驗 1 1 跨交換機實現(xiàn)跨交換機實現(xiàn) VLANVLAN 實驗目的實驗目的 跨交換機實現(xiàn) VLAN 實驗拓撲實驗拓撲 上面所選交換機型號為 cisco switch2950 上圖線路連接情況為 交換機 Switch1 的 F0 1 F0 2 分別和 PC1 PC2 相連 Switch2 的 F0 1 F0 2 端口分 別和 PC3 PC4 相連 Switch1 的 F0 12 和 Switch2 的 F0 12 端口連接 實驗設備實驗設備 Switch2950 2 臺 pc 4 臺 本實驗所用的命令本實驗所用的命令 1 enable 2 configure terminal 3 vlan database 4 VLAN vlan 號 NAME vlan 名 增加 VLAN 5 VTP DOMAIN domain 名 設置 VTP 域 6 Vtp server client transparent 設置 VTP 域的模式 7 IP address 給交換機設 IP 地址 8 IP default gateway 給交換機設默認網(wǎng)關 9 Hostname 給交換機設主機名 10 Switchport mode trunk 給交換機設 Trunk 11 Switchport mode access 12 Switchport access vlan vlan 把端口放入某個 vlan 13 Show vlan 14 Show vtp status 15 Interface vlan vlan 實驗步驟實驗步驟 1 交換機 s1 配置 Switch enable Switch vlan database 進入 Vlan 的配置 Switch vlan vtp domain xyz 設置 VTP 域 名字為 xyz Switch vlan vtp server 設置 VTP 域的模式為 server Switch vlan vlan 2 name jsjx 新建一個 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 交換機 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 機設置 在 Boson netsim 模擬器上請輸入命令 winipcfg 然后可以設置各參數(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 驗證測試 當完成上面這些配置時 VLAN1 內(nèi)的 PC1 PC3 可相互 ping 通 VLAN2 內(nèi)的 PC2 PC4 也可相互 ping 通 但兩個 VLAN 間的用戶無法相 互 ping 通 PC1 ping PC3 PC2 ping PC4 PC1 ping PC2 PC3 ping PC4 實驗實驗 2 通過路由器實現(xiàn)通過路由器實現(xiàn) VLAN 間通信間通信 實驗拓撲實驗拓撲 上圖線路連接情況為 Router2621 通過 F0 0 端口和交換機 S1 的 F0 12 端 口相連 交換機 S1 的 F0 11 端口和交換機 S2 的 F0 12 端口相連 S1 的 F0 1 F0 2 分別和 PC1 PC2 相連 S2 的 F0 3 F0 4 分別和 PC3 PC4 相連 實驗目的實驗目的 通過路由器實現(xiàn)各個 VLAN 間的互聯(lián)互通 實驗設備實驗設備 1 臺 Cisco2621 路由器 要帶有 1 個快速以太口和 2 臺 2950 的交換機 Cisco IOS 10 0 版或更高版本 2 4 臺 PC 3 1 根交叉電纜和一根直通電纜 4 一根用于控制端口訪問 Cisco 扁平電纜 本實驗所用的命令本實驗所用的命令 在上面實驗命令的基礎上 再加上 Encapsulation isl dot1 vlan 封裝 ISL 或 802 1Q 協(xié)議 實驗步驟實驗步驟 1 交換機 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 交換機 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 機設置 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 注意 當完成上面這些配置時 VLAN1 內(nèi)的 PC1 PC3 可相互 ping 通 VLAN2 內(nèi)的 PC2 PC4 也可相互 ping 通 但兩個 VLAN 間的用戶無法相互 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 驗證測試 當完成上面這些配置時 VLAN1 內(nèi)的 PC1 PC3 可相互 ping 通 VLAN2 內(nèi)的 PC2 PC4 也可相互 ping 通 但兩個 VLAN 間的用戶無法相 互 ping 通 注 該測試在模擬器上常出錯 心得體會 正確使用并記住所需要的命令 比方說心得體會 正確使用并記住所需要的命令 比方說 vlan database 是虛擬局 域網(wǎng)的數(shù)據(jù)庫 一個 vlan 的任何信息都可以在它里面查到 對于 vtp domain xyz 在 VTP 中繼 一般是在 VLAN 中設置相互學習 我記得一般就設置域名 密碼 模 式還有個開啟修剪 VTP 是 Vlan Trunk Protocal 虛擬局域網(wǎng)中繼協(xié)議 VTP Server 命令 的意思是將這臺交換機的 VTP 模式設置為 Server 即服務器模式 在這臺交換機上可以添加 修改 刪除 Vlan 并且會通過 VTP 協(xié)議傳給本 VTP 域 vtp domain 名稱設成一樣 下的 配置成 VTP 客戶模式 vtp client 的交換機上 客戶模式不能添加 修改或刪除 Vlan 信 息 只能學習 對于vlan 2 name jsjx 一個是 ID 一個是名字 本實驗的這些協(xié)議比 較多 所以掌握并了解它的含義十分必要 實驗實驗 3 靜態(tài)路由與缺省路由使用 靜態(tài)路由與缺省路由使用 網(wǎng)絡拓撲網(wǎng)絡拓撲 實驗目的實驗目的 通過靜態(tài)路由使不同網(wǎng)段用戶互聯(lián)互通 實驗內(nèi)容及步驟實驗內(nèi)容及步驟 路由器型號可選為 Cisco router 805 或其它帶有串口和以太網(wǎng)端口的 路由器 A 路由器的配置 一 基本配置 1 配置路由器主機名 router enable 注 從用戶模式進入特權模式 router configure terminal 注 從特權模式進入全局配置模式 router config hostname A 注 將主機名配置為 A A config 2 配置路由器遠程登陸密碼 A config line vty 0 4 注 進入路由器 vty0 至 vty4 虛擬終端線路模 式 A config line login A config line password star 注 將路由器遠程登陸口令設置為 star 3 配置路由器特權模式口令 A config enable password star 或 A config enable secret star 注 將路由器特權模式口令配置為 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 注 設置路由器 serial0 的 IP 地址為 172 16 0 1 對應的子網(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 二 配置接口時鐘頻率 DCE A config interface serial0 A config if clock rate 64000 注 設置接口物理時鐘頻率為 64Kbps 三 配置靜態(tài)路由 A config ip route 10 0 0 0 255 0 0 0 172 16 0 2 默認路由為 A config ip route 0 0 0 0 0 0 0 0 172 16 0 2 B 路由器的配置 一 基本配置 1 配置路由器主機名 router enable router configure terminal router config hostname B B config 2 配置路由器遠程登陸密碼 B config line vty 0 4 B config line login B config line password star 注 將路由器遠程登陸口令設置為 star 3 配置路由器特權模式口令 B config enable password star 或 B config enable secret star 注 將路由器特權模式口令配置為 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 默認路由為 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 驗證命令 在路由器特權用戶模式下可輸入如下命令 show ip int brief show ip route ping 某端口或 PC 機的 IP 地址 實驗結果 A B 各路由器應該看到全網(wǎng)路由 主機 192 168 0 1 能夠訪問 主機 10 0 0 1 能 ping 通 2 配置路由器遠程登陸密碼 B config line vty 0 4 B config line login B config line password star 注 將路由器遠程登陸口令設置為 star 3 配置路由器特權模式口令 B config enable password star 或 B config enable secret star 注 將路由器特權模式口令配置為 star 4 為路由器各接口分配 IP 地 心得體會 心得體會 同樣的 路由器的配置和前面類似 在這里加了靜態(tài)路由 這 時候需要遠程登錄密碼 將路由器遠程登陸口令設置為 star 配置路由器特 權模式口令時將路由器特權模式口令配置為 star 這一點非常關鍵 這樣就 可以為路由器分配 IP 地址 從而進行靜態(tài)配置 實驗四實驗四 動態(tài)路由配置使用動態(tài)路由配置使用 實驗目的實驗目的 本實驗主要用來練習動態(tài)路由 OSPF 協(xié)議 驗證該協(xié)議的工作原理 實驗步驟實驗步驟 1 繪制實驗拓撲圖 首先 利用 Boson Network Designer 繪制實驗網(wǎng)絡拓撲圖 繪制好的拓撲 圖如圖所示 按照 夠用為度 的原則 這里我們可以選擇 cisco router 805 作為路由器 型號 同時 在給兩臺路由器間布線時要選擇點到點類型 另外 對于 DCE 端 可以任意選擇 不過在實驗配置時 對于 DCE 端路由器的接口 serial 0 不 要忘記配置時鐘信號 這里我們選用 R1 的 serial 0 接口作為 DCE 端 2 配置路由器基本參數(shù) 在繪制完實驗拓撲圖后 可以將其保存并裝入 Boson NetSim 中開始實驗 配置 通過 Boson NetSim 中的工具欄按鈕 eRouters 選擇 R1 并按照下面的 過程進行路由器基本參數(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 端口并設置時鐘頻率 R1 config if end R1 copy run start 或 write 通過 Boson NetSim 中的工具欄按鈕 eRouters 選擇 R2 并按照下面的 過程進行路由器基本參數(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 機基本參數(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 測試到默認網(wǎng)關 R1 的 接口 ethernet 0 的連通性 在 Host 2 的命令提示符下鍵入 ping 192 168 2 1 測試到默認網(wǎng)關 R1 的 接口 ethernet 0 的連通性 4 配置 測試動態(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. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 公司轉(zhuǎn)讓股權合同
- 工地設備機械施工合同書
- 2025年寧波從業(yè)資格證應用能力考些啥
- 《數(shù)據(jù)可視化技術應用》2.3剖析用戶購買行為數(shù)據(jù)-教案
- 簡單版本的加工承攬合同6篇
- 工作室租房合同7篇
- 《愛心行動-圖形與拼組》作業(yè)設計方案
- 水力學模擬考試題與參考答案
- 電工崗位試題庫及參考答案
- 個人工作計劃周工作計劃
- ISO22000食品管理體系2023年度內(nèi)審全套資料
- 2024-2030年中國街舞培訓行業(yè)發(fā)展趨勢及競爭格局分析報告
- 油田勘測設計行業(yè)發(fā)展概況及未來三年行業(yè)發(fā)展趨勢預測
- 致病菌引起的食品安全事件
- 浙江省溫州市(2024年-2025年小學五年級語文)人教版期中考試(下學期)試卷及答案
- 企業(yè)員工背景審查制度
- 數(shù)據(jù)要素白皮書(2024年)-中國通信標準化協(xié)會
- 鋼管樁工程施工方案
- 《魏書生班主任工作漫談》讀書心得體會課件
- 冰淇淋店選址與競爭環(huán)境分析
- 領導干部離任交接表
評論
0/150
提交評論