There are two common model or “set of standards” na ginamit or ginagamit sa common network natin ngayon. This is the OSI and TCP/IP.
Now, sa bagong CCNA, it only focuses on TCP/IP model dahil ito na ang karaniwang “standard” na ginagamit sa network communication ngayon(lalo na sa internet). Ibig sabihin, OSI has been removed.
Pero para mas maging madali at mabilis mong maunawaan ang TCP/IP, I decided to include the OSI model pa rin on this book. This will help you see the difference and hopefully help you figure out why OSI has been removed and replaced by TCP/IP.
Let’s start.
TCP/IP Model explained
Ang TCP/IP model ay isang standard ng communication in computer networking. Ito ay binuo noong 1970 ng Defense Advance Research Project Agency (DARPA). Kagaya ng OSI model, ang TCP/IP model ay isa ring guidelines sa pagde-design at pag-iimplement ng mga devices, programs, networking protocols at iba pa.
TCP/IP has become the adapted model in the modern world today. Ito na ang karaniwang ginagamit sa network communication in the modern world.
Like the OSI model, si TCP/IP ay binubuo din ng iba’t ibang layers or set of standards to organize and make the communication easier for vendors and manufacturers.
Ang mga vendors at manufacturer ay sumusunod sa standard na ito upang sa ganun ay “magkita-kita at makapagusap-usap” ang mga networking devices kahit galing pa sa iba’t ibang manufacturer or vendors.
For example, ang isang computer na running on Windows operating system(from Microsoft) ay may kakayanan na makapag-communicate sa isang Mac computer(na gawa naman ng Apple).
They can be connected in the network through a network switch na gawa naman ni Cisco(just for example). They can be connected via cable or wireless kung saan compatible din ang mga ito even if they were created by different vendors. Pwede silang mag-usap, magkita at magka-unawaan by following a certain standards and protocols gaya nga ng TCP/IP.
Take note, they are from different vendors and manufacturers and running on different operating systems. Pero dahil lahat sila at sumusunod on a certain standards and protocols of communication, nagkaka-intindihan sila at nagkaka-unawaan.
Think about the lan card or network interface card ng mga desktop pc or laptops. Kahit pa iba’t ibang manufacturers or vendors(like Asus, Apple, Lenovo, Toshiba and more), ang mga lan card or network interface card nila ay sumusunod sa pare-parehong standards.
That’s why when we connect a network cable(rj45 & copper for example), sakto lang ito at nakaka-connect tayo sa network(or sa switch).
Ang mga vendor or manufacturers ng mga networking equipments like Cisco, Juniper, Huawei ay ganun din. They allowed communication kahit pa iba’t ibang devices and cables(as long as it compatible with them) ang naka-connect sa kanila.
At hindi lang ito limited sa mga hardwares. It also comes in softwares and other programs na part ng ating network. For example, a Google Chrome from Google can run on MacBook Pro na gawa ni Apple. Or a JPEG photo can be read by a photo software installed in a Huawei device. And a whole lot more.
They are all following a certain standard and protocols. This is where TCP/IP comes in.
Think of it like a blueprint ng isang bahay. Kahit iba-iba ang gumagawa sa kitchen, sala, mga kwarto at iba, as long as they follow the blueprint or plano, it will come out as what have planned from the beginning. The ‘blueprint’ serves as the guidlines ng mga gumagawa ng bahay.
Ganun din sa network and communication. Vendors and manufacturers follow standards(blueprint) like TCP/IP para maging organize, maayos at swabe ang communication ng mga ito.
Don’t worry, I know it might be confusing for now. Lalo na kung ikaw ay hindi I.T or talagang starting from scratch. Pero as we go along, it will make sense.
In order to really understand the TCP/IP, let’s dig deeper into its layers.
Hindi katulad ng OSI model, ang TCP/IP ay meron lamang apat na layers. Ito ay ang Application, Transport, Internet and Network Access layers. If you can recall, we know that some OSI layers are “merged” in a corresponding layer sa TCP/IP.
The Four Layer of the TCP/IP
Application Layer
As I mentioned earlier and showed you, the application layer of the TCP/IP model was the combination of the upper layers in the OSI. It all focuses on the “protocols” resides or used by the application or programs before it goes out and into the network.
Here’s the illustration showing the upper layers of the OSI merged into one in the TCP/IP model.
In order for us to really understand how this layer works, let me break down all the three layers(from OSI) that act as the Application layer in the TCP/IP model.
OSI Application layer
Ang application layer ang pinaka-malapit sa end user.
Bakit?
Dahil ang mga software or application na ginagamit natin or ginagamit ng mga network devices ay gumagamit ng mga “protocol” na nabibilang sa application layer.
Example ay ang mga web browsers gaya ng internet explorer, google chrome at mozilla. Ang mga ito ay gumagamit ng protocol na “http or https” na nabibilang sa application layer.
Ang ilan sa mga protocols na example ng application layer ay ang mga sumusunod: FTP, Telnet, DHCP, SMTP at maraming pang iba.
Please take note na hindi ang mga softwares or programs ang nasa application layer ni OSI kundi ang mga ginagamit nitong “protocols“.
OSI Presentation layer
Ang presentation layer ng OSI model ang concern sa presentation ng data. Sinisigurado ng presentation layer ng maipre-present ng tama ang “format” ng data galing sa sending device kapag nareceive na ng receiving device.
For example, nag-upload ka ng picture mo sa facebook na naka-JPEG format, ang presentation layers sa network ni Facebook (or mga servers ni Facebook) ay nauunawaan na picture ang iuupload mo dahil naka-present ito as JPEG format.
Please take note na ang mga OSI layers from sending device ay may katapat din na corresponding layers sa receiving device. Each layer ay nag-uusap usap layer to layer. Ibig sabihin, ang presentation layer ni sending device ay nakikipag-usap or nakikipag-communicate lang sa presentation layer ni receiving device.
The presentation layer also talks or pass this “format” to the application layer para maintidihan ito ng program or softwares(or protocol) inside the application.
OSI Session layer
Ang session layer naman ang concern sa pag-eestablish at pagte-terminate ng connection between two communicating devices.
Sinisigurado muna ni session layer ng sending device na available ang session layer ng receiving device at ready makipag-communicate. Gumagamit ito ng “timer” upang makasigurado na ready sa communication ang both devices.
Kapag naman merong error or naputol ang communication, sinusubukan din ni session layer na ire-establish ang connection. Minomonitor niya rin ang connection at once complete na, ang session layer din ang nag-teterminate ng connection.
These layers, 5, 6, and 7 ng OSI model ang bumubuo sa Application layer ng TCP/IP model. As what I shared in the illustration above, they are sitting in the application side before going out and into the network.
Transport Layer
Ang transport layer naman ang naka-talaga sa flow control ng data. Ito rin ang nagche-check ng error at nagre-recover ng data between two communicating devices.
In OSI model, the transport layer is in layer 4. The two common example of transport layer are the TCP (Transmission Control Protocol) at UDP (User Datagram Protocol).
Pano naman ito gumagana?
For example, sabihin natin nag-upload ka ng picture sa Facebook. Bago ito mag-appear sa timeline or sa wall mo, unti-unti muna itong kinokopya galing sa computer or cellphone mo papunta sa server ni Facebook. At sa process ng pagkopya or pag-upload mo ng picture, hindi itong isang bagsak lang.
Let’s say ang picture mo ay HD, at ang size nito ay 5MB. Hindi isang bigla napupunta or na-uupload ung 5MB mong picture. Pwedeng sa unag 5 seconds, 500KB muna ang nakopya, then sa sumunod na 15 seconds 1MB then 2MB and so on. Kapag nakopya na lahat, si transport layer din ang bahalang magre-order ng data(kung tcp) kung hindi man ito na-receive in order ng receiving device.
Some terminologies to remember:
- Segmentation – ang segmentation ay ang proseso ng transport layer kung saan hinahati-hati ang user data into smaller units na tinatawag na segment.
Kagaya ng example natin kanina, kapag nag-uupload or nag-dodownload tayo ng isang file sa internet or papunta sa ibang device, hinahati-hati ito into segments(ex. 1mb per segment). - Flow Control – ang flow control naman ay ang proseso ng pag-limita ni transport layer sa laki, dami or rate ng data na kayang ma-handle ng receiver.
For example, kapag ang size ng isang segment ay malaki or sobra sa kayang i-handle ng receiver, it will send a signal/message na bawasan ito ng sender para ma-handle niya ng ayos ang flow ng data. - Session Multi-plexing – ang proseso kung saan nakaka-communicate at nakaka-connect ang iba’t ibang application at the same time sa isang device. Gumagamit ito ng mga iba’t ibang ports or socket numbers.
Ito ang mga karaniwang port number and description na ginagamit natin sa network.
Common TCP ports: telnet – port 23 / http – port 80
Ico-confirm rin ng transport layer ng receiving device kay transport layer ng sending device na data has been received successfully. Ganito umiikot ang main function ni transport layer.
When it comes to transport layer, meron tayong main and most common protocols na ginagamit at pumapasok dito.
Let’s talk about them.
TCP vs. UDP
Let’s dig a little deeper sa nabanggit natin na tcp and udp protol. TCP(Transmission Control Protocol) and UDP(User Datagram Protocol) are always included kapag pinag-usapan natin ang transport layer.
When it comes to TCP, we need to have a “reliable connection”. That means, we need to have a confirmation from both ends(sender and receiver) bago magsimula or mangyari yung communication.
Dito din pumapasok ang tinatawag natin na 3-way handshake.
Ang 3-way handshake process ay isang proseso kung saan nagpapadala ng “syn” packet ang sender(communicating device) papunta sa receiver. Kapag ito ay natanggap, the receiving device needs to send another “syn-ack” packet.
Meaning, the initial syn packet has being acknowledged. Once it’s done, the sending device will send another “syn” packet before the tcp connection has been established. This is the only time na pwede na magsimula or mag-start ang connection or communication ng dalawang device.
The 3-way handshake process looks like this:
Yan ang tinatawag natin na 3-way handshake. At ang process na ito ay pasok sa TCP. As I said earlier, TCP needs a reliable connection. That’s why it needs acknowledgement from both end before communication started.
Kumbaga, si TCP ay “sigurista”. Sinisiguro niya muna na meron at ready na ang kabilang side before they start communicating. At hindi lang yun, TCP also make sure na tama ang mga natatanggap na “data” nang receiver. If not, it has the ability to arrange and fix it.
Meron din itong ability to “control” kung gaano kadami or kabilis ang pag-pasa ng data from sender to receiver. We’ll talk about this later.
Sa TCP, meron din tayong re-transmission and packet recovery. Ibig sabihin, if during the connection or communication meron tayong “packet loss”, meron itong way to recover loss data during the communication. It can re-transmit those missing “data or packet” .
Now it UDP, it doesn’t work like that. UDP doesn’t need reliability.
Tinatawag din ito minsan na “best effort” dahil kung ano lang ang gumana or maabot or mangyari in terms of connecting and communication, that’s it.
Wala ng recovery and acknowledgement. Walang nangyayaring 3-way handshake na kagaya sa TCP. Walang error checking, walang packet re-arrangement, walang reliability.
Let’s have an example.
Kapag tayo ay nag-connect sa Facebook via browser, it connects us via protocols that belongs to TCP. When we check our emails it also uses TCP.
So yung process ng connection or communication ng pc or smartphones natin needs reliability and acknowledgement. 3-way handshake happens and once it’s confirmed, dun pa lang mabubuo yung communication.
If Facebook or the other end doesn’t respond or doesn’t accept our connection, our browser(gamit yung mga protocols that belongs to tcp) will try to re-connect or if there is something missing will try to recover or re-transmit para makapag-communicate tayo.
So for example, si Facebook, unti-unting ni-loload yung website or timeline into our browser. The “data” are arranged and fixed para pagdating sa browser natin, maayos ang nakikita natin at organize na web page.
Ganun din sa email. It downloads and copy the “data” or email from the server and transfer them into our browser or email provider. If some of the packets or data was lost, it has the ability to re-transmit those packets and fixed and arranged them para tama at organize ang mababasa nating email.
Make sense idol?
In UDP, it doesn’t work that way.
Wala itong re-transmission of packet. Wala rin itong recovery of packets. Kung naputol ang connection or communication natin, it doesn’t have a recovery for those loss. It just continue its communication or connection.
For example, you’re watching a live streaming ng laban ni Pacquaio. Yung connection mo sa server is tuloy-tuloy lang via the streaming na pinapanood mo. Kapag may nag-drop, nag-lag, naputol ang connection etc. hindi na nagre-retransmit yung stream. Because it’s live. Pwedeng mag-resume ng connection mo, tapos na yung laban. There’s no re-transmission of packets or recovery of loss packets.
Gets?
Ang isa pang magandang analogy is this.
For example, meron akong gustong sabihin kay Juan. Let’s say isang secret kung papaano siya yayaman nang mabilis. Ngayon, pwede kong “tawagan” si Juan para kausapin at sabihin ang sikretong ito. Kapag may sumagot sa telepono, pwede kong i-confirm at tanungin ko si Juan na nga ba ang kausap ko bago ko sabihin ang sikreto. Tama?
Now, once nag-confirm na siya nga si Juan, that’s the only time na sasabihin ko yung sikreto. There’s a confirmation. There’s an acknolwedgement. That’s how TCP works.
Now, on the other hand, pwede ko rin sulatan na lang si Juan thru the snail mail. Via post office ika nga. And then sabihin ko sa kanya yung sikreto via that letter.
I can just “wish” na sana makarating sa bahay nina Juan yung sulat at sana mabasa ni Juan yung sikreto. Ang kaso, in this process, hindi ako sure kung nakarating nga ba kina Juan yung letter. Or hindi rin ako sure kung si nabasa nga ba ni Juan yung letter ko. Wala kasing acknowledgement or confirmation from Juan. I just send it and “hope” it will get there and Juan gets it.
That’s how UDP works.
Gets mo idol?
This is just a high-level analogy para mas madali mong makita ang pagkaka-iba ng dalawa. They are basically “opposite” types of protocols that operates in transport layer.
Internet Layer
Ang internet layer(which is the network layer in OSI) naman ang naghahandle ng logical addresses (IP address) na ginagamit ng mga routers para ma-determine ang path from sending device to the receiving device.
Using the source and destination IP addresses, nalalaman ng mga routers kung san ibabato or kung saan padadaanin ang data or “packets” from the source to the destination.
Ang bawat host or end devices ay may kanya-kanyang “unique” ip address. Ang mga ip address na ito ay part ng isang subnet or network. Kung ikukumpara natin sa isang pamayanan, ang house no. ay ang ip address at street address naman ang network address.
Pag-uusapan natin ang IP addressing sa future lesson at sigurado akong na maiintindihan mo ang mga ito kapag dumating na tayo dun.
Ang mga routers ay merong database ng mga source at destination ip addreses in the network. Ito ay tinatawag nating routing table.
Based sa routing table, nalalaman din ng mga routers kung saan ang pinaka-mabilis na daan or anong pinaka-mabilis na paraan para marating ang isang destination. Dito pumapasok ang mga “routing protocols” gaya ng static route, EIGRP, OSPF at BGP. Idi-discuss natin yan in the future lessons.
Network Access Layer
The network access layer of the TCP/IP model composed of the physical addressing and physical connection of the devices in our network. This is where data-link and physical layers of the OSI merged. Para din mas maintindihan natin, let’s take a look on how they work.
OSI Data-link layer
Ang data-link layer ay concern sa destination sa local network. Kung ang layer internet layer ang nagha-handle ng logical address or IP address, ang layer 2 naman ang bahala sa physical address or “mac address“.
Kapag naipadala na ni internet layer ang packets or data sa destination network, si layer 2 na ang bahala kung kanino mismong device or kung sang local destination ito dadalhin.
If you can recall how the switch work, that’s basically how it applies.
Ang packets from layer 3 ay ini-encapsulate niya into “frame” at nag-aadd siya ng header containing the source and destination MAC addresses to let the device communicate properly.
Ang Data Link layer ay nahahati sa dalawang sub-layers:
- LLC (Logical Link Control) – ito ang sub-layer na ginagamit ni layer 2 sa error detection at flow control
- MAC (Media Access Control) – ang sub-layer naman na ito ay para sa hardware addressing and controlling the access. Itong sub-layer na ito ang naghahandle ng physical address ng mga device known as the “MAC address“.
Remember that the mac address is physical address which is burned into the NIC or communication card ni device from its manufacturer.
OSI Physical layer
Ang physical layer ng OSI model naman ang nagde-define ng physical transfer ng “bits” into the network. This is where the “data” are translated into electrical signals(or light signals for fiber) before transmitting to the other side of the network.
Ito ang concern sa details ng connectors at network interface cards kung papaano ito makaka-pagsend at makaka-receive ng bits from the other end.
Dito pumapasok ang NIC, network cables, voltage levels etc. Kagaya din ng OSI model, ang TCP/IP model ay nagtatakda ng mga functions kung pano “makakapag-usap usap or magkikita-kita” ang mga communicating devices kahit ito ay galing pa sa iba’t ibang manufacturer/vendor.
Sa pagsunod sa TCP/IP model, almost every device can communicate to each other by properly implementing the necessary protocols.
Sa ngayon, ito na ang karaniwang ginagamit ng standard ng communication lalo na’t connected sa internet.
jennifer busa says
what is the difference between TCP and OSI layers
Billy says
Hi Jennifer, it’s already been shared on this article and on the previous. Paulit na lang idol pag ndi na-gets Ulit ulit lang makukuha din yan. Salamats!
rompak says
damn
Ruck says
Idol Billy,
Panu at kailan nagagamit or sa alin devices nagagamit ang OSI at TCP/IP?
Kung parehas lng sila ng gamit bakit pa ginawa ang TCP/IP?
Billy says
For simplicity. More on that on the coming videos. 🙂
Cherry says
ano ang kaibahan sa TCP/IP at UDP???
Tataru says
TCP/IP is for sending Emails then UDP is more on Livestreaming, multiplayer games and etc.
Sam says
Hi po Sir Billy, napansin ko lang po na mas recent na naimbento ang OSI model kaysa sa TCP/IP model. Correct me na lang po if I’m wrong, I searched for OSI’s development date and it was on 1984, much recent then with TCP/IP’s development which is on 1970. 🙂 Bakit po considered ang OSI as outdated at bakit pa po gumawa nito kung yung TCP/IP ay mas simple na? Thanks po and God bless!
Sam says
Also Sir, would you kindly explain po further yung diagram ng data flow for TCP? Yung sa may part ng internet to link to ethernet…? Ano po ba ang ethernet? Sorry po and thank you Sir! God bless po 🙂
Billy says
Read Ethernet technology here.
Sam says
Okay po 🙂 Thanks po!
Paulo Bollosa says
Magkakaroon din po ba kau ng published Physical Book nung pong CCNA Basic And Fundamentals?
Billy says
Maybe yes, this year end. 😉
Lenard Reyes says
bakit po ung iba 5 layers ung TCP/IP model nila
Application
Transport
Network
Data link
Physical
ano po ba ung tama? pag TCP/IP na ang pinaguusapan