Border Gateway Protocol

BGP Basics

Routers that belong to the same AS and exchange BGP update'ami, work on the Internal BGP (IBGP); routers, which belong to different AS and exchange BGP update'ami too, work on the External BGP (EBGP). Commands for IBGP and EBGP configuration are the same, except the router configuration command "neighbor ebgp-multihop" (which is described in section "2" External BGP "this chapter). Therefore, whenever we mention the IBGP and EBGP, this will be done in the context of that routing updates occur either within the same AS, or between AS.

Figure 12-1 shows how to distinguish between EBGP and IBGP.

Figure = 12-1: EBGP, IBGP, and Multiple ASs

Before you share information about routes external AS, BGP should ensure that the network _vnutri ego_ AS achievable. This is ensured by a combination of information-sharing on routes to IBGP between routers within the AS and the transfer of BGP routing information to one of the Interior Gateway Protocols (IGPs), which operate within the AS (for example, Intereior Gateway Routing Protocol IGRP, Intermediate System-to-Intermediate System IS -IS, Routing Information Protocol RIP and Open Shortest Path First OSPF).

BGP uses TCP as its transport protocol (port 179). Any two routers between which opened tcp connection for exchanging routing information are called "peers" or "neighbors". The figure above routers A and B are BGP peers, as well as routers B and C, C and D. Routing Information consists of nezakoltsovannoy (loop-free) maps of autonomous systems. Note that in AS BGP peers are not connected directly to each other (roughly speaking, not connected directly to cable).

BGP peers exchange complete trigger BGP routing tables to each other. Later, they send only incremental updates. In addition, BGP peers exchange keepalive messages (to ensure that the relationship between them is not lost), and notification messages (error messages, and other service information).

For easy configuration of routers in the figure above, the following command:
! Router A
router bgp 100
neighbor remote-as 200
! Router B
router bgp 200
neighbor remote-as 100
neighbor remote-as 200
! Router C
router bgp 200
neighbor remote-as 200
neighbor remote-as 300
! Router D
router bgp 300
neighbor remote-as 200

As can be seen from the above configuration, router bgp global configuration command sets the router number of its AS and exchange BGP routes include between autonomous systems.

Configuration command neighbor [ip address] remote-as [AS] adds an entry in the routing table BGP, and in the record stating that the peer is identified by its IP address within its autonomous system. For routers that use EBGP, neighbors are usually directly connected, and the IP address neighbor'a - a network interface IP address of a boundary router to your side. (The exception to this rule is "EBGP Multihop," which is described later in this section).

For routers that are running IBGP, IP address may be the address of any of the interfaces of a router in the network, which is part of your AS.

Some remarks on the autonomous systems specified in Figure 12-1:

* Routers A and B share information on routing, EBGP, and Routers B and C - for IBGP. Note that the EBGP peers are directly connected, and IBGP - not, as between them, running IGP, it allows them to reach each other and share information.

* All routers that exchange BGP tables within the AS, should set "peers relations" between them. This means that the BGP speakers within an AS must be logically linked. BGP4 uses two mechanisms that facilitate the requirement of complete logical interconnection of routers within an AS. This "Confederations" and "Route Reflectors", which are described below.

* AS 200 is "in transit" for AS 100 and AS 300, AS 200 That is used as a transit packets between AS 100 and AS 300.