資工系必修 共筆
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • 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
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • 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 Help
Menu
Options
Engagement control 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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ###### tags: `計算機網路概論` :::info [回共筆首頁](https://hackmd.io/SSJDgNdiQ02odihzTkkQpg) [回科目首頁](https://hackmd.io/v_hdETFnSwCLMTNXEWM9Og) ::: # 1. Introduction ## 1.1 what is the Internet? ### 什麼是互聯網? 1. hosts = endsystems: - 功用: 執行 network apps - 舉例: PC、SERVER、LAPTOP、SmartPhone 2. communication links: - 範例: 光纖(fiber)、銅線(copper)、電波(radio)、衛星(satellite) - transmission rate **越高** : bandwidth **越大** 3. packet switches: - 功用: 發送封包(forward packets) - 舉例: Routers(路由器)、Switches(網路交換器) :::info **Packets** * 被分段的資料 => 封包 ::: ### 連接到互聯網的裝置 越來越多裝置連接到互聯網(物聯網)。 ### 什麼是互聯網? 1. Internet(互聯網): - 各種網路組成的網路(network of networks) 2. protocols(協議): - 控制訊息的傳送與接收 - 舉例: **TCP、IP(這兩個 狠 重要)**、HTTP、Skype、802.11 2. Internet standards: - 協議的詳細內容 ### 什麼是protocols(協議)? 1. **網路的協定相當於人類的語言。** 2. 協定定義**格式**、**訊息收發的順序** 和 **訊息傳輸的採取的行動**。 ## 1.2 network edge ### 網路的結構 1. network edge - 主機(Hosts): 客戶端(clients)與伺服器(servers) 2. access networks, physical media - 有線較無線穩定,因為無線的干擾較多,你的訊息是別人的雜訊 3. network core - 路由器互相連接,須具備**高速**的特性,常用**光纖** ### Access network: home network(家用網路) 1. ISP(網際網路服務供應商)提供網路 2. Modem(數據機)將網際網路的訊號轉換,並讓裝置可以連接到網際網路 3. 外網IP一個裝置只有一個 4. 有動態IP的其中一個原因**(?)**: 網路公司不想要用戶自己在家開伺服器 ## 1.3 network core ### Introduct network core 1. The network core => 老師都稱core network - 多個routers組成 2. 功用: - forward packets 3. 通常只有ISP可以負擔的起建造network core的機器,因為這些routers都很貴 ### Packet-switching: store-and-forward 如何傳送封包 1. store-and-forward - router先把整個packets store起來,檢查整個封包的destination在哪裡,再forward出去 - 花費時間 - takes L/R seconds to transmit(push out) L-bit packet into link at R~bps~ - 我有L-bit長度的封包,然後傳送的速率為R~bps~,則傳送一次,需要花費L/R seconds - 舉例:L = 7.5 Mbits, R = 1.5 Mbits ,則one-hop transmission delay = 5 sec ### Packet-switching: queueing delay, loss 在傳送封包時,會遇到delay跟loss - if arrival rate(in bits) to link exceeds transmission rate of link for a period of time: - packets will queue, wait to be transmitted on link - packets can be dropped (lost) if memory (buffer) fills up - 當要傳的資料大於switch傳的速率,就會發生 - 佇列,先進先出 - 倘若switch的buffer已經滿了,就會發生loss ### Two key network-core function - routing: make a decision,有一個routing algorithm,可以把輸入的packet要去的方向,先至做出table表,交由forwarding處理。 - forwarding: process the packets base on routing,根據routing製作出來的table表,把封包傳送到指定的path。 ### Alternative core: circuit switching - Circuit switching - 建立終端之間的連線 - 佔據線路直至通訊結束 => no sharing - 傳統電話通訊網路,通常用於傳統電話 => 接線生 - 傳輸時針對多個User佔用資源的技術FDM versus TDM - FDM 分頻多工 - TDM 分時多工 - 1. User2閒置,其他User不能用User2的Timeline ![](https://i.imgur.com/H6Yf3Os.png =80%x) ### Packet switching versus Circuit switching | | 資源利用 | Congestion | |:------- | ------------ |:------------------------------------------- | | packet | 可以共用資源 | Excessive Congestion: packet delay and loss | | Circuit | 一次只能一個 | 不會有Congestion | ### Internet Structure: network of networks > 要怎麼把分佈在全球所有的Access network連接起來? 1. 先劃分區域,把該區域的所有Access network連接到當地的ISP 2. 每個ISP會通過Internet Exchange Point連接起來,橋接的線稱作peering link 3. 也可以把多個Access net連接到regional net,再連接到ISP,提高效率(Ex. 大學校園網路、公司內部網路、社區網路) 4. CDN (Content Delivery Network): - 服務公司在世界各地架設該公司提供的伺服器 - 加速終端使用者下載、讀取資料 ![](https://i.imgur.com/oNAUT9Q.png) ## 1.4 delay, loss, throughput in networks ### How do loss and delay occur? - delay => 當前面的封包在處理時,等待被處理的時間就是 queueing delay - loss => incoming rate > outgoing rate and buffer is fulled ### Four sources of packet delay :::info d~nodal~ = d~proc~ + d~queue~ + d~trans~ + d~prop~ ::: 1. d~proc~ (nodal processing): - determin output link 計算要出去的path的時間 - 只能換更好的router來加速d~proc~ 2. d~queue~ (queueing delay): - depends on congestion level of router 根據congestion的狀況,產生的delay時間 - 可以設計更好的演算法來加快queue的時間 3. d~trans~ (transmission delay): - L(packet length(bits)) / R(link bandwidth(bps)) > bandwidth 指的是speed of changing 0 and 1 - 只能換更好的router來加速d~trans~ 4. d~prop~ (propagation delay): - depends on cable materials we used 速度是根據傳輸線使用的材質而定 - d(length of physical link)/s(propagation speed: 通常為光速) ### Queueing delay (revisited) - R: link bandwidth (bps) - L: packet length (bits) - a: average packet arrival rate (per second) :::info - La/R ~ 0: avg. queueing delay small => 很通暢 - La/R = 1: avg. queueing delay large => 滿載,壅塞 - La/R > 1: more "work" arriving than can be servied, average delay infinite. 因為會發生loss,導致無法正確計算avg. ::: ### "Real" Internet delays and routes - **traceroute** program: provides delay - 會提供每個經過的router在transmit的delay時間 ### Throughput - 指於一通訊通道上單位時間能成功傳遞的平均資料量,單位通常表示為位元每秒(bit/s或bps) - 兩種角度計算Throughput的 1. 短時間 instantaneous: rate at given point in time 2. 平均 average: rate over longer period of time - Internet scenario - per-connection end-end throughput: `min(Rc, Rs, R/10)` - 現實層面,Rc或Rs通常是bottle neck ![Internet Scenario](https://i.imgur.com/zC3bt0u.png =70%x) > Bottle Neck: 瓶頸,意思是在所有的通路中,傳輸速度最慢的路徑。 ## 1.5 protocol layers, service models ## 1.6 networks under attack: security ## 1.7 history ## 重點整理 :::info 1. 2. :::

    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