This manuscript addresses the coexistence of planned and spontaneous interconnected networks in the Internet core. In this realm, the focus is on routing within a specific type of Autonomous System (AS) called compound AS, which contains both wireless ad hoc networks and wired fixed networks. The approach studied in this manuscript is to enhance existing Interior Gateway Protocols (IGPs), typically based on the link-state algorithm, in order to enable them to operate both in ad hoc networks and in wired networks. The manuscript thus analyzes the use of link-state routing in ad hoc networks. Based on this analysis, different techniques are proposed and theoretically evaluated, aiming at optimizing the performance of link state routing in a compound AS. The manuscript then investigates the impact of these techniques when applied to OSPF, one of the main IGPs used in the Internet. The performance of OSPF extensions on MANETs using the studied techniques are compared via simulations. Finally, OSPF operation over compound internetworks is evaluated via experiments on a testbed.