I'm going to show you how to configure an eBGP peering. eBGP is used between BGP speakers in different autonomous systems. These speakers should be directly connected, that is either with a point-to-point link, or a connection onto the same layer 2 LAN. You should never use an interior gateway protocol between eBGP speakers, so make sure you've turned off OSPF or ISIS on those interfaces. Since the BGP speakers are directly connected, they have IP addresses from the same subnet, so they can reach each other through the interface connected route. Now I'm going to show you how to configure an eBGP peering session using Cisco IOS as an example. If you're using some other vendor, the concepts are the same but the syntax is different. Let's start from the point of view of router "A" in "AS100". The statement: "router bgp 100" starts the routing process and says the local AS number is 100. The statement: "neighbor <IP address> remote-as 101" gives the IP address of the peer to connect to and what AS number that peer is in. "neighbor <IP address> activate" enables the peering session. The remaining statements are a minimal configuration for announcing and receiving routes. The "network" statement imports the given network from the global RIB into the BGP RIB, so that it can be announced to our BGP peers. The 2 "prefix-list" statements restrict the routes that we will accept from this peer and that we will announce to this peer. It's very important to control what routes we send and receive because if our peer accidentally starts announcing the wrong routes to us, it could break our network. Using a prefix list, where we explicitly list the prefixes we permit is the simplest way of doing this. Now let's look from the point of view of router "C" in "AS101". This is very much a mirror image of the configuration of router "A". There's "router bgp 101" because this router is in "AS101". The "neighbor" statements point to the IP address of router "A", and the "remote-as" is 100. The eBGP session won't come up until both sides have been configured. Once you've done this, you will want to check if the peering session has established. The command to do this in IOS is: "show ip bgp summary" it will show, for each neighbor, the BGP version, which is always 4, the remote AS number, some counters of messages sent and received, and how long the session has been up, and the number of prefixes or routes received from the peer. If it says "active" this actually means the BGP session is down. In other words, it's actively trying to connect to the peer but it hasn't succeeded yet. For IPv6 the corresponding command is: "show bgp ipv6 unicast summary" and it gives a similar set of information.

© Produced by Philip Smith and the Network Startup Resource Center, through the University of Oregon.

Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
This is a human-readable summary of (and not a substitute for) the license. Disclaimer. You are free to: Share — copy and redistribute the material in any medium or format Adapt — remix, transform, and build upon the material The licensor cannot revoke these freedoms as long as you follow the license terms. Under the following terms: Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. NonCommercial — You may not use the material for commercial purposes. No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.