Home » Cisco, Routing & Switching, Technology

Network Statements, Part 9

Author: Al Friebe 8 November 2010 1,260 views No Comments
Tags: ,

This time, we’ll look at the behavior of network statements under BGP (Border Gateway Protocol).

BGP peering relationships are configured manually using the BGP “neighbor remote-as” command, and the IP routing table is used to find the best route to a particular neighbor. Here’s a basic BGP configuration, with our router in BGP Autonomous System 65001 peering with a router having IP address 1.2.3.4 in BGP AS 65002. We’ve also included a network statement for 10.0.0.0/8:

router bgp 65001

neighbor 1.2.3.4 remote-as 65002

network 10.0.0.0

Unlike the network statements used with IGPs (Interior Gateway Protocols), BGP network statements have nothing at all to do with running the protocol on particular interfaces. Instead, the function of a BGP network statement is to tell the router to search the IP routing table for a particular prefix, and if that prefix is found, originate it into the BGP database. Once in the BGP database, the prefix is available for advertisement to BGP peers.

Note that a BGP network statement is used to originate a prefix into BGP. A prefix that is learned via BGP does not require a network statement in order to be placed into the BGP database.

Suppose that our router has the prefix 10.0.0.0/8 in its IP routing table as a connected, static or IGP route. The exact behavior of the network statement will depend on the status of automatic route summarization under BGP. Suppose that “auto summary” is enabled, like this:

router bgp 65001

neighbor 1.2.3.4 remote-as 65002

network 10.0.0.0

auto-summary

In this case, the existence of either the classful network (10.0.0.0/8) or any subnet of that network in the IP routing table will result in the classful network (but not the existing subnets) being originated into BGP. Now suppose that auto summary is disabled, like this:

router bgp 65001

neighbor 1.2.3.4 remote-as 65002

network 10.0.0.0

no auto-summary

In this case, BGP will search for the classful network (10.0.0.0/8), and if it is found, that classful network will be originated into BGP. On the other hand, if only subnets of the network are found (but not the classful network itself), nothing will be originated into BGP. In other words, when using the BGP network statement without the “mask” option, it’s either the classful network or nothing that’s originated into BGP, never the subnets.

The default setting of automatic route summarization varies by BGP version, but you can see the current status by looking at the BGP section under “show ip protocols”.

In the next installment we’ll examine the effect of using the “mask” option with BGP network statements.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.