OSI Layer of Routing Protocol

Unanswered Question
Jul 6th, 2009
User Badges:

Hi,


On which layer of OSI OSPF,EIGRP,BGP and RIP works?


Correct me if i am wrong OSPF and EIGRP uses port no 88 and 89 respectively and BGP uses TCP(179) and RIP uses UDP port.

So OSPF and EIGRP run over TCP/UDP so it might be an Application layer protocol? BGP and RIP are transport layer protocol.


I am really confused about this, pls can anyone explain it with some reference link.



Thanks

Prasad

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3.4 (8 ratings)
Loading.
Jon Marshall Mon, 07/06/2009 - 12:24
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Manish Prasad Mon, 07/06/2009 - 13:50
User Badges:

Jon ,its really good thread and almost cleared my confusion.Thank You.

Joseph W. Doherty Mon, 07/06/2009 - 16:08
User Badges:
  • Super Bronze, 10000 points or more

"On which layer of OSI OSPF,EIGRP,BGP and RIP works? "


Layer 7 that supports layer 3, which is why it's so confusing.


http://en.wikipedia.org/wiki/Routing_protocol


The purpose of layered models, is really to build layers of common software so the highest layer, the actual application, doesn't have to "reinvent the wheel". It also allows actual layered components to be interchanged if there are well defined functional interfaces between the layers. However, "applications" aren't bound to not directly provide lower level layer features.

chad patterson Wed, 03/13/2013 - 14:11
User Badges:

WRONG WRONG WRONG! EVERYBODY IS WRONG!



http://en.wikipedia.org/wiki/List_of_network_protocols_(OSI_model)#Layer_3_protocols_.28Network_Layer_management.29




Layer 3 protocols (Network Layer management)


L2 or L3 protocol like OSPF, BGP,ISIS, RIP,MPLS, DSL,ADSL, SDH,Sonet, DSLAM,VLAN,ATM,QoS,framerelay,




Layer 4 protocols (Transport Layer)

  • AH Authentication Header over IP or IPSec
  • ESP Encapsulating Security Payload over IP or IPSec
  • GRE Generic Routing Encapsulation for tunneling
  • IL Originally developed as transport layer for 9P
  • SCTP Stream Control Transmission Protocol
  • Sinec H1 for telecontrol
  • SPX Sequenced Packet Exchange
  • TCP Transmission Control Protocol
  • UDP User Datagram Protocol
  • DCCP Datagram Congestion Control Protocol
  • DNS Domain Name System
Julio Carvajal Sat, 03/16/2013 - 22:04
User Badges:
  • Purple, 4500 points or more

Hello Chad,


I disagree on that one

EIGRP and OSPF do work on the IP /network layer but RIP and BGP works on the application layer as they use UDP/TCP respectly to make the protocol work. They rely on a layer 4 protocol


Regards

chad patterson Mon, 03/18/2013 - 14:38
User Badges:

jcarvaja, your disagreement is in error. These are layer three protocols. I linked to the documentation to provide the definative answer.


The OSI model classification of protocols is not like a layer cake; in that you can't say because this protocol relies on a layer 4 TCP or UDP, that it must therefore be higher on the OSI model than layer 4. Rather the protocols are classified by the services they provide. RIP and BGP provide layer 3 services.

Julio Carvajal Mon, 03/18/2013 - 15:07
User Badges:
  • Purple, 4500 points or more

Hello Chad,


They are routing protocols but those 2 RIP,BGP work as an application protocol,


Please read the chapter #  4 of the TCP/IP guide  for further clarification


Regards

Rolf Fischer Sat, 03/23/2013 - 01:56
User Badges:
  • Blue, 1500 points or more

In my opinion there are 2 points of view: On the one hand, all routing protocols serve very special purposes and can be seen as applications (regarding what they do). The service they provide is certainly used by the network layer.

On the other hand they have to use some kind of underlying protocols for exchanging their information. Which layer and which particular protocol is used, is a mayor decision for the routing protocol developers.


John Moy describes this decision process in "OSPF: Anatomy of an Internet Routing Protocol" (Section 3.2 "Encapsulation) very interesting by stating pros and cons.

1) Link Layer:

  • Most of them do not provide fragmentation/reassembly, so it had to be implemented in the routing protocol.
  • Code Points (e.g. a "Type" for Ethernet) for the various link layers would be needed.

2) Network:

  • IP provides fragmentation/reassembly.
  • IP runs over virtually any link type, even forwarding services could be used (in the case of OSPF: Virtual Links, sort of an IP tunnel)
  • You can use multicast addresses.
  • Nowadays it's insufficient to implement the use of IPv4, you also have to consider IPv6

3) Transport Layer

  • UDP provides a optional checksum.
  • UDP is easy to implement.
  • TCP and UDP have 16-bit port numbers (IP: 8 bit protocol numbers)
  • TCP adds a reliable transport.

Of course, every layer adds some overhead.

All of those are design considerations for any (network) application developer.


I think, trying to assign routing protocols to OSI layers doesn't help very much in understanding. Using the network layer for transportation of protocol data doesn't nessesarily mean we have a transport protocol.

One have to know what encapsulation protocols use and what advantages/disadvantages the usage of a particular layer involves. This helps understanding many of the concepts of a given routing protocol.


Best regards

Rolf

Joseph W. Doherty Wed, 06/05/2013 - 20:13
User Badges:
  • Super Bronze, 10000 points or more

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


Everyone is wrong except for what you read on Wiki which is the "definative [sic] answer", eh?


I wouldn't consider Wiki the source for definitive answers, but it often has references to such sources.  If we really want definitive answers about the OSI model, we should use the ISO/IEC source documents, such as ISO/IEC       7498-1:1994.


In 7498-4's 7.5.4.2, you'll find description of routing but not of a routing protocol.  A distinction may be made between a routed protocol, e.g. IP, and a dynamic routing protocol, e.g. BGP, and the OSI model's network layer, I believe, is describing the former.


This distinction also explains why we can route packets without a routing protocol at all.  What's static routing as there's no protocol?  Or, we can run multiple routing protocols concurrently, and have rules (like AD) with information being provided to L3 from multiple routing protocols, if any (statics might be another source of route information too), will be used to select the route's outgoing path.


It's simple to consider routing protocols just at L3, but in the OSI model, lower layers do not invoke higher layers, so BGP at just L3 invoking TCP, L4, is confusing.  Further, as the OSI model conceals information from higher levels, e.g. L3 isn't supposed to "know" about physical media attributes, yet some routing protocols keep track of multiple lower layer attributes to select what they consider the best path.


So, for these reasons, I personally believe it's clearer to "understand" dynamic routing protocols as applications, i.e. L7, that manage/control/interact at L3 (using only the basic OSI model).  Yet, that too is a simplification as when you read ISO/IEC       7498-4:1989, describing a management framework that's outside of the basic OSI model itself, yet interacts with OSI layers, we can see how dynamic routing protocols might better fit within that framework.


This last distinction is somewhat implied in Chad's original reference, as you might note it has sections for both "Layer 3 protocols (Network Layer)" and "Layer 3 protocols (Network Layer management)".  Notice routing protocols are generally listed under the latter, yet ISO/IEC       7498-1:1994 has a Network Layer but not a Network Layer management within the OSI model.


harvisin Wed, 06/05/2013 - 17:01
User Badges:
  • Silver, 250 points or more

Hello,


BGP uses TCP as the underlying transport protocol and RIP uses UDP as  the underlying transport protocol, however, it doesn't mean that they  are on Transport layer on the OSI model.

Similar to SMTP (email),  it is also on Application layer, however, it uses the underlying  Transport layer (TCP/25).


For 3550 switch, please find the following  configuration guide on the latest version for routing protocols  supported on 3550 switch:

http://www.cisco.com/en/US/docs/switches/lan/catalyst3550/software/release/12.2_44_se/configuration/guide/swiprout.html


It supports  all RIP, OSPF, EIGRP and BGP.

rais Thu, 06/06/2013 - 09:25
User Badges:
  • Silver, 250 points or more

Would it be useful if routing protocols can also advertise application port or layer-4 info? E.g. they can carry prefix 1.1.1.1:443?


Thanks.

Actions

This Discussion