www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / ROUTE / Module 6 / iBGP and eBGP Fundamentals – Configuring and Verifying External BGP

iBGP and eBGP Fundamentals – Configuring and Verifying External BGP

An external BGP (eBGP) neighbor relationship is established between two routers that reside within different autonomous systems. There are two ways to configure eBGP neighbor relationships. These two methods are as follows:

  • Peer the routers using the physical interface IP addresses
  • Peer the routers using non-directly connected interfaces

The first method is the most commonly implemented method used when peering with another autonomous system. Using this method, the neighbor [address] command is used to specify the physical interface IP address of the eBGP peer.

Peering the BGP speakers using non-directly connected interfaces is commonly used in the stub multi-homed implementations described earlier in this chapter when there are multiple physical circuits between the enterprise edge and provider edge routers. In such cases, rather than configuring multiple BGP peers using the physical interface IP addresses, and eBGP session can be established between the routers by peering to interfaces that are not directly connected, such as Loopback interfaces. This is illustrated in Figure 6-25:

6-25

Fig. 6-25. External BGP Peering Using Multiple Circuits To the Same Router

In Figure 6-25, two physical links, which are Serial 0/0 and Serial 0/1 have been provisioned between R1 and R2. Instead of using the IP addresses on the physical interfaces to establish external BGP neighbor relationships, a single eBGP neighbor relationship can be configured using the IP addresses assigned to the Loopback interfaces for peering.

Another situation in which the eBGP peers might need to be established using interfaces that are not directly connected might be when a third party device resides between the enterprise and provider. Such as situation requires that eBGP multihop be used to establish peers relationships between the BGP speakers, as illustrated in Figure 6-26:

6-26

Fig. 6-26. External BGP Peering When Transiting Another Network

Unlike the configuration of directly connected eBGP peers, the configuration of non-directly connected eBGP peers requires additional configuration in Cisco IOS software. This configuration is required due to the default operation of BGP, as will be explained in the following section. The next section describes the configuration of directly connected peers.

Configuring Directly Connected eBGP Neighbor Relationships

The configuration of directly connected eBGP neighbors is straightforward. After BGP has been enabled on the router, the neighbor [address] remote-as [autonomous system number] router configuration command must be manually configured for each desired neighbor using the IP address assigned to the physical interface and referencing the autonomous system that remote neighbor resides in. Figure 6-27 illustrates a basic neighbor which shows two routers. R1 resides in AS 65001, while R2 resides in AS 2:

6-27

Fig. 6-27. External BGP Peering Using Physical Interface Addresses

The configuration of the eBGP peer on R1 is performed as follows:

R1(config)#router bgp 65001
R1(config-router)#bgp router-id 1.1.1.1
R1(config-router)#neighbor 10.0.0.2 remote-as 2
R1(config-router)#exit

The configuration of the eBGP peer on R2 is performed as follows:

R2(config)#router bgp 2
R2(config-router)#bgp router-id 2.2.2.2
R2(config-router)#neighbor 10.0.0.1 remote-as 65001
R2(config-router)#exit

Following this configuration, the show ip bgp summary command can be used to verify the state of the configured neighbors. The output of this command shows the following:

R1#show ip bgp summary
BGP router identifier 1.1.1.1, local AS number 65001
BGP table version is 1, main routing table version 1Neighbor    V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.0.0.2    4     2       3       3        1    0    0 00:00:41        0

Before we proceed any further, it is important to understand the information printed by this command. This information is listed and described in Table 6-7:

Field

Description

Neighbor

Specifies the IP address of the neighbor as specified in the neighbor configuration command

V

Specifies the BGP version. The default is 4

AS

Specifies the AS of the BGP neighbor

MsgRcvd

Specifies the number of messages received from the neighbor

MsgSent

Specifies the number of messages sent to the neighbor

TblVer

Specifies the last version of the BGP database that was sent to the neighbor

InQ

Specifies the number of messages queued to be processed from the neighbor

OutQ

Specifies the number of messages queued to be sent to the neighbor

Up/Down

Specifies the length of time that the BGP session has been in the Established state, or the current status if not in the Established state

State/PfxRcd

Specifies the state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. When the maximum number is reached, the string “PfxRcd” appears in the entry, the neighbor is shut down, and the connection is set to Idle. An (Admin) entry with Idle status indicates that the connection has been shut down using the neighbor shutdowncommand.

Tab.6-6. Fields in the show ip bgp summary Command

In addition to using the show ip bgp summary command, the show ip bgp neighbors command can be used to view detailed information for a specific neighbor or all configured neighbors. Keep in mind that this command produces a lot of output which includes the neighbor address, as specified by the neighbor command, whether the neighbor is internal or external, the autonomous system the neighbor resides in, the BGP version, the neighbor RID, the state of the connection and how long the connection has been up.

Additional information included in the output printed by this command includes the hold timer and keepalive interval, the capabilities of the neighbor, the number of BGP messages sent and received, the number of prefixes sent and received, the default TTL of the BGP packets (this is explained in the following section), and the local and remote ports used to establish the session. These fields are printed in bold in the following output:

R1#show ip bgp neighbors
BGP neighbor is 10.0.0.2,  remote AS 2, external link
  BGP version 4, remote router ID 2.2.2.2
  BGP state = Established, up for 00:07:58
Last read 00:00:58, last write 00:00:58, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
Message statistics:
InQ depth is 0
OutQ depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                0          0
    Keepalives:             9          9
    Route Refresh:          0          0
    Total:                 10         10
Default minimum time between advertisement runs is 30 secondsFor address family: IPv4 Unicast
BGP table version 1, neighbor version 1/0
Output queue size : 0
Index 1, Offset 0, Mask 0x2
1 update-group member
                                 Sent       Rcvd
  Prefix activity:               —-       —-
    Prefixes Current:               0          0
    Prefixes Total:                 0          0
    Implicit Withdraw:              0          0
    Explicit Withdraw:              0          0
    Used as bestpath:             n/a          0
    Used as multipath:            n/a          0Outbound    Inbound
Local Policy Denied Prefixes:    ——–    ——-
Total:                                0          0
Number of NLRIs in the update sent: max 0, min 0Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 1
Local host: 10.0.0.1, Local port: 24319
Foreign host: 10.0.0.2, Foreign port: 179

[Truncated Output]

Configuring Non-directly Connected eBGP Neighbor Relationships

The configuration of eBGP peers that are not directly connected requires the use of additional commands in Cisco IOS software. By default, eBGP packets are sent with a TTL value of one, meaning that the specified neighbor can only be one hop away, i.e. directly connected. This default value can be validated by issuing the show ip bgp neighbors command for a directly connected neighbor and looking for the statement or line that reads: Outgoing TTL 1.

NOTE: The Outgoing TTL 1 statement is printed in bold in the output of the show ip bgp neighbors command shown in the previous section

In order to establish an eBGP session with a neighbor that is more than a single hop away, then the neighbor [address] ebgp-multihop [1-255] router configuration must be used. The ebgp-multihop [1-255] configuration statement is used to specify the TTL of the BGP packet, i.e. how far away the peer is from the local router in terms of the number of hops. If the hop count is not specified, this command sets a default hop count of 255, meaning that eBGP packets will be sent with an IP TTL of 255. For example, if the neighbor 2.2.2.2 ebgp-multihopconfiguration command was issued when configuring an indirectly connected eBGP peer, because no TTL value was specified, Cisco IOS software will set the TTL of packets to 255, allowing a neighbor relationship to be established with a router up to a maximum of 255 hops away. This default behavior can be validated using theshow ip bgp neighbors command as shown in the following output:

R1#show ip bgp neighbors 2.2.2.2
BGP neighbor is 2.2.2.2,  remote AS 2, external link
BGP version 4, remote router ID 0.0.0.0
BGP state = Active
Last read 00:00:04, last write 00:00:04, hold time is 180, keepalive interval is 60 seconds[Truncated Output]Connections established 0; dropped 0
Last reset never
External BGP neighbor may be up to 255 hops away.
No active TCP connection

In addition to specifying the TTL, the neighbor [address] update-source [interface name] command must also be used when configuring indirectly connected eBGP peers. This command is used to allow BGP sessions to use any operational interface for TCP connections. The difference between the neighbor [address] ebgp-multihop [1-255] and the neighbor [address] update-source [interface name] command is that neighbor [address] ebgp-multihop [1-255] command is used to provide IP reachability to the specified eBGP neighbor, while theneighbor [address] update-source [interface name] command is used to provide TCP reachability between the routers by specifying the interfaces that will be used for the establishment of the actual TCP session between the routers.

Figure 6-28 shows a basic network with two routers. R1 resides in AS 65001 and R2 resides in AS 2. The two routers have two physical point-to-point links between them. An eBGP session will be established between the routers using the Loopback addresses for peering:

6-28

Fig. 6-28. External BGP Peering Using Physical Interface Addresses

Before configuring the eBGP session, it is important to verify IP connectivity between the two Loopback addresses. In most cases, static routes are configured on the edge routers allowing connectivity between these two addresses. This would be implemented on R1 as follows:

R1(config)#ip route 2.2.2.2 255.255.255.255 serial 0/0
R1(config)#ip route 2.2.2.2 255.255.255.255 serial 0/1

Assuming a similar configuration has been implemented on R2, a simple ping test should be used to verify IP connectivity between the 1.1.1.1/32 and 2.2.2.2/32 addresses:

R1#ping 2.2.2.2 source 1.1.1.1 repeat 10Type escape sequence to abort.
Sending 10, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!!!!!!
Success rate is 100 percent (10/10), round-trip min/avg/max = 1/2/4 ms

Following the verification of IP connectivity between the two addresses, the eBGP session can now be configured. This is performed as follows on R1:

R1(config)#router bgp 65001
R1(config-router)#bgp router-id 1.1.1.1
R1(config-router)#neighbor 2.2.2.2 remote-as 2
R1(config-router)#neighbor 2.2.2.2 update-source loopback 0
R1(config-router)#neighbor 2.2.2.2 ebgp-multihop 2
R1(config-router)#exit

Referencing the configuration above, BGP is enabled on R1, specifying the autonomous system 65001. Next, the BGP RID of the router is manually configured.  After configuring the peer, R2, using the desired peering address of 2.2.2.2, the neighbor 2.2.2.2 update-source loopback 0 command means that all BGP updates are sourced from the Loopback0 interface of R1. This is the same address that will be configured as the neighbor address on R2 when configuring BGP on that router. And finally, the neighbor 2.2.2.2 ebgp-multihop 2 command means that neighbor 2.2.2.2 can be up to 2 hops away from R1. This command also sets the TTL in the IP header of the BGP packet to 2.

Following the same sequence of steps, the eBGP multihop configuration on R2 would be implemented as shown in the following output:

R2(config)#router bgp 2
R2(config-router)#bgp router-id 2.2.2.2
R2(config-router)#neighbor 1.1.1.1 remote-as 65001
R2(config-router)#neighbor 1.1.1.1 ebgp-multihop 2
R2(config-router)#neighbor 1.1.1.1 update-source loopback 0
R2(config-router)#exit

The same logic is used, only that the peer being specified on R2 is 1.1.1.1. This is the IP address of the Loopback0 interface of R1 – the same interface BGP packets are sourced from based on the configuration of R1. Following this configuration, the show ip bgp summary command can be used to verify the peer relationship between the routers as seen in the following output:

R1#show ip bgp summary
BGP router identifier 1.1.1.1, local AS number 65001
BGP table version is 1, main routing table version 1Neighbor    V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2     4     2       5       5        1    0    0 00:01:22        0

The show ip bgp summary command would also show the peer relationship on R2:

R2#show ip bgp summary
BGP router identifier 2.2.2.2, local AS number 2
BGP table version is 1, main routing table version 1Neighbor    V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1     4 65001       5       5        1    0    0 00:01:01        0

Prev

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.