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.5.子網路(subnet)

  • 網路遮罩(network mask)

    • 用"IP位址"及"網路遮罩"進行"AND位元運算", 算出來的就是"所屬的網路位址"

      • 例如26.2.21.198/255.0.0.0, 網路位址為11111111.00000000.000000000.00000000-> 26.0.0.0

      • 1稱為在乎位元, 0稱為不在乎位元

  • 子網路(subnet): 將一個大網路切成許多子網路

  • 子網路遮罩(subnet mask): 目的是透過子網路遮罩將網路切割成許多小網路

  • 切割成子網路

    • ex 1. 在一個class C切出每個子網路有8個IP數(8台主機), 推算子網路遮罩及子網路數

      • 子網路遮罩: 11111111.11111111.11111111.11111000

      • 子網路數: 8-3=5

    • ex 2. 在一個class B切出每個子網路有32個IP數(32台主機), 推算子網路遮罩及子網路數

      • 子網路遮罩: 11111111.11111111.11111111.11100000

      • 子網路數: 16-5=11

    • ex 3. 在一個class C切出32個子網路, 推算子網路遮罩及主機數

      • 子網路遮罩: 11111111.11111111.11111111.11111000

      • 主機數: 8-5=3

    • ex 4. 在一個class B切出2048個子網路, 推算子網路遮罩及主機數

      • 子網路遮罩: 11111111.11111111.11111111.11100000

      • 主機數: 16-11=5

    • 分割subnet的步驟:

      • 1.先決定主機數, 或是子網路數

      • 2.計算適當的subnet mask

      • 3.列出所有的子網路及起訖IP

      • 4.經過subnet的切割後, 每個subnet的第一個IP要保留作為"網路位址代號", 最後一個IP要保留作為"網路廣播位置"

      • 5.剩餘可用IP = 所有IP - 第一個IP- 最後一個IP - 挑一個作為預設閘道IP

Previous3.4.UDPNext3.6.子網路間的通訊

Last updated 5 years ago

Was this helpful?