Thursday, December 17, 2015

Examining the Transport Layer

As you're probably noticed I'm skipping over a few sections of the OSI model intentionally. The Transport layer is where I get the most confused, so this blog post is to help myself and all of you (possibly).

The Transport Layer, layer 4 of the OSI model is meant to reliability transfer data by error correction. Two different categories handle this traffic.
  • Transmission Control Protocol(TCP) | Connection-oriented - Specific parameters are established before data is sent
  • User Datagram Protocol(UDP) | Connectionless - Data sends at best effort, no connection is set before hand.
This seems like a great place to say, let's just stick with TCP right? Well no, in TCP each packet is 
  • Connection Establishment(3-Way Handshake..What?)
  • Segmented and sequenced to ensure proper data when reassembly has completed.
  • Flow Control - transfer rate is negotiated to prevent congestion
You recall workstations and devices having an IP address, correct? While network devices are able to obtain connection to different services and applications. We need to define what traffic is what. The Transport Layer is responsible to determine which OSI layer to divert the packet to depending on this traffic, or port number

Service or services are able to run on a single computer, these are determined by port numbers and look like this: www.google.com80. For example, a web hosting server would be using port 80(HTTP) to deliver a website to clients. I'd sure you'll notice we don't type a ":80" after a website that's because browsers by default place HTTP in the front of a website for you. So, in reality: www.google.com, really looks like this: http://www.google.com.

Ports 0-1023 are reserved and are considered, well-known. Ports 1024-49151 are reserved by the IANA upon request. From 49152 - 65536 cannot be registered, and are considered dynamic. Here's a short list of well-known ones:


Remember that 3-Way HandShake business I was talking about? That's what happens during each TCP packet needing to be transferred. For example, let's say Host A needs to access a website from Server B. Before any HTTP(Port80) traffic sends over. An acknowledgement needs to be established, like someone answering a phone call.
  • Host A - Sends over a Syn or synchronize message to Server B to initiate a connection
  • Server B - Sends back an Acknowledgement or ACK to Host A. Server B also sends over a SYN message to keep the sequence in check. Thus Host A receives a SYN + ACK from Server B.
  • Host A - Completes 3-Way Handshake by sending an ACK to Server B's SYN message.
Passive Open - to ensure complete communication to a specific port from the Internet. You may have check a port forward configuration on your firewall, by going to canyouseeme.org. You would supply your public IP address and desired port. If your configuration worked, it would state open.

I've reached my limit on TCP/UDP, further information can of course be found at: https://en.wikipedia.org/wiki/Transport_layer .

No comments:

Post a Comment