recursive lookup to find out how to reach a BGP
next-hop address by using its IGP entries in the routing table.
For example, router C learns in a BGP update about network
172.16.0.0/16 from a route source of 172.20.10.1 (router B),
with a next hop of 10.10.10.3 (router A). Router C installs the
route to 172.16.0.0/16 in the routing table with a next hop of
10.10.10.3. Router B should announce network 10.10.10.0/24
using its IGP to router C so that router C can install that
route into its routing table with a next hop of 172.20.10.1. An
IGP uses the source IP address of a routing update (route
source) as the next-hop address, whereas BGP uses a separate
field per network to record the next-hop address. If router C
has a packet to send to 172.16.100.1, it looks up the network
in the routing table and finds a BGP route with a next hop of
10.10.10.3. Because it is a BGP entry, router C completes a
recursive lookup in the routing table for a path to network
10.10.10.3. The IGP has placed a route to network 10.10.10.0 in
the routing table with a next hop of 172.20.10.1, so router C
forwards the packet destined for 172.16.100.1 to 172.20.10.1.
Content 6.3 Configuring BGP
6.3.9 BGP neighbor next-hop-self Command
Sometimes it is necessary to override a router’s default
next-hop behavior and force it to advertise itself as the
next-hop address for routes sent to a neighboring router. The
neighbor next-hop-self command forces BGP to use its own
IP address as the next-hop address for each network that it
advertises to its IBGP neighbor, rather than letting the
protocol choose the next-hop address. An internal protocol,
such as RIP, EIGRP, or OSPF, always uses the source IP address
of a routing update as the next-hop address for each network
that is placed in the routing table. The neighbor
next-hop-self command makes BGP use the source IP address
of the update as the next-hop address for each advertised
network. Figure displays the command parameters. Example:
next-hop-self Configuration
In Figure , router B views
the 192.168.1.0 route learned from AS 65100 as having a next
hop of 172.16.1.1, which is the entrance to AS 65100 for router
B. When router B announces that network to its IBGP neighbors
in AS 65101, the BGP default setting is to announce that the
next hop to reach that network is the entrance to AS 65100
(172.16.1.1). It works this way by default because BGP is an
AS-by-AS routing protocol. For any BGP router to reach networks
in or behind AS 65100, those routers need to reach network
172.16.1.1. Therefore, you need to include the network that
represents 172.16.1.1 in the internal routing protocol. In this
example, however, router B uses the neighbor
next-hop-self command to change the default BGP settings.
Once this command is given, router B advertises a next hop of
2.2.2.2 (the IP address of the loopback interface) to its IBGP
neighbor, because that is the source IP address of the routing
update to its IBGP neighbor (set with the neighbor
update-source command). When router C announces networks
that are in or behind AS 65101 to EBGP neighbors, such as
router D in AS 65102, router C, by default, uses its outbound
interface address 192.168.1.2 as the next-hop address. This
address is also the default next-hop address for router D to
reach any networks in or behind AS 65101. When running BGP over
a multiaccess network such as Ethernet, a BGP router adjusts
the next-hop address to avoid inserting additional hops into
the network. This feature is sometimes called a third-party
next hop. Example: Next Hop on a Multiaccess
Network
As shown in Figure , routers B and C in AS
65000 are running an IGP so that router B can reach network
172.30.0.0 via 10.10.10.2. Router B also runs EBGP with router
A. When router B sends a BGP update to router A regarding
172.30.0.0, it uses 10.10.10.2 as the next hop and not its own
IP address (10.10.10.1). Because the network between the three
routers is a multiaccess network, router A uses router C as a
next hop to reach 172.30.0.0, rather than making an extra hop
via router B. The next-hop address issue makes more sense when
you review it from the perspective of an ISP. A large ISP at a
public peering point has multiple routers peering with
different neighboring routers. It is not possible for one
router to peer with every neighboring router at the major
public peering points. For example, in the figure, router B may
peer with AS 64520, and router C may peer with AS 64600. Router
A must have a path through AS 65000 to get to networks in and
behind AS 64600. Router A has a neighbor relationship only with
router B in AS 65000. However, router B does not handle traffic
going to AS 64600. The preferred path of router B to AS 64600
is through router C, 10.10.10.2. Router B must advertise the
networks for AS 64600 to router A, 10.10.10.3. Router B notices
that routers A and C are on the same subnet, so router B
informs router A to install the AS 64600 networks with a next
hop of 10.10.10.2 and not 10.10.10.1.
Content
6.3 Configuring BGP
6.3.10 Injection Routing Information into BGP Use
the network network-number command to permit BGP
to advertise a network if it is present in the IP routing
table. Figure displays the command parameters. The
network command determines which networks that the
router originates. This concept is different from using the
network command when you are configuring an IGP. Unlike
an IGP, the network command does not start BGP on
specific interfaces. Instead it indicates to BGP which networks
it should originate from this router. The mask parameter
indicates that BGP4 can handle subnetting and supernetting. The
list of network commands must include all networks in
your autonomous system that you want to advertise, not just
those that are locally connected to the router. Prior to Cisco
IOS Software Release 12.0, there was a limit of 200 network
commands per BGP router. This limit has been removed. The
resources of the router, such as the configured NVRAM or RAM,
determine the maximum number of network commands that you can
use. The neighbor command tells BGP where to advertise,
and the network command tells BGP what to advertise.
Content 6.3 Configuring BGP
6.3.11 BGP network Command Example The sole
purpose of the network command is to notify BGP which
network to advertise. Without the mask option, this command
announces only the classful network number. At least one subnet
of the specified major network must be present in the IP
routing table to allow BGP to start announcing the classful
network as a BGP route. When you specify a network-mask
option, an exact match to the network (both address and
mask) must exist in the routing table before BGP announce a
routes. BGP checks whether it can reach it before it starts
announcing the network as a BGP route. The following are two
examples of how the network network-mask command
can be misconfigured. In Figure , the network 192.168.1.1
mask 255.255.255.0 command makes BGP check for the specific
192.168.1.1/24 route in the routing table. It may find
192.168.1.0/24 or 192.168.1.1/32. However, if it never finds a
specific match for the 192.168.1.1/24 network, BGP does not
announce the 192.168.1.1/24 network to any neighbors. In Figure
, the network 192.168.0.0 mask 255.255.0.0 command
advertises a CIDR block. Therefore, BGP looks for
192.168.0.0/16 in the routing table. It may find 192.168.1.0/24
or 192.168.1.1/32. If BGP never finds 192.168.0.0/16, it does
not announce the 192.168.0.0/16 network to any neighbors. In
this case, you can configure the following static route toward
the null interface, so BGP can find an exact match in the
routing table: ip route 198.168.0.0 255.255.0.0 null0
After finding an exact match in the routing table, BGP
announces the 192.168.0.0/16 network to any neighbors.
Note
The BGP auto-summary router