bgp

Function

The bgp command enables BGP and enter the BGP view or displays the BGP view directly.

The undo bgp command disables BGP.

By default, the BGP is disabled.

Format

bgp { as-number-plain | as-number-dot }

undo bgp [ as-number-plain | as-number-dot ]

Parameters

Parameter Description Value
as-number-plain Integral AS number. The value is an integer ranging from 1 to 4294967295.
as-number-dot AS number in dotted notation. The value is in the format of x.y, where x and y are integers that range from 1 to 65535 and from 0 to 65535, respectively.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP is an inter-AS dynamic routing protocol. BGP running within an AS is called Internal BGP (IBGP), and BGP running between ASs is called External BGP (EBGP).

Whether to apply BGP to routing information transmission between ASs depends on the following conditions:

  • If at least one of the following conditions is met, BGP can be used:

    • Data packets can be transmitted from one AS to another AS.

    • Multiple connections to external Internet Service Providers (ISPs) and Internet exist in ASs.

    • Data flows entering or leaving ASs must be controlled.

  • If one of the following conditions is met, BGP does not need to be used:

    • Users are connected to only one ISP network.

    • The ISP does not need to provide Internet access services for users.

    • ASs adopt default routes between each other.

Configuration Impact

After the bgp command is run, BGP is enabled.

Follow-up Procedure

Devices on a BGP network must establish BGP peer relationships with each other by using the peer as-number command.

Precautions

Each device runs in only one AS; therefore, each device can be specified with only one local AS number.

CAUTION:

Exercise caution when using the undo bgp command because it will delete all BGP configurations on a device.

Example

# Enable BGP and enter the BGP view.

<sysname> system-view
[sysname] bgp 100
[sysname-bgp]

Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.