Network & Protocols
  • Introduction
  • Chapter1: protocol for industrial
    • 1.1.modbus
  • Chapter2: Protocol for IOT
    • 2.1.MQTT
      • 2.1.1.Introduction: What is MQTT?
      • 2.1.2.Install mosquitto on Windows 7
      • 2.1.3.Install M2Mqtt by Nuget, Example code
  • Chapter3: Protocol for network
    • 3.1.網路模型與協定
    • 3.2.HTTP
      • 3.2.1.Basic concept
      • 3.2.2.Session & Cookie
    • 3.3.TCP/IP
    • 3.4.UDP
    • 3.5.子網路(subnet)
    • 3.6.子網路間的通訊
    • 3.7.路由
  • Chapter4: Protocol for Wireless network
    • 4.1.BLE, IBeacon
  • Chapter5: Cellular and Wifi
    • 5.1.Cellular module
      • 5.1.1.AT Command
      • 5.1.2.各家常用模組
        • 5.1.2.1.Cinterion
          • 5.1.2.1.1.PLS8-E
          • 5.1.2.1.2.PLS8-X
          • 5.1.2.1.3.PLS8-US
        • 5.1.2.2.Sierra
          • 5.1.2.2.1.MC-7354
        • 5.1.2.3.Telit
          • 5.1.2.3.1.LE910-EUG
          • 5.1.2.3.2.LE910-NAG
      • 5.1.3.用儀器測試Throughput
    • 5.2.MBIM for Windows
    • 5.3.Wireshark
      • 5.3.1.Capture filter
      • 5.3.2.Cli command
      • 5.3.3.Monitor mode
      • 5.3.4.Work with ssh
    • 5.4.LTE
      • 5.4.1.Introduction
      • 5.4.2.Types of networks
      • 5.4.3.Elements of access and core networks
      • 5.4.4.What's LTE different?
      • 5.4.5.LTE訊息傳輸
      • 5.4.6.3GPP (Generation Partnership Project)
      • 5.4.7.FDD, TDD, Half Duplex FDD
      • 5.4.8.Beared Types
Powered by GitBook
On this page

Was this helpful?

  1. Chapter3: Protocol for network

3.6.子網路間的通訊

Previous3.5.子網路(subnet)Next3.7.路由

Last updated 5 years ago

Was this helpful?

  • router

    • 必須負責解封裝, 再重新封裝, 就是轉送(forwarding)(封包從某nic進來後又從某nic出去), 怎麼選擇出去的路徑則屬於routing的範疇、

  • default gateway:

    • 當設備不知道該往何處送出時, 就會將封包送往此預設閘道, 讓預設閘道代為尋找以及轉送等目的, 功用是連接兩個不同協定與傳輸介質網路的一台設備,GATEWAY可以是區域連接,也可以是廣域的連接 目的就是讓區域網路知道 封包的目的地如果不是再 區域網路裡面時 要將封包往哪裡傳 才能夠抵達目的地

  • 子網路間的通訊

    • ex1. 兩台主機共皆於同一部switch上, 是否能互相通訊?

      • A: 10.0.1.1/24, 無default gateway

      • B: 10.0.2.1/24, 無default gateway

      • Ans:

        • A的網路區段為10.0.1.0/24, B的網路區段為10.0.2.0/24, 兩個主機屬於不同區段, 因此在網路層時會判斷為discard, 故無法互相通訊

        • A ping B或B ping A會顯示No route to host

      • ex2. 兩台主機共皆於同一部switch上, 是否能互相通訊?

        • A: 10.0.1.1/24, 無default gateway

        • B: 10.0.2.1/16, 無default gateway

        • Ans:

          • A的網路區段為10.0.1.0/24, B的網路區段為10.0.2.0/16, A的網路區段是歸屬於B之內, A認為B是不同區段的網路, 但B會認為A是同個網域 因此B ping A可以, A ping B不通, 只能單向通訊

          • A ping B會顯示No route to host

          • B ping A會顯示100% packet loss

      • ex3. 兩台主機共皆於同一部switch上, 是否能互相通訊?

        • A: 10.0.1.1/24, default gateway: 10.0.1.254/24

        • B: 10.0.2.1/24, default gateway: 10.0.1.254/24

        • Ans:

          • 兩個主機屬於不同區段, A ping B或B ping A會先將封包送到default gateway(即router), 再由router轉送, 因此兩台主機可互相通訊

      • ex4. 兩台主機共皆於同一部switch上, 是否能互相通訊?

        • A: 192.168.26.129/24, default gateway: 192.168.26.2

        • B: 192.168.26.3/31, default gateway: 192.168.26.2

        • Ans:

          • A的網路區段為192.168.26.0/24, B的網路區段為192.168.26.0/31, B的網路區段是歸屬於A之內, A認為B是同區段的網路, 但B認不得A, 因此當A ping B時, 封包會由A直接送到B, 而B回覆A時會先將封包給gateway, 封包最後會到A, 完成雙向通訊.