Cisco: BGP Basic CLI Mode

From OnnoWiki
Jump to navigation Jump to search

sumber: https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus6000/sw/unicast/6_x/cisco_n6k_layer3_ucast_cfg_rel_602_N2_1/l3_bgp.html#23909



Prerequisites for BGP

BGP has the following prerequisites:

   You must enable the BGP feature (see the “Enabling the BGP Feature” section).
   You should have a valid router ID configured on the system.
   You must have an AS number, either assigned by a Regional Internet Registry (RIR) or locally administered.
   You must configure at least one IGP that is capable of recursive next-hop resolution.
   You must configure an address family under a neighbor for the BGP session establishment.

Guidelines and Limitations for BGP

BGP has the following configuration guidelines and limitations:

   The dynamic AS number prefix peer configuration the overrides individual AS number configuration inherited from a BGP template.
   If you configure a dynamic AS number for prefix peers in an AS confederation, BGP establishes sessions with only the AS numbers in the local confederation.
   BGP sessions created through a dynamic AS number prefix peer ignore any configured eBGP multihop time-to-live (TTL) value or a disabled check for directly connected peers.
   Configure a router ID for BGP to avoid automatic router ID changes and session flaps.
   Use the maximum-prefix configuration option per peer to restrict the number of routes received and system resources used.
   Configure the update-source to establish a session with BGP/eBGP multihop sessions.
   Specify a BGP policy if you configure redistribution.
   Define the BGP router ID within a VRF.
   If you decrease the keepalive and hold timer values, you might experience BGP session flaps.
   If you configure VRFs, enter the desired VRF (see Chapter 1, “Configuring Layer 3 Virtualization”).

Default Settings

Table 1-2 lists the default settings for BGP parameters.


Table 1-2 Default BGP Parameters Parameters

Default

BGP feature


Disabled

keep alive interval


60 seconds

hold timer


180 seconds CLI Configuration Modes

The following sections describe how to enter each of the CLI configuration modes for BGP. From a mode, you can enter the ? command to display the commands available in that mode.

This section includes the following topics:

   Global Configuration Mode
   Address Family Configuration Mode
   Neighbor Configuration Mode
   Neighbor Address Family Configuration Mode

Global Configuration Mode

Use global configuration mode to create a BGP process and configure advanced features such as AS confederation and route dampening. For more information, see Chapter1, “Configuring Advanced BGP”

This example shows how to enter router configuration mode: switch# configuration switch(config)# router bgp 64496 switch(config-router)#


BGP supports Virtual Routing and Forwarding (VRF). You can configure BGP within the appropriate VRF if you are using VRFs in your network. See the “Configuring Virtualization” section for more information.

This example shows how to enter VRF configuration mode: switch(config)# router bgp 64497 switch(config-router)# vrf vrf_A switch(config-router-vrf)#

Address Family Configuration Mode

You can optionally configure the address families that BGP supports. Use the address-family command in router configuration mode to configure features for an address family. Use the address-family command in neighbor configuration mode to configure the specific address family for the neighbor.

You must configure the address families if you are using route redistribution, address aggregation, load balancing, and other advanced features.

This example shows how to enter address family configuration mode from the router configuration mode: switch(config)# router bgp 64496 switch(config-router)# address-family ipv6 unicast switch(config-router-af)#


This example shows how to enter VRF address family configuration mode if you are using VRFs: switch(config)# router bgp 64497 switch(config-router)# vrf vrf_A switch(config-router-vrf)# address-family ipv6 unicast switch(config-router-vrf-af)#

Neighbor Configuration Mode

Cisco NX-OS provides the neighbor configuration mode to configure BGP peers. You can use neighbor configuration mode to configure all parameters for a peer.

This example shows how to enter neighbor configuration mode: switch(config)# router bgp 64496 switch(config-router)# neighbor 192.0.2.1 switch(config-router-neighbor)#


This example shows how to enter VRF neighbor configuration mode: switch(config)# router bgp 64497 switch(config-router)# vrf vrf_A switch(config-router-vrf)# neighbor 192.0.2.1 switch(config-router-vrf-neighbor)#

Neighbor Address Family Configuration Mode

An address family configuration submode inside the neighbor configuration submode is available for entering address family-specific neighbor configuration and enabling the address family for the neighbor. Use this mode for advanced features such as limiting the number of prefixes allowed for this neighbor and removing private AS numbers for eBGP.

This example shows how to enter neighbor address family configuration mode: switch(config)# router bgp 64496 switch(config-router# neighbor 192.0.2.1 switch(config-router-neighbor)# address-family ipv4 unicast switch(config-router-neighbor-af)#


This example shows how to enter VRF neighbor address family configuration mode: switch(config)# router bgp 64497 switch(config-router)# vrf vrf_A switch(config-router-vrf)# neighbor 209.165.201.1 switch(config-router-vrf-neighbor)# address-family ipv6 unicast switch(config-router-vrf-neighbor-af)#



Referensi


Pranala Menarik