---
title: "Lists operational state of BGP peers"
method: GET
path: "/bgp/peers"
tags: ["bgp"]
deprecated: true
---

# Lists operational state of BGP peers

`GET /bgp/peers`

> **Deprecated.**

Retrieves current operational state of BGP peers created by
Cilium BGP virtual router. This includes session state, uptime,
information per address family, etc.
Deprecated: This will be removed in the future.

## Response `200`

Success

- BgpPeer[]
  - `name` string — Name of peer
  - `local-asn` integer — Local AS Number
  - `peer-asn` integer — Peer AS Number
  - `peer-address` string — IP Address of peer
  - `tcp-password-enabled` boolean — Set when a TCP password is configured for communications with this peer
  - `ebgp-multihop-ttl` integer — Time To Live (TTL) value used in BGP packets sent to the eBGP neighbor. 1 implies that eBGP multi-hop feature is disabled (only a single hop is allowed).
  - `peer-port` integer — TCP port number of peer
  - `session-state` string — BGP peer operational state as described here https://www.rfc-editor.org/rfc/rfc4271#section-8.2.2
  - `uptime-nanoseconds` integer — BGP peer connection uptime in nano seconds.
  - `graceful-restart` BgpGracefulRestart — BGP graceful restart parameters negotiated with the peer.
    - `enabled` boolean — When set, graceful restart capability is negotiated for all AFI/SAFIs of this peer.
    - `restart-time-seconds` integer — This is the time advertised to peer for the BGP session to be re-established after a restart. After this period, peer will remove stale routes. (RFC 4724 section 4.2)
  - `families` BgpPeerFamilies[] — BGP peer address family state
    - `afi` string — BGP address family indicator
    - `safi` string — BGP subsequent address family indicator
    - `received` integer — Number of routes received from the peer of this address family
    - `accepted` integer — Number of routes accepted from the peer of this address family
    - `advertised` integer — Number of routes advertised of this address family to the peer
  - `connect-retry-time-seconds` integer — Initial value for the BGP ConnectRetryTimer (RFC 4271, Section 8) in seconds
  - `configured-hold-time-seconds` integer — Configured initial value for the BGP HoldTimer (RFC 4271, Section 4.2) in seconds. The configured value will be used for negotiation with the peer during the BGP session establishment.
  - `applied-hold-time-seconds` integer — Applied initial value for the BGP HoldTimer (RFC 4271, Section 4.2) in seconds. The applied value holds the value that is in effect on the current BGP session.
  - `configured-keep-alive-time-seconds` integer — Configured initial value for the BGP KeepaliveTimer (RFC 4271, Section 8) in seconds. The applied value may be different than the configured value, as it depends on the negotiated hold time interval.
  - `applied-keep-alive-time-seconds` integer — Applied initial value for the BGP KeepaliveTimer (RFC 4271, Section 8) in seconds. The applied value holds the value that is in effect on the current BGP session.
  - `local-capabilities` BgpCapabilities[] — Capabilities announced by the local peer
    - `capabilities` string — Base64-encoded BGP capabilities details
  - `remote-capabilities` BgpCapabilities[] — Capabilities announced by the remote peer
    - `capabilities` string — Base64-encoded BGP capabilities details

## Other responses

- `500` — Internal Server Error
- `501` — BGP Control Plane disabled

---

[API](https://skmtc.net/cilium/apis/cilium-api.md) · [All operations](https://skmtc.net/cilium/apis/cilium-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cilium/cilium-api/revisions/351336b27221/schema)
