Data transmission and packets
แนะนำใหม่
10:32
การส่งข้อมูล
คุณส่งรูปภาพให้เพื่อนที่อยู่อีกฟากโลก มันไม่ได้เดินทางในรูปแบบก้อนเดียว แต่ถูกแบ่งออกเป็นแพ็กเก็ตเล็กๆ จำนวนนับร้อยๆ แพ็กเก็ต โดยแต่ละแพ็กเก็ตจะมีป้ายกำกับ…
บรรยายภาษาอังกฤษ · สลับคำบรรยายภาษาอังกฤษและภาษาจีนได้
ในบทเรียนนี้
| English | ความหมาย |
|---|---|
| Data transmission/ˈdeɪtə trænˈsmɪʃn/ | |
| packets/ˈpækɪts/ | แพ็กเก็ต |
| serial/ˈsɪərɪəl/ | แบบอนุกรม |
| parallel/ˈpærəlel/ | แบบขนาน |
| packet switching/ˈpækɪt ˈswɪtʃɪŋ/ | Sending data as separate packets that share network links and may travel along different routes. |
| header/ˈhedə/ | ส่วนหัว |
| IP addresses | |
| packet number | |
| payload/ˈpeɪləʊd/ | ส่วนข้อมูลที่มีประโยชน์ |
| trailer/ˈtreɪlə/ | |
| end marker | |
| error check | |
| file/faɪl/ | A named collection of data stored and managed as a unit. |
| routers/ˈruːtəz/ | เราเตอร์ |
| bit/bɪt/ | A binary digit, taking the value zero or one. |
| USB | Uses standard connectors , can auto-detect devices and load drivers , and can carry power. |
| Simplex/ˈsɪmpleks/ | One direction only (computer → printer). |
| Half-duplex/hɑːf ˈdjuːpleks/ | Both directions, one at a time (walkie-talkie). |
| Full-duplex/fʊl ˈdjuːpleks/ | Both directions at once (phone call). |
| connectors/kəˈnektəz/ | |
| drivers |
การส่งข้อมูล
- Data transmission คือการเคลื่อนย้ายข้อมูลจากจุดหนึ่งไปยังอีกจุดหนึ่ง
- ข้อมูลจะถูกแบ่งออกเป็นชิ้นเล็กๆ เท่าๆ กันเรียกว่า packets
- เรายังต้องเลือกวิธีการเดินทาง: แบบ serial/parallel และทิศทาง
Packets และการสลับแพ็กเก็ต
- แพ็กเก็ต มีสามส่วน: เฮดเดอร์ (ที่อยู่ IP ของผู้ส่งและผู้รับ, หมายเลขแพ็กเก็ต), พอยลอยด์ (ข้อมูล), และ เทรลเลอร์ (เครื่องหมายสิ้นสุด + การตรวจสอบข้อผิดพลาด)
- ประโยชน์ของ packet: หากมี packet เดียวที่หายไปจะส่งใหม่เท่านั้น (ไม่ใช่ทั้งไฟล์); packets สามารถใช้เส้นทางที่แตกต่างกันได้; ผู้ใช้งานหลายคนสามารถแชร์ช่องสัญญาณเดียวกันได้
- ใน packet switching, routers อ่าน header แต่ละอันและเลือกเส้นทาง; packets อาจมาถึงไม่เรียงลำดับและจะถูก เรียงลำดับใหม่ ตามหมายเลข packet

แพ็กเก็ตมีเฮดเดอร์, พอยลอยด์ (ข้อมูล) และเทรลเลอร์; เฮดเดอร์จะรองรับที่อยู่และหมายเลขแพ็กเก็ต.

เราเตอร์ส่งต่อแพ็กเก็ต และแพ็กเก็ตที่แตกต่างกันสามารถเดินทางผ่านเส้นทางที่ต่างกันไปยังผู้รับคนเดียวกันได้.

How data travels in packets
Step through packet switching. Splitting a file into addressed packets is why one lost packet only needs resending, and why many users can share the same line.
A packet header contains:
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
The header carries control info (addresses + packet number); the payload is the data; the trailer marks the end + error check.
Match each part of a packet to what it carries.
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
A packet = header (control info) + payload (data) + trailer (end + error check); splitting up means only lost packets are resent.
Serial เทียบกับ Parallel
- Serial ส่ง bit หนึ่งตัวต่อครั้ง ลงในสายเคเบิลเส้นเดียว — ราคาถูก และเหมาะสำหรับระยะทาง ไกล (bits คงอยู่ตามลำดับ)
- Parallel ส่ง หลาย bit พร้อมกัน ลงในสายเคเบิลหลายเส้น — เร็วกว่าแต่ใช้ได้เฉพาะระยะทาง สั้น (bits อาจมาถึงเวลาต่างกันเล็กน้อย)

An Ethernet cable with an RJ45 plug, often used to carry data on a wired network

Serial transmission:
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Serial = one bit at a time (cheaper, long-distance reliable); parallel = many bits at once (fast, short-distance).
ทิศทาง และ USB
- Simplex — ทิศทางเดียวเท่านั้น (คอมพิวเตอร์ → เครื่องพิมพ์)
- Half-duplex — ทั้งสองทิศทาง แต่ทีละด้าน (วิทยุสื่อสาร)
- Full-duplex — ทั้งสองทิศทางพร้อมกัน (การโทรโทรศัพท์)
- USB: หัวเส้ามาตรฐานเดียว, ตรวจจับอุปกรณ์อัตโนมัติและโหลดไดรเวอร์, ส่งพลังงานได้ด้วย, และเส้าเข้าได้ทางเดียวเท่านั้น

A fibre-optic cable carries data as pulses of light along thin glass fibres


Half-duplex sends data both ways at the same time, like a phone call, while full-duplex sends both ways but only one at a time.
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
False. They are swapped: half-duplex sends both ways but one direction at a time (like a walkie-talkie), while full-duplex sends both ways at once (like a phone call). Simplex is one way only.
A benefit of USB is that:
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
USB uses standard connectors, can auto-detect devices and load drivers, and can carry power.
การ์ดนี้เป็นการ์ดใหม่ จึงแสดงเป็นภาษาอังกฤษจนกว่าคำแปลจะพร้อม
Worked example: an email in packets
An email is split into packets 1, 2 and 3. They arrive at the receiver in the order 3, 1, 2. Explain how the email is still read correctly, and why the packets may arrive out of order.
- Each packet's header holds the receiver's IP address and its packet number. The receiver waits for all the packets and puts them back in order 1, 2, 3 by their numbers.
- In packet switching 分组交换, each router sends each packet along the route that is free at that moment, so packets take different routes and some arrive sooner. If one never arrives, the receiver asks for it to be sent again.
Which of these is stored in a packet's header?
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
The header holds the sender's and receiver's IP addresses and the packet number; the data is the payload.
Parallel transmission is the better choice for sending data over long distances.
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Over long distances the bits on parallel wires can arrive at different times (skew) and the extra wires cost more, so serial is used.
คุณเข้าใจแล้ว
- packet = header (ที่อยู่ + หมายเลข) + payload + trailer; ส่งใหม่เฉพาะ packet ที่หายไป
- packet switching: routers จัดการเส้นทางให้แต่ละ packet; เรียงลำดับใหม่ตาม packet number
- serial = 1 bit/1 สาย (ระยะไกล); parallel = หลาย bit/หลายสาย (ระยะสั้น)
- simplex / half-duplex / full-duplex = ทางเดียว / ทีละทิศทาง / ทั้งสองทิศทางพร้อมกัน
เกิดปัญหาอะไรขึ้น? เฉพาะทีมเว็บไซต์เท่านั้นที่เห็นข้อมูลนี้