Woodstock Blog

a tech blog for general algorithmic interview questions

[Design] Networks and TCP/IP

Overview

Internet protocol suite is a networking model and communications protocols used by the Internet. It is commonly known as TCP/IP.

Four abstraction layers:

  1. Application layer
  2. Transport layer
  3. Internet layer
  4. Link layer

The protocols are maintained by the Internet Engineering Task Force (IETF).

A summary of four-layer model

  1. Application: authentication, compression, and end user services
  2. Transport: handles the flow of data between systems and provides access to the network for applications via the BSD socket library
  3. Network: packet routing
  4. Link: Kernel OS/device driver interface to the network interface on the computer.

source

More details

The Application layer:

  1. where applications create user data and communicate with other applications on another host (make use of Transport Layer to provide reliable or unreliable pipes to other processes).
  2. different application architecture, such as the client-server model and peer-to-peer.
  3. SMTP, FTP, SSH, HTTP all operate above this layer.
  4. processes are addressed via ports.

Well-known official port numbers are in the range of 0 - 255. Port 256 - 1023 are reserved for other well-known services. 1024 - 65535 are neither in-use nor reserved. They are used when TCP/IP automatically assigns port numbers to client programs.

The Transport Layer:

  1. performs host-to-host communications.
  2. “UDP” provides unreliable datagram service.
  3. Transmission Control Protocol” provides flow-control, connection establishment, and reliable transmission of data.

The Internet layer:

  1. exchange datagrams across network boundaries.
  2. establishes internetworking thus establishes the Internet.
  3. Internet Protocol”, defines IP addresses and the routing structures used for the TCP/IP protocol suite.
  4. routing: transport datagrams to the next IP router that has the connectivity to a network closer to the final data destination.

The Link layer:

  1. defines the networking methods within local network link without intervening routers.
  2. describe local network topology and the interfaces needed to effect transmission of Internet layer datagrams to next-neighbor hosts.

Difference from OSI

The Internet protocol suite was in use before the OSI model, and is well established worldwide.

The OSI model, however, is a proven concept that is used in all other data communications protocols. It will continue to be used as a guideline for all other communications applications.