Question

Can anyone also tell me why we have 2 layered models(OSI AND TCP/IP)?

Just having a bit of trouble with the question above. Can anyone kindly help?

3

4 Answers

TCP is layer 4. MAC is layer 2. IP addresses are layer 3.

2

We have two layered models because the TCP/IP Model was first defined by the Department of Defense, where they only had one specific goal of creating a nationwide network. The OSI Model is the standard model created by the International Organization for Standardization (ISO) which defines how software and hardware components involved in a network communication should divide the labor and interact with one another. In other words, the OSI Model is the conceptual model that is used for communication of telecom or computing systems that disregards the underlying internal structure or technology.

I'll start with the TCP/IP model first, since it was the first one developed out of the two models.The TCP/IP model is much more loose than the OSI model, so there are only four layers and they don't quite correspond to each layer of the OSI Model.

TCP/IP MODEL

The TCP/IP layers are:

  • Application Layer
  • Transport Layer
  • Internet Layer
  • Network Interface Layer

In the picture are also some protocols/services that are associated with the corresponding layer.

TCP/IP Model

Layer 4 - Application Layer The application layer defines protocols and how host programs interface with the transport layer services to use the network.

Layer 3 - Transport Layer The transport layer provides communication session management between host computers. Defines the level of service and status of the connection used when transporting data.

Layer 2 - Internet Layer The Internet layer packages data into IP datagrams, which contain source and destination address information that is uses to forward the datagram between hosts and across networks. It also performs the routing of the IP datagrams.

Layer 1 - Network Interface Layer The Network Interface layer specifies details of how data is physically sent through the network. It also adds MAC address information to specify which hardware device the message came from, and which hardware device the message is going to

OSI MODEL

The OSI model is not mandated for networking, but because of it's well designed structure, most protocols and systems adhere to this model quite closely. The main purpose of this model is to discuss or describe individual network functions so someone can understand them. The OSI Model has seven layers:

  • Application
  • Presentation
  • Session
  • Transport
  • Network
  • Data Link
  • Physical

OSI Model

Layer 7 - Application Layer This layer works with the application software to provide communications functions as required. It verifies the availability of a communications partner and the resources to support any data transfer.

Layer 6 - Presentation Layer This layer checks to ensure that the data is compatible with the communication system resources. It also handles any data formatting or code conversion that may be needed.

Layer 5 - Session Layer This layer handles the authentication and authorization functions. It also manages the connection between the two communicating devices. It establishes the connection, maintains the connection, and terminates the connection.

Layer 4 - Transport Layer This layer provides Quality of Service functions to ensure the complete delivery of the data. The integrity of the data is guaranteed at this layer because of the error correction and similar functions.

Layer 3 - Network Layer The network layer handles packed routing through logical addressing and switching.

Layer 2 - Data Link Layer This data link layer unpacks data into frames that can be transmitted across the physical media.

Layer 1 - Physical Layer The physical layer defines the logic levels, data rates, physical media and data conversion functions that make up the bit stream of packets that are sent from one device to another.

To answer the question in your title

If you look at the TCP/IP Model explanation above, it essentially answers your question. A MAC address would be found in the Network Interface Layer (Layer 1) of the TCP/IP Model. An IP address would be found in the Internet Layer (Layer 2). To give you a small hint about the ports, TCP and UDP use port numbers for transmission. There is also something special about the FF:FF:FF:FF:FF:FF MAC address. I'll leave you to find that one out.

TCP/IP layer model was introduced before the ISO model, emerged from the US DoD. The purpose of it was not introducing general standards or not as to be a description for all network communication. Here, the TCP or Transmission Control Protocol and IP or Internet Protocol are 2 standards. This model proposed 4 layers.

Brief overview of TCP and IP protocols.

TCP

  • TCP defines how to establish, deliver and close communication channels properly and reliably (by acknowledging received packets). Since it establishes a connection, ensures the receiving end exists, therefore, it is a connection oriented protocol while IP is not. TCP communication ends when the applications on both ends successfully complete sending and receiving data.
  • TCP guarantees the delivery of the data chunks (Protocol Datagrams) called packets. The data from application are divided into chunks and a header is added. This creates a chunk called Segment. It utilizes windowing to manage flow control to avoid errors.
  • Communication services. TCP is a the next higher level to IP. It interacts with application layer.

IP

  • IP basically helps you to find the required destination (routing and addressing) and deliver data, from a computer to another computer over networked medium.
  • This is a connectionless protocol.
  • Packets from the TCP layer are encapsulated in IP datagrams and forwarded to next level. This has few mechanisms to avoid certain errors.

The Open System Interconnect model is a standard. It describes how applications cam communicate over a network. It is created by the ISO. This model is used as a reference and also called a 'Reference Model' to make sure each product of the different vendor interoperate without problems. This model proposed 7 layers each layer specifically defining the software/hardware layers and responsibilities/communication functions, flow and related protocols. TCP/IP model does not cleanly map to the OSI model. This is not something actually implemented but used as a guide (reference, as mentioned before).

This is a comparison. Image credit goes to buildingautomationmonthly.com Answers to the questions.

enter image description here

Answers to the questions

  1. An IP address (A Public IP Address). Internet layer uses these addresses to router IP datagrams.
  2. Same as above but the address is a Private IP (Range 192.168.0.0 - 192.168.255.255).
  3. This is also an IP but it is known as the Loopback Address. It is a virtual interface - no data is passed to actual network interfaces but loops back (Address block - 127.0.0.0/8). This is also mapped to hostnames such as localhost.
  4. A MAC address (Network Access Layer) assigned to a network interface. These addresses are used as network addresses in the mentioned layer (i.e. with IEEE network technologies such as Ethernet and WiFi).
  5. Same as above. This is a broadcast address.
  6. Port 80 is used by HTTP protocol (Web). This belongs to the Application Layer. Ports are used to establish communication channels (sockets). Web server listen for incoming requests through this port. This is categorized as a well known port (from 0 to 1023 are categorized as well known ports). These are used by system processes and used to provide various services. The international body IANA is responsible for assigning ports and maintaining the assignments.

  7. Same as above (a port). This belongs to the next category, Registered Ports. These are used for specific services. However, these ports can also be used to ordinary tasks. The range is from 1024 to 49151. Port 2000 is used by Cisco, callbook and other applications (including malware).

The a. part is based on the TCP/IP protocol stack:-

  • Application Layer
  • Transport Layer
  • Internet Layer (a.k.a. Network Layer)
  • Link Layer (a.k.a. Physical Layer)

I don't know if I've fully understood the b. part of Q1(b). But the following is what I'd go with.

Answers:

  1. 136.206.1.4

    a. Internet Layer

    b. IPv4 Public IP

  2. 192.168.1.10

    a. Internet Layer

    b. IPv4 Private IP

  3. 127.0.0.1

    a. Internet Layer

    b. IPv4 Loopback

  4. 0C:5F:56:C0:DD:08

    a. Link Layer

    b. Mac address

  5. FF:FF:FF:FF:FF:FF

    a. Link Layer

    b. Broadcst MAC

  6. Port 80

    a. Application Layer

    b. HTTP, ip-address:80 ; example:- 192.168.126.132:80

  7. Port 2000

    a. SCCP / Skinny protocol

    b. Transport Layer

To answer your added question, simply consider any sort of communication between devices across network(s)

TCP/IP : Used for identifying protocols and their relationships during communication through the network

OSI/IP : Used to identify the devices corresponding to the protocols , and their relationships, that are involved during this communication

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy