华为乾坤-修改所有VPN BGP:请求示例

时间:2025-05-12 15:31:48

请求示例

HTTP的示例
PATCH /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-bgp:vpn-bgp HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-AC CES S-TOKEN: x-yyyyyy
restconf-transaction-id: "00000000-0000-0000-0000-000000000000"
{
	"huawei-nce-e-bgp:vpn-bgp" : {
		"vpn-instance" : "_public_",
		"router-id" : "10.1.0.0",
		"ipv4-unicast" : {
			"enable" : true,
			"default-route-import" : true,
			"route-select-delay" : 10,
			"reflector-cluster-id" : 10,
			"reflect-change-path" : true,
			"auto-frr" : true,
			"mode" : "be",
			"down-switch" : true,
			"route-relay-tunnel-v6-selector" : "policy1",
			"preference" : {
				"external" : 10,
				"internal" : 10,
				"local" : 10
			},
			"aggregate-route" : [
				{
					"address" : "192.168.1.1",
					"mask" : 24
				}
			],
			"network-route" : [
				{
					"address" : "192.168.1.2",
					"mask" : 24,
					"route-policy" : "policy1"
				}
			],
			"import-routing" : [
				{
					"protocol" : "static",
					"thead-id" : 10,
					"cost" : 10,
					"route-policy" : "policy1"
				}
			],
			"evpn" : {
				"srv6" : {
					"mode" : "be",
					"down-switch" : true
				},
				"locator" : [
					{
						"name" : "name"
					}
				]
			},
			"advertise-l2-evpn" : {
				"advertise-route-to-evpn" : [
					{
						"protocol" : "all",
						"advertise-route-mode" : "all"
					}
				]
			},
			"locator" : [
				{
					"name" : "name"
				}
			]
		},
		"ipv6-unicast" : {
			"enable" : true,
			"default-route-import" : true,
			"route-select-delay" : 10,
			"reflector-cluster-id" : 10,
			"reflect-change-path" : true,
			"auto-frr" : true,
			"mode" : "be",
			"down-switch" : true,
			"route-relay-tunnel-v6-selector" : "policy1",
			"preference" : {
				"external" : 10,
				"internal" : 10,
				"local" : 10
			},
			"aggregate-route" : [
				{
					"address" : "fc00::7",
					"mask" : 96
				}
			],
			"network-route" : [
				{
					"address" : "fc00::7",
					"mask" : 96
				}
			],
			"import-routing" : [
				{
					"protocol" : "static",
					"thead-id" : 10,
					"cost" : 10,
					"route-policy" : "policy1"
				}
			],
			"evpn" : {
				"srv6" : {
					"mode" : "be",
					"down-switch" : true
				},
				"locator" : [
					{
						"name" : "name"
					}
				]
			},
			"advertise-l2-evpn" : {
				"advertise-route-to-evpn" : [
					{
						"protocol" : "all",
						"advertise-route-mode" : "all"
					}
				]
			},
			"locator" : [
				{
					"name" : "name"
				}
			],
			"locator-routes" : [
				{
					"locator-name" : "name"
				}
			]
		},
		"ipv4-vpn" : {
			"enable" : true,
			"policy-vpntarget" : true
		},
		"l2vpn-evpn" : {
			"enable" : true,
			"policy-vpn-target" : true,
			"reflect-change-path" : true
		},
		"link-state-unicast" : {
			"enable" : "True",
			"domain-identifier" : "192.168.1.1",
			"reflector-cluster-id" : 10
		},
		"ipv6-srpolicy" : {
			"enable" : "True",
			"nexthop-select-depend-type" : "default",
			"router-id-filter" : true
		},
		"bgp-peer" : [
			{
				"peer-ip" : "192.168.1.1",
				"peer-as" : "1",
				"local-as-number" : "1",
				"local-if-name" : "GE0/0/0",
				"local-if-address" : "192.168.1.1",
				"ebgp-max-hop" : 10,
				"auth-type" : "password",
				"password-type" : "cipher",
				"password-text" : "Example@123",
				"key-chain-name" : "aa",
				"timer" : {
					"keep-alive-time" : 10,
					"host-time" : 10,
					"connect-retry-time" : 10
				},
				"ipv4-unicast" : {
					"enable" : true,
					"allow-as-loop" : 1,
					"advertise-community" : true,
					"advertise-ext-community" : true,
					"nexthop-config" : "local",
					"prefix-sid" : "default",
					"reflect-client" : true,
					"export-route-policy" : "policy1",
					"import-route-policy" : "policy1",
					"route-update-interval" : 10
				},
				"ipv6-unicast" : {
					"enable" : true,
					"allow-as-loop" : 1,
					"advertise-community" : true,
					"advertise-ext-community" : true,
					"nexthop-config" : "local",
					"prefix-sid" : "default",
					"reflect-client" : true,
					"export-route-policy" : "policy1",
					"import-route-policy" : "policy1"
				},
				"ipv4-vpn" : {
					"enable" : true,
					"export-route-policy" : "policy1",
					"import-route-policy" : "policy1"
				},
				"l2vpn-evpn" : {
					"enable" : true,
					"reflect-client" : true,
					"export-route-policy" : "policy1",
					"import-route-policy" : "policy1"
				},
				"link-state-unicast" : {
					"enable" : "True",
					"reflect-client" : true,
					"export-route-policy" : "policy1"
				},
				"ipv6-srpolicy" : {
					"enable" : "True",
					"reflect-client" : true,
					"advertise-ext-community" : true,
					"graceful-restart-static-timer" : 3600
				},
				"bfd" : {
					"enable" : true,
					"multiplier" : 3,
					"min-rx-interval" : 10,
					"min-tx-interval" : 10
				}
			}
		]
	}
}
support.huaweicloud.com/qiankuncmn-qiankuncs/toctopics/zh-cn_topic_0000001899844977.html
提示

您即将访问非华为云网站,请注意账号财产安全