---
title: 新增BGP配置
description: "1. 编辑新增BGP配置的yaml文件。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengcpfs/ecosystemEnable/Docker/kunpengcontainer_06_0027.html
sourcePath: /source/zh/kunpengcpfs/ecosystemEnable/Docker/kunpengcontainer_06_0027.html
indexId: 6ea38b698acd27a09ff3f99b3e3478ea4753e4963aa49404cc1a6fe2cff01f6575
---
# 新增BGP配置

1. 编辑新增BGP配置的yaml文件。
  如下所示配置一个新的BGP，注意BGP名称和ASNumber不能与已有的BGP冲突。

  1 2 3 4 5 6 7 8 9 10 apiVersion: projectcalico.org/v3 kind: BGPConfiguration metadata: name: default spec: logSeverityScreen: Info nodeToNodeMeshEnabled: true asNumber: 63400 serviceClusterIPs: - cidr: 10.244.0.0/16

  参数配置详见官方介绍BGP配置(https://docs.projectcalico.org/reference/resources/bgpconfig)。

2. 添加BGP。
  1 calicoctl apply -f - < bgp.yaml

  命令返回如下信息，表示添加成功。

  1 Successfully applied 1 ‘BGPConfiguration’ resource(s)

3. 执行如下命令获取刚添加的BGP配置信息，并以宽格式输出。

```
calicoctl get bgpConfiguration -o wide
```


  1 2 NAME LOGSEVERITY MESHENAbLED ASNUMBER default Info true 63400
