電腦網絡實驗教程
許辰人、黃群、邊凱歸
相關主題
商品描述
"本書是北京大學本科“電腦網絡”課程的實驗教材,以動手實踐為第一導向,培養學生“理論引導實踐,實踐反哺理論”的專業認知,為後續電腦專業課程的學習和綜合專業素質的培養打下堅實基礎。本書內容包括經典電腦網絡鏈路層、網絡層、傳輸層、應用層的理論與實踐等專業基礎知識,以及可編程網絡、高性能網絡報文處理、用戶態網絡協議棧、網絡測量、移動應用位置服務、移動感知與導航、移動短視頻應用等前沿技術。第 1~10章配套富有挑戰性的實驗代碼,使學生能夠掌握相關知識,分析問題,動手實踐,以適應未來的專業學習;同時激發學生的專業興趣,引導學生逐步形成發現問題、分析問題和解決問題的思維方式,造就自己,成為合格的電腦專業人才。 本書適合作為高等學校電腦相關專業的 “電腦網絡 ”課程的實驗教材,也可作為其他專業的學生學習電腦網絡基礎知識的參考用書。 "
目錄大綱
目錄
第 0章預備知識....................................................................................1
0.
1系統環境與代碼庫.......................................................................1
0.
2說明文檔查詢工具 man ...............................................................1
第一部分經典電腦網絡與網絡協議棧
第 1章鏈路層:Ethernet.....................................................................5
1.1實驗目的
....................................................................................5
1.2實驗環境配置
.............................................................................6
1.3 實驗內容
....................................................................................7 Wireshark........................................................................7
1.3.2基於
libpcap的以太網數據包收發 ...................................10 參考文獻..........................................................................................12
1.3.1
第 2章網絡層:IP..............................................................................13
2.1實驗目的
..................................................................................13
2.2 實驗內容
..................................................................................13 Wireshark......................................................................13
2.2.1
2.2.2路由表
...........................................................................13
2.2.3路由算法
.......................................................................14
2.2.4
IP轉發 .........................................................................18 參考文獻..........................................................................................19
第 3章傳輸層:TCP..........................................................................20
3.1實驗目的
..................................................................................20
3.2 實驗內容
..................................................................................21 Wireshark......................................................................21
3.2.1
3.2.2
TCP狀態機 ..................................................................22
3.2.3滑動窗口
.......................................................................26
3.
2.4異常處理:丟包重傳與連接重置 ......................................27
3.2.5
Socket接口 ...................................................................29
3.2.6擴展練習:流量控制...........................................................................32
3.2.7擴展練習:擁塞控制...........................................................................33 參考文獻..............................................................................................................34
第 4章應用層:SFTP............................................................................................35
4.1實驗目的 ......................................................................................................36
4.2實驗內容 ......................................................................................................36
4.2.1 SSH傳輸層 .......................................................................................36
4.2.2 SSH驗證層 .......................................................................................40
4.2.3 SSH連接層 .......................................................................................41
4.2.4 SFTP子系統.....................................................................................42
4.2.5客戶端程序 ........................................................................................43 參考文獻..............................................................................................................44
第二部分高級電腦網絡與現代網絡技術
第 5章可編程網絡:SDN.......................................................................................47
5.1實驗目的 ......................................................................................................47
5.2實驗環境配置 ...............................................................................................47
5.3實驗背景 ......................................................................................................48
5.3.1 SDN介紹 ..........................................................................................48
5.3.2 OpenFlow介紹 ..................................................................................48
5.4實驗內容 ......................................................................................................49
5.4.1 MiniNet的基本使用方式 ....................................................................49
5.4.2進階啟動選項.....................................................................................51
5.4.3 MiniNet的命令行界面命令.................................................................54
5.4.4使用 Python接口 ..............................................................................55 參考文獻..............................................................................................................55
第 6章可編程網絡:P4 ..........................................................................................56
6.1實驗目的 ......................................................................................................56
6.2實驗環境配置 ...............................................................................................56
6.3實驗背景 ......................................................................................................56
6.3.1 P4可編程網絡 ...................................................................................56
6.3.2 P4基本語法 ......................................................................................58
6.4實驗內容 ......................................................................................................65
6.4.1實現基本轉發.....................................................................................65
6.4.2實現控制平面.....................................................................................66
6.4.3實現鏈路監控.....................................................................................67
參考文獻..............................................................................................................68
第 7章高性能網絡報文處理:DPDK ......................................................................70
7.1實驗目的 ......................................................................................................70
7.2實驗環境配置 ...............................................................................................70
7.3實驗背景 ......................................................................................................71
7.3.1 DPDK簡介.......................................................................................71 EAL..................................................................................................72
7.3.2
7.3.3 常用核心組件.....................................................................................74
7.4實驗內容 ......................................................................................................76
7.4.1 路由規則 ...........................................................................................78
7.4.2 主循環...............................................................................................79
第 8章用戶態網絡協議棧:OmniStack...................................................................82
8.1實驗目的 ......................................................................................................82
8.2實驗背景 ......................................................................................................82
8.2.1 用戶態協議棧簡介 ..............................................................................82
8.2.2 OmniStack簡介.................................................................................82
8.3實驗內容 ......................................................................................................87
8.3.1 實現簡單的 UDP協議棧 ....................................................................87
8.3.2 實現基於字符串匹配的 IDS.................................................................90
8.3.3 實現 RTP協議 ..................................................................................91
第 9章網絡測量:OmniSketch ..............................................................................93
9.1實驗目的 ......................................................................................................93
9.2實驗內容 ......................................................................................................93
9.2.1 網絡測量簡介.....................................................................................93
9.2.2 Sketch簡介 .......................................................................................95
9.2.3 編程框架 ...........................................................................................95
9.2.4實現並測試 Elastic Sketch ................................................................ 100 參考文獻............................................................................................................ 102
第 10章移動應用位置服務 .................................................................................... 103
10.1 實驗目的 .................................................................................................. 103
10.2 實驗環境配置............................................................................................ 104
10.3 實驗內容 .................................................................................................. 104
10.3.1信號濾波與定位算法 ..................................................................... 104
10.3.2定位結果展示 ............................................................................... 106 參考文獻............................................................................................................ 107
第 11章移動感知與導航........................................................................................ 108
11.1實驗目的 .................................................................................................. 108
11.2實驗環境配置............................................................................................ 108
11.3實驗內容 .................................................................................................. 109
11.3.1基於二維碼的地圖構建 .................................................................. 109
11.3.2基於二維碼的自動導航 .................................................................. 110 參考文獻............................................................................................................ 111
第 12章移動短視頻應用........................................................................................ 112
12.1實驗目的 .................................................................................................. 112
12.2實驗內容 .................................................................................................. 113
12.2.1移動短視頻生成 ............................................................................ 113
12.2.2移動短視頻發布 ............................................................................ 113
12.2.3移動短視頻傳播數據分析............................................................... 114 參考文獻............................................................................................................ 115
參考答案 .................................................................................................................. 116