The OSI (Open Systems Interconnect) model is 7 layers showing more detail to the TCP/IP model which is 4 layers.
TCP (Transfer Control Protocol)/IP (Internet Protocol) is the most common transport protocol in use today. It is Layer 4 of the OSI (Open Systems Interconnect) model.
The Application Layer is used to connect Software mainly to the Transport Layer which will segment and encapsulate the data into a datagram.
The datagram then get transferred to the internet through media such a a Network interface which could be a Ethernet connect, Fiber optic, or a wireless connection for example.
(Gabriel Torres, March 28, 2012)
(Shuler, R., 2002)
Intro Data Encapsulation – Introduction To OSI Layer Model – The Internetworking Part5
As you know OSI works in layer as the data moves down it is encapsulated by each layer .The data encapsulation is only useful to the same layer at the other end. The encapsulated data is called PDU(Protocol Data Units).As only the same layer or we call peer layer can read the data it strips the header that was attached extract useful info and sends it to upper layer.
The real transmission starts from transport layer. The data from above layers is formed as a segment and transferred. This segment has a header (info particular only to transport layer) which is attached to the data .Now this segment with TH header is passed to network layer where network layer attaches its own header to it. At the receivers end each layer reads the header extract the useful info from theheader .After taking the info it removes the header and passed the data to the above layer.
Internet Layer: Where Packets Are Prepared for Delivery
The transport protocols TCP, UDP, and SCTP pass their segments and packets down to the Internet layer, where the IP protocol handles the segments and packets. IP prepares them for delivery by formatting them into units called IP datagrams. IP then determines the IP addresses for the datagrams, so that they can be delivered effectively to the receiving host.
IP Datagrams
IP attaches an IP header to the segment or packet's header, in addition to the information that is added by TCP or UDP. Information in the IP header includes the IP addresses of the sending and receiving hosts, the datagram length, and the datagram sequence order. This information is provided if the datagram exceeds the allowable byte size for network packets and must be fragmented.
Data-Link Layer: Where Framing Takes Place
Data-link layer protocols, such as PPP, format the IP datagram into a frame. These protocols attach a third header and a footer to “frame” the datagram. The frame header includes a cyclic redundancy check (CRC) field that checks for errors as the frame travels over the network media. Then, the data-link layer passes the frame to the physical layer.
Physical Network Layer: Where Frames Are Sent and Received
The physical network layer on the sending host receives the frames and converts the IP addresses into the hardware addresses appropriate to the network media. The physical network layer then sends the frame out over the network media.
(Oracle, 1999)