How we decide which protocol belong to which layer ?
My understanding is , it depend on the protocol filed in case of IP(Protocol: ICMP(1) ) and Type field in case of Ethernet.
So lets say if IP Protocol:ICMP(1) then it is encapsulated inside IP, so it is layer 3.
If Type field of Ethernet (Ethernet Type 0x0800), can we say IP is encapsulated inside frame ? Then IP is layer 2 or Layer 3. ?
Can you confirm if my understanding is correct or not
How to decide which protocol belongs to which OSI layer?
My simple question is to read RFC for the particular Protocol.
ICMP is actually a user of the IP protocol--in other words, ICMP messages must be encapsulated within IP packets. However, ICMP is implemented as part of the IP layer. So ICMP processing can be viewed as occurring parallel to, or as part of, IP processing. Therefore, in the topic on TCP/IP-based layered network, ICMP is shown as a layer 3 protocol.
Hi Deepak Kumar,
Thanks for your input.
Basically I am trying to understand the logic for defining any protocol as L2 or L3.
MY understand is if the any protocol encapsulated into IP its Layer 3 , if it encapsulated into ethernet then it is L2.
Did I get it right ?
Your logic is correct, so is the protocol deals with IP addresses? then layer 3 is involved, is it only Ethernet and MAC addresses then layer 2, if ports are involved then layer4+ , if application specific then can be layer 7.