An exterior gateway protocol is a routing protocol used to exchange routing information between autonomous systems. This exchange is crucial for communications across the Internet. Notable exterior gateway protocols include Exterior Gateway Protocol (EGP) and Border Gateway Protocol (BGP).
By contrast, an interior gateway protocol is a type of protocol used for exchanging routing information between gateways (commonly routers) within an autonomous System (for example, a system of corporate local area networks). This routing information can then be used to route network-level protocols like IP.