8.4 BGP Basic Configuration
8.4.2
Configuring EBGP for a single connection to an ISP

While there are significant differences in the way BGP and the various IGPs operate, the syntax of the BGP commands is similar to the syntax for configuring internal routing protocols.

Use the router bgp command to activate BGP and identify the local AS. The AS number will be assigned to you by the inter-NIC if you are connecting to the Internet, or by some local policy if you are connecting to an internal network.

Use the network command to permit BGP to advertise a network when it is present in the IP routing table.

With an IGP, such as RIP, the network command determines the interfaces the protocol will run on, and the prefixes advertised are then derived from the enabled interfaces. BGP actually determines what it will advertise from the network command. For instance, if you configure BGP to advertise the 172.18.0.0/16 network, but only have a route to 172.18.10.0/24, BGP will not advertise the 172.18.0.0/16 network. The route in the routing table and the network configured must match for BGP to advertise the prefix.

Use the neighbor remote-as command to identify a peer router with which the local router will establish a session. The value placed in the AS field of the neighbor command determines whether this peer is an EBGP or an IBGP neighbor. If the AS field configured in the router bgp command is identical to the AS configured in the neighbor statement, BGP will initiate an internal session. If the field values are different, BGP will build an external session.

Use the clear ip bgp command to remove entries from the BGP table and reset BGP sessions. Use this command after making configuration changes to ensure that the change is activated and that peer routers are informed.

Note: Use the clear command with the asterisk option (clear all) whenever you make changes to a configuration in order for those changes to take effect.

While it's not technically required to execute clear ip bgp * to make a configuration change take effect in the network, rather than attempt to explain the complicated conditions under which the clear command is required, it is safer to do it every time a configuration change is made. This practice ensures that changes will always be propogated correctly.