One question thats seems to get so many diferent and contradicting anwers , I am confused too , while if we were apply the OSI layer theory, that every layer uses the layer below it to be able to complete the end to end transmission. TCP ( Layer 4) uses IP (Layer 3). When IP receives a TCP segment it marks the Protocol Number feild in the IP header as 6 which then helps the final receiver ( the destination IP in the IP Header) of the IP packet to understand tht it needs to hand over the packet to TCP for further processing. The same thing happens with EIGRP ( Protocol number 88) and OSPF ( Protocol number 89) .
One of the refernces in the link below says
"In an IP header, the Protocol field identifies the service in the next higher level in the protocol stack to which data is passed."
Theoretically if EIGRP & OSPF uses IP they are supposed to be at a layer above IP ie Layer 4.
I've often read OSPF and EIGRP being termed as Layer 3 and have had trouble finding out why? I am hoping that I get some good lessons from all who know this better.
Thanks in Advance
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
And for another opinion . . . (laugh)
Routing protocols are not layer 3 or 4, as they support layer 3 but are not layer 3. I recall (?) the ITU documents make this clear as routing protocols are documented separately from main OSI model which is about moving the bits/frames/packets, etc.
Consider static routing, what's that? It's how you, a person, configure, or support layer 3 information, used by the router to make its forwarding/routing decision. So are network engineers layer 3 too?
IP layer 3 accepts a packet, looks at its destination address, and then makes a routing decision for that packet. That has nothing to do with how the routing protocol works or how it updates the routing information. Similarly, the command line syntax for entering static routes, or how "efficiently" (process, optimal, fast, CEF, etc.) the routing lookup is accomplished, supports L3, but it is not L3.
Since routing protocols support L3, how they share their information recognizes they need to be careful how they use the network (inband), they're supporting. For example, as routing protocols are trying to keep L3 informed of the current topology, they realize there will be times it's out of date, and so generally (logically) don't rely on the network to move routing information between routing peers depending on network L3. (That's the reason why routing peers usually share physical media and depend on L2 broadcasts and/or multicast.)
If the routing protocol are, themselves, not L3, what are they? Well, since routing protocol are really dedicated applications, sharing data (which happens to be the L3 topology), I consider them like other services, L7 in OSI, or the application layer in IP. Again, though, these special "applications" support the network's L3 layer, and might do so using various layers of the network.
Also consider a router's L3 being populated with statics, EIGRP and OSPF. If these 3 sources all disagree about topology, how is the L3 topology determined? It's determined by the L3 of the router, not the routing protocols themselves. (I.e. something with "better" knowledge has to decide what to accept from the routing protocols.)
Umesh, Nish, Jon,
Positioning of protocols to layers is often a point of contention, as Jon has very clearly stated.
First of all, trying to squeeze TCP/IP protocols into OSI terminology is bound to fail at some point because TCP/IP was not designed according to OSI model, never observed it, nor was trying to emulate or mimic it. Just because TCP/IP and OSI are similar does not mean you can cleanly do the mapping of protocols in TCP/IP into layers of OSI. Many misunderstandings about the protocol placement are rooted here.
Second, most approaches use a gross simplification: they believe that "if the messages of protocol ABC are placed into datagrams of Layer N, then the protocol ABC must be on Layer N+1". This premise is illustrative but it is not definitoric, and therefore not universally true. Layers are defined by services they provide , not by services they depend on. No offense intended but I really wish all those people who make very categorical and resolute statements about this protocol being in Layer X and that protocol being in Layer Y in fact read the OSI layer specifications to see how the layers are defined, and only then made their judgements. Anyone interested - please see http://www.itu.int/ITU-T/recommendations/index.aspx?ser=X and the X.200 series of recommendations. Good reading for long winter evenings (sorta... )
Third, the layering works well for data flows if each layer already somehow, automagically, knows all the necessary information required to complete its task. However, the control of individual layers, i.e. creating and communicating the information that directs the operation of each layer (routing table contents, MAC table contents, load sharing table contents, etc.) reaches beyond the layering model and often, it plainly violates it just in order to make it simple and work. For example, BGP delivers control information for the internetwork (or the OSI network) layer. But BGP runs over TCP. Is BGP an application layer protocol? No, it isn't - because it does not deliver/provide application-layer services! The fact it runs over TCP is irrelevant. BGP provides control information for the network layer, and should thus be considered a Layer3 control protocol. Or, think of the interrelation of TCP MSS and MTU. The MTU is the maximum payload size of a Layer2 frame. The MSS is the maximum payload size of the Layer4 segment. How would TCP, a Layer4 protocol, know about Layer2 payload size limitations if the strict layering was observed? Well, here, because the size of MTU and MSS constitutes a control information, the layering is not observed that strictly.
With respect to any routing protocol - my personal opinion is that a routing protocol creates and communicates the control information to allow the network layer do its job. The protocol may run over Layer2 frames such as IS-IS, it may run directly over IP just like OSPF or EIGRP, it may run over UDP or TCP as RIP or BGP do... that does not really matter. None of IS-IS, OSPF, EIGRP, RIP, BGP provide any other service or capability beyond populating routing tables, i.e. data structures defined for and within the network layer operation. Therefore, I personally consider all these routing protocols to sit at Layer3 because their target is the control of Layer3 operation.
My two cents...