bgp yang-mode enable

Function

The bgp yang-mode enable command enables the YANG management mode for BGP VPN instances and BGP Muli-Instance VPN instances.

The undo bgp yang-mode enable command disables the YANG management mode for BGP VPN instances and BGP muli-instance VPN instances.

By default, the YANG management mode of BGP and BGP muli-instance is disabled.

Format

bgp yang-mode enable

undo bgp yang-mode enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

To configure and manage BGP VPN instances and BGP multi-instance VPN instances in huawei-bgp.yang, you need to enable the YANG management mode for BGP VPN instances on the device or globally enable the leaf node (/bgp:bgp/bgp:global/bgp:yang-enable) using the YANG model file.

Precautions

Running the bgp yang-mode enable command changes the configurations of BGP VPN instances and their peers or peer groups.

If a command supports both the BGP-VPN instance view and the BGP-VPN instance IPv4 address family view, the command can be run in either view before the bgp yang-mode enable command is run; after the bgp yang-mode enable command is run, this command can be run only in the BGP-VPN instance view. If the command has been configured in the BGP-VPN instance IPv4 address family view, the configuration file is automatically switched to the BGP-VPN instance view, which does not interrupt the network. However, if a configuration rollback is performed and the command in the BGP-VPN instance view is rolled back to the BGP-VPN instance IPv4 address family view, the configuration of the command will be deleted and then delivered. As a result, the network is interrupted. Therefore, exercise caution when using the configuration rollback function in this scenario. After the bgp yang-mode enable comamnd configuration is deleted, the configuration file that has been automatically converted will not be modified, and the command can be run in either view.

If a command supports both the BGP-VPN instance view and the BGP-VPN instance IPv6 address family view, the command can be run in either view before the bgp yang-mode enable command is run; after the bgp yang-mode enable command is run, this command can be run only in the BGP-VPN instance view. If the command has been configured in the BGP-VPN instance IPv6 address family view, the configuration file is automatically switched to the BGP-VPN instance view, which does not interrupt the network. However, if a configuration rollback is performed and the command in the BGP-VPN instance view is rolled back to the BGP-VPN instance IPv6 address family view, the configuration of the command will be deleted and then delivered. As a result, the network is interrupted. Therefore, exercise caution when using the configuration rollback function in this scenario. After the bgp yang-mode enable comamnd configuration is deleted, the configuration file that has been automatically converted will not be modified, and the command can be run in either view.

After the bgp yang-mode enable command is run on a device, you cannot configure or manage BGP multi-instance private network instances in the bgp_bgpmultiinstcomm.xsd file using the schema. You can configure and manage BGP private network instances in the huawei-bgp.yang file only using NETCONF YANG.

After the bgp yang-mode enable command is run, the as-number command run in the BGP-VPN instance IPv4 address family view and BGP-VPN instance IPv6 address family view is converted into the as-number ipv4 and as-number ipv6 commands run in the BGP-VPN instance view.

Example

# Enable the YANG management mode of BGP.
<HUAWEI> system-view
[~HUAWEI] bgp yang-mode enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >