The Exterior Gateway Protocol (EGP) is located on the network layer of the OSI reference model and is based on the IP protocol. The EGP protocol is used for communication between routers and is used to interconnect several complex networks that form a self-contained world and only occasionally communicate with other networks.
Such a network is called an autonomous system( AS) in TCP/IP terminology. Together with other autonomous systems in the network, it forms a "network of networks". In each autonomous system of the network federation, at least one edgerouter( ER) is now set up as an exterior gateway that connects the autonomous system with the other autonomous systems.
The Exterior Gateway protocol is mainly based on three mechanisms:
- It supports neighbor acquisition, i.e., there is a mechanism through which an edge ro uter learns about other edge routers of neighboring autonomous systems and exchanges routing information with them based on the EGP protocol. This is a router-to-router multicast between exterior gateways.
- EGP neighbors test at intervals whether their neighbor still exists (i.e., responds to request ). This prevents data packets from being routed in endless succession over an autonomous system that is in fact no longer reachable.
- EGP neighbors exchange information at intervals about which networks can reach them, and thus update their routing tables according to the currently active topology.
The Exterior Gateway Protocol detects a neighbor gateway and its activation; it can test EGP neighbor gateways to see if they respond, and periodically exchange "Routing Update Messages" between EGP neighbor gateways.
The EGP header consists of the 8-bitversion field, the EGP type, code field, and status field data fields of equal length, and four 16-bit fields: the checksum field, the autonomous system data field, the sequence number field, and a reserved data field. The EGP version field specifies the version of the EGP header used. The EGP Type field defines what type of message it is and allows the router to specify the type of EGP message when transmitting over networks.
The EGP-Code field specifies the type of AGP type in more detail. It specifies whether it is a command or a response to a command. The status field handles the polling and acknowledgement modes. The EGP protocol is described in RFC 904.