Lecture 01 · Introduction

المحاضرة 01 · مقدمة

The TCP/IP stack, PDUs and addresses

مكدّس TCP/IP ووحدات البيانات (PDUs) والعناوين

Slides 22–29الشرائح 22–29 P1 MUSTP1 ضروري

Five layers, five PDUs, three scopes, three addresses, and the place in a computer where each layer runs. This is the most table-shaped block in the course, which makes it the best source of matching questions.

خمس طبقات، وخمس PDUs، وثلاثة نطاقات، وثلاثة عناوين، والمكان داخل الحاسوب الذي تعمل فيه كل طبقة. هذا أكثر أجزاء المقرر شبهاً بالجداول، ولهذا هو أفضل مصدر لأسئلة التوصيل.

High exam riskاحتمال عالٍ في الامتحان

Slides 25, 26 and 27 are three tables, and a matching question can be built from any column of any of them: layer to PDU, layer to payload, layer to connection type, layer to address. Learn the big table further down this page until you can fill it in blank, including the bit widths.

الشرائح 25 و26 و27 ثلاثة جداول، ويمكن بناء سؤال توصيل من أي عمود فيها: الطبقة إلى PDU، والطبقة إلى payload، والطبقة إلى نوع الاتصال، والطبقة إلى العنوان. احفظ الجدول الكبير أسفل هذه الصفحة حتى تستطيع ملأه فارغاً، بما في ذلك عدد البتات.

One purpose: connectivity

غاية واحدة: الاتصالية (connectivity)

Slide 22 opens the Internet section with one sentence: the purpose of the TCP/IP stack is to provide connectivity between the client and server. In the lamp system, the browser sends PUT /lamp/state to a server that might be on another continent, and neither program knows the path in between. The stack is what hides that path.

تفتتح الشريحة 22 قسم الإنترنت بجملة واحدة: غرض TCP/IP stack هو توفير الاتصال (connectivity) بين client وserver. في نظام المصباح يرسل المتصفح PUT /lamp/state إلى server قد يكون في قارة أخرى، ولا يعرف أي من البرنامجين المسار بينهما. الـ stack هو الذي يخفي ذلك المسار.

Slide 23 explains why it is split: connectivity is a complex problem, so the Internet divides it into layers, five of them in the TCP/IP stack. Each layer provides one or more functionalities, and connectivity emerges from the interaction between the functionalities at the different layers.

وتشرح الشريحة 23 سبب التقسيم: الاتصال مشكلة معقّدة، فيقسمها الإنترنت إلى طبقات، خمس منها في TCP/IP stack. كل طبقة تقدّم وظيفة أو أكثر، والاتصال ينبثق (emerges) من التفاعل بين وظائف الطبقات المختلفة.

Connectivity = PL + DLL + NL + TL + AL Read the plus signs as composition, not arithmetic. No single layer delivers a web page.

Connectivity = PL + DLL + NL + TL + AL. اقرأ علامات الجمع على أنها تركيب لا عملية حسابية، فلا توجد طبقة واحدة تسلّم صفحة ويب وحدها.

LayerالطبقةAbbrev.الاختصارOne-line jobوظيفتها في سطرExample protocolsأمثلة على البروتوكولات
Applicationالتطبيق (Application)ALSupports network applicationsتدعم تطبيقات الشبكةHTTP, SMTP, IMAP, FTP
Transportالنقل (Transport)TLProcess-to-process deliveryالتوصيل من عملية إلى عملية (process-to-process)TCP, UDP
Networkالشبكة (Network)NLRoutes packets from source host to destination hostتوجّه الحزم من المضيف المصدر إلى المضيف الوجهةIP
Data linkربط البيانات (Data link)DLLMoves frames between neighbouring interfacesتنقل الإطارات (frames) بين الواجهات المتجاورةEthernet, Wi-Fi (802.11), PPP
Physicalالفيزيائية (Physical)PLPuts bits on the wire or into the airتضع البتات على السلك أو في الهواءSignal encodings of Ethernet and Wi-Fiترميزات الإشارة في Ethernet وWi-Fi

The payoff of layering is modularity: a layer can change internally without the others noticing. Swap Wi-Fi for 5G and HTTP does not change a single byte.

ثمرة التقسيم إلى طبقات هي النمطية (modularity): تستطيع طبقة أن تتغيّر داخلياً دون أن تلاحظ الطبقات الأخرى. استبدل Wi-Fi بـ 5G ولن يتغيّر بايت واحد في HTTP.

Five layers versus seven

خمس طبقات مقابل سبع

The previous pages used OSI as the example of a layered system. OSI has seven layers; TCP/IP has five. The two missing ones are session and presentation: TCP/IP folds them into the application layer, so if an application needs those functions it implements them itself.

استخدمت الصفحات السابقة OSI مثالاً على النظام الطبقي. لـ OSI سبع طبقات، ولـ TCP/IP خمس. والطبقتان الغائبتان هما session وpresentation: يدمجهما TCP/IP في طبقة التطبيق، فإن احتاج تطبيق إلى تلك الوظائف نفّذها بنفسه.

OSI (7)TCP/IP (5)
7 Application7 التطبيق (Application)Applicationالتطبيق (Application)
6 Presentation6 العرض (Presentation)
5 Session5 الجلسة (Session)
4 Transport4 النقل (Transport)Transportالنقل (Transport)
3 Network3 الشبكة (Network)Networkالشبكة (Network)
2 Data link2 ربط البيانات (Data link)Data linkربط البيانات (Data link)
1 Physical1 الفيزيائية (Physical)Physicalالفيزيائية (Physical)

Slide 24 places the stack in a whole system: Users on top (a control room with dashboards), the five-layer TCP/IP band in the middle, and Sensing and Actuation at the bottom (an HC-SR04 distance sensor and a Raspberry Pi Pico). Users and sensing are the two endpoints the stack serves. They are not extra layers of TCP/IP.

تضع الشريحة 24 الـ stack داخل نظام كامل: Users في الأعلى (غرفة تحكّم بلوحات عرض)، وشريط TCP/IP ذو الطبقات الخمس في الوسط، وSensing and Actuation في الأسفل (حسّاس مسافة HC-SR04 ولوحة Raspberry Pi Pico). المستخدمون والاستشعار هما الطرفان اللذان يخدمهما الـ stack، وليسا طبقتين إضافيتين في TCP/IP.

Encapsulation and PDUs

التغليف (Encapsulation) ووحدات البيانات (PDUs)

Each layer's unit of data is its protocol data unit (PDU). Going down the sender's stack, each layer puts its own header in front of whatever the layer above handed it. That is encapsulation, and it follows one rule:

وحدة البيانات في كل طبقة هي الـ protocol data unit (PDU) الخاصة بها. عند النزول في stack المرسل، تضع كل طبقة header خاصاً بها أمام ما سلّمتها إياه الطبقة التي فوقها. هذا هو الـ encapsulation، وله قاعدة واحدة:

PDU of layer n = headern + PDU of layer n + 1 (the payload) The link layer also adds a trailer (a CRC frame check sequence) behind the payload.

PDU الطبقة n يساوي header تلك الطبقة زائد PDU الطبقة n + 1، وهذا هو الـ payload. وطبقة الربط تضيف أيضاً trailer (CRC) خلف الـ payload.

Application Transport Network Data link Physical GET /lamp ... message TCP hdr message segment IP hdr segment packet MAC hdr packet CRC frame 0110 1001 0010 1110 1011 0001 ... bits
Going down, each layer wraps the PDU above it. Going up at the receiver, each layer reads and removes only its own header. The payload is never rewritten.
في النزول، تغلّف كل طبقة الـ PDU القادمة من الطبقة التي فوقها. وفي الصعود عند المستقبِل، تقرأ كل طبقة ترويستها (header) وحدها وتزيلها. والحمولة (payload) لا يُعاد كتابتها أبداً.

Slide 25's table, corrected where it slips:

جدول الشريحة 25، مع تصحيح مواضع الخطأ فيه:

LayerالطبقةPDUPayload (content)الحمولة (المحتوى)Protocolsالبروتوكولات
Applicationالتطبيق (Application)Messageرسالة (Message)Bytes (application data)بايتات (بيانات التطبيق)HTTP, SMTP, FTP
Transportالنقل (Transport)Segment (TCP), datagram (UDP)مقطع (Segment) في TCP، وdatagram في UDPMessageرسالة (Message)TCP, UDP
Networkالشبكة (Network)Packet (also called datagram)حزمة (Packet)، وتُسمّى أيضاً datagramSegmentمقطع (Segment)IP
Data linkربط البيانات (Data link)Frameإطار (Frame)Packetحزمة (Packet)Ethernet, PPP, Wi-Fi
Physicalالفيزيائية (Physical)Bitsبتات (Bits)N/A on the slide (the frame, as signals)غير مذكور في الشريحة (الإطار على شكل إشارات)N/A on the slideغير مذكور في الشريحة
Where slide 25 slipsأين تخطئ الشريحة 25

"email" is listed as a protocol. Email is an application; its protocols are SMTP (sending) and IMAP (reading). "MAC addresses" is listed as a protocol. It is the addressing scheme used by link protocols such as Ethernet and Wi-Fi. If the exam reproduces the slide's table, answer with the slide; if it asks what a protocol is, do not call email or MAC addresses protocols.

الشريحة تذكر "email" بروتوكولاً. البريد تطبيق، وبروتوكولاته SMTP (للإرسال) وIMAP (للقراءة). وتذكر "MAC addresses" بروتوكولاً. وهي نظام العنونة الذي تستخدمه بروتوكولات الربط مثل Ethernet وWi-Fi. إن نقل الامتحان جدول الشريحة فأجب بما فيها، وإن سأل ما هو البروتوكول فلا تسمِّ البريد أو عناوين MAC بروتوكولات.

The pink box says "the message is broken into segments". True for TCP, which splits a byte stream; UDP sends each message as one datagram.

والصندوق الوردي يقول "الرسالة تُقسَّم إلى segments". هذا صحيح في TCP الذي يقسّم تدفق البايتات، أما UDP فيرسل كل رسالة في datagram واحد.

Who reads which header

من يقرأ أي ترويسة

Encapsulation is also what keeps the middle of the network simple. A router processes only the network, link and physical layers: it reads the IP header to choose the next hop and never opens the segment. A switch processes only link and physical. Only the two end hosts read the transport header and the application message. The IP header carries a Protocol field that tells the receiving host whether to hand the payload to TCP or UDP.

الـ encapsulation هو أيضاً ما يُبقي وسط الشبكة بسيطاً. الـ router يعالج طبقات network وlink وphysical فقط: يقرأ IP header ليختار القفزة التالية ولا يفتح الـ segment أبداً. والـ switch يعالج link وphysical فقط. والطرفان النهائيان وحدهما يقرآن transport header ورسالة التطبيق. ويحمل IP header حقلاً اسمه Protocol يخبر المضيف المستقبِل هل يسلّم الـ payload إلى TCP أم UDP.

Three scopes, three addresses

ثلاثة نطاقات وثلاثة عناوين

Slides 26 and 27 add two columns to the same layer list. Each layer connects a different kind of thing, so each needs a different scope and a different address.

تضيف الشريحتان 26 و27 عمودين إلى قائمة الطبقات نفسها. كل طبقة تربط نوعاً مختلفاً من الأشياء، فتحتاج كل منها نطاقاً مختلفاً وعنواناً مختلفاً.

Laptop 10.0.0.7:51514 Router 1 Router 2 Server 3.120.0.10:443 E2E, transport: port to port (one, virtual) H2H, network: IP to IP (one, virtual) P2P hop 1 hop 2 hop 3 MAC pair A pair B pair C IP addresses and ports unchanged end to end (ignoring NAT). MAC addresses rewritten at every hop.
Slides 26 to 28 on one path. Higher layer, wider scope, more virtual connection. Only the P2P links are real cables or radio channels.
الشرائح من 26 إلى 28 على مسار واحد. كلما ارتفعت الطبقة اتسع النطاق وصار الاتصال افتراضياً أكثر. وحدها روابط P2P كوابل حقيقية أو قنوات راديوية.

The matching table

جدول التوصيل

This is the one table to learn cold. Every column is a possible matching question.

هذا هو الجدول الوحيد الذي يجب حفظه تماماً. كل عمود فيه سؤال توصيل محتمل.

LayerالطبقةPDUScopeالنطاقTypeالنوعAddressالعنوانBitsالبتاتChanges per hop?يتغيّر في كل قفزة؟
Applicationالتطبيق (Application)Messageرسالة (Message)(rides on E2E)(تسير فوق E2E)n/aلا ينطبقnone (names, URLs)لا يوجد (أسماء، URLs)n/aلا ينطبقNoلا
Transportالنقل (Transport)Segmentمقطع (Segment)E2E, app to appE2E، من تطبيق إلى تطبيقLogicalمنطقي (Logical)Port numberرقم المنفذ (Port number)16Noلا
Networkالشبكة (Network)Packetحزمة (Packet)H2H, machine to machineH2H، من جهاز إلى جهازLogicalمنطقي (Logical)IP address (IPv4)عنوان IP (IPv4)32No (ignoring NAT)لا (بتجاهل NAT)
Data linkربط البيانات (Data link)Frameإطار (Frame)P2P, NIC to NICP2P، من بطاقة شبكة إلى بطاقة شبكة (NIC to NIC)Physicalفيزيائي (Physical)MAC addressعنوان MAC48Yes, every hopنعم، في كل قفزة
Physicalالفيزيائية (Physical)Bitsبتات (Bits)(the medium)(الوسط الناقل)n/aلا ينطبقnoneلا يوجدn/aلا ينطبقn/aلا ينطبق

Why the MAC changes and the IP does not: a MAC address only has meaning on one link. At every hop the router strips the old frame and builds a new one for the next link, using ARP to map the next hop's IP address to its MAC address. The IP and port scopes span the whole path, so they stay. Your laptop never learns the server's MAC address, only its own gateway's.

لماذا يتغيّر MAC ولا يتغيّر IP: عنوان MAC له معنى على رابط واحد فقط. عند كل قفزة يزيل الـ router الإطار القديم ويبني إطاراً جديداً للرابط التالي، مستخدماً ARP لربط عنوان IP للقفزة التالية بعنوان MAC الخاص بها. أما نطاقا IP وport فيمتدان على المسار كله فيبقيان. وحاسوبك لا يعرف أبداً عنوان MAC للـ server، بل عنوان البوابة الخاصة به فقط.

Worked: counting connectionsمثال محلول: عدّ الاتصالات

A laptop reaches a server through 4 routers. How many E2E, H2H and P2P connections are there?

حاسوب يصل إلى server عبر 4 موجّهات. كم اتصالاً من نوع E2E وH2H وP2P يوجد؟

E2E: 1 (process to process). H2H: 1 (host to host). P2P: routers + 1 = 5 links: laptop to R1, R1 to R2, R2 to R3, R3 to R4, R4 to server.

E2E: 1 (من عملية إلى عملية). H2H: 1 (من مضيف إلى مضيف). P2P: عدد الموجّهات زائد واحد، أي 5 روابط: laptop → R1، R1 → R2، R2 → R3، R3 → R4، R4 → server.

So the destination MAC address is written 5 times along the way, while the destination IP address is written once and never changes.

إذن يُكتب عنوان MAC للوجهة 5 مرات على طول الطريق، بينما يُكتب عنوان IP للوجهة مرة واحدة ولا يتغيّر أبداً.

Sockets and the 5-tuple

المقابس (Sockets) والـ 5-tuple

Slide 28 draws the three scopes as three lines and circles the top-left pair: Socket = IP address + port number. A socket is one endpoint. A connection is a pair of sockets, one at each end. To tell flows apart, networks add the protocol and use the 5-tuple.

ترسم الشريحة 28 النطاقات الثلاثة ثلاثة خطوط وتحيط الزوج العلوي الأيسر بدائرة: Socket = IP address + port number. الـ socket طرف واحد. والاتصال زوج من sockets، واحد عند كل طرف. ولتمييز التدفقات تضيف الشبكات البروتوكول وتستخدم الـ 5-tuple.

socket = (IP, port)connection = (socketclient, socketserver)flow = (protocol, src IP, src port, dst IP, dst port)

socket = (IP, port)، وconnection زوج من sockets، وflow = (protocol, src IP, src port, dst IP, dst port).

Worked: two tabs, one serverمثال محلول: تبويبان وخادم واحد

Two Chrome tabs on one laptop (10.0.0.7) open TCP connections to 3.120.0.10:443. Tab A gets source port 51514, tab B gets 51515.

تبويبان في Chrome على حاسوب واحد (10.0.0.7) يفتحان اتصالي TCP إلى 3.120.0.10:443. يأخذ التبويب A المنفذ المصدر 51514، والتبويب B المنفذ 51515.

The two 5-tuples are (TCP, 10.0.0.7, 51514, 3.120.0.10, 443) and (TCP, 10.0.0.7, 51515, 3.120.0.10, 443). Only the source port differs, and that is enough for the OS to deliver each reply to the right tab. The MAC address plays no part: it covers one hop and would change before the reply came back.

الـ 5-tuples هما (TCP, 10.0.0.7, 51514, 3.120.0.10, 443) و(TCP, 10.0.0.7, 51515, 3.120.0.10, 443). المنفذ المصدر وحده مختلف، وهذا يكفي ليسلّم نظام التشغيل كل رد إلى التبويب الصحيح. ولا دور لعنوان MAC: فهو يغطي قفزة واحدة وسيتغيّر قبل أن يعود الرد.

The slide's pink box, "a connection is identified using a combination of IP address and port number", is incomplete: one IP plus one port names only one socket. A connection needs both endpoints' IPs and ports, plus the protocol to tell a TCP flow from a UDP flow on the same numbers.

الصندوق الوردي في الشريحة، "يُعرَّف الاتصال بمزيج من عنوان IP ورقم المنفذ"، ناقص: IP واحد مع port واحد يسمّي socket واحداً فقط. الاتصال يحتاج عناوين IP ومنافذ الطرفين معاً، زائد البروتوكول لتمييز تدفق TCP عن تدفق UDP بالأرقام نفسها.

Where the stack lives in one computer

أين يعيش المكدّس داخل حاسوب واحد

Slide 29, figure (a), cuts a computer into three spaces separated by two seams. Figure (b) is the concrete web stack: browser or server, HTTP, socket API, TCP, IP, Ethernet, wired or wireless.

الشريحة 29، الشكل (a)، تقسم الحاسوب إلى ثلاث مساحات يفصل بينها حدّان. والشكل (b) هو web stack الملموس: المتصفح أو الـ server، ثم HTTP، ثم socket API، ثم TCP، ثم IP، ثم Ethernet، ثم وسط سلكي أو لاسلكي.

SpaceالحيّزLayersالطبقاتWeb stack (b)مكدّس الويب (b)Seam below itالحد الفاصل تحته
Application spaceحيّز التطبيقات (Application space)ALBrowser or server, HTTPالمتصفح أو الـ server، وHTTPSocket APISocket API
Operating system (kernel)نظام التشغيل (النواة، kernel)TL, NLTCP, IPDriversبرامج التشغيل (Drivers)
Hardware (NIC)العتاد (NIC)DLL, PLEthernet, wired or wirelessEthernet، سلكي أو لاسلكيn/aلا ينطبق

HTTP is a library inside the browser or server process, not part of the OS; the OS only sees bytes written to a socket. TCP and IP live in the kernel, reached through the socket API. One refinement on the slide: the link layer is not purely hardware, because part of its processing runs in the driver on the host CPU.

HTTP مكتبة داخل عملية المتصفح أو الـ server، وليست جزءاً من نظام التشغيل، فنظام التشغيل لا يرى إلا بايتات تُكتب في socket. أما TCP وIP فيعيشان في الـ kernel ويُوصل إليهما عبر socket API. وتدقيق واحد على الشريحة: طبقة الربط ليست عتاداً خالصاً، فجزء من معالجتها يعمل في الـ driver على معالج المضيف.

Exam trapفخ امتحاني

MAC changes per hop, IP does not. Ignoring NAT, source and destination IP addresses and ports are the same at every point on the path. MAC addresses are rewritten at every router. "The router replaces the destination IP address" is false.

MAC يتغيّر مع كل قفزة، وIP لا يتغيّر. بتجاهل NAT، عناوين IP والمنافذ للمصدر والوجهة هي نفسها في كل نقطة على المسار. أما عناوين MAC فتُعاد كتابتها عند كل router. وعبارة "الـ router يستبدل عنوان IP للوجهة" خاطئة.

Routers do not read TCP ports. A router stops at the network layer. Only the two end hosts open the transport header and the HTTP message.

الموجّهات لا تقرأ منافذ TCP. الـ router يتوقف عند طبقة الشبكة. والطرفان النهائيان وحدهما يفتحان transport header ورسالة HTTP.

Packet is network, segment is transport. The order down the stack is message, segment, packet, frame, bits. Swapping packet and segment is the most common slip. And a packet's payload is a segment, not the message: the message is one level deeper.

الـ packet لطبقة الشبكة، والـ segment لطبقة النقل. الترتيب نزولاً: message ثم segment ثم packet ثم frame ثم bits. وتبديل packet وsegment أشيع زلّة. والـ payload في الـ packet هو segment لا الرسالة، فالرسالة في مستوى أعمق.

P2P here means one hop, not peer-to-peer file sharing.

P2P هنا تعني قفزة واحدة، لا مشاركة الملفات peer-to-peer.

Connectivity = PL + DLL + NL + TL + AL OSI 7, TCP/IP 5: session and presentation folded into applicationOSI سبع طبقات وTCP/IP خمس: طبقتا الجلسة والعرض مدمجتان في التطبيق message, segment, packet, frame, bitsرسالة، مقطع، حزمة، إطار، بتات payload = PDU of the layer aboveالحمولة = الـ PDU الخاصة بالطبقة التي فوقها port 16 bits, E2Eالمنفذ 16 بت، E2E IPv4 32 bits, H2HIPv4 بطول 32 بت، H2H MAC 48 bits, P2PMAC بطول 48 بت، P2P MAC rewritten every hopعنوان MAC يُعاد كتابته في كل قفزة routers: network, link, physical onlyالموجّهات (routers): طبقات الشبكة وربط البيانات والفيزيائية فقط socket = IP + port; flow = 5-tuplesocket = IP + منفذ، وflow = 5-tuple app space | socket API | kernel (TCP, IP) | drivers | NICحيّز التطبيقات | socket API | النواة (TCP، IP) | برامج التشغيل | NIC

Check yourself

اختبر نفسك

In the TCP/IP stack, what does a network-layer packet carry as its payload?

في TCP/IP stack، ما الذي يحمله packet طبقة الشبكة بوصفه payload؟

C. A payload is always the PDU of the layer directly above. Transport sits above network, so a packet carries a segment, and the message is one level deeper inside that segment. B is backwards: the frame carries the packet, not the other way round. D is the physical layer's PDU.

الجواب C. الـ payload دائماً هو PDU الطبقة التي فوقها مباشرة. طبقة النقل فوق طبقة الشبكة، فالـ packet يحمل segment، والرسالة في مستوى أعمق داخل ذلك الـ segment. وB معكوس: الـ frame هو الذي يحمل الـ packet. وD هو PDU الطبقة الفيزيائية.

A router forwards your packet toward a cloud server. Ignoring NAT, which address does it replace for the next hop?

يمرّر router الـ packet الخاص بك نحو server سحابي. بتجاهل NAT، أي عنوان يستبدله للقفزة التالية؟

B. MAC addresses only mean something on one link, so every router builds a new frame with a new MAC header. IP addresses have host-to-host scope and stay the same along the whole path. A router does not even read the port, which is in the transport header it never opens. D is wrong because the link-layer addresses must change.

الجواب B. عناوين MAC لها معنى على رابط واحد فقط، فيبني كل router إطاراً جديداً بـ MAC header جديد. أما عناوين IP فنطاقها host-to-host وتبقى هي نفسها على المسار كله. والـ router لا يقرأ المنفذ أصلاً، فهو في transport header الذي لا يفتحه. وD خاطئ لأن عناوين طبقة الربط يجب أن تتغيّر.

Match the scope to its address and size. Which row is correct?

صِل النطاق بعنوانه وحجمه. أي صف صحيح؟

A. Transport is end to end between processes, named by 16-bit ports (0 to 65535). Network is host to host, named by 32-bit IPv4 addresses. Data link is one hop between NICs, named by 48-bit MAC addresses. B swaps the transport and network addresses; C puts MAC on the host-to-host path, which cannot work because MACs change at every hop; D has the right names with shuffled sizes.

الجواب A. طبقة النقل end to end بين العمليات، وتُسمّى بمنافذ 16 بت (من 0 إلى 65535). وطبقة الشبكة host to host، وتُسمّى بعناوين IPv4 من 32 بت. وطبقة الربط قفزة واحدة بين NICs، وتُسمّى بعناوين MAC من 48 بت. وB يبدّل عنواني النقل والشبكة، وC يضع MAC على مسار host-to-host وهذا مستحيل لأن MAC يتغيّر مع كل قفزة، وD أسماؤه صحيحة وأحجامه مخلوطة.

Two browser tabs on one laptop connect to the same server on port 443 over TCP. What lets the OS tell the two connections apart?

تبويبان في متصفح على حاسوب واحد يتصلان بالـ server نفسه على المنفذ 443 عبر TCP. ما الذي يجعل نظام التشغيل يميّز بين الاتصالين؟

D. Both tabs share the laptop's IP and MAC, both use TCP, and both target 3.120.0.10:443. The OS gives each connection its own ephemeral source port, so the two 5-tuples differ only in that field. B is doubly wrong: the MAC is shared and is not part of the 5-tuple at all.

الجواب D. التبويبان يشتركان في IP وMAC الحاسوب، وكلاهما يستخدم TCP، وكلاهما يقصد 3.120.0.10:443. يعطي نظام التشغيل كل اتصال منفذاً مصدراً مؤقتاً خاصاً به، فلا يختلف الـ 5-tuples إلا في هذا الحقل. وB خاطئ مرتين: الـ MAC مشترك، وليس جزءاً من الـ 5-tuple أصلاً.

On a laptop browsing the Web, where do TCP and IP normally run, and how does the browser reach them?

على حاسوب يتصفح الويب، أين يعمل TCP وIP عادة، وكيف يصل إليهما المتصفح؟

C. Slide 29: the application layer sits in application space, transport and network in OS space, and data link and physical in hardware space. The socket API is the seam between application and OS; drivers are the seam between OS and hardware. A puts TCP where HTTP lives. B is where link and physical run. D is wrong because a home router does not terminate your TCP connection, the end hosts do.

الجواب C. الشريحة 29: طبقة التطبيق في application space، والنقل والشبكة في مساحة نظام التشغيل، والربط والفيزيائية في مساحة العتاد. الـ socket API هو الحد بين التطبيق ونظام التشغيل، والـ drivers هي الحد بين نظام التشغيل والعتاد. وA يضع TCP حيث يعيش HTTP. وB هو مكان الربط والفيزيائية. وD خاطئ لأن موجّه المنزل لا ينهي اتصال TCP الخاص بك، بل الطرفان النهائيان.