Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Border Gateway Protocol
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Packet format == === Message header format === {| class=wikitable style="text-align:center; border:none; background:none; color: inherit;" |+BGP version 4 message header format{{Ref RFC|4271|section=4.1|notes=no}} |- ! style="width:4%;"|bit offset ! colspan="16" style="width:50%;"| 0β15 ! colspan="8" style="width:25%;"| 16β23 ! colspan="8" style="width:25%;"| 24β31 |- ! 0 | rowspan="4" colspan="32"| Marker (always: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff) |- ! 32 |- ! 64 |- ! 96 |- ! 128 | colspan="16"| Length | colspan="8"| Type | colspan="8" style="border: none; background:none; color: inherit;"| |} * '''Marker''': Included for compatibility, must be set to all ones. * '''Length''': Total length of the message in [[Octet (computing)|octets]], including the header. * '''Type''': Type of BGP message. The following values are defined: ** Open (1) ** Update (2) ** Notification (3) ** KeepAlive (4) ** Route-Refresh (5) note: "Marker" and "Length" is omitted from the examples. === Open Packet === ; Version (8bit): Version of BGP used. ; My AS (16bit): Senders [[autonomous system (Internet)|autonomous system]] number. ; Hold Time (16bit): Timeout timer, used to calculate KeepAlive messages. Default 90 seconds. ; BGP Identifier (32bit): IP-address of sender. : Optional Parameters Length (8 bit): total length of the Optional parameters field. '''Example of Open Message''' Type: Open Message (1) Version: 4 My AS: 64496 Hold Time: 90 BGP Identifier: {{IPaddr|192.0.2.254}} Optional Parameters Length: 16 Optional Parameters: Capability: Multiprotocol extensions capability (1) Capability: Route refresh capability (2) Capability: Route refresh capability (Cisco) (128) === Update Packet === Only changes are sent, after initial exchange, only difference (add/change/removed) are sent. '''Example of UPDATE Message''' Type: UPDATE Message (2) Withdrawn Routes Length: 0 Total Path Attribute Length: 25 Path attributes ORIGIN: IGP AS_PATH: 64500 NEXT_HOP: 192.0.2.254 MULTI_EXIT_DISC: 0 Network Layer Reachability Information (NLRI) {{IPaddr|192.0.2.0/27}} {{IPaddr|192.0.2.32/27}} {{IPaddr|192.0.2.64/27}} === Notification === If there is an error it is because one of the fields in the OPEN or UPDATE message does not match between the peers, e.g., BGP version mismatch, the peering router expects a different My AS, etc. The router then sends a Notification message to the peer indicating why the error occurred. {| class="wikitable mw-collapsible mw-collapsed" style="margin: 0 auto; text-align:center" |+ Error Codes ! rowspan="2" |Error Code !! rowspan="2" |Name !! colspan="2" |subcodes |- |Code || Name |- |rowspan="3" | 1 || rowspan="3" |Message Header Error || 1 || style="text-align:left"| Connection Not Synchronized |- | 2 || style="text-align:left"| Bad Message Length |- | 3 || style="text-align:left"| Bad Message Type |- |rowspan="6" | 2 || rowspan="6" |OPEN Message Error || 1 || style="text-align:left"| Unsupported Version Number. |- |2 || style="text-align:left"| Bad Peer AS. |- | 3 || style="text-align:left"| Bad BGP Identifier. |- | 4 || style="text-align:left"|Unsupported Authentication Code. |- | 5 || style="text-align:left"|Authentication Failure. |- | 6 || style="text-align:left"|Unacceptable Hold Time. |- | rowspan="11" |3 || rowspan="11"; style="text-align:left"|UPDATE Message Error || 1 || style="text-align:left"|Malformed Attribute List. |- | 2 || style="text-align:left"|Unrecognized Well-known Attribute. |- | 3 || style="text-align:left"|Missing Well-known Attribute. |- | 4 || style="text-align:left"|Attribute Flags Error. |- | 5 || style="text-align:left"|Attribute Length Error. |- | 6 || style="text-align:left"|Invalid ORIGIN Attribute |- | 7 || style="text-align:left"|AS Routing Loop. |- | 8 || style="text-align:left"|Invalid NEXT_HOP Attribute. |- | 9 || style="text-align:left"|Optional Attribute Error. |- | 10 || style="text-align:left"|Invalid Network Field. |- | 11 || style="text-align:left"|Malformed AS_PATH. |- | 4 || colspan="3" |Hold Timer Expired |- | 5 || colspan="3" |Finite State Machine Error |- | 6 || colspan="3" |Cease |} '''Example of NOTIFICATION Message''' Type: NOTIFICATION Message (3) Major error Code: OPEN Message Error (2) Minor error Code (Open Message): Bad Peer AS (2) Bad Peer AS: 65200 === KeepAlive === KeepAlive messages are sent periodically, to verify that remote peer is still alive. keepalives should be sent at intervals of one third the <code>holdtime</code>. '''Example of KEEPALIVE Message''' Type: KEEPALIVE Message (4) === Route-Refresh === Defined in RFC{{IETF RFC|7313|plainlink=yes}}. Allows for soft updating of <code>Adj-RIB-in</code>, without resetting connection. '''Example of ROUTE-REFRESH Message''' Type: ROUTE-REFRESH Message (5) Address family identifier (AFI): IPv4 (1) Subtype: Normal route refresh request [RFC2918] with/without ORF [RFC5291] (0) Subsequent address family identifier (SAFI): Unicast (1)
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Border Gateway Protocol
(section)
Add topic