Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

Protocol at which OSI layer

Hello Expert,

How it is decided that BGP is working at application layer and OSPF is working at layer-4. The difference here is in BGP it relies on TCP for transport and OSPF has its own transport mechanism. Does this difference play role in deciding the working of particular protocol at which layer.

In a nutshell wanna know which mechanism decide working of protocol at particular layer.

Regards # Mahesh                  

Everyone's tags (1)
8 REPLIES
New Member

Re:Protocol at which OSI layer

Hoi,


BGP is working at Layer 7 because he's data is encapsulated into a Layer 4 segment.

And OSPF, as a Transport Layer protocol is encapsulated directly into a Layer 3 packet.

Maybe other Cisco expert will more describe this behavior in details :)


Sent from Cisco Technical Support Android App

Cisco Employee

Re:Protocol at which OSI layer

Mahesh,

This is a topic for holy wars, you know

Sometimes protocols are put into layers based on which features they already depend on. This would indeed make BGP an L7 protocol, as it runs over TCP. The same would go for RIP, as it runs over UDP.

But I do not agree with this approach. In my opinion, it is better to have a look at the services the protocol provides itself to see what layer it resides at. Use a common sense: if the routing protocol provides control information to the data plane of a router, does it not make it more of an L3 control plane protocol?

You see, each layer has its typical responsibilities. The L7 provides a software engineer with tools to make end user applications and end user services network-aware. But neither BGP nor RIP are directly used by end users. Both BGP, RIP and OSPF (and IS-IS and EIGRP) - they all are concerned with routing. They supply the control data for a router to perform its routing tasks. So from this perspective, all of them - IS-IS, OSPF, RIP, (E)IGRP, BGP - are L3 protocols, more specifically, L3 control protocols, regardless of what encapsulation they use. Control protocols often cause headaches when trying to squeeze them into layers because they willingly violate them - you see, you can have a protocol running over TCP that manipulates some remote switch's CAM table. Is it an application protocol? Hardly! It would be an L2 control protocol.

The classic layering works for data plane protocols... but control plane, management plane, they tend to exceed the boundaries of typical layering. Recall the ATM reference model - it was actually a cube containing layers and planes because the management and control of the elements needed to exceed the boundaries of simple layering. See this example (used from http://www.thatstechnology.com/wp-content/images/computer-networks/ATM%20reference%20Model.jpg)

http://www.thatstechnology.com/wp-content/images/computer-networks/ATM%20reference%20Model.jpg

Notice how the Plane Management covers all layers, and how the layers are split into Control Plane and User Planes. In ATM, it was already clear that strict layering does not work in terms of performing control and management over the network.

I do not think I have resolved this debate, because this is a topic that pops up every now and then and is a matter of personal preferences more than technical accuracy.

Best regards,

Peter

Re:Protocol at which OSI layer

Hi Peter,

Thanks for explanation.

Though debate is not resolved the information provided by you is quite useful...as always

Regards # mahesh

Super Bronze

Re:Protocol at which OSI layer

Disclaimer

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.

Liability Disclaimer

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.

Posting

As Peter notes, this is a "holy war" topic, which arises from time-to-time on these forums.

Peter is just wrong!!!

Personally I consider routing protocols "applications" that support the L3 layer.  However, in the OSI model, often they are considered running at that layer they support, but a protocol like BGP, which uses TCP (a L4 service), is "above" L3, so how can this be?  Hence confusion.

Note carefully how Peter says ". . .  more specificially, L3 control protocols . . ."

In previous posts, I noted the ITU treats routing protocols as a different/special case from the data plane layers.  Which I think adds some clarity lacking in the OSI model.  Laugh - and don't forget, there are lots of "network models", another "holy war" subject.

PS:

For more fun, consider Cisco's PfR.  It changes routing information, looking at attributes beyond/outside of just L3 reachability.  What kind of protocol is this?

New Member

Protocol at which OSI layer

Hello Mahesh ,

BGP  uses the TCP as its transport protocol, which provides  connection-oriented reliable delivery. In this way, BGP assumes that its  communication is reliable and, therefore, BGP does not have to  implement any retransmission or error-recovery mechanisms, like EIGRP  does. BGP information is carried inside TCP segments using protocol 179;  these segments are carried inside IP packets.

BGP is the only IP routing protocol to use TCP as its transport layer with a dedicated TCP port for protocol identification.

OSPF and EIGRP reside directly above the IP layer. (Using the IP  protocol ID , refer the IPV4 header diagram and check the details of  protocol field).

Regards

Sandeep 

Re:Protocol at which OSI layer

Hello Sandep,

Thanks for your reply.

Honestly with your answer I really don't understand how do we conclude that BGP is working at application layer and others not.

Regards # mahesh

New Member

Re:Protocol at which OSI layer

Hello Mahesh ,

BGP rides over our existing TCP/IP structure,

BGP and RIP are application layer protocols cause they are dependent on TCP and UDP , which encapsulates BGP and RIP segments respectively.

As we know BGP requires destination reachability to establish peering .

This is called NLRI (Network layer reachability information) which can be provided by IGP which is identified as IP protocol ID under any IP packet or by simple point to point connectivity via IP.

BGP requires reachability before exchanging routing information which relies on TCP connection i.e. Three-way handshake.

In this way we observe BGP is considered an application layer protocol because it utilizes TCP in order to encapsulate packets. Which is similar to other application layer protocols like HTTP or Telnet , because it requires IP reachability first before it looks for dedicated TCP port to initiate a TCP connection with its peer .

RIP has a similar setup, though it uses UDP instead of TCP.

EIGRP and OSPF are not considered application layer protocols, rather they are Network layer protocols since they are respectively using IP protocol 88 and IP protocol 89 to communicate , you can refer the IPV4 header diagram and check the details of protocol field where there is dedicated port under the protocol field for each layer 3 protocol .

The application layer contains all protocols for specific data communications services on a process-to-process level.

Many protocols are implemented as user-space programs, i.e. applications depending on the services provided by the application layer.

Also BGP uses TCP as its transport protocol. This eliminates the need to implement explicit update fragmentation, retransmission, acknowledgement, and sequencing(RFC-4271).BGP uses its own mechanism (unlike OSPF inserting its PDUs directly into frames running at the data link layer).

Also with BGP you can have neighborship with indirectly connected routers which is not possible with OSPF or IS-IS. This means BGP uses its own internet protocol suite(set of communications protocols) and depends on TCP connection .

As per the given details , it can be considered that BGP/RIP works above Layer 3/IP .. but it can still be a point of discussion and preference to conclude BGP works on application layer .

Hope , I have added some info. to your query .

Regards

Sandeep

Re:Protocol at which OSI layer

Hi Sandeep,

Thanks for reply.

If I combine top 4 layers (Transport,Session,Presentation,Application) to a single layer and name it application layer then yes I am able to convince myself that BGP is working at application layer and OSPF is working at Layer-3.

Regards # Mahesh

1748
Views
15
Helpful
8
Replies
CreatePlease login to create content