Command map

show bgp encode

Turn a route announcement into wire-format hex.

Ze command

Registry path
show bgp encode
Usage
show bgp encode [family <family>] [local-as <local-as>] [peer-as <peer-as>] [path-id <include|omit>] [part <message|body|nlri>] [asn-width <two-octet|four-octet>] [announcement <announcement>]
Mode
read-only, offline
Wire method
ze-bgp:show-encode
Backends
any backend
Task support
optional: the MCP call is synchronous, which is the default
Subcommands
none: this command takes no subcommand
Pipes, always
json, ndjson, table, text, yaml, raw, no-more, save
Pipes, when the answer has rows
match, count, first, last, display, fill
Pipes, while streaming
log
Pipes, local process only
save

Description

Takes a route in API syntax and returns the BGP UPDATE
as a hex string. Use it to build a test payload, to feed ze-test, or to verify
that an announcement encodes correctly.

Arguments

NameTypeRequiredValuesSummaryDescription
familystringnoany value of this typeAddress family of the routeThe address family the route is encoded for (afi/safi). Without it, ipv4/unicast.
local-asuintnoany value of this typeLocal AS numberThe local AS number the UPDATE is built for. Without it, 65533.
peer-asuintnoany value of this typePeer AS numberThe peer AS number. Equal to local-as, the UPDATE is built for an iBGP session. Without it, 65533.
path-idenumnoinclude omitADD-PATH path identifierWhether each NLRI carries an ADD-PATH path identifier (RFC 7911). Without it, omit.
partenumnomessage body nlriPart of the UPDATE to answerWhich part of the UPDATE the answer carries: the whole message with its 19-octet header, the body without the header, or the NLRI alone. Without it, message.
asn-widthenumnotwo-octet four-octetAS number encoding widthHow AS numbers are encoded: in two octets (RFC 4271) or in four (RFC 6793). Without it, four-octet.
announcementstringnoany value of this typeRoute to encodeThe route in the API announcement syntax, such as route 10.0.0.0/24 next-hop 192.0.2.1.

Mapping status

No vendor equivalent has been curated yet for this Ze command.

Juniper Junos MX

No equivalent is listed for this vendor yet.

Cisco IOS XR

No equivalent is listed for this vendor yet.

Nokia SR OS

No equivalent is listed for this vendor yet.

VyOS

No equivalent is listed for this vendor yet.