cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4898
Views
0
Helpful
3
Replies

redistribute connected vs network command

jay_7301
Level 1
Level 1

Hello,

 

I have 3 routers

 

r1 - AS 100

R2 - AS 200

R3 - AS 200

 

R1 Connected direct to R2 via EBGP. R2 Connects to R3 via IBGP I advertise a loopback 1.1.1.1/32 on r1 router3 will not see this as there is no valid route as the next hop is the outgoing interface of r1 which I cannot ping so I use the next hop self command between r2 and r3 which works well.

I have got the same setup however I have removed the network command an advertised the network via redistribute connected within BGP for some reason I don't need the next hop self command and I can ping the loopback no problem any idea why this is??

 

Hope someone can clear this up also I'm not using any IGP

 

Thanks

1 Accepted Solution

Accepted Solutions

Hello,

It is because when you do the redistribute connected, by default, you are advertising all the connected networks through BGP. Therefore, you are advertising both the loopback of R1 and the link connected to R2 (R1-R2). The same result would be to announce the loopback and the connected link R1-R2 via the network command.

The only difference between both commands is that with "network" you will advertise the prefixes with origin IGP and with "redistribute" with origin "incomplete". Take this into account for the BGP Best Path Selection: IGP>incomplete.

Typically, you have a better control with "network" instead of "redistribute". However, when you want to advertise a lot of prefixes, it is useful the redistribute and you can always add a route-map to control the prefixes you want to inject in BGP.

Hope this helps,

Jose.

View solution in original post

3 Replies 3

e.ciollaro
Level 4
Level 4

First of all I suppose you are advertising networks between R2 and R3 to R1 via eBGP. In any case there is no reason why it has to work using redistribution. It made a little test and, as supposed,   it doesn't work. Could you please post you configuration ?

 

Bye,

enrico

Hello,

It is because when you do the redistribute connected, by default, you are advertising all the connected networks through BGP. Therefore, you are advertising both the loopback of R1 and the link connected to R2 (R1-R2). The same result would be to announce the loopback and the connected link R1-R2 via the network command.

The only difference between both commands is that with "network" you will advertise the prefixes with origin IGP and with "redistribute" with origin "incomplete". Take this into account for the BGP Best Path Selection: IGP>incomplete.

Typically, you have a better control with "network" instead of "redistribute". However, when you want to advertise a lot of prefixes, it is useful the redistribute and you can always add a route-map to control the prefixes you want to inject in BGP.

Hope this helps,

Jose.

Just if you config redistribute connected also on R2, otherwise network between R1 and R2 is advertised to R3 with next hop R1 and, again, R3 does not know R1 address.

 

enrico

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card