Chapterبەش 2 · Lectureوانە 2.6

Encapsulation, PDUs and Addresses at Each Layerپێچانەوە، یەکەکانی دراوەی پرۆتۆکۆڵ و ناونیشانەکان لە هەر چینێکدا

How data is wrapped on the way down and unwrapped on the way up: encapsulation and decapsulation step by step with a web page from Sulaymaniyah to Duhok, the name of the data unit at each layer (data, segment, packet, frame, bits), peers talking through their headers, the address used at each layer, the routers that use only layers 1–3, and how many bytes the headers cost.

چۆن لە دابەزیندا دەپێچرێتەوە و لە سەرکەوتندا دەکرێتەوە: و هەنگاو بە هەنگاو بە لاپەڕەیەکی وێب لە سلێمانییەوە بۆ دهۆک، ناوی یەکەی لە هەر چینێکدا (، ، ، ، )، کە بە سەردێڕەکانیان قسە دەکەن، ئەو ناونیشانەی هەر چینێک بەکاری دەهێنێت، ئەو تەنیا چینەکانی 1 تا 3 بەکار دەهێنن و سەردێڕەکان چەند تێ دەچن.

13 min read14 خولەک خوێندنەوە · 13 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Explain encapsulation and decapsulation, and say which layer adds or removes each header and the trailer.
  • Name the PDU at each layer: data, segment or datagram, packet, frame and bits.
  • Describe how peer layers communicate through their headers, and when an application adds its own header.
  • Match each layer with its address — preamble bits, MAC, IP, port, application names — and say which ones change at every hop.
  • Draw the data flow from a host through routers to another host, and work out header overhead in bytes.
  • و ڕوون بکەیتەوە و بڵێیت کام چین هەر سەردێڕێک و زیاد دەکات یان لای دەبات.
  • لە هەر چینێکدا ناو بهێنیت: ، یان ، ، و .
  • وەسفی بکەیت چینە هاوتاکان چۆن بە سەردێڕەکانیان پەیوەندی دەکەن و کەی سەردێڕی خۆی زیاد دەکات.
  • هەر چینێک لەگەڵ ناونیشانەکەی یەک بخەیت — ، MAC، IP، ، ناوی — و بڵێیت کامیان لە هەر بازێکدا دەگۆڕێن.
  • ڕەوتی لە بە ناو بۆ تر بکێشیت و بارگرانیی سەردێڕەکان بە بژمێریت.

Encapsulation: wrapping data layer by layerپێچانەوە: دراوە چین بە چین دەپێچرێتەوە

Encapsulation is the process of adding control information as data passes down through the layered model. Each layer takes what it gets from the layer above, keeps it whole as its own data, and puts a header in front of it — at the data link layer usually also a trailer at the end. The receiver does the reverse, decapsulation: each layer reads and removes its own part. Down, across and up showed the journey; this lesson opens the packages.

ئەو پرۆسەیەیە کە لە کاتی دابەزینی بە ناو مۆدێلە چینبەندییەکەدا زانیاریی کۆنترۆڵی بۆ زیاد دەکرێت. هەر چینێک ئەوەی لە چینی سەرەوە وەریدەگرێت وەک خۆی وەک خۆی دەهێڵێتەوە و سەردێڕێک دەخاتە پێشی — لە زۆرجار لە کۆتاییدا — وەک ئەوەی لەقتوو بدرێت. وەرگر پێچەوانەکەی دەکات، : هەر چینێک بەشەکەی خۆی دەخوێنێتەوە و لای دەبات. دابەزین، تێپەڕین و سەرکەوتن گەشتەکەی پیشان دا؛ ئەم وانەیە پاکەتەکان دەکاتەوە.

Four stages from left to right. A letter: data, what the program sends. The letter in an envelope marked port 443: a segment, with the TCP header and its ports. That envelope inside a bigger one marked to 198.51.100.25: a packet, with the IP header and its IP addresses. All of it in a parcel marked to the next device (MAC), with a check tag at the end: a frame, with the Ethernet header and trailer. Bottom: each layer wraps what it gets from above and writes its own label on the outside; at the receiver the wrappers are opened in reverse — decapsulation.چوار قۆناغ لە چەپەوە بۆ ڕاست. نامەیەک: دراوە، ئەوەی بەرنامەکە دەینێرێت. نامەکە لەناو زەرفێکدا کە پۆرت 443ـی لەسەرە: بڕ، بە سەردێڕی TCP و پۆرتەکانی. ئەو زەرفە لەناو زەرفێکی گەورەتردا کە نووسراوە بۆ 198.51.100.25: پاکێت، بە سەردێڕی IP و ناونیشانەکانی IPـی. هەمووی لەناو پاکەتێکدا کە نووسراوە بۆ ئامێری دواتر (MAC) و نیشانەیەکی پشکنینی لە کۆتاییدایە: فرەیم، بە سەردێڕ و پاشکۆی فرەیمی Ethernet. لە خوارەوە: هەر چینێک ئەوەی لە سەرەوە وەریدەگرێت دەیپێچێتەوە و نیشانەی خۆی لە دەرەوەی دەنووسێت؛ لە وەرگردا بەرگەکان بە پێچەوانەوە دەکرێنەوە — هەڵوەشاندن.
Like envelopes inside envelopes, each with its own address.وەک زەرف لەناو زەرفدا، هەر یەکە و ناونیشانی خۆی.CêIT
Envelopes inside envelopesزەرف لەناو زەرفدا

A school sends exam papers: the teacher's letter goes in an envelope with the class's name, that envelope goes in a bigger one with the school's address, and the post office puts it in a bag for the next sorting office.

قوتابخانەیەک پەڕەی تاقیکردنەوە دەنێرێت: نامەکەی مامۆستا دەخرێتە زەرفێکەوە کە ناوی پۆلەکەی لەسەرە، ئەو زەرفە دەخرێتە ناو زەرفێکی گەورەترەوە کە ناونیشانی قوتابخانەکەی لەسەرە و پۆستەخانە دەیخاتە جانتایەکەوە بۆ نووسینگەی ڕیزکردنی دواتر.

Where the analogy stops workingسنووری ئەم نموونەیە

A real envelope is never rewritten on the way; in a network, every router throws away the frame and builds a new one.

زەرفی ڕاستەقینە لە ڕێگادا هەرگیز دووپاتە نانووسرێتەوە؛ لە هەر فڕێ دەدات و یەکێکی نوێ دروست دەکات.

Down the stack: a web page leaves the serverدابەزین بە ستوونەکەدا: لاپەڕەیەک لە ڕاژەکارەکە دەردەچێت

A web server in Sulaymaniyah sends a page to Shilan's laptop in Duhok. The application hands over HTTP data: an HTTP header and the HTML. Transport puts a TCP header in front, with the port numbers — now it is a segment. The internet layer adds an IP header with the IP addresses — now it is a packet. The data link layer adds an Ethernet header with the MAC addresses and, at the end, a trailer with the error check (FCS) — now it is a frame. The physical layer sends it as bits.

لە سلێمانی لاپەڕەیەک بۆ شیلان لە دهۆک دەنێرێت. HTTP دەداتە دەست: و HTML. سەردێڕێکی TCP دەخاتە پێشی، کە ژمارەی تێدایە — ئێستا . چینی سەردێڕێکی IP زیاد دەکات کە تێدایە — ئێستا . سەردێڕێکی Ethernet زیاد دەکات کە تێدایە و لە کۆتاییشدا بە پشکنینی هەڵە ⁦(FCS)⁩ — ئێستا . وەک دەینێرێت.

Animation in nine steps with a five-layer stack on the left. Sender, the web server in Sulaymaniyah: 1, HTTP header and HTML at the application layer; 2, TCP adds its header with ports 443 to 51514, a segment; 3, IP adds its header with 203.0.113.80 to 198.51.100.25, a packet; 4, Ethernet adds a header with MAC addresses and the FCS trailer, a frame; 5, the frame leaves as bits, 1100 0101 …. Receiver, Shilan's laptop in Duhok: 6, the FCS is checked and the Ethernet header and trailer are removed; 7, the packet is for this IP address and the IP header is removed; 8, port 51514 belongs to the browser and the TCP header is removed; 9, the browser reads the HTTP header and shows the page. Last frame: headers are added on the way down and removed on the way up.
Animation in nine steps with a five-layer stack on the left. Sender, the web server in Sulaymaniyah: 1, HTTP header and HTML at the application layer; 2, TCP adds its header with ports 443 to 51514, a segment; 3, IP adds its header with 203.0.113.80 to 198.51.100.25, a packet; 4, Ethernet adds a header with MAC addresses and the FCS trailer, a frame; 5, the frame leaves as bits, 1100 0101 …. Receiver, Shilan's laptop in Duhok: 6, the FCS is checked and the Ethernet header and trailer are removed; 7, the packet is for this IP address and the IP header is removed; 8, port 51514 belongs to the browser and the TCP header is removed; 9, the browser reads the HTTP header and shows the page. Last frame: headers are added on the way down and removed on the way up.
Encapsulation going down at the server, decapsulation going up at the laptop. لە دابەزیندا لە ، لە سەرکەوتندا لە .CêIT

On the wire the frame reads, from front to back: Ethernet header, IP header, TCP header, HTTP header, data, Ethernet trailer. Each header is the label its layer needs; the next screens show who reads which one.

لەسەر وایەرەکە لە پێشەوە بۆ دواوە ئاوایە: سەردێڕی Ethernet، سەردێڕی IP، سەردێڕی TCP، ، ، Ethernet. هەر سەردێڕێک ئەو نیشانەیەیە کە چینەکەی پێویستیەتی؛ شاشەکانی داهاتوو پیشان دەدەن کێ کامیان دەخوێنێتەوە.

Does the application add a header?ئایا ئەپەکە سەردێڕ زیاد دەکات؟

The application's header may or may not exist. HTTP has one: a status line and header lines such as Content-Type and Content-Length, then an empty line, then the page. In HTTP/2 and HTTP/3 the same header fields travel in a compressed binary form. DNS starts every message with a 12-byte header. Some programs send their data with no header of their own. So pictures that show a layer-7 header (H7) and books that say “no header is added at layer 7” are both describing real cases.

سەردێڕی لەوانەیە هەبێت و لەوانەیە نەبێت. سەردێڕی هەیە: دێڕی دۆخ و دێڕەکانی سەردێڕ وەک Content-Type و Content-Length، پاشان دێڕێکی بەتاڵ، پاشان لاپەڕەکە. لە ⁦HTTP/2⁩ و ⁦HTTP/3⁩ـدا هەمان زانیارییەکانی سەردێڕ بە شێوەیەکی دووانیی پەستێنراو دەڕۆن. هەموو نامەیەک بە سەردێڕێکی ⁦12⁩ دەست پێ دەکات. هەندێک بەرنامە بەبێ سەردێڕی خۆیان دەنێرن. بۆیە ئەو وێنانەی سەردێڕی چینی ⁦7 (H7)⁩ پیشان دەدەن و ئەو کتێبانەی دەڵێن «لە چینی 7دا هیچ سەردێڕێک زیاد ناکرێت» هەردووکیان باسی حاڵەتی ڕاستەقینە دەکەن.

The start of an HTTP response: HTTP/1.1 200 OK; Content-Type: text/html; charset=utf-8; Content-Length: 2048; Date: Wed, 04 Nov 2026 09:00:00 GMT; then an empty line, which ends the header; then the page, <!DOCTYPE html> and <html lang="ckb" dir="rtl">. A brace marks the first four lines as the HTTP header, the application's own header; another marks the rest as the data, the page. Bottom: DNS adds a 12-byte header; some programs send plain data with no header.سەرەتای وەڵامێکی HTTP: HTTP/1.1 200 OK؛ Content-Type: text/html; charset=utf-8؛ Content-Length: 2048؛ Date: Wed, 04 Nov 2026 09:00:00 GMT؛ پاشان دێڕێکی بەتاڵ کە کۆتایی بە سەردێڕەکە دەهێنێت؛ پاشان لاپەڕەکە، <!DOCTYPE html> و <html lang="ckb" dir="rtl">. کەوانەیەک چوار دێڕی یەکەم وەک سەردێڕی HTTP دیاری دەکات، سەردێڕی خودی ئەپەکە؛ یەکێکی تر ئەوانی تر وەک دراوە، واتە لاپەڕەکە. لە خوارەوە: DNS سەردێڕێکی 12 بایتی زیاد دەکات؛ هەندێک بەرنامە دراوەی ڕووت بەبێ سەردێڕ دەنێرن.
HTTP's own header comes before the page.سەردێڕی خودی پێش لاپەڕەکە دێت.CêIT

Up the stack: decapsulation at the receiverسەرکەوتن بە ستوونەکەدا: هەڵوەشاندن لە وەرگردا

At Shilan's laptop the process runs in reverse, using the information in each PDU. The data link layer checks the frame's FCS and the destination MAC address, then removes the Ethernet header and trailer. The internet layer checks that the IP address is its own and removes the IP header. The transport layer reads the port number, removes the TCP header and hands the data to the right program. The HTTP data reaches the browser. If a check fails — a bad FCS, a foreign address — the data is dropped there.

لە شیلاندا پرۆسەکە بە پێچەوانەوە دەڕوات، بە بەکارهێنانی زانیارییەکانی ناو هەر . FCSـی و مەبەست دەپشکنێت، پاشان سەردێڕ و Ethernet لادەبات. چینی دەپشکنێت کە هی خۆیەتی و سەردێڕی IP لادەبات. ژمارەی دەخوێنێتەوە، سەردێڕی TCP لادەبات و دەداتە بەرنامەی دروست. HTTP دەگاتە . ئەگەر پشکنینێک سەرنەکەوێت — FCSـی هەڵە، ناونیشانی بیانی — لەوێ فڕێ دەدرێت.

The receiver's five layers, with an arrow going up. Physical: bits become a frame. Data link: FCS correct? MAC address mine? If yes, remove the header and trailer. Internet: destination IP mine? If yes, remove the IP header. Transport: port 51514, the browser; remove the TCP header. Application: HTTP, show the page. Bottom: a check that fails stops there — a bad FCS or a foreign address and the data is dropped.پێنج چینەکەی وەرگر بە تیرێکی سەرەوە. چینی فیزیکی: بیتەکان دەبن بە فرەیم. چینی بەستەری دراوە: FCS دروستە؟ ناونیشانی MAC هی خۆمە؟ ئەگەر بەڵێ، سەردێڕ و پاشکۆی فرەیم لابە. چینی ئینتەرنێت: IPـی مەبەست هی خۆمە؟ ئەگەر بەڵێ، سەردێڕی IP لابە. چینی گواستنەوە: پۆرتی 51514، تۆڕگەڕەکە؛ سەردێڕی TCP لابە. چینی ئەپ: HTTP، لاپەڕەکە پیشان بدە. لە خوارەوە: پشکنینێک کە سەرنەکەوێت لەوێ دەوەستێت — FCSـی هەڵە یان ناونیشانی بیانی و دراوەکە فڕێ دەدرێت.
Check, then remove: each layer handles only its own header.پشکنین، پاشان لابردن: هەر چینێک تەنیا سەردێڕی خۆی دەگرێتە ئەستۆ.CêIT
Definitionپێناسە

The reverse of : at the receiver, on the way up the layers, each layer reads and removes its own header (and trailer) and passes the rest to the layer above.

پێچەوانەی : لە وەرگردا، لە کاتی سەرکەوتن بە چینەکاندا، هەر چینێک سەردێڕی خۆی (و کۆتاییەکەی) دەخوێنێتەوە و لای دەبات، ئەوەی دەمێنێتەوە دەداتە چینی سەرەوە.

A new name at every layer: PDUsناوێکی نوێ لە هەر چینێکدا: یەکەکانی دراوەی پرۆتۆکۆڵ

A protocol data unit (PDU) is the form a piece of data takes at one layer. At every stage it gets a different name to show its new shape, named after the TCP/IP protocols: data at the application layer (in OSI, the top three layers all handle data), a segment at the transport layer (with UDP, a datagram), a packet at the internet layer, a frame at the network access layer — its shape depends on the medium — and bits while it crosses the medium.

ئەو شێوەیەیە کە پارچەیەک لە یەک چیندا وەریدەگرێت. لە هەر قۆناغێکدا ناوێکی جیاواز وەردەگرێت بۆ پیشاندانی شێوە نوێیەکەی، بەپێی ⁦TCP/IP⁩: لە (لە OSIـدا سێ چینە سەرەوەکە هەموویان دەگرنە ئەستۆ)، لە (لەگەڵ ، )، لە چینی ، لە چینی دەستگەیشتن بە — شێوەکەی بەندە بە — و لە کاتی تێپەڕین بە .

An e-mail on its way down five layers. Application: the e-mail text, named data. Transport: a TCP header plus the data, a segment. Internet: an IP header, the TCP header and the data, a packet. Data link: an Ethernet header, IP, TCP, data and an FCS trailer, a frame — which depends on the medium, Ethernet or Wi-Fi. Physical: bits, 0110 1001 …. An arrow on the right points down. Bottom: then the bits go to the router and out into the network.ئیمەیڵێک لە ڕێگای دابەزینی بە پێنج چیندا. چینی ئەپ: دەقی ئیمەیڵەکە، ناوی دراوەیە. چینی گواستنەوە: سەردێڕێکی TCP لەگەڵ دراوەکە، بڕ. چینی ئینتەرنێت: سەردێڕێکی IP، سەردێڕی TCP و دراوەکە، پاکێت. چینی بەستەری دراوە: سەردێڕێکی Ethernet، IP، TCP، دراوە و پاشکۆی فرەیمی FCS، فرەیم — کە بەندە بە هۆکاری گواستنەوەکەوە، Ethernet یان وای‌فای. چینی فیزیکی: بیتەکان، 0110 1001 …. تیرێک لە ڕاست ڕووی لە خوارەوەیە. لە خوارەوە: پاشان بیتەکان دەچن بۆ ڕێدۆز و دەڕۆنە ناو ڕایەڵەوە.
Data, segment, packet, frame, bits: one e-mail, five names.، ، ، ، : یەک ، پێنج ناو.CêIT

Why TCP's unit is a segment and UDP's a datagram, and why neither is a packet, is explained in Segment, datagram, packet: the right words.

بۆچی یەکەی و یەکەی و بۆچی هیچیان نین، لە بڕ، داتاگرام، پاکێت: وشە دروستەکانـدا ڕوون کراوەتەوە.

Definitionپێناسە

The name of the unit of data at each layer: that layer's header (sometimes also a trailer) plus the data from the layer above. The PDUs are data, segment or datagram, packet, frame and bits.

ناوی یەکەی لە هەر چینێکدا: سەردێڕی ئەو چینە (هەندێک جار کۆتاییەکیش) لەگەڵ چینی سەرەوە. یەکەکان بریتین لە ، یان ، ، و .

Peers talk through their headersتاکەکان بە سەردێڕەکانیان قسە دەکەن

Each layer of host A talks to the same layer of host B: application, presentation and session exchange data; transport exchanges segments; network exchanges packets; data link exchanges frames; physical exchanges bits. The PDUs are how these peers keep in contact: the TCP header that A's transport layer writes is read only by B's transport layer. Only the physical layers are really joined by a wire; every other conversation goes down, across and up (peers and interfaces).

هەر چینێکی A لەگەڵ هەمان چینی B قسە دەکات: ، و ئاڵوگۆڕ دەکەن؛ ؛ ؛ ؛ . ئەو ڕێگایەن کە ئەم پێی پەیوەندییان دەپارێزن: ئەو سەردێڕە TCPـیەی A دەینووسێت تەنیا B دەیخوێنێتەوە. تەنیا بە ڕاستی بە وایەرێک بەیەکەوە بەستراون؛ هەموو گفتوگۆکانی تر دادەبەزن، تێدەپەڕن و سەردەکەونەوە (تاکەکان و نێوبەستەکان).

Host A and host B, each with the seven OSI layers. Dashed two-way arrows join each layer with the same layer opposite, labelled data, data, data at layers 7, 6 and 5, segments at 4, packets at 3, frames at 2, and a solid line labelled bits at layer 1. Bottom: only the bottom line is a real wire; every other conversation goes down, across and up.میوانگر A و میوانگر B، هەر یەکە بە حەوت چینەکەی OSI. تیری پچڕپچڕی دوولایەنە هەر چینێک بە هەمان چینی بەرانبەرەوە دەبەستن: دراوە، دراوە، دراوە لە چینەکانی 7، 6 و 5، بڕەکان لە 4، پاکێتەکان لە 3، فرەیمەکان لە 2 و هێڵێکی تەواو بە ناوی بیتەکان لە چینی 1. لە خوارەوە: تەنیا هێڵی خوارەوە وایەری ڕاستەقینەیە؛ هەموو گفتوگۆکانی تر دادەبەزن، تێدەپەڕن و سەردەکەونەوە.
Same layer to same layer, each with its own PDU.هەمان چین بۆ هەمان چین، هەر یەکە بە خۆی.CêIT

An address at every layerناونیشانێک لە هەر چینێکدا

The labels in the headers are what manage the communication. The physical layer adds timing and synchronisation bits — in Ethernet the preamble, so the receiver can lock on to the signal. The data link header holds the destination and source physical (MAC) addresses; the network header the destination and source logical (IP) addresses; the transport header the destination and source process numbers (ports). The upper layers carry the encoded application data, with names such as a web address.

نیشانەکانی ناو سەردێڕەکان پەیوەندییەکە بەڕێوە دەبەن. کات و هاوکاتکردن زیاد دەکات — لە Ethernetـدا ، تاکو وەرگر خۆی لەگەڵ ڕێک بخات. سەردێڕی ناونیشانی فیزیکی ()ی مەبەست و سەرچاوە هەڵدەگرێت؛ سەردێڕی ناونیشانی لۆجیکی ()ی مەبەست و سەرچاوە؛ سەردێڕی ژمارەی ()ی مەبەست و سەرچاوە. چینەکانی سەرەوە کۆدکراوی هەڵدەگرن، لەگەڵ ناوی وەک ناونیشانی وێب.

A table for the web page from Sulaymaniyah to Duhok, first hop. Upper layers: encoded application data and names — https://www.example.org/ — no change per hop. Transport: source and destination ports — 443 to 51514 — no change. Network: source and destination IP addresses — 203.0.113.80 to 198.51.100.25 — no change. Data link: source and destination MAC addresses — 00:00:5e:00:53:01 to …:53:02 — changes at every hop. Physical: timing and sync bits, the preamble 10101010 … 10101011 — new on every hop. Bottom: IP addresses and ports stay end to end; MAC addresses and the signal are new on every hop.خشتەیەک بۆ لاپەڕەکەی سلێمانی بۆ دهۆک، یەکەم باز. چینەکانی سەرەوە: دراوەی کۆدکراوی ئەپ و ناو — https://www.example.org/ — لە هەر بازێکدا ناگۆڕێت. چینی گواستنەوە: پۆرتی سەرچاوە و مەبەست — 443 بۆ 51514 — ناگۆڕێت. چینی ڕایەڵە: ناونیشانی IPـی سەرچاوە و مەبەست — 203.0.113.80 بۆ 198.51.100.25 — ناگۆڕێت. چینی بەستەری دراوە: ناونیشانی MACـی سەرچاوە و مەبەست — 00:00:5e:00:53:01 بۆ …:53:02 — لە هەر بازێکدا دەگۆڕێت. چینی فیزیکی: بیتەکانی کات و هاوکاتکردن، پێشەکیی فرەیم 10101010 … 10101011 — لە هەر بازێکدا نوێیە. لە خوارەوە: ناونیشانەکانی IP و پۆرتەکان لە سەرێکەوە بۆ سەرەکەی تر وەک خۆیان دەمێننەوە؛ ناونیشانەکانی MAC و سیگناڵ لە هەر بازێکدا نوێن.
Ports and IP addresses travel end to end; MAC addresses only one hop. و لە سەرێکەوە بۆ سەرەکەی تر دەڕۆن؛ تەنیا یەک باز.CêIT

A home router that does NAT is the one exception you meet every day: it rewrites the private source address and port (see NAT). How the next MAC address is found is in ARP, and the port numbers themselves in Port numbers and sockets.

ماڵ کە دەکات تاکە جیاوازییە کە ڕۆژانە دەیبینیت: ناونیشانی تایبەتی سەرچاوە و دەگۆڕێت (بڕوانە NAT). چۆنییەتیی دۆزینەوەی دواتر لە ARPـدایە و خودی ژمارەکانی لە ژمارەی پۆرت و سۆکێتەکانـدا.

The OSI story: seven steps down, seven steps upچیرۆکی OSI: حەوت هەنگاو بۆ خوارەوە، حەوت هەنگاو بۆ سەرەوە

Data flows when two devices share a medium. The OSI model tells it in seven steps each way:

ڕەوتی ڕوو دەدات کاتێک دوو ئامێر بەش دەکەن. بە حەوت هەنگاو بۆ هەر لایەک دەیگێڕێتەوە:

Sendingناردن
  1. An application on the source creates the data (application layer).

    لەسەر سەرچاوەکە دروست دەکات ().

  2. The data is encrypted (presentation layer).

    شفرە دەکرێت ().

  3. A session ID is added (session layer).

    زیاد دەکرێت ().

  4. Transport cuts it into segments, each with the receiving program's port.

    دەیکات بە ، هەر یەکەیان بە بەرنامەی وەرگر.

  5. Network adds the source and destination IP addresses: the segment becomes a packet.

    سەرچاوە و مەبەست زیاد دەکات: دەبێتە .

  6. Data link adds the MAC addresses and the CRC: now it is a frame.

    و CRC زیاد دەکات: ئێستا .

  7. Physical turns the frame into a signal of bits.

    دەکاتە .

Receivingوەرگرتن
  1. The destination reads the bits as a frame.

    مەبەست وەک دەخوێنێتەوە.

  2. It removes the MAC addresses and CRC and passes the rest up.

    و CRC لادەبات و ئەوەی ماوە دەیداتە سەرەوە.

  3. The IP addresses are removed and the packet goes up to transport.

    لادەبرێن و بۆ دەچێتە سەرەوە.

  4. The port number picks the program that gets the segment.

    ژمارەی ئەو بەرنامەیە هەڵدەبژێرێت کە وەردەگرێت.

  5. The session ID is used.

    بەکار دەهێنرێت.

  6. The encryption is removed.

    شفرەکە دەکرێتەوە.

  7. The original data reaches the application.

    ئەسڵییەکە دەگاتە .

Worked example: from X to Y through three routersنموونەی کارپێکراو: لە X بۆ Y بە سێ ڕێدۆزدا

Exam task: draw the data flow when host X sends to host Y through routers A, B and C. X uses all seven layers on the way down, and Y uses all seven on the way up. Each router uses only layers 1–3: it receives the bits, rebuilds the frame, reads the IP header to choose the next hop, and sends a new frame down to its physical layer. So between the sending host and the receiving host, the data flow involves only layers one, two and three.

ئەرکی تاقیکردنەوە: ڕەوتی بکێشە کاتێک X بە ناو A، B و Cـدا بۆ Y دەنێرێت. X هەر حەوت چینەکە لە دابەزیندا بەکار دەهێنێت و Y هەر حەوتەکە لە سەرکەوتندا. هەر تەنیا چینەکانی 1 تا 3 بەکار دەهێنێت: وەردەگرێت، دروست دەکاتەوە، سەردێڕی IP دەخوێنێتەوە بۆ هەڵبژاردنی و نوێ دەنێرێتە خوارەوە بۆ . کەواتە لە نێوان نێرەر و وەرگردا ڕەوتی تەنیا چینەکانی یەک، دوو و سێ دەگرێتەوە.

Top: X in Sulaymaniyah, router A at the Sulaymaniyah ISP, router B in Erbil, router C at the Duhok ISP and Y in Duhok, joined by links. Below: X's seven-layer stack, three router stacks with only layers 3, 2 and 1, and Y's seven-layer stack. An orange path goes down X from layer 7 to layer 1, up to layer 3 and down again in each router, and up Y from layer 1 to layer 7. Bottom: each router opens the frame, reads the IP header to choose the next hop, and builds a new frame.لە سەرەوە: X لە سلێمانی، ڕێدۆز A لە ISPـی سلێمانی، ڕێدۆز B لە هەولێر، ڕێدۆز C لە ISPـی دهۆک و Y لە دهۆک، بە بەستەر بەیەکەوە بەستراون. لە خوارەوە: ستوونی حەوت چینیی X، سێ ستوونی ڕێدۆز کە تەنیا چینەکانی 3، 2 و 1یان هەیە و ستوونی حەوت چینیی Y. ڕێڕەوێکی نارنجی لە X لە چینی 7ـەوە بۆ چینی 1 دادەبەزێت، لە هەر ڕێدۆزێکدا تا چینی 3 سەردەکەوێت و دادەبەزێتەوە و لە Y لە چینی 1ـەوە تا چینی 7 سەردەکەوێت. لە خوارەوە: هەر ڕێدۆزێک فرەیمەکە دەکاتەوە، سەردێڕی IP دەخوێنێتەوە بۆ هەڵبژاردنی بازی دواتر و فرەیمێکی نوێ دروست دەکات.
Hosts use seven layers; routers in between use three. حەوت چین بەکار دەهێنن؛ نێوانیان سێ.CêIT

Which MAC addresses go into each new frame is the A-to-P example in OSI layers 1–3; how routers choose the next hop is in how packets are routed. Try it in the CêIT network lab: build “three networks and two routers” and send a ping.

کام دەچنە ناو هەر نوێوە لە نموونەی A بۆ Pـی چینەکانی 1 تا 3ی OSIـدایە؛ چۆنییەتیی هەڵبژاردنی لەلایەن لە پاکێتەکان چۆن ڕێگا دەدۆزنەوەـدایە. لە تاقیگەی ڕایەڵەی CêIT تاقی بکەرەوە: «سێ و دوو » دروست بکە و بنێرە.

How many bytes are headers?چەند بایت سەردێڕن؟

An Ethernet frame carries at most 1,500 bytes of packet: its MTU. Around it go a 14-byte header and a 4-byte FCS (1,518 bytes), and on the wire an 8-byte preamble before it and a gap of 12 byte-times after it. Inside, IPv4 and TCP headers take at least 20 bytes each, so a full frame carries at most 1,460 bytes of TCP data:

Ethernet لە ⁦1,500⁩ زیاتر هەڵناگرێت: ئەمە . لە دەوریدا سەردێڕێکی ⁦14⁩ و FCSـێکی 4 دێت (⁦1,518⁩ ) و لەسەر وایەریش 8 پێشی دەکەوێت و بۆشاییەکی ⁦12⁩ دوای دێت. لە ناویدا سەردێڕەکانی ⁦IPv4⁩ و TCP هەر یەکەیان لانیکەم ⁦20⁩ دەگرن، بۆیە پڕ لە ⁦1,460⁩ زیاتر TCP هەڵناگرێت:

14608+14+20+20+1460+4+12=14601538≈94.9%\frac{1460}{8 + 14 + 20 + 20 + 1460 + 4 + 12} = \frac{1460}{1538} \approx 94.9\%

A full frame spends about 95 % of the wire's time on your data.

پڕ نزیکەی ⁦95⁩٪ی کاتی وایەرەکە بۆ خۆت بەکار دەهێنێت.

Two bars. A full-size Ethernet frame with TCP/IPv4, 1,538 byte-times on the wire: preamble and SFD 8, Ethernet header 14 plus FCS 4, IP header 20, TCP header 20, data 1,460 and a gap of 12 between frames; your data is 1,460 B, 94.9 %. One key press, 1 byte of data: the frame is padded to the 64-byte minimum — 8, 14, 20, 20, 1 byte of data, 5 bytes of padding, 4 and a 12-byte gap; the data is 1 of 84, 1.2 %. Bottom: big packets waste little; tiny packets are mostly headers.دوو شریت. فرەیمێکی Ethernetـی پڕ لەگەڵ TCP/IPv4، 1,538 کاتی بایت لەسەر وایەر: پێشەکیی فرەیم و SFD 8، سەردێڕی Ethernet 14 لەگەڵ FCS 4، سەردێڕی IP 20، سەردێڕی TCP 20، دراوە 1,460 و بۆشاییەکی 12 لە نێوان فرەیمەکاندا؛ دراوەی خۆت 1,460 B، 94.9٪. لێدانی یەک دوگمە، یەک بایت دراوە: فرەیمەکە پڕ دەکرێتەوە تا کەمترین قەبارە، 64 بایت — 8، 14، 20، 20، یەک بایت دراوە، 5 بایت پڕکەرەوە، 4 و بۆشاییەکی 12 بایتی؛ دراوەکە 1 لە 84ـە، 1.2٪. لە خوارەوە: پاکێتەکانی گەورە کەم بە فیڕۆ دەدەن؛ پاکێتەکانی زۆر بچووک زۆربەیان سەردێڕن.
Headers are a small tax on big packets and a heavy one on tiny ones.سەردێڕەکان باجێکی بچووکن لەسەر گەورە و قورسن لەسەر بچووکەکان.CêIT

Every field of the frame is shown in Inside an Ethernet II frame, and why other links have other MTUs in Media independent — but every link has an MTU.

هەموو بەشەکانی لە ناو فرەیمێکی Ethernet IIـدا دەبینیت و بۆچی بەستەرەکانی تر جیاوازیان هەیە لە MTU لە هەر بەستەرێکداـدا.

Common mistakesهەڵە باوەکان

  • “Headers are added at the receiver.” They are added going down at the sender and removed going up at the receiver.
  • Mixing up the PDU names. Segment (transport), packet (network/internet), frame (data link), bits (physical).
  • Putting the trailer on every layer. Only the data link layer adds a trailer (the FCS).
  • “Routers open the segment.” Routers stop at layer 3; only the end hosts read TCP and the application data.
  • “The IP address changes at every router.” The MAC addresses do; the IP addresses stay (except where NAT rewrites them).
  • “Every application adds a header.” HTTP and DNS do; some applications send plain data.
  • «سەردێڕ لە وەرگردا زیاد دەکرێت.» لە نێرەردا لە دابەزیندا زیاد دەکرێت و لە وەرگردا لە سەرکەوتندا لادەبرێت.
  • تێکەڵکردنی ناوی . ()، ( / چینی )، ()، ().
  • دانانی بۆ هەموو چینێک. تەنیا ⁦(FCS)⁩ زیاد دەکات.
  • « دەکەنەوە.» لە چینی 3دا دەوەستن؛ تەنیا سەرەتا و کۆتایی TCP و دەخوێننەوە.
  • « لە هەر دەگۆڕێت.» دەگۆڕێن؛ وەک خۆیان دەمێننەوە (جگە لەو شوێنەی دەیانگۆڕێت).
  • «هەموو سەردێڕ زیاد دەکات.» و زیادی دەکەن؛ هەندێک ڕووت دەنێرن.

Exercisesڕاهێنانەکان

ExerciseڕاهێنانBytes of a small web requestبایتەکانی داواکارییەکی بچووکی وێب

A browser sends an HTTP message of 300 bytes over TCP, IPv4 and Ethernet (20-byte TCP and IP headers). How big are (a) the segment, (b) the packet, (c) the frame, (d) the time on the wire in byte-times, with the 8-byte preamble and the 12-byte gap? (e) What share of that time is the HTTP message?

پەیامێکی HTTPـی ⁦300⁩ بە TCP، ⁦IPv4⁩ و Ethernet دەنێرێت (سەردێڕی ⁦20⁩ TCP و IP). قەبارەی (أ) ، (ب) ، (ج) ، (د) کاتی سەر وایەر بە کاتی ، لەگەڵ 8 و بۆشایی ⁦12⁩ ، چەندە؟ (هـ) چەند لەو کاتە پەیامی HTTPـەکەیە؟

Show answerوەڵامەکە پیشان بدە
segment=300+20=320packet=320+20=340frame=340+14+4=358wire=358+8+12=378300378≈79.4%\begin{aligned} \text{segment} &= 300 + 20 = 320 \\ \text{packet} &= 320 + 20 = 340 \\ \text{frame} &= 340 + 14 + 4 = 358 \\ \text{wire} &= 358 + 8 + 12 = 378 \\ \tfrac{300}{378} &\approx 79.4\% \end{aligned}

(a) 320 bytes, (b) 340 bytes, (c) 358 bytes, (d) 378 byte-times, (e) about 79 %.

(أ) ⁦320⁩ ، (ب) ⁦340⁩ ، (ج) ⁦358⁩ ، (د) ⁦378⁩ کاتی ، (هـ) نزیکەی ⁦79⁩٪.

ExerciseڕاهێنانWhich header is outside?کام سەردێڕ لە دەرەوەیە؟

A frame holds an IP header, an HTTP header, an Ethernet header, a TCP header, the data and an FCS. Put them in order from the first byte on the wire to the last, and say which layer removes each part at the receiver.

سەردێڕێکی IP، ، سەردێڕێکی Ethernet، سەردێڕێکی TCP، و FCSـێکی تێدایە. ڕیزیان بکە لە یەکەم سەر وایەرەوە تا دوایین و بڵێ لە وەرگردا کام چین هەر بەشێک لادەبات.

Show answerوەڵامەکە پیشان بدە
  • Ethernet header → IP header → TCP header → HTTP header → data → FCS.
  • Data link removes the Ethernet header and FCS; internet removes the IP header; transport removes the TCP header; the browser reads the HTTP header and the data.
  • سەردێڕی Ethernet ← سەردێڕی IP ← سەردێڕی TCP ← ← ← FCS.
  • سەردێڕی Ethernet و FCS لادەبات؛ چینی سەردێڕی IP؛ سەردێڕی TCP؛ و دەخوێنێتەوە.
Review questionsپرسیارەکانی پێداچوونەوە
In the OSI model, as a data packet moves from the lower to the upper layers, headers are ___ (added, removed, rearranged, randomised).لە مۆدێلی OSIـدا، کاتێک پاکێتێکی دراوە لە چینەکانی خوارەوە بۆ سەرەوە دەڕوات، سەردێڕەکان ⁦___⁩ (زیاد دەکرێن، لادەبرێن، ڕیز دەکرێنەوە، هەڕەمەکی دەکرێن).

Removed.

لادەبرێن.

And from the upper to the lower layers?و لە چینەکانی سەرەوە بۆ خوارەوە؟

Added.

زیاد دەکرێن.

True or false: as a packet moves from the lower to the upper layers, headers are added.ڕاست یان هەڵە: کاتێک پاکێتێک لە چینەکانی خوارەوە بۆ سەرەوە دەڕوات، سەردێڕ زیاد دەکرێت.

False: going up they are removed.

هەڵەیە: لە سەرکەوتندا لادەبرێن.

Name the PDU at each layer, top to bottom.یەکەی دراوەی پرۆتۆکۆڵ لە هەر چینێکدا ناو بهێنە، لە سەرەوە بۆ خوارەوە.

Data, segment (or datagram), packet, frame, bits.

، (یان )، ، ، .

Summaryپوختە

  • Encapsulation: going down, each layer adds its control information — a header, and at the data link layer a trailer. Decapsulation: going up, each layer checks and removes its own part.
  • PDUs: data (application), segment or datagram (transport), packet (internet), frame (data link), bits (physical).
  • The application header may or may not exist: HTTP and DNS have one.
  • Peers talk through their headers: the header a layer writes is read by the same layer on the other side.
  • An address at every layer: timing bits (preamble), MAC addresses (change every hop), IP addresses and ports (end to end), application names.
  • Hosts use all the layers; routers use layers 1–3 and build a new frame for every hop. A full Ethernet frame carries at most 1,460 bytes of TCP data (about 95 % of the wire time).
  • : لە دابەزیندا هەر چینێک زانیاریی کۆنترۆڵی خۆی زیاد دەکات — سەردێڕێک و لە . : لە سەرکەوتندا هەر چینێک بەشەکەی خۆی دەپشکنێت و لای دەبات.
  • : ()، یان ()، (چینی )، ()، ().
  • سەردێڕی لەوانەیە هەبێت و لەوانەیە نەبێت: و هەیانە.
  • بە سەردێڕەکانیان قسە دەکەن: ئەو سەردێڕەی چینێک دەینووسێت هەمان چین لە لاکەی تر دەیخوێنێتەوە.
  • ناونیشانێک لە هەر چینێکدا: کات ()، (لە هەر بازێکدا دەگۆڕێن)، و (لە سەرێکەوە بۆ سەرەکەی تر)، ناوی .
  • هەموو چینەکان بەکار دەهێنن؛ چینەکانی 1 تا 3 بەکار دەهێنن و بۆ هەر بازێک نوێ دروست دەکەن. Ethernetـی پڕ لە ⁦1,460⁩ زیاتر TCP هەڵناگرێت (نزیکەی ⁦95⁩٪ی کاتی وایەر).

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

Copper Cables, Connectors and Cabling Hardwareکێبڵی مس، سەرەکانی کێبڵ و کەرەستەکانی کێبڵکاری

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.

Appearanceڕووکار

Modeدۆخ
Styleشێواز
Coloursڕەنگەکان

Saved on this device only.تەنیا لەسەر ئەم ئامێرە پاشەکەوت دەکرێت.