08-05-2022 07:58 AM
While in discussion we are unable to conclude why BGP is Application layer protocol?? We know it uses tcp port number 179 and when tcp is used it should be transport layer protocol.
Any good documented answers?
Solved! Go to Solution.
08-05-2022 12:02 PM
BGP is an application.
BGP does have a defined network messaging format, that could be, in theory, be used independently of BGP, like other application layer protocols (e.g. HTTP, FTP, SMTP, etc.) are used, but since (to my knowledge) only BGP use BGP messaging, I would consider that part of the application (BGP) and not a standalone (L7) application layer protocol. Admittedly, this distinction is in a grey area, because many of the "known" applications protocols are very much tied to the application that initially defined them; just those are more likely to be just a little more diverse in follow on applications that use that protocol too. Also because of the diversity, those application protocols might evolve with additional features as follow on applications, or original applications, evolve too.
08-06-2022 02:00 PM
Hi everyone,
I would like to offer a different view on this topic. I will be a little assertive, beware - but no bad intent! : D
Protocols are correctly classified into layers based on the services they provide, not based on the protocol they ride on top of. That approach is tempting - but wrong. It incidentally works with user data and data plane protocols such as SMTP, for example - because they are intended to pass their data all the way from top to bottom through the network stack and back. But this approach fails when we try to apply it to control plane protocols because there is a conflict: Control plane protocols need to provide services at different layers, starting from Layer2, but they also need to communicate between network nodes - and for that communication, they can reuse any suitable protocol from the whole stack. So for control plane protocols, this negates any attempts to classify them based on the protocol they use to carry their own messages.
Considering BGP to be an application layer protocol is bordering on absurd. If we think about it, what application services would BGP provide? What user data does BGP carry? What user application directly runs on top of BGP? You guessed it - none. How can we possibly compare services provided by BGP to services provided by unambiguous application layer protocols - POP3, IMAP, SMTP, HTTP, FTP, SSH, to name a few? Even a fleeting comparison must make it beyond obvious that BGP is just not in the same league as these application protocols; BGP's services focus on Layer3, nowadays with VXLAN and EVPN even on Layer2, but in no circumstances would BGP be the protocol exposed all the way to a user's application, carrying user's data for user consumption.
BGP runs on top of TCP, granted. But does it matter? Not at all. RIP runs on top of UDP which is also a transport layer protocol, yet we don't doubt as much about RIP being a Layer3 protocol, do we? And - even though a stretch - we could modify STP (yes, Spanning Tree Protocol) to run on top of UDP. Would that change STP into an application protocol too, just because it would run on top of UDP?
And, granted, we see BGP often as a binary application, a process, running in the operating systems. Does perhaps that matter? Not at all, either. BGP is a set of algorithms. How else than a computer program, a process, an application, should it exist, then? Have you checked the list of IOS-XE or NX-OS processes? You will see STP process there too. Yet we don't call STP an application layer protocol because of that, either. In NX-OS, there is even the netstack process that is, in essence, a userspace reimplementation of the TCP/IP which otherwise exists as a driver. Would we now call the entire set of TCP + UDP + ICMP + IP + ARP "application layer protocols" just because they run as userspace processes in netstack?
I pointed out these absurdities so strongly simply because they're so obvious, yet so often overlooked.
BGP, first of all, is a control plane protocol. That immediately allows us to have the full right to disregard what are its underlying protocols (TCP and IP and some L2) because as a control plane protocol, it needs to serve some lower layer in the stack. And, clearly, this is the network layer, or Layer3, by OSI (the "internet layer" by TCP/IP architecture). BGP is all concerned about routing information and that is Layer3's job. BGP provides the intelligence, the knowledge, the information for Layer3 to operate properly, as it populates routing tables. I even invite you to consider that with the prominent use of BGP in Layer2 VPN applications, recently EVPN where it carries information about MAC addresses, BGP has effectively extended its control plane services also to Layer2.
The bottom line is: The Russian doll approach to classifying protocols works only for protocols that handle user data for ultimate user consumption, and even there, the approach is not the proper one; it just happens to work. Correctly, every protocol has a set of services it offers - that is why it has been created, to offer services (not to consume them). And it is those services it is offering that define what layer the protocol belongs to.
My 0.02€ ; )
Best regards,
Peter
08-05-2022 08:24 AM - edited 08-05-2022 08:24 AM
Hello,
As with other "Applications" they also have well known TCP port numbers. RIP is the same way with UDP. EIGRP and OSPF are IP protocols as they have their own IP protocol of 88 and 89.
Hope that helps
-David
08-05-2022 08:32 AM
I agree to your point David but as application layer functionality is to show display the data in visual format in bgp but its not the case with BGP and it also doesn't use any functionality of the presentation layer so why it is to be known as application layer.
08-05-2022 10:14 AM
So I wouldn't say that so much as you don't HAVE to have visual formats to display applications. You can have an application that has no display or visual properties. As I mentioned with RIP it is also an Application protocol. It uses the lower layers (Transport, Network, Data Link and Physical) to help deliver the Application data.
-David
08-05-2022 12:02 PM
BGP is an application.
BGP does have a defined network messaging format, that could be, in theory, be used independently of BGP, like other application layer protocols (e.g. HTTP, FTP, SMTP, etc.) are used, but since (to my knowledge) only BGP use BGP messaging, I would consider that part of the application (BGP) and not a standalone (L7) application layer protocol. Admittedly, this distinction is in a grey area, because many of the "known" applications protocols are very much tied to the application that initially defined them; just those are more likely to be just a little more diverse in follow on applications that use that protocol too. Also because of the diversity, those application protocols might evolve with additional features as follow on applications, or original applications, evolve too.
08-06-2022 02:00 PM
Hi everyone,
I would like to offer a different view on this topic. I will be a little assertive, beware - but no bad intent! : D
Protocols are correctly classified into layers based on the services they provide, not based on the protocol they ride on top of. That approach is tempting - but wrong. It incidentally works with user data and data plane protocols such as SMTP, for example - because they are intended to pass their data all the way from top to bottom through the network stack and back. But this approach fails when we try to apply it to control plane protocols because there is a conflict: Control plane protocols need to provide services at different layers, starting from Layer2, but they also need to communicate between network nodes - and for that communication, they can reuse any suitable protocol from the whole stack. So for control plane protocols, this negates any attempts to classify them based on the protocol they use to carry their own messages.
Considering BGP to be an application layer protocol is bordering on absurd. If we think about it, what application services would BGP provide? What user data does BGP carry? What user application directly runs on top of BGP? You guessed it - none. How can we possibly compare services provided by BGP to services provided by unambiguous application layer protocols - POP3, IMAP, SMTP, HTTP, FTP, SSH, to name a few? Even a fleeting comparison must make it beyond obvious that BGP is just not in the same league as these application protocols; BGP's services focus on Layer3, nowadays with VXLAN and EVPN even on Layer2, but in no circumstances would BGP be the protocol exposed all the way to a user's application, carrying user's data for user consumption.
BGP runs on top of TCP, granted. But does it matter? Not at all. RIP runs on top of UDP which is also a transport layer protocol, yet we don't doubt as much about RIP being a Layer3 protocol, do we? And - even though a stretch - we could modify STP (yes, Spanning Tree Protocol) to run on top of UDP. Would that change STP into an application protocol too, just because it would run on top of UDP?
And, granted, we see BGP often as a binary application, a process, running in the operating systems. Does perhaps that matter? Not at all, either. BGP is a set of algorithms. How else than a computer program, a process, an application, should it exist, then? Have you checked the list of IOS-XE or NX-OS processes? You will see STP process there too. Yet we don't call STP an application layer protocol because of that, either. In NX-OS, there is even the netstack process that is, in essence, a userspace reimplementation of the TCP/IP which otherwise exists as a driver. Would we now call the entire set of TCP + UDP + ICMP + IP + ARP "application layer protocols" just because they run as userspace processes in netstack?
I pointed out these absurdities so strongly simply because they're so obvious, yet so often overlooked.
BGP, first of all, is a control plane protocol. That immediately allows us to have the full right to disregard what are its underlying protocols (TCP and IP and some L2) because as a control plane protocol, it needs to serve some lower layer in the stack. And, clearly, this is the network layer, or Layer3, by OSI (the "internet layer" by TCP/IP architecture). BGP is all concerned about routing information and that is Layer3's job. BGP provides the intelligence, the knowledge, the information for Layer3 to operate properly, as it populates routing tables. I even invite you to consider that with the prominent use of BGP in Layer2 VPN applications, recently EVPN where it carries information about MAC addresses, BGP has effectively extended its control plane services also to Layer2.
The bottom line is: The Russian doll approach to classifying protocols works only for protocols that handle user data for ultimate user consumption, and even there, the approach is not the proper one; it just happens to work. Correctly, every protocol has a set of services it offers - that is why it has been created, to offer services (not to consume them). And it is those services it is offering that define what layer the protocol belongs to.
My 0.02€ ; )
Best regards,
Peter
08-07-2022 06:03 PM - edited 08-08-2022 08:06 AM
Peter, truly always wonderful when you contribute (even if only 0.02€, laugh).
No need to apologize for being assertive, when you have a strong opinion. Always worthwhile to read your explanations and/or thinking.
"Protocols are correctly classified into layers based on the services they provide, not based on the protocol they ride on top of. That approach is tempting - but wrong."
We're discussing the OSI model correct?
If so, could you reference OSI documentation asserting same?
Last time I dug into this, https://community.cisco.com/t5/switching/osi-layer-of-routing-protocol/td-p/1289611 (which was some time ago), I did RTFM (briefly), and didn't notice such an assertion in ISO/IEC 7498-1 (or ITU-T's X.200).
Mind you, ISO/IEC 7498-4, and -1's references to it, seems to infer, for management purposes, such as perhaps controlling the contents of a network node's routing table, can jump about, i.e. OSI model's layer usage doesn't apply, but then again, does that grant naming such a management protocol, after the layer it supports, assuming there's but one layer?
For the last question, I have in mind, SNMP, which I believe is considered a L7 protocol, yet it can impact, L1 (e.g. change Ethernet speed), L2 (e.g. change MTU), L3 (e.g. change IP).
You ask "If we think about it, what application services would BGP provide?" What it does provide, routing information.
Further you ask "What user data does BGP carry? What user application directly runs on top of BGP?", well if using the term "user" in the typical sense, user interaction, none, but all computer software, as the very end, services users, no? But, aside from that, why "user" at all? Reading OSI's documentation about the application layer, doesn't mention user (at least I hadn't noticed such).
Applications in the OSI model sense, appear to be software that communicates to peer software across the network, and, in turn, is at the highest level. Again, users per se, at least in the OSI documentation aren't mentioned, but normally, above a network application would often be found some human interaction with that application. (Hmm, you've never interacted with manual review and/or configuration changes to a routing protocol, like BGP? [Sorry, couldn't resist the barb - laugh])
Oh, and if one thinks, well BGP mostly does what it does w/o much human interaction (beyond setup). True, but I've automated many process systems that use other application protocols, to do things, w/o much human interaction (beyond setup) too.
You also write ". . . but in no circumstances would BGP be the protocol exposed all the way to a user's application, carrying user's data for user consumption.", well, cannot say I know of such a product, but I have used a product that directly tapped into OSPF as an OSPF neighbor, to provide nicely presented information for network engineer type users. I would think a similar product, could be developed for BGP, i.e. a non-routing app peering with a BGP neighbor. Also, unsure how Cisco does it's interaction with BGP when PfR does some of its magic with it, including, I recall (?) being able to send out community strings to "other side" BGP neighbors.
If you think about it, BGP, is very much like other L7 applications, i.e. it communicates with its peers apps, using a defined application protocol, which, probably, goes across the network, to one of its peer, just like any other app using the network. What makes BGP, different, is it interacts with the local device routing process, likely in a proprietary matter. Well, something like FTP, also needs to usually interact with the local data storage system too, and I'm unaware of a standard protocol for that aspect.
"BGP runs on top of TCP, granted. But does it matter? Not at all. RIP runs on top of UDP which is also a transport layer protocol, yet we don't doubt as much about RIP being a Layer3 protocol, do we?"
BGP running on top of TCP, does it matter as an app, no. RIP running on UDP, doubt it's a L3 protocol, yep. (Oh no, Joe's really gone over the edge.)
"And - even though a stretch - we could modify STP (yes, Spanning Tree Protocol) to run on top of UDP. Would that change STP into an application protocol too, just because it would run on top of UDP?"
Don't see why it needs to change to using UDP to be an app. Going up/down the OSI stack, does not, I thought, require something "active" from every layer.
"Would we now call the entire set of TCP + UDP + ICMP + IP + ARP "application layer protocols" just because they run as userspace processes in netstack?"
No, because TCP and UDP and IP are fundmental services that support transport for the layers they operate at. ICMP, interestingly, if you browse the Internet, there seems to be arguments whether it's a L3, L2 or even a L2.5 protocol.
But for ARP, sure another app, which is another protocol that appears folk can argue over what layer it is.
"Correctly, every protocol has a set of services it offers - that is why it has been created, to offer services (not to consume them). And it is those services it is offering that define what layer the protocol belongs to."
Again, within the OSI model documentation (since we're assigning its layer tags), that's noted where?
Peter, when you touch upon "control plane" protocols, I believe they are often square pegs trying to be forced into the round holes of the OSI model layers. Much like what's ARP and/or ICMP.
One reason I have a problem with routing protocols being considered L3 protocols, which, of course, they do support, is that they only support it, they don't control it. The L3 layer on a router, decides (also based on how we configured it) how to accept and process the routing information provided by routing protocols. BGP, itself, doesn't determine the routes it provides to the router will be used or not.
If there was but one routing protocol, that always worked the same way, regarding what routes were actually going to be used by the router making its routing decisions, then it would be an integral part of that OSI layer, not just as an adjunct.
Another reason, having been a software developer for a couple of decades, I take a very broad view of what's an app. Normally, precision is a good thing, but since this question arises, and arises, and arises, are we trying to argue how many angels can fit on a pin head?
If you say BGP is an app, that supports L3 (or now, as you note, perhaps L2 too), so it uses TCP (yawn). It supports L3 and/or L2 forwarding (yawn). But, instead, if it's a L3 protocol! Ah, then how does it use L4 transport? Well because it's special, it's a control plane protocol (NB: undefined in 7498-1/X.200), ah okay. Ah, then how does it now support L2 transport? Well because . . .
Anyway so much for my 2 cents worth (which since I don't know the current conversion rate, unsure how that compares with 0.02€ - laugh). Also, Peter, what you argue I don't consider absurd just conventional. ; )
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide