chihiro-stoicism
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    2
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # IPERF3與NETPERF 實驗 ## 實驗簡介 使用IPERF和NETPERF去觀察網絡的變化。 ## 實驗環境 1. MacOS 2. Ubuntu 3. Homebrew 4. Iperf3 5. Netperf ## 安裝IPERF3 && NETPERF ```shell= brew install iperf3 # 使用Homebrew安裝iperf3 brew install netperf # 使用Homebrew安裝netperf ``` ### IPERF3 介紹 Iperf是一款基於TCP/IP和UDP/IP的網絡性能測試工具,可以用來測量網絡帶寬和網絡質量,提供網絡延遲抖動、數據包丟失率、最大傳輸單元等統計信息。網絡管理員可以根據這些信息瞭解並判斷網絡性能問題,從而定位網絡瓶頸,解決網絡故障。 ### IPERF3 安裝客戶端和服務端 ```shell= iperf3 -s # 利用iperf3建立一個本地TCP服務端 iperf3 -c 192.168.19.103 # 利用iperf3 建立一個客戶端並連接目標服務器 ``` 如下所示: 下图是服務端,上图是客戶端。 ![](https://i.imgur.com/fqrXbm4.png) ![](https://i.imgur.com/h30ZcPi.jpg) ### IPERF3 基本應用 #### 使用IPERF3查看網絡帶寬及延遲抖動和數據包丟失 ```shell= iperf3 -u -c 192.168.19.103 -b 200M -i 1 -t 60 -l 300 ``` > 以上參數表示 使用udp進行測試; -c 為客戶端運行並要指定服務端的IP地址;-b 表示使用的測試帶寬;-i 表示每次報告的間隔, 單位為秒;-t 表示以時間為測試結束條件進行測試,默認為 10 秒; -l 用於設置包的大小 (UDP包大小設置為300字節,PPS數值接近研發估算的dMCU實際使用情況,即每100M流量對應40K PPS)。 ![](https://i.imgur.com/HxJOxXn.png) 图片尾3行記錄了網絡帶寬及延遲抖動和數據包丟失。 其中,Interval 表示運行時間,Tranfer 表示傳輸總字節,Bitrate 表示寬帶,Jitter 表示延遲抖動,Lost/Total Datagrams 表示丟包率。 1. 丟包率為95% 1. 延遲抖動為0.063ms 1. 帶寬為23.1 Mbits/sec --- ### NETPERF 介紹 netperf是一個基於client-server模式的網絡測試工具,可以測量TCP和UDP傳輸的吞吐量、時延、CPU佔用率等性能參數。它可以測試以下幾種模式的TCP核UDP網絡性能: * TCP_STREAM:client端向server端發送批量TCP數據 * UDP_STREAM:client端向server端發送批量UDP數據 * TCP_RR和TCP_CRR:前者是在同一個連接中進行多次request和response請求,後者是每次請求新建一個連接(HTTP) * UDP_RR:使用UDP進行request和response請求 ### NETPERF 安裝客戶端和服務端 ```shell= netserver -p 12345 # 利用netperf建立一個本地TCP服務端, 並指定12345端口。 netperf -t [type] -H [ip] -l [time] -p [port] # 利用netperf 建立一個客戶端並連接本地服務器, # 其中type為测试类型, # ip為目標主機的IP地址, # time為測試時間 # port為目標地址的端口 ``` 如下图所示: ![](https://i.imgur.com/XuociQ8.jpg) ### NETPERF 基本應用 > 網絡性能測量的五項指標: > * 可用性(availability) > * 響應時間(response time) > * 網絡利用率(network utilization) > * 網絡吞吐量(network throughput) > * 網絡帶寬容量(network bandwidth capacity) #### 測試tcp吞吐 ```shell= netperf -t TCP_STREAM -H 192.168.19.104 -l 10 -p 12345 ``` > 表示:測試的協議為(TCP_STREAM)、服務器的IP地址為(192.168.19.104)、持續的時間為(10秒)、指定連接服務端的12345 ![](https://i.imgur.com/qP1Am9A.png) 上述輸出的解釋: * 遠端系統(即server)使用大小為131072字節的socket接收緩衝 * 本地系統(即client)使用大小為131072字節的socket發送緩衝 * 向遠端系統發送的測試分組大小為131072字節 * 測試經歷的時間為10.29秒 * 吞吐量的測試結果為23.99 Mbits/秒 > 在缺省情況下,netperf向發送的測試分組大小設置為本地系統所使用的socket發送緩衝大小。 TCP_STREAM方式下與測試相關的局部參數如下表所示: | 参数 | 说明 | |:-------:|:--------------------------------------:| | -S size | 設置遠端系統的socket發送與接收緩衝大小 | | -m size | 設置本地系統發送測試分組的大小 | | -D | 對本地與遠端系統的socket設置TCP_NODELAY選項| | -M size | 設置遠端系統接收測試分組的大小 | | -s size | 設置本地系統的socket發送與接收緩衝大小 | > 在測試中,應該通過調整不同的測試分組(-m)來觀察什麼因素影響了連接的吞吐量。例如,如果懷疑路由器由於缺乏足夠的緩衝區看空間,使得轉發大的分組時存在問題,就可以增加測試分組大小觀察吞吐量的變化。如果較小的分組吞吐量較高,提高分組大小吞吐量反而降低(假設還沒有達到帶寬上限),則可能是網絡中的網絡設備或者服務器端存在緩衝區問題。 ### 測試udp吞吐 ![](https://i.imgur.com/7yiGIL5.png) 測試結果: 第一行表示本地吞吐:3633.24Mb/s 第二行表示接收端吞吐:4.36Mb/s ### 測試tcp交互速率 #### 類似於http的長連接 ```shell= sudo netperf -t TCP_RR -H 192.168.19.104 -l 10 -p 12345 -- -r 256,2048 ``` ![](https://i.imgur.com/3ElSN9t.png) 測試結果: 第一行表示61.30kb/s的響應 第二行是服務器的數據統計 #### 類似tcp短連接 ```shell= sudo netperf -t TCP_CRR -H 192.168.19.104 -l 10 -p 12345 -- -r 128,1024 ``` ![](https://i.imgur.com/A8oGb5c.png) 測試結果: 第一行表示37.36kb/s的響應 ### 測試udp交互 ```shell= netperf -t UDP_RR -H 192.168.19.104 -l 10 -p 12345 -- -r 256,2048 ``` ![](https://i.imgur.com/t1i16dJ.png) 測試結果: 第一行表示168.99kb/s的響應。 --- ## 網絡技術發展情況調研 ### 互聯網上 (固定端及移動端)的用戶、流量、業與應用的分布情況、變化情況、存在問題; #### 一、關於接入互聯網的物理網絡類型與變化、接入終端類型種類與變化、網絡通信技術的發展趨勢; 首先,關於接入互聯網的物理網絡類型與變化,隨著5G技術的不斷發展,越來越多的地區開始使用5G網絡,這種網絡可以提供更快的網速和更穩定的連接。此外,光纖網絡也在不斷普及,取代了傳統的ADSL和DSL網絡。網絡連接的方式不斷往無線的方向發展,在2019年,wifi6發行,使得使用網絡的設備不再只能依靠有線網才能使用又快又穩定的網絡。還有,衛星網絡也在某些地區得到了廣泛應用,為偏遠地區提供了互聯網接入。 其次,關於接入終端類型種類與變化,近年來,智能手機和平板電腦成為了主流的互聯網接入終端,而傳統的台式電腦和筆記本電腦的使用率逐漸下降,相當一部分人只需要簡單的智能設備便能滿足需求。此外,智能家居設備的普及也帶動了物聯網設備的發展,這些設備可以通過互聯網進行遠程控制和設備狀態的監控。 最後,關於網絡通信技術的發展趨勢,隨著人工智能、區塊鏈和物聯網等新技術的發展,網絡通信技術也在不斷進化。例如,5G網絡可以提供更快的網速和更低的延遲,這將有助於實現更高效的遠程協作和雲計算。此外,人工智能技術也可以在網絡通信中發揮重要作用,例如通過機器學習技術優化網絡拓撲結構和路由算法,還有雲計算技術可以為網絡通信提供更加高效、靈活的數據存儲和處理方式,為用戶提供更好的服務和體驗,還有物聯網技術是指將各種物品通過互聯網連接起來,實現智能化控制和管理,這是未來網絡通信技術的一個重要發展方向。 #### 二、互聯網上 (固定端及移動端)的用戶、流量、業與應用的分布情況、變化情況、存在問題; 首先,隨著互聯網的普及和移動設備的普及,聯網用戶數量和流量呈現快速增長的趨勢。根據中國互聯網網絡信息中心的數據,截至20年6月,我國聯網用戶規模已經達到9.39億,互聯網普及率達到67.3%。同時,移動互聯網用戶規模也在不斷擴大,截至20年6月,我國移動互聯網用戶規模已經達到8.54億,佔總聯網用戶數的90.9%。 其次,在聯網用戶分布方面,城市用戶數量佔據了主導地位。根據CNNIC的數據,截至2020年6月,城市互聯網用戶規模達到7.13億,佔總聯網用戶數的76%。而農村互聯網用戶規模為2.26億,佔總聯網用戶數的24%。不過,近年來農村互聯網用戶數量也在快速增長。 還有在聯網流量方面,視頻、音樂、遊戲等娛樂類應用是佔據了絕對的主導地位。根據艾瑞咨詢的數據,2019年,我國移動互聯網用戶每天平均使用時長為7.2小時,其中70%的時間用於娛樂類應用。同時,短視頻、直播等新興應用也在快速崛起。 還有,在聯網業務方面,電子商務、在線支付、在線教育等互聯網服務也在不斷發展。根據艾瑞咨詢的數據,2019年,我國電子商務交易額達到34.8萬億元,同比增長16.5%。在線支付也已經成為人們日常生活中不可或缺的一部分。同時,隨著疫情的影響,在線教育也得到了快速發展,成為了人們學習的重要渠道。 然而,我認為隨著聯網應用的不斷發展,也存在一些問題。例如,隱私和安全問題,隨著互聯網的發展,個人隱私和安全受到了越來越大的威脅。網絡犯罪、身份盜竊、網絡釣魚等問題層出不窮。還有網絡成癮問題,互聯網的普及和便利性也帶來了網絡成癮問題。過度使用互聯網會對身體和心理健康造成負面影響。還有網絡暴力問題,互聯網的匿名性和無邊界性也導致了網絡暴力問題的出現。網絡暴力可能會對受害者造成心理和身體上的傷害。 --- ## 實驗成員 | 名字 | 學號 | 任務 | 占比 | |:----:|:--------:|:---------------:|:----:| | 張家淼 |20337148 |網絡技術發展情況調研 |50% | | 林均 | 20337073 | IPERF3&&NETPERF | 50% |

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully