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.