Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

BGP and IGPs and their "network" command comparison

CCNP1 V3, Cisco curriculum 9.3.1 Basic BGP configuration says :

(((The network command is used with IGPs, such as RIP, to determine the interfaces on which to send and receive updates. The command also indicates which directly connected networks to advertise.

However, when configuring BGP, the network command does not affect what interfaces BGP runs on. Therefore, configuring just a network statement will not establish a BGP neighbor relationship. This is a major difference between BGP and IGPs))).

Let us take this scenario

RTA 0/0 connected to RTB S0/0 with network address 10.1.1.0/24

RTA S0/2 connected connected to RTC S0/0 with network address 10.1.2.0/24

RTA S0/3 connected connected to R1 S0/0 with network address 192.168.3.0/24.

RTA(config)router bgp 300

RTA(config-router)#network 10.0.0.0

RTA(config-router)#network 192.168.3.0

1- Note single command network 10.0.0.0 advertise networks for both S0(10.1.1.0) and S0/2 (10.1.2.0),,,,,I am right ?

Let us apply the same scenario on IGP (say EIGRP)

RTA(config)router EIGRP 300

RTA(config-router)#network 10.0.0.0

RTA(config-router)#network 192.168.3.0

Note single command network 10.0.0.0 advertise networks for both S0(10.1.1.0) and S0/2 (10.1.2.0),,,,,I am right ?

Now curriculum is saying “This is a major difference between BGP and IGPs.” What is the major difference between IGPS and BGP ? if he meant by the major difference that : “configuring just a network statement will not establish a BGP neighbor relationship”,,,,,we did not say that network statement will establish a IGP neighbor relationship”!!!!!,,,,,,Any correction to my understanding ?

9 REPLIES

Re: BGP and IGPs and their "network" command comparison

Hello,

in your example for BGP it will in general NOT announce the 10.1.1.0/24 and 10.1.2.0/24. It will include 192.168.3.0/24, though.

It depends on the BGP configuration with respect to "no auto-summary". If "no auto-summary" is configured (most like it is), the network command will only result in an entry in the BGP table, when an exact match in the IP routing table is found. In your example "network 10.0.0.0" will NOT result in any BGP table entry. The network 192.168.3.0 will be found in the IP routing table and thus result in an entry in the BGP table.

The proper configuration for your example would look like this:

router bgp 65000

network 10.1.1.0 mask 255.255.255.0

network 10.1.2.0 mask 255.255.255.0

network 192.168.3.0

no auto-summary

If you would like to include 10.0.0.0/8 instead of the subnets:

router bgp 65000

network 10.0.0.0

network 192.168.3.0

no auto-summary

ip route 10.0.0.0 255.0.0.0 Null0 190

The static route will create the nessessary entry in the IP routing table to allow 10.0.0.0/8 to be included into the BGP table.

BGP "adjacency", i.e. peering is solely made possible by the BGP command: "neighbor a.b.c.d remote-as ". The network statement has no influence on peering. So with BGP the network command solely determines which networks you would like to include into the BGP table.

With IGPs the function of the network command is different, because it will

1) identify the interfaces on a router, where IGP hellos are sent. This means the network command has a "functional component" related to adjacency (unlike BGP network statement).

2) include the network in IGP routing updates once an adjacency is achieved (similar to BGP).

Especially 1) is the big difference between IGP and BGP, when it comes to "network" command.

Hope this helps! Please rate all posts.

Regards, Martin

New Member

Re: BGP and IGPs and their "network" command comparison

Thanks Martin for the effort that you have spent for this reply.

I have got couple of questions:

1- (((in your example for BGP it will in general NOT announce the 10.1.1.0/24 and 10.1.2.0/24. It will include 192.168.3.0/24, though. )))

Why did you exclude 192.168.3.0/24 ?Were you giving me as example, or there was a reason for that ?

2- (((If you would like to include 10.0.0.0/8 instead of the subnets))).

You did not write the "mask" command because BGP will take the default value,,,,didn't it?

3- (((So with BGP the network command solely determines which networks you would like to include into the BGP table))).

But this will be included in BGP table if and only if it has been included in a unicat table (ip routing table ),,,,,Isn't it ?

4- (((With IGPs the function of the network command is different, because it will

1) identify the interfaces on a router,)))

I am going to expalin my understanding and correct me please,,,,with IGP when we define the "netwrok" statement (command), we are going to include either the specific ip address (host) or we are going to specify the network address (more than one hosts).In both cases we are going to implicitly define which interface(s) will involve in the routing process,,,,,Am I right ?

5- (((2) include the network in IGP routing updates once an adjacency is achieved (similar to BGP). )))

You meant the similarty in the process of adding to the table,,,,but not the same table,,,Am I right ?

New Member

Re: BGP and IGPs and their "network" command comparison

I found this useful information from :

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800c95bb.shtml#networkcommand

With some modification made by me:

In BGP the network command controls what networks are originated by this box. This is a different concept from what we are used to configuring with IGPs.

With this command we are not (While in IGPs we are trying to run) trying to run BGP on a certain interface, rather we are trying to indicate to BGP what networks it should originate from this box.

Re: BGP and IGPs and their "network" command comparison

Hi, This is correct.

Great! Regards, Martin

New Member

Re: BGP and IGPs and their "network" command comparison

1- (((network 10.1.1.0 mask 255.255.255.0 and network 10.1.2.0 mask 255.255.255.0 without "no auto-summary"(enable auto summary))))

BGP will advertise 10.1.1.0/24 and 10.1.2.0/24 in BGP table , but must have exact much in the routing table,,,,Am I right ?

2- network 10.0.0.0 command with "no auto-summary"(disable auto summary)?

BGP will advertise 10.0.0.0/8 in BGP table , but must have exact much in the routing table,,,,Am I right ?

3- network 10.0.0.0 command with "auto-summary" (Enable auto summary) ?

At least one subnet of the network must be present in the IP routing table ,like 10.1.1.0 or 10.2.0.0 or any other, and BGP will advertise 10.0.0.0/8,,,Am I right ?

Purple

Re: BGP and IGPs and their "network" command comparison

You are correct on all three counts.. looks like you've got it.

Paresh.

New Member

Re: BGP and IGPs and their "network" command comparison

(((1- (((network 10.1.1.0 mask 255.255.255.0 and network 10.1.2.0 mask 255.255.255.0 without "no auto-summary"(enable auto summary))))

BGP will advertise 10.1.1.0/24 and 10.1.2.0/24 in BGP table , but must have exact much in the routing table,,,,Am I right ?)))

If this is the right case,,,why do I need to the use the "no auot-summary" here :

(((router bgp 65000

network 10.1.1.0 mask 255.255.255.0

network 10.1.2.0 mask 255.255.255.0

network 192.168.3.0

no auto-summary)))---quote form Martin's reply

Purple

Re: BGP and IGPs and their "network" command comparison

Actually, I must take back what I said about you being correct with reagrds to your first point. That is not, in fact, correct.

If you have 'network 10.1.1.0 mask 255.255.255.0' with auto-summary enabled, then BGP does not need an exact match in order to advertise 10.1.1.0/255.255.255.0. A prefix that is a subnet of 10.1.1.0/255.255.255.0, such as 10.1.1.32/255.255.255.224 will also result in 10.1.1.0/255.255.255.0 being advertised by BGP.

Paresh

New Member

Re: BGP and IGPs and their "network" command comparison

((7-48 Building Scalable Cisco Internetworks (BSCI) v2.2 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; however, if you disable

autosummary, an exact match to the network must exist in the routing table))

My understanding If I used "no auto-summary" that means I disabled the autosummary,,,Am I right ?then I have to have exact matching in the ip routing table ,,,Am I right ?

255
Views
0
Helpful
9
Replies
CreatePlease to create content