cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1350
Views
0
Helpful
10
Replies

Where do routing protocols fit in the TCP/IP stack?

ncasey777
Level 1
Level 1

It is always said that routing protocols fit at layer 3 because they handle the routing aspect. But if you look at each protocol a little deeper this gets confusing.

Take OSPF for instance, it has an IP protocol number 89. Does this mean it is actually at a layer 4 like TCP which has a protocol number of 6? Same question for IGRP which has IP protocol 9.

Is this similar to ICMP (IP #1) that stays "within" layer 3 or is it really layer 4 or as well?

Similar question concerning RIP which does NOT have an IP protocol but instead has a UDP port 520...is RIP therefore NOT layer 3 and instead an application layer protocol? Same question for BGP which uses TCP port 179...is it not layer 3 but rather application layer? Thanks.

10 Replies 10

Edison Ortiz
Hall of Fame
Hall of Fame

Layer 3 is the IP Address.

Dynamic routing protocols are either in the transport layer (OSPF, EIGRP) or the application layer (RIP, BGP).

There were all designed to handle L3 information and advertise it as needed.

mohammedmahmoud
Level 11
Level 11

Hi,

All routing protocols handle layer 3 information, but not all routing protocols operate in layer 3.

BGP is an application layer protocol because it uses TCP (179) to transport its messages, and RIP because it uses UDP (520) for the same purposes. While EIGRP and OSPF are said to operate at the internet layer (OSI Network Layer) because they encapsulate their messages directly into IP packets (Using IP protocol 88 and 89 respectively, they don't utilize TCP or UDP or anything above layer 3 in the OSI model, the OSPF data or payload is just encapsulated inside the IP Packet, with no higher OSI layer utilized).

HTH,

Mohammed Mahmoud.

It sounds like just because an IP packet has an IP protocol number in it, it does not mean it is necessarily going to layer 4, (unlike TCP (protocol 6) and UDP (protocol 17) which do go to layer 4)...so a protocol number of 89 for OSPF doesn't mean go layer 4, instead it remains at layer 3 with the payload identified by the protocol number.

Edison,

I think you actually meant

BGP & RIP -- Tranport layer (uses TCP 179 & UDP 520)

OSPF & EIGRP -- Network layer (uses IP 88 & 89)

Narayan

Narayan, yes.

Hi,

BGP and RIP uses TCP and UDP, but they also utilize the whole OSI model and thus they are called application layer protocol, while OSPF and EIGRP utilizes only until layer 3 from the OSI model and uses their own structure afterwards and thats why they are called network layer protocols.

HTH,

Mohammed Mahmoud.

Isn't it interesting that whenever you see a TCP/IP protocol stack that shows sample protocols at each layer, they always show RIP at layer 3? If it is an application layer, why do you think it is being placed at layer 3? We all know its FUNCTION is to allow layer 3 routing, but if it is truly an upper-layer protocol wouldn't it be less confusing to present it that way from the start?

Hi Nicholas,

Lets differentiate between the function of routing protocols and which layers of OSI model they use to operate, BGP and RIP uses all the 7 layers of the OSI to operate starting from application layer (application layer provide the interfaces by which user applications access the network, this is done when configuring them) down to the physical layer, while OSPF and EIGRP uses only until layer 3 and encapsulates its payload directly into the IP packet and don't utilize any OSI layer further.

In the cases of confusion like this one, i suggest that you search in many places, most importantly the most famous resources like Jeff Doyle's Routing TCP/IP vol1, you'll find this issue covered in Chapter 1.

HTH,

Mohammed Mahmoud.

I'm guessing OSPF and EIGRP were designed to stay at level 3 to simplify and speed up the whole process rather than having to add more steps.

Nicholas,

You are totally correct in this, the OSPF and EIGRP designers thought this way they can simplify the structuring and the processing of the packet when it is exchanged between the routers.

HTH,

Mohammed Mahmoud.

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