0% found this document useful (0 votes)
275 views7 pages

iBGP and eBGP With or Without A Loopback Address

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
275 views7 pages

iBGP and eBGP With or Without A Loopback Address

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Sample Configuration for iBGP and eBGP With or

Without a Loopback Address


Contents
Introduction
Prerequisites
Requirements
Components Used
Conventions
Configure
Network Diagram
iBGP Configuration
eBGP Configuration
iBGP Configuration with a Loopback Address
eBGP Configuration with a Loopback Address
Verify
Verify iBGP Configuration
Verify eBGP Configuration
Verify iBGP Configuration with a Loopback Address
Verify eBGP Configuration with a Loopback Address
Troubleshoot
Related Information

Introduction
BGP is an exterior gateway protocol (EGP), used to perform interdomain routing in TCP/IP networks. A BGP
router needs to establish a connection (on TCP port 179) to each of it's BGP peers before BGP updates can be
exchanged. The BGP session between two BGP peers is said to be an external BGP (eBGP) session if the BGP
peers are in different autonomous systems (AS) . A BGP session between two BGP peers is said to be an internal
BGP (iBGP) session if the BGP peers are in the same autonomous systems.

By default, the peer relationship is established using the IP address of the interface closest to the peer router.
However, using the neighbor update-source (registered customers only) command, any operational interface,
including the loopback interface, can be specified to be used for establishing TCP connections. This method of
peering using a loopback interface is useful since it will not bring down the BGP session when there are multiple
paths between the BGP peers, which would otherwise result in tearing down the BGP session if the physical
interface used for establishing the session goes down. In addition to that, it also allows the routers running BGP
with multiple links between them to load balance over the available paths.

The sample configurations in this document are for iBGP and eBGP, both with and without a loopback addresses.

Note: You can use these configurations for establishing neighbor relationship. Refer to Using the Border Gateway
Protocol for Interdomain Routing for more complex configurations.

Prerequisites
Requirements

Before you attempt this configuration, ensure that you meet this requirement:

 Knowledge of BGP protocols


Components Used

This document is not restricted to specific software and hardware versions. The command outputs shown in this
document were taken from the 2500 Series Routers running IOS® version 12.2(24a).

Conventions

For more information on document conventions, refer to Cisco Technical Tips Conventions.

Configure
This section contains the following configuration examples:

 iBGP Configuration

 eBGP Configuration

 iBGP Configuration with a Loopback Address

 eBGP Configuration with a Loopback Address

In this section, you are presented with the information to configure the features described in this document.

Note: To find additional information on the commands used in this document, use the Command Lookup Tool
(registered customers only) .

Network Diagram

This document uses this network setup:

iBGP Configuration

In this configuration, both routers are in AS 400.

R1-AGS R6-2500

Current configuration:

!-- Output suppressed.


Current configuration:
interface Serial1
ip address 10.10.10.1 255.255.255.0 !-- Output suppressed.
!
router bgp 400 interface Serial0
ip address 10.10.10.2 255.255.255.0
!--- Enables BGP for the autonomous !
!--- system 400. router bgp 400
neighbor 10.10.10.1 remote-as 400
neighbor 10.10.10.2 remote-as 400
!-- Output suppressed.
!--- Specifies a neighbor 10.10.10.2
!--- in the remote AS 400, making end
!--- this an iBGP connection.
!-- Output suppressed.

end

eBGP Configuration

In this configuration, the router R1-AGS is in AS 300 and Router R6-2500 is in AS 400.

R1-AGS R6-2500
Current configuration:

!-- Output suppressed

interface Serial1
Current configuration:
ip address 10.10.10.1 255.255.255.0
!
!-- Output suppressed.
router bgp 300
interface Serial0
!--- Enables BGP for the autonomous
ip address 10.10.10.2 255.255.255.0
!--- system 300.
!
router bgp 400
neighbor 10.10.10.2 remote-as 400
neighbor 10.10.10.1 remote-as 300
!--- Specifies a neighbor 10.10.10.2
!-- Output suppressed.
!--- in the remote AS 400, making
!--- this an eBGP connection.
end

!-- Output suppressed.

end

Peers must be directly connected when using eBGP. If they are not directly connected, the neighbor ebgp-
multihop (registered customers only) command must be used and a path through an IGP or static route to reach
the peer must exist in order for the routers to establish neighbor relationship. In the configuration above, R1-AGS
router belongs to AS 300 while R6-2500 router belongs to AS 400.

iBGP Configuration with a Loopback Address

You can configure iBGP using a loopback address (or any other operational interface) as shown in this section.

R1-AGS R6-2500

Current configuration:

!-- Output suppressed.


Current configuration:
interface Loopback0
ip address 1.1.1.1 255.255.255.255
! !-- Output suppressed.
interface Serial1
ip address 10.10.10.1 255.255.255.0 interface Loopback0
! ip address 2.2.2.2 255.255.255.255
router bgp 300 !
neighbor 2.2.2.2 remote-as 300 interface Serial0
neighbor 2.2.2.2 update-source Loopback0 ip address 10.10.10.2 255.255.255.0
!
!--- This command specifies that the TCP router bgp 300
!--- connection with the specified external neighbor 1.1.1.1 remote-as 300
!--- peer should be established using the neighbor 1.1.1.1 update-source Loopback0
!--- address on the loopback interface. !
ip route 1.1.1.1 255.255.255.255 10.10.10.1
!
ip route 2.2.2.2 255.255.255.255 10.10.10.2 !-- Output suppressed.

!--- This static route ensures that the end


!--- remote peer address used for peering
!--- is reachable.
!-- Output suppressed.

end

eBGP Configuration with a Loopback Address

You can also configure eBGP using a loopback address (or any other operational interface) as shown in this section.
Loopback interfaces are used in this manner to guarantee reachability in networks with multiple paths as shown in
the Load Sharing Using the Loopback Address as a BGP Neighbor section of Load Sharing with BGP in Single and
Multihomed Environments: Sample Configurations.

R1-AGS R6-2500
Current configuration:

!-- Output suppressed.

Current configuration:
interface Loopback0
ip address 1.1.1.1 255.255.255.255
! !-- Output suppressed.
interface Serial1
ip address 10.10.10.1 255.255.255.0
! interface Loopback0
router bgp 300 ip address 2.2.2.2 255.255.255.255
neighbor 2.2.2.2 remote-as 400 !
neighbor 2.2.2.2 ebgp-multihop 2 interface Serial0
ip address 10.10.10.2 255.255.255.0
!--- This command changes the ttl value in !
!--- order to allow the packet to reach the router bgp 400
!--- external BGP peer which is not directly neighbor 1.1.1.1 remote-as 300
!--- connected or is using an interface other neighbor 1.1.1.1 ebgp-multihop 2
!--- than the directly connected interface. neighbor 1.1.1.1 update-source Loopback0
!
neighbor 2.2.2.2 update-source Loopback0 ip route 1.1.1.1 255.255.255.255 10.10.10.1

!--- This command specifies that the TCP


!--- connection with the external BGP !-- Output suppressed.
!--- peer should be established using the
!--- address on the loopback interface.
! end

ip route 2.2.2.2 255.255.255.255 10.10.10.2

!--- This static route ensures that the


!--- remote peer address used for peering
!--- is reachable.

!-- Output suppressed.

end

Verify
These sections provide information you can use to confirm your configurations are working properly. Certain show
commands are supported by the Output Interpreter Tool , which allows you to view an analysis of show command
output.

Verify iBGP Configuration

Use the show ip bgp neighbors (registered customers only) command to display information about the TCP and
Border Gateway Protocol (BGP) connections and verify if the BGP peer is established. The output of the show ip
bgp neighbors command below shows the BGP state as 'Established', which indicates that the BGP peer
relationship has been established successfully.

R1-AGS# show ip bgp neighbors | include BGP


BGP neighbor is 10.10.10.2, remote AS 400, internal link
BGP version 4, remote router ID 2.2.2.2
BGP state = Established, up for 00:04:20
BGP table version 1, neighbor version 1
R1-AGS#

The show ip bgp neighbors command has been used above with the modifier | include BGP. This makes the output
more readable by filtering the the command output and displaying the relevant parts only.

In addition, the show ip bgp summary (registered customers only) command can also be used to display the
status of all BGP connections, as shown below.

R1-AGS(9)# show ip bgp summary


BGP router identifier 10.1.1.2, local AS number 400
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


10.10.10.2 4 400 3 3 1 0 0 00:00:26 0

Verify eBGP Configuration

Use the show ip bgp neighbors (registered customers only) command to display information about the TCP and
Border Gateway Protocol (BGP) connections and verify if the BGP peer is established. The output of the show ip
bgp neighbors command below shows the BGP state as 'Established', which indicates that the BGP peer
relationship has been established successfully.

R1-AGS# show ip bgp neighbors | include BGP


BGP neighbor is 10.10.10.2, remote AS 400, external link
BGP version 4, remote router ID 2.2.2.2
BGP state = Established, up for 00:00:17
BGP table version 1, neighbor version 1

In addition, the show ip bgp summary (registered customers only) command can also be used to display the
status of all BGP connections, as shown below.

R1-AGS(9)# show ip bgp summary


BGP router identifier 10.10.10.1, local AS number 300
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


10.10.10.2 4 400 3 3 1 0 0 00:00:26 0

Verify iBGP Configuration with a Loopback Address

Use the show ip bgp neighbors (registered customers only) command to display information about the TCP and
Border Gateway Protocol (BGP) connections and verify if the BGP peer is established. The output of the show ip
bgp neighbors command below shows the BGP state as 'Established', which indicates that the BGP peer
relationship has been established successfully.

R1-AGS# show ip bgp neighbors | include BGP


BGP neighbor is 2.2.2.2, remote AS 300, internal link
BGP version 4, remote router ID 2.2.2.2
BGP state = Established, up for 00:00:28
BGP table version 1, neighbor version 1
R1-AGS#

In addition, the show ip bgp summary (registered customers only) command can also be used to display the
status of all BGP connections, as shown below.

R1-AGS(9)# show ip bgp summary


BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


2.2.2.2 4 400 3 3 1 0 0 00:00:26 0

Verify eBGP Configuration with a Loopback Address

Use the show ip bgp neighbors (registered customers only) command to display information about the TCP and
Border Gateway Protocol (BGP) connections and verify if the BGP peer is established. The output of the show ip
bgp neighbors command below shows the BGP state as 'Established', which indicates that the BGP peer
relationship has been established successfully.

R1-AGS# show ip bgp neighbors | include BGP


BGP neighbor is 2.2.2.2, remote AS 400, external link
BGP version 4, remote router ID 2.2.2.2
BGP state = Established, up for 00:00:16
BGP table version 1, neighbor version 1
External BGP neighbor may be up to 2 hops away.

In addition, the show ip bgp summary (registered customers only) command can also be used to display the
status of all BGP connections, as shown below.

R1-AGS(9)# show ip bgp summary


BGP router identifier 1.1.1.1, local AS number 300
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


2.2.2.2 4 400 3 3 1 0 0 00:00:26 0

Troubleshoot
Refer to Why Do BGP Neighbors Toggle Between Idle, Connect, and Active States? and Troubleshooting BGP for
troubleshooting information.

Related Information
 EBGP Multihop and the update-source Command
 Load Sharing with BGP in Single and Multihomed Environments: Sample Configurations
 BGP Support Page
 Technical Support - Cisco Systems

You might also like