cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4588
Views
0
Helpful
8
Replies

Network command in bgp

jack george
Level 1
Level 1

Hello,

i want to know in case if route advertised to router PE by ibgp does it must have exact match in routing table of PE  to adv. through ebgp to another PE or just this needed at CE when using network command at it.

 

BR,

1 Accepted Solution

Accepted Solutions

 ..., we dont need network command and exact match for network in RT in R2 in order to adv. it to R3 ?

 

Yes, you do not need "network" command to advertise the iBGP learned routes from R2 to eBGP neighbor R3. However, you need to remember two things:-

1) About Synchronization -- You need to disable synchronization using "no synchronization" command; otherwise, BGP does not advertise iBGP learned routes to eBGP neighbors unless it validates the route through IGP. 

2) Best path selection algorithm -- Since only best paths are announced to BGP peers, make sure the iBGP learned route on R2 is selected as a best-path to reach to the destination network. 

 

HTH,

Meheretab

HTH,
Meheretab

View solution in original post

8 Replies 8

Hello Jack,

No, you do not need to have exact match of the route in the routing table of the PE since the route is already advertised to it through iBGP. You will need it in the routing table of the CE if it (the route) is advertised to BGP using the network command on the CE.

HTH,
Meheretab
HTH,
Meheretab

so in case network connected to R1 and network command used  and R1 connected to R2 and network prefix adv. using ibgp to R2, when R2 adv. network to R3 which connect with R2 by ebgp , we dont need network command and exact match for network in RT in R2 in order to adv. it to R3 ?

thanks for reply 

Hi

Usually if you are advertising any route using network command, the information must be match with the information into the routing table, for example:

You are receiving the network:

10.0.0.0/24

but you set up

network 10.0.0.0 mask 255.0.0.0

 

it will not be advertised to other router, because the mask is not matching.  The same case if you are advertising a route using Prefix-list, you must match the subnet mask like you have received it. But if you are filtering the networks to be advertised you dont need network command between eBGP routers.

But if you are going to use any filtering method like prefix list, you must match the subnet mask otherwise it will not be advertised to the neighbor. 

 

 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

 ..., we dont need network command and exact match for network in RT in R2 in order to adv. it to R3 ?

 

Yes, you do not need "network" command to advertise the iBGP learned routes from R2 to eBGP neighbor R3. However, you need to remember two things:-

1) About Synchronization -- You need to disable synchronization using "no synchronization" command; otherwise, BGP does not advertise iBGP learned routes to eBGP neighbors unless it validates the route through IGP. 

2) Best path selection algorithm -- Since only best paths are announced to BGP peers, make sure the iBGP learned route on R2 is selected as a best-path to reach to the destination network. 

 

HTH,

Meheretab

HTH,
Meheretab

so in case network connected to R1 and R1 connected with R2 with ibgp does this network command must have exact match in routing table or not in R2 in order to adv. it through ebgp to R3

BR,

Hi

For example:

 

R1 ----- iBGP-----R2------eBGP----R3

 

R1 must advertise a prefix with the network command and it must included the same network and subnet mask like known through the routing table. 

 

R2 does not required use network command, it will advertise the R1's prefix to R3. But if you are going to use prefix-list on R2 in order to advertise specific prefix to R3 you must add to the prefix list the same network with its subnet mask like it has been known into the routing table. 

 

Imagine, R2 received from R1 the prefix 10.0.0.1/32 and 10.1.0.1/32 and you want to advertise them to R3, you cannot use:

ip prefix-list TEST seq 5 permit 10.0.0.0/24 

 

To advertise both, they will not be advertised to R3, so you need to use:

 

no ip prefix-list TEST seq 5 permit 10.0.0.0/24 

ip prefix-list TEST seq 5 permit 10.0.0.1/32

ip prefix-list TEST seq 10 permit 10.1.0.1/32

 

Hope it is useful

:-) 

 

 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

so R2 dont need exact match for prefix in its routing table to adv. it to R3

You do not always need to have exact match in routing table of R2; most of the time, you will have though. The reason is that you might have best path learned in BGP table which is not installed in the RIB (routing table) b/c of rib-failure (r>) -- there could be a static route configured which has higher administrative distance and will be installed in the routing table. The rib-failure route is still advertised to peers unless you run "bgp suppress-inactive".

HTH,
Meheretab
HTH,
Meheretab
Review Cisco Networking for a $25 gift card