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

Advertise loopback IP and LAN networks via bgp neighbor

getaway51
Level 2
Level 2

May I know which is the cmd to advertise loopback ip?

Because there is no something like that in my router config. But when i show ip bgp , the loopback ip is indeed advertised.

R1(config)#router bgp 1
R1(config-router)#network 11.11.11.0 mask 255.255.255.0

 

router bgp 64478
bgp router-id 200.31.2.7
bgp log-neighbor-changes
neighbor 10.20.2.1 remote-as 67845
neighbor 10.20.2.1 timers 3 22
neighbor 209.16.4.5 remote-as 3423
neighbor 209.16.4.5 timers 4 22
!
address-family ipv4
redistribute connected
redistribute static
neighbor 10.20.2.1 activate
neighbor 10.20.2.1 next-hop-self
neighbor 209.16.4.5 activate
neighbor 209.16.4.5 soft-reconfiguration inbound
neighbor 209.16.4.5 filter-list 15 out
exit-address-family

1 Accepted Solution

Accepted Solutions

BGP has three ways to advertise a route but based on your question i will highlight only the two that are relevant.

  • network command
  • redistribute command
  • Aggregation

The network command requires you to explicitly specify which networks should be advertised into BGP. Where as the redistribute command might inadvertently advertise networks into BGP that you did not explicitly select (aka, using redistribute connected and later adding an loopback interface for testing that you did not mean to get advertise).

*** Rate All Helpful Responses ***

P.Williams

View solution in original post

8 Replies 8

shaps
Level 3
Level 3

You can either use the redistribute command which already seems to be present or the network statement under the bgp process,

 

network 1.1.1.1 mask 255.255.255.255

 

Rob

is the loopback advertised due to the command "redistribute connected"? 

 

What is the loopback IP ? 

 

As you are not advertising any subnets in your BGP configuration then it looks like it is the redistribute connected that is responsible for the advertising. 

 

Jon

is the loopback advertised due to the command "redistribute connected"? 

BGP has three ways to advertise a route but based on your question i will highlight only the two that are relevant.

  • network command
  • redistribute command
  • Aggregation

The network command requires you to explicitly specify which networks should be advertised into BGP. Where as the redistribute command might inadvertently advertise networks into BGP that you did not explicitly select (aka, using redistribute connected and later adding an loopback interface for testing that you did not mean to get advertise).

*** Rate All Helpful Responses ***

P.Williams

do you mean that redistribute connected also includes loopback ip?

 

Yes, it does.

 

Jon

It means that all IP address associated with any interface including loopback ( directly connected interfaces)  will be redistributed into bgp.

i.e BGP will will add these associated loopback networks into its routing table and advertise them to its neighbors.

 

P.Williams