Home > Articles > Introduction to BGP

Introduction to BGP

  • Sample Chapter is provided courtesy of Cisco Press.
  • Date: Nov 19, 2016.

Chapter Description

In this sample chapter from Routing TCP/IP, Volume II: CCIE Professional Development, 2nd Edition, author Jeff Doyle covers the basic operation of BGP, including its message types, how the messages are used, and the format of the messages. You also learn about the various basic attributes BGP can associate with a route and how it uses these attributes to choose a best path. Finally, this chapter shows you how to configure and troubleshoot BGP peering sessions.

Troubleshooting Exercises

  1. Routers R1 and R3 in Figure 2-31 can ping each other’s loopback 0 interfaces. The network operator configures an IBGP peering between both routers, as shown in Example 2-27. However, the IBGP session is not getting established. The command bgp log-neighbor-changes was configured on both routers, and the output from the show logging and the show ip bgp neighbors commands is shown in Example 2-28. What is likely to be preventing the IBGP peering from coming up?

    02fig31.jpg

    Figure 2-31 Topology for Troubleshooting Exercise 1

    Example 2-27 Configuring an IBGP Peering Between R1 and R3

    ! R1
    !
    router bgp 1
      bgp log-neighbor-changes
      neighbor 192.168.0.3 remote-as 1
      neighbor 192.168.0.3 update-source loopback 0
      neighbor 192.168.0.3 description R3
      neighbor 192.168.0.3 password Ch2_Troublesh00ting_ExcerSizE
    !
    ! R3
    !
    router bgp 1
      bgp log-neighbor-changes
      neighbor 192.168.0.1 remote-as 1
      neighbor 192.168.0.1 update-source loopback 0
      neighbor 192.168.0.1 description R1
      neighbor 192.168.0.1 password Ch2_Troublesh00ting_ExcerSizE
    !

    Example 2-28 show logging and show ip bgp neighbors Output

    R1
    R1#show logging
    Syslog logging: enabled (12 messages dropped, 9 messages rate-limited,
                    0 flushes, 0 overruns, xml disabled, filtering disabled)

    No Active Message Discriminator.



    No Inactive Message Discriminator.


        Console logging: level debugging, 117 messages logged, xml disabled,
                         filtering disabled
        Monitor logging: level debugging, 0 messages logged, xml disabled,
                         filtering disabled
        Buffer logging:  level debugging, 126 messages logged, xml disabled,
                         filtering disabled
        Logging Exception size (8192 bytes)
        Count and timestamp logging messages: disabled
        Persistent logging: disabled

    No active filter modules.

    ESM: 0 messages dropped

        Trap logging: level informational, 59 message lines logged

    Log Buffer (8192 bytes):

    *Sep  4 01:21:00.311: %SYS-5-CONFIG_I: Configured from console by console
    *Sep  4 01:21:20.835: BGP: 192.168.0.3 went from Idle to Active
    *Sep  4 01:21:20.843: BGP: 192.168.0.3 open active delayed 30866ms (35000ms max, 28%
      jitter)
    *Sep  4 01:21:51.711: BGP: 192.168.0.3 open active, local address 192.168.0.1
    *Sep  4 01:21:51.891: BGP: 192.168.0.3 open failed: Destination unreachable; gateway
      or host down, open active delayed 31701ms (35000ms max, 28% jitter)
    *Sep  4 01:22:23.595: BGP: 192.168.0.3 open active, local address 192.168.0.1


    R1#show ip bgp neighbors
    BGP neighbor is 192.168.0.3,  remote AS 1, internal link
      BGP version 4, remote router ID 0.0.0.0
      BGP state = Active
      Last read 00:03:33, last write 00:03:33, hold time is 180, keepalive interval is
      60 seconds
      Message statistics:
        InQ depth is 0
        OutQ depth is 0
                             Sent       Rcvd
        Opens:                  0          0
        Notifications:          0          0
        Updates:                0          0
        Keepalives:             0          0
        Route Refresh:          0          0
        Total:                  0          0
      Default minimum time between advertisement runs is 0 seconds

     For address family: IPv4 Unicast
      BGP table version 1, neighbor version 0/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          0

                                       Outbound    Inbound
      Local Policy Denied Prefixes:    --------    -------
        Total:                                0          0
      Number of NLRIs in the update sent: max 0, min 0

      Connections established 0; dropped 0
      Last reset never
      No active TCP connection
    R3
    R3#show logging
    Syslog logging: enabled (12 messages dropped, 9 messages rate-limited,
                    0 flushes, 0 overruns, xml disabled, filtering disabled)

    No Active Message Discriminator.



    No Inactive Message Discriminator.


        Console logging: level debugging, 115 messages logged, xml disabled,
                         filtering disabled
        Monitor logging: level debugging, 0 messages logged, xml disabled,
                         filtering disabled
        Buffer logging:  level debugging, 124 messages logged, xml disabled,
                         filtering disabled
        Logging Exception size (8192 bytes)
        Count and timestamp logging messages: disabled
        Persistent logging: disabled

    No active filter modules.

    ESM: 0 messages dropped

        Trap logging: level informational, 55 message lines logged
    Log Buffer (8192 bytes):

    *Sep  4 01:20:55.003: %SYS-5-CONFIG_I: Configured from console by console
    *Sep  4 01:21:28.723: BGP: 192.168.0.1 went from Idle to Active
    *Sep  4 01:21:28.731: BGP: 192.168.0.1 open active delayed 34023ms (35000ms max, 28%
      jitter)
    *Sep  4 01:22:02.755: BGP: 192.168.0.1 open active, local address 192.168.0.3
    *Sep  4 01:22:02.811: BGP: 192.168.0.1 open failed: Destination unreachable; gateway
      or host down, open active delayed 25843ms (35000ms max, 28% jitter)
    *Sep  4 01:22:28.655: BGP: 192.168.0.1 open active, local address 192.168.0.3
    *Sep  4 01:22:28.831: BGP: 192.168.0.1 open failed: Destination unreachable; gateway
      or host down, open active delayed 27833ms (35000ms max, 28% jitter)
    *Sep  4 01:22:56.667: BGP: 192.168.0.1 open active, local address 192.168.0.3
    *Sep  4 01:22:56.859: BGP: 192.168.0.1 open failed: Destination unreachable; gateway
      or host down, open active delayed 33383ms (35000ms max, 28% jitter)

    R3#show ip bgp neighbors
    BGP neighbor is 192.168.0.1,  remote AS 1, internal link
      BGP version 4, remote router ID 0.0.0.0
      BGP state = Active
      Last read 00:03:57, last write 00:03:57, hold time is 180, keepalive interval is
      60 seconds
      Message statistics:
        InQ depth is 0
        OutQ depth is 0
                             Sent       Rcvd
        Opens:                  0          0
        Notifications:          0          0
        Updates:                0          0
        Keepalives:             0          0
        Route Refresh:          0          0
        Total:                  0          0
      Default minimum time between advertisement runs is 0 seconds

     For address family: IPv4 Unicast
      BGP table version 1, neighbor version 0/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          0

                                       Outbound    Inbound
      Local Policy Denied Prefixes:    --------    -------
        Total:                                0          0
      Number of NLRIs in the update sent: max 0, min 0

      Connections established 0; dropped 0
      Last reset never
      No active TCP connection
  2. Refer to Figure 2-32. R1 and R2 have been configured to establish an IBGP connection, but the connection is not coming up. Upon inspecting the logging buffer, the logs in Example 2-29 were found. Why is the IBGP session not coming up?

    02fig32.jpg

    Figure 2-32 Topology for Troubleshooting Exercise 2

    Example 2-29 Logs Lack an IBGP Session

    R1#
    *Sep  4 02:49:20.575: BGP: 192.168.0.2 open failed: Connection timed out; remote
      host not responding, open active delayed 457ms (1000ms max, 87% jitter)
    *Sep  4 02:49:21.035: BGP: 192.168.0.2 open active, local address 192.168.0.1
    R1#
    *Sep  4 02:49:21.287: %TCP-6-BADAUTH: No MD5 digest from 192.168.0.2(179) to
      192.168.0.1(43661)
  3. In an attempt to rectify the problem in Exercise 2, the network operator changed the BGP configuration on one of the routers. Now he receives the log messages shown in Example 2-30. Why is the IBGP session not coming up, and what is the difference between the log messages in this exercise and Exercise 2?

    Example 2-30 Logs Still Missing an IBGP Session

    R1#
    *Sep  4 02:51:16.003: BGP: 192.168.0.2 open active, local address 192.168.0.1
    R1#
    *Sep  4 02:51:21.007: BGP: 192.168.0.2 open failed: Connection timed out; remote
      host not responding, open active delayed 30634ms (35000ms max, 28% jitter)
    R1#
    *Sep  4 02:51:21.739: %TCP-6-BADAUTH: Invalid MD5 digest from 192.168.0.2(28677) to
      192.168.0.1(179)
  4. In Figure 2-33, routers R1 and R2 are in AS1. R3 is in AS2. OSPF is the IGP for AS1 and area 0 spans the whole AS. Routers R1 and R2 have been configured to peer over their loopback addresses. R1 peers with R3 over the physical link addresses. The configurations for all three routers are listed in Example 2-31. Interface Loopback0 of R3 (192.168.0.3) is shown in the output of show ip bgp on router R2, but the route is not being installed in the IP routing table. What is the reason for this? And what are two ways to fix this issue, and which method is considered to be best practice configuration?

    02fig33.jpg

    Figure 2-33 Topology for Troubleshooting Exercise 4

    Example 2-31 Router Configurations for Troubleshooting Exercise 4

    ! R1
    !
    interface Serial1/0
     ip address 10.0.0.1 255.255.255.252
    !
    interface Serial1/1
     ip address 172.16.0.1 255.255.255.252
    !
    interface Loopback 0
     ip address 192.168.0.1 255.255.255.255
    !
    router ospf 1
     log-adjacency-changes
     network 10.0.0.1 0.0.0.0 area 0
     network 192.168.0.1 0.0.0.0 area 0
    !
    router bgp 1
     no synchronization
     bgp log-neighbor-changes
     neighbor 192.168.0.2 remote-as 1
     neighbor 192.168.0.2 update-source Loopback0
     neighbor 172.16.0.2 remote-as 2
     no auto-summary
    !
    ! R2
    !
    interface Serial1/0
     ip address 10.0.0.2 255.255.255.252
    !
    interface Loopback 0
     ip address 192.168.0.2 255.255.255.255
    !
    router ospf 1
     log-adjacency-changes
     network 10.0.0.2 0.0.0.0 area 0
     network 192.168.0.2 0.0.0.0 area 0
    !
    router bgp 1
     no synchronization
     bgp log-neighbor-changes
     neighbor 192.168.0.1 remote-as 1
     neighbor 192.168.0.1 update-source Loopback0
     no auto-summary
    !
    ! R3
    !
    interface Serial1/1
     ip address 172.16.0.2 255.255.255.252
    !
    interface Loopback 0
     ip address 192.168.0.3 255.255.255.255
    !
    router bgp 2
     no synchronization
     bgp log-neighbor-changes
     network 192.168.0.3 mask 255.255.255.255
     neighbor 172.16.0.1 remote-as 1
     no auto-summary
    !
  5. Reference Figure 2-33 in Exercise 4. The network operator fixed the problem that was stopping the bgp route from being installed in the IP routing table on R2. Now the route is in both the BGP table and the IP routing table. However, the ping from R2 to R3 is still not successful. What may be the reason for this and how would you fix it?

Cisco Press Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Cisco Press and its family of brands. I can unsubscribe at any time.

Overview

Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Cisco Press products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@ciscopress.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security

Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children

This site is not directed to children under the age of 13.

Marketing

Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out

Users can always make an informed choice as to whether they should proceed with certain services offered by Cisco Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.ciscopress.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links

This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020