cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
9273
Views
33
Helpful
12
Replies

OSI Layer of Routing Protocol

Manish Prasad
Level 5
Level 5

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

12 Replies 12

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

Joseph W. Doherty
Hall of Fame
Hall of Fame

"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.

 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

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

Julio Carvajal
Senior Network Security and Core Specialist
CCIE #42930, 2xCCNP, JNCIP-SEC

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.

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

Julio Carvajal
Senior Network Security and Core Specialist
CCIE #42930, 2xCCNP, JNCIP-SEC

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

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
Level 3
Level 3

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.

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.

Eloy Pascal
Level 1
Level 1

Look at the top left table of this poster http://packetlife.net/posters/IOS_Interior_Routing_Protocols.pdf and I think everything will be more clear, just think of what resources each protocol uses within the IP or TCP stack of protocols. Cheers and hope this helps!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card