Introduce and explain the Network model
OSI Model:
The Seven Layers Of The OSI Model
7) Application.
This is the layer the user is interacting with (software). This can be skype, chrome etc.
Note that only applications who employ networking protocols count as part of layer 7. A simple text editor with no networking capability is technically not part of the application layer, even though it too is an “application”.
6) Presentation.
This is basically the OS.
5) Session.
This layer deals with communication between two devices. For example: when the user goes to a website, the user’s computer must open a session between itself and the server hosting the website, thus allowing the user to receive the website in the first place. The same goes for any sort of communication, ie VOIP etc. Synchronizing happens when a session is interrupted and resumed at the point at which it was interrupted.
4) Transport.
Responsible for host-to-host communication.
Deals with how much information is sent back and forth in a session. Using the website example it handles the information the user sends in a request, and then the information the server has to retrieve and send back in order for you to see the website.
It does things such as packet confirmation (making sure that sent packets have been received).
It ensures that multiple applications can send data, thus it must keep track of what data comes from what application, which it combines into a single flow of data, which it sends to the lower layers.
3) Network.
This is where routers operate. Anything regarding the TCP/IP protocol happens here. Think IP’s, subnet masks, default gateways, DNS etc.
Makes it possible to interconnect networks.
2) Data Link.
This is where switches operate. They ensure that computers can talk to each other.
1) Physical.
Unlike all the other layers, this is the only layer that actually physically sends data across a network. Any data from layer 7 – 2 must go through layer 1 to reach another computer.
This is where stuff like connecting computers together with cables happen. Of course, the same is true for wireless networks despite there not being any physical cable present.
TCP/IP Model:
The Four Layers in the TCP/IP Model
4) Application
Equivalent to Application, Presentation and Session in OSI.
Think HTTP, FTP, SMTP, SSH, DNS, DHCP etc, etc.
The layer provides a way for applications to use network services.
Real world example: google.com
For example when you use a browser to access google.com, the browser serves as the application layer of the TCP/IP model. The goal is to communicate with the web server for google, and to do that, we need the transport layer.
3) Transport (Host-to-Host)
Is responsible for ensuring logical connections between hosts, and transfer of data. In other words, it acts as the delivery service used by the application layer above.
Data can be delivered with or without reliability.
TCP (Transmission Control Protocol) keeps track of packets sent and received, hence reliable.
If A is sending a stream of data to B, TCP will split it into smaller blocks called segments. Each segment is checked for errors, and retransmitted if any are found. A knows whether a segmented contains errors depending upon the acknowledgement it receives from B.
Note that multiple segments can be sent in-between acknowledgements to minimize waiting time.
If an error is detected, the faulty data will be retransmitted.
UDP (User Datagram Protocol) does not keep track of packets received, hence “unreliable” (but faster). Useful for streaming video, VIOP and other services where lost packets are not of great concern.
UDP is connectionless, meaning that A doesn’t initiate a transport connection to B before it starts sending data. If B detects an error, it simply ignores it (rather than acknowledge the error to A), leaving any potential fix entirely up to A.
In other words, if an error is detected, the faulty data won’t be retransmitted as a result of this protocol.
Whether TCP or UDP is used depends on the what the application is set up to do, and in the case of a browser and HTTP, TCP is the default method used.
Real world example: google.com continued
When the browser (application) wants to communicate with the web server that is google.com, it wants to
open a connection to the server (using a socket address)
send data to the server (either with or without reliability (TCP or UDP))
receive data from the server
close the connection
The web server on the other hand, needs to
be ready to receive requests from clients
receive data from clients
send data to clients
be notified that the connection is closed, or alternatively close it itself
A socket address is simply the IP and port of the web server. Google.com equals 74.125.232.104 and the port is 80, hence the socket address is “74.125.232.104:80″.
A web browser defaults to 80, so including it is optional. However if the web server is configured to receive connections only on port for example 1040, it must be specified as such. In other words, the web server would in that case be ready to receive client requests on 1040 rather than 80.
2) Internet
Equivalent to Network layer in OSI.
Ensures routing of data between different networks and subnets.
IP and ARP (Address Resolution Protocol) are the main protocols used here.
ARP is used to convert IPs to physical addresses. In this case, a physical address means the MAC address.
If for example A wants to communicate with B through a switch, but the MAC address of B is unknown. First a cached ARP table is used to check for the MAC address, if it’s not found, an ARP message (FF:FF:FF:FF:FF:FF) is broadcasted on the network, requesting and answer from the IP of B. B replies, and the message can be sent.
1) Network
Equivalent to Data Link and Physical layer in OSI.
This explains why TCP/IP omits “physical” as a layer in its model.
It does things such as place data in frames and passes it between hosts.
To learn more about frames, read: Introduction to Ethernet
OSI Model vs TCP/IP
No comments:
Post a Comment