เลเยอร์ใดของ osi model อยู่ในส่วนของ segment

5.1 ให้บริการจัดการเรื่องการโต้ตอบข้อมูลซึ่งจะให้บริการทั้งในแบบส่งข้อมูลไม่พร้อมกัน(Half-Duplex) และแบบพร้อมกัน (Full-Duplex)

5.2 การสื่อสารในทิศทางเดียวกัน ในการสื่อสารผ่านระบบเครือข่ายระยะไกลหากเกิดข้อผิดพลาดขึ้นระหว่างการสื่อสารในจุดใดจุดหนึ่ง Session Layer จะอนุญาตให้ผู้ใช้เลือกที่จะทำการรับ - ส่ง ข้อมูลใหม่อีกครั้งในเวลาใดก็ได้

5.3 การรายงานเกี่ยวกับข้อผิดพลาดถ้าในระหว่างการสือ่สารเกิดมีข้อผิดพลาดที่ไม่สามารถแก้ไขได้ Session Layer จะทำการส่งสัญญานเพื่อแจ้งให้ Application รู้ถึงขอ้ผิดพลาดนั้น

The tasks of the transport layer (also end-to-end control, transport control) include the segmentation of the data stream and in relieving congestion.

A data segment is a Service Data Unit, which is used for encapsulation on the fourth layer (transport layer). It consists of protocol elements that contain Layer 4 information control. When addressing the data segment assigned a Layer 4 address, so a port. The data segment is encapsulated in the layer 3 in a data packet.

The transport layer provides the application-oriented layers 5 to 7 standardized access so that they do not need to consider the characteristics of the communications network.

Five different service classes of different grades are defined in layer 4 and may be used by the upper layers, from the simplest to the most comfortable service with multiplex mechanisms, error protection and troubleshooting procedures..

OSI Layer 4 - Transport Layer

In computer networking, the transport layer is a conceptual division of methods in the layered architecture of protocols in the network stack in the Internet Protocol Suite and the Open Systems Interconnection (OSI). The protocols of the layer provide host-to-host communication services for applications.[1] It provides services such as connection-oriented data stream support, reliability, flow control, and multiplexing.

The details of implementation and semantics of the Transport Layer of the TCP/IP model (RFC 1122), which is the foundation of the Internet, and the Open Systems Interconnection (OSI) model of general networking, are different. In the OSI model the transport layer is most often referred to as Layer 4 or L4, while numbered layers are not used in TCP/IP.

The best-known transport protocol of TCP/IP is the Transmission Control Protocol (TCP), and lent its name to the title of the entire suite. It is used for connection-oriented transmissions, whereas the connectionless User Datagram Protocol (UDP) is used for simpler messaging transmissions. TCP is the more complex protocol, due to its stateful design incorporating reliable transmission and data stream services. Other prominent protocols in this group are the Datagram Congestion Control Protocol (DCCP) and the Stream Control Transmission Protocol (SCTP).

ชั้น Network Interface จะทำหน้าที่แปลง IP Address เป็นหมายเลขประจำตัวทางฮาร์ดแวร์ของอุปกรณ์เครือข่าย เพื่อใช้ในการรับ-ส่งข้อมูลในระดับกายภาพ รวมทั้งการสร้างสัญญาณไฟฟ้าสำหรับการรับ-ส่งข้อมูลตามมาตรฐานทางฮาร์ดแวร์ที่ใช้ เช่น ระบบ อีเธอร์เน็ต หรือ โทเค็นริง ซึ่งจะคล้ายกับการรวม ชั้น Data Link และ ชั้น Physical ของ OSI Model เข้าด้วยกัน

…ในการติดต่อสื่อสารผ่านระบบเครือข่ายจะต้องมีตัวกลาง หรือ มาตรฐานกลาง ในการติดต่อสือสาร OSI 7 Layers เป็นรูปแบบการอ้างอิงสำหรับวิธีการใช้งานการสื่อสารผ่านเครือข่าย และใช้อ้างอิงเป็นกรอบแนวคิดในการทำความเข้าใจความสัมพันธ์ ขององคค์ประกอบต่าง ๆ

… ซึ่งได้มีการแบ่งการทำงานของ เครือข่ายเป็นชั้นต่าง ๆ เพื่อให้การทำงานของระบบการสื่อสารนั้นเป็นไปอย่างประสิทธิภาพมากยิ่งขึ้น เนื่องจากได้มีการแบ่งส่วนการทำงาน ทำให้เข้าไปจัดการในส่วนของ Layers ต่าง ๆ ได้ถูกต้อง ซึ่ง Layers นั้นได้แบ่งเป็นทั้งหมด 7 Layers ซึ่งแต่ละ Layers ก็มีหน้าที่การทำงานที่แตกต่างกันไป
บน OSI Model ก็จะแบ่งเป็น 2 กลุ่มใหญ่ คือ

  • Layer 5–7 เรียกว่า Upper Layer โดยทั่วไปจะเป็นส่วนที่พัฒนาใน Software Application โดยประกอบด้วย Application Layer, Presentation Layer และ Session Layer
  • Layer 1–4 เรียกว่า Lower Layer จะเป็นส่วนที่ทำหน้าที่ในการสื่อสารข้อมูลซึ่งอาจจะพัฒนาได้ทั้งแบบเป็น Software และ Hardrware

ในบทความนี้ จะเรียงลำดับแบบ Top to Down (Layer 7 — Layer 1)

Layer 7 : Application Layer

เป็น Layer ที่อยู่ใกล้กับผู้ใช้มากที่สุด และเป็น Layer ที่ทำการส่ง และรับข้อมูลโดยตรงกับผู้ใช้ โดยการแสดง Interface ของแอปพลิเคชันต่าง ๆ ที่มีการส่งข้อมูลผ่านทาง Inernet เช่น Web Browser หรือ เป็นแอปพลิเคชันที่ใช้ในการถ่ายโอนข้อมูลระหว่างเครือข่าย เช่น WinSCP รวมถึง Prtocol ที่มีการใช้งานใน Layer เช่น DNS, WWW/HTTP, P2P, E-MAIL/POP, SMTP Telnet, FTP และ อื่นๆ อีกมากมาย

Layer 6 : Presentation Layer

เป็น Layer ที่รับผิดชอบเรื่องรูปแบบของการแสดงผลเพื่อให้แอปพลิเคชันต่าง ๆ ที่ใช้งาน ทราบว่าข้อมูลที่ส่ง และรับเป็นข้อมูลประเภทใด เช่น HTML, DOC, JPGE, MP3, AVI, Sockets

Layer 5 : Session Layer

เป็น Layer นี้จะควบคุมการส่งผ่านข้อมูลการสื่อสารจากต้นทางไปยังปลายทางให้มีความสอดคล้องกัน ยกตัวอย่างเช่น Web Browser สามารถทำงานติดต่อสื่อสารได้พร้อม ๆ กันหลายหน้าต่าง หรือ แอปพลิเคชันต่าง ๆ ในช่วงที่มีการ Connecting อยู่นั้น จะเป็นช่วงของ Session Layer ที่บ่งบอกว่าสามารถเข้าสู่แอปพลิเคชัน ได้ หรือ ไม่

Layer 4 : Transport Layer

เป็น Layer ที่จัดการแบ่งข้อมูลใน Layer ด้านบนให้เหมาะสมกับการจัดส่งไปให้ Layer ด้านล่าง (Segmentation), ทำการประกอบข้อมูลที่ได้มาจาก Layer ด้านล่าง (Essembly) และทำการแก้ไขปัญหาเมื่อเกิดข้อผิดพลาดขึ้นในระหว่างทางของการส่งข้อมูล (Error Recovery) ตัวอย่างของ Protocol คือ TCP และ UDP หน่วยของข้อมูลใน Layer นี้มักถูกเรียกว่า “Segment”

Layer 3 : Network Layer

เป็น Layer ที่มีหน้าที่หลักในการส่ง Packet จากต้นทางให้ไปถึงปลายทางด้วยเส้นทางที่ดีที่สุด (Best Effort Delivery) Layer นี้จะมีการกำหนดให้มีการตั้ง Logical Address ขึ้นมาเพื่อใช้ระบุตัวตน ตัวย่างของ Protocol คือ IP และ Logical Address ที่ใช้ก็คือ หมายเลข IP Address นั่นเอง หน่วยของข้อมูล คือ “Packet”

เป็น Layer ที่รับผิดชอบในการส่งข้อมูลบนเครือข่ายแต่ละประเภทเช่น Ethernet, Token Ring, MPLS หรือ บน WAN ต่าง ๆ และดูแลเรื่องของการห่อหุ้มข้อมูล (Encapsulation) จาก Layer บน ในการสื่อสาร Layer นี้จะมีการระบุหมายเลข Physical Address ของอุปกรณ์ต่าง ๆ ที่เรียกว่า MAC Address โดยหน่วยของข้อมูล คือ “Frame”

Layer 1 : Physical Layer

เป็น Layer ล่างสุด ซึ่งจะกล่าวถึง คุณสมบัติทางกายภาพ อุปกรณ์ที่ใช้ในการเชื่อมต่อ เช่น Cable Lan, Fiber Optic หรือ Connnector อื่น ๆ ซึ่งอาจจะเป็นทั้งแบบที่ใช้สาย หรือ ไม่ใช้สาย รวมถึงมาตรฐานของการเชื่อมต่อ อุปกรณ์ สายเคเบิล แรงดันไฟฟ้า เช่น มาตรฐานของสาย CAT ประเภทต่าง ๆ , มาตรฐาน RS232 เป็นต้น การรับส่งจะเป็นในรูป 0 หรือ 1 หน่วยของข้อมูล คือ “Bit”

Overview OSI Model For easy understanding.

https://hindime.net/osi-model-hindi/Encapsulation / Decapsulation

Encapsulation / Decapsulation
  • Encapsulation (ห่อหุ้มข้อมูล)
  • Decapsulation (นำข้อมูลออกจากการห่อหุ้ม)
Data exchange in the OSI Model

ข้อมูลที่ส่งจาก Application บน Computer เครื่องหนึ่ง ไปยัง Application บน Computer จะต้องส่งผ่านแต่ละ Layer ของ OSI Model ตามลำดับ ดังรูป

Data Exchange

ในการส่งข้อมูลนั้น ข้อมูล และ Header ของแต่ละ Layer จะถูก Encapsulation และเมื่อมีการรับข้อมูลที่ปลายทางแล้ว ข้อมูลจะถูก Decapsulation โดย Header จะถูกถอดออกตามลำดับของ Layer

แถม ๆ !!! ประเภทของการโจมตีในแต่ละ Layer

Conclude

… สาเหตุของการแบ่ง Protocol ออกเป็น 7 Layer ตามมารถฐาน OSI
ดังที่ทราบกันว่า Protocol หมายถึง ข้อกำหนด หรือ ข้อตกลงในการสื่อสารข้อมูล ระหว่างอุปกรณ์ที่ทำหน้าที่บนระบบเครือข่าย, เครื่องคอมพิวเตอร์ หรือ อุปกรณ์ใด ๆ ที่จะรับส่งข้อมูลกันได้ ควรจะมีการสร้างความเข้าใจ หรือ ข้อตกลงเดียวกัน เกี่ยวกับรูปแบบของข้อมูล และสถานะการทำงานต่าง ๆ โดยแต่ละ Layer มักจะมีผู้ชำนาญเฉพาะทางเข้ามารับผิดชอบในการผลิต Hardware และ Software ขึ้นมาทำงาน ซึ่งหากไม่มีการกำหนดมาตรฐานกลางแล้ว การพัฒนา และใช้งานที่เกี่ยวกับ Network ทั้ง Hardware และ Software ของผู้ผลิตที่เป็นคนละยี่ห้อ อาจเกิดปัญหาเนื่องจากการไม่ Compatible กัน

That’s very kind of you.

👨🏼‍💻 Stories ของผู้เขียนนี้ส่วนมากเป็นความรู้เกี่ยวกับ Network หากมีข้อผิดพลาดประการใดผู้เขียนขออภัยมา ณ ที่นี้ด้วย หรือ มีข้อแนะนำสามารถ Comment บอกได้ครับ | ขอบคุณผู้อ่านทุกท่าน ฝากกด Clap กด Follow 👏🏻 หากถูกใจ และเป็นกำลังใจให้ผู้เขียน * บทความใหม่ ๆ จะพยายามออกให้ได้เดือนละ 2 บทความนะครับ