Routing protocols exchange routing information and distribute it to all neighbors. Each protocol has its own way of detecting neighbors and establishing adjacency with them. By design, all IGP neighbors are one hop away. However, because BGP4 neighbors can be one hop away or n hops away, they are not dynamically discovered. Rather, an administrator must enable and configure each neighbor for the exchange of routing information. The greater the number of neighbors, the greater the administrative overhead.
With the BGP4 dynamic neighbor feature, a new BGP4 neighbor is dynamically created when a device sees an incoming TCP session initiated from a remote neighbor with an IP address in the configured subnet listen range. The device that initiates this connection still has the neighbor statically configured. Each listen range can be configured as a subnet IPv4 address range. BGP4 dynamic neighbors are configured using a range of IP addresses and BGP4 peer groups.
When the incoming TCP session falls within the configured subnet listen range, a new BGP4 neighbor is dynamically created as a member of that peer group. After the listen range is configured and the associated peer group is activated, dynamic BGP4 neighbor creation does not require any further configuration on the initial device. Newly created BGP4 dynamic peers automatically inherit the attributes associated with the peer group attached to the listen range, such as inbound policy and outbound policy.
You can set the total number of dynamic neighbors that can be formed in the system. When the global or listen range limit is increased, any new connection coming from the remote end that falls under the configured range is accepted. If the limit is reached and you reduce the global or peer-group limit, established dynamic neighbors are not destroyed. When the limit is reached and new connection requests are received, the connections are rejected and the information is logged.
BGP4 dynamic neighbors are deleted when a session moves from the established state to the idle state.