According to RFC 1812, to which layer do OSPF and BGP belong, Application or Internet Layer? To your surprise, the answer is the Application layer.
It depends on the model you are following. RFC 1812 apparently stands for the TCP/IP model. OSPF and BGP belong to the Application Layer.
From the perspective of ISO 7498-1, the OSI Basic Reference Model, it is generally accepted that they belong to the Network Layer.
188.8.131.52 Any relay functions and hop-by-hop service enhancement protocols used to support the network-service between the OSI end systems are operating below the Transport Layer, i.e. within the Network Layer or below.
Source: ISO 7498-1