cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
573
Views
3
Helpful
4
Replies

Routing

Mlex1
Spotlight
Spotlight

Am i right when we configure BGP anywhere, example configuration   

router bgp 12345

neighbor 192.168.0.1 remote-as 3456
neighbor 192.168.0.1 description TEST
neighbor 192.168.0.2 remote-as 6789
neighbor 192.168.0.2 description TEST1

address-family ipv4

neighbor 192.168.0.1 activate

neighbor 192.168.0.2 activate

in this situation i know bgp will establishment.

second option same configuration with small changes 

router bgp 12345

no bgp default ipv4-unicast

neighbor 192.168.0.1 remote-as 3456
neighbor 192.168.0.1 description TEST
neighbor 192.168.0.2 remote-as 6789
neighbor 192.168.0.2 description TEST1

address-family ipv4

neighbor 192.168.0.1 activate

neighbor 192.168.0.2 activate

here i know if i didn't add neighbor 192.168.0.1 activate bgp neighbor state will be in IDL or down.

i know what does means command activate in general but in example i have some confuse.

Why we need activate in first example ?

Спрашивай все что хочешь
1 Accepted Solution

Accepted Solutions

M02@rt37
VIP
VIP

Hello @Mlex1,

In the context of configuring BGP, the `activate` command is used to activate a BGP neighbor. However, whether you need to use it or not depends on the specific behavior of the router and the configuration.

In your first example:
router bgp 12345
neighbor 192.168.0.1 remote-as 3456
neighbor 192.168.0.1 description TEST
neighbor 192.168.0.2 remote-as 6789
neighbor 192.168.0.2 description TEST1
address-family ipv4
neighbor 192.168.0.1 activate
neighbor 192.168.0.2 activate

You have explicitly used the `activate` command for both BGP neighbors (192.168.0.1 and 192.168.0.2). This means you are explicitly telling the router to activate the BGP session with these neighbors. The `activate` command ensures that the router initiates the BGP session establishment process with these neighbors.

In yor second example:
router bgp 12345
no bgp default ipv4-unicast
neighbor 192.168.0.1 remote-as 3456
neighbor 192.168.0.1 description TEST
neighbor 192.168.0.2 remote-as 6789
neighbor 192.168.0.2 description TEST1
address-family ipv4
neighbor 192.168.0.1 activate
neighbor 192.168.0.2 activate

You have disabled the default IPv4 unicast behavior with `no bgp default ipv4-unicast`, but you still included `neighbor 192.168.0.1 activate` and `neighbor 192.168.0.2 activate`. In this case, these `activate` commands are redundant because, without them, the BGP neighbors would still be activated due to the `neighbor` statements in the configuration.

The use of `activate` can be optional in some BGP configurations. It is typically used when you want to explicitly specify which BGP neighbors to activate, especially in situations where there are many configured neighbors, and you only want to establish BGP sessions with a subset of them. However, if you have the `neighbor` statements in your configuration without `activate`, the router will still attempt to establish BGP sessions with those neighbors.


In Cisco IOS XR, the activate command is not necessary when configuring BGP. Cisco IOS XR uses a different approach to handle the activation of BGP neighbors compared to classic Cisco IOS. In Cisco IOS XR, when you configure a BGP neighbor using the neighbor command, the router automatically considers that neighbor as active by default. You don't need to explicitly use the activate command. This simplifies the BGP configuration process by eliminating the need for the activate command found in classic Cisco IOS.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

4 Replies 4

M02@rt37
VIP
VIP

Hello @Mlex1,

In the context of configuring BGP, the `activate` command is used to activate a BGP neighbor. However, whether you need to use it or not depends on the specific behavior of the router and the configuration.

In your first example:
router bgp 12345
neighbor 192.168.0.1 remote-as 3456
neighbor 192.168.0.1 description TEST
neighbor 192.168.0.2 remote-as 6789
neighbor 192.168.0.2 description TEST1
address-family ipv4
neighbor 192.168.0.1 activate
neighbor 192.168.0.2 activate

You have explicitly used the `activate` command for both BGP neighbors (192.168.0.1 and 192.168.0.2). This means you are explicitly telling the router to activate the BGP session with these neighbors. The `activate` command ensures that the router initiates the BGP session establishment process with these neighbors.

In yor second example:
router bgp 12345
no bgp default ipv4-unicast
neighbor 192.168.0.1 remote-as 3456
neighbor 192.168.0.1 description TEST
neighbor 192.168.0.2 remote-as 6789
neighbor 192.168.0.2 description TEST1
address-family ipv4
neighbor 192.168.0.1 activate
neighbor 192.168.0.2 activate

You have disabled the default IPv4 unicast behavior with `no bgp default ipv4-unicast`, but you still included `neighbor 192.168.0.1 activate` and `neighbor 192.168.0.2 activate`. In this case, these `activate` commands are redundant because, without them, the BGP neighbors would still be activated due to the `neighbor` statements in the configuration.

The use of `activate` can be optional in some BGP configurations. It is typically used when you want to explicitly specify which BGP neighbors to activate, especially in situations where there are many configured neighbors, and you only want to establish BGP sessions with a subset of them. However, if you have the `neighbor` statements in your configuration without `activate`, the router will still attempt to establish BGP sessions with those neighbors.


In Cisco IOS XR, the activate command is not necessary when configuring BGP. Cisco IOS XR uses a different approach to handle the activation of BGP neighbors compared to classic Cisco IOS. In Cisco IOS XR, when you configure a BGP neighbor using the neighbor command, the router automatically considers that neighbor as active by default. You don't need to explicitly use the activate command. This simplifies the BGP configuration process by eliminating the need for the activate command found in classic Cisco IOS.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Hi  M02@rt37 thank you for support 

You have disabled the default IPv4 unicast behavior with `no bgp default ipv4-unicast`, but you still included `neighbor 192.168.0.1 activate` and `neighbor 192.168.0.2 activate`. In this case, these `activate` commands are redundant because, without them, the BGP neighbors would still be activated due to the `neighbor` statements in the configuration. 

here im not agree with you if i disable `no bgp default ipv4-unicast` here neighbor don't be activate, i tested before ask the question 

i should add neighbor 192.168.0.1 activate

after neighbor will be activate 

Спрашивай все что хочешь

Hello,

 

By default IPv4 neighborships are already "active so no need for the "activate" keyword. When you disable the BGP default IPv4 address family's you essentially disable the "activation". This requires you to go under the specific address family and activate that neighbor. You also have to activate neighbors for specific neighbors I believe such as VPNV4/6 and VRFs, because by default they are not active.

 

router bgp 100
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 22.22.22.22 remote-as 100
neighbor 22.22.22.22 update-source Loopback0

!
address-family ipv4
neighbor 22.22.22.22 activate
exit-address-family

!
address-family ipv4 vrf RED
neighbor 172.16.11.1 remote-as 65001
neighbor 172.16.11.1 activate
exit-address-family

!

address-family vpnv4
neighbor 11.11.11.11 activate
neighbor 11.11.11.11 send-community extended
exit-address-family
!
address-family vpnv6
neighbor 11.11.11.11 activate
neighbor 11.11.11.11 send-community extended
exit-address-family

Hope that helps

 

-David

Hi David thank you for your support

You also have to activate neighbors for specific neighbors I believe such as VPNV4/6 and VRFs, because by default they are not active.

about this i know 

Спрашивай все что хочешь
Review Cisco Networking for a $25 gift card