EGP: The history of BGP
Before BGP, the Exterior Gateway Protocol (EGP) was used to determine routing between autonomous systems. EGP contained many limitations which necessitated a new protocol. One of these limitations is the fact that EGP was designed around a backbone-centered tree, which no longer represents the internet. EGP also did not accommodate the size of the internet as it grew. Also, EGP allowed misrepresentation of routing information. BGP was developed to correct these flaws in EGP. The use of classless interdomain routing by BGP solved both the topology and size problems by representing a group of addresses by a single entry in a routing table. BGP also performs checks on the authenticity of routing information displayed by autonomous systems. For these reasons, BGP is the routing protocol used on the internet.
How does it all work?