1BGPD(8)                   BSD System Manager's Manual                  BGPD(8)
2

NAME

4     bgpd — Border Gateway Protocol daemon
5

SYNOPSIS

7     bgpd [-cdnv] [-D macro=value] [-f file]
8

DESCRIPTION

10     bgpd is a Border Gateway Protocol (BGP) daemon which manages the network
11     routing tables.  Its main purpose is to exchange information concerning
12     "network reachability" with other BGP systems.  bgpd uses the Border
13     Gateway Protocol, Version 4, as described in RFC 4271.
14
15     BGP is an exterior gateway protocol using a multiple step decision
16     process to find the best path.  Advanced filtering can be used to influ‐
17     ence the route decision for traffic engineering.  The session engine of
18     bgpd is responsible for maintaining the TCP session with each neighbor.
19     Updates are passed to the Route Decision Engine (RDE) where the paths are
20     filtered and used to compute a Routing Information Base (RIB).  The par‐
21     ent process is responsible for keeping the RIB in sync with the kernel
22     routing table.
23
24     The route decision process selects the best path by evaluating all paths
25     to the same destination.  The decision process continues to the next step
26     if paths have equal attributes.  Paths that are less preferred are taken
27     out of consideration until there is only one path left.
28
29         1.  All paths with errors or loops are not eligible.
30
31         2.  Paths with an unreachable nexthop are not eligible.  After this
32             step all remaining paths are valid.
33
34         3.  The path with the highest LOCAL_PREF is selected.
35
36         4.  The path with the shortest AS path attribute is selected.
37
38         5.  The ORIGIN attribute is compared.  The order is IGP before EGP
39             before incomplete origins.
40
41         6.  The path with the lowest MULTI_EXIT_DISC metric is selected.
42             Normally, this value is only considered when choosing between
43             multiple routes sent by the same neighbouring AS.  However, if
44             “rde med compare always” is set in the configuration, the metric
45             is compared for routes sent by any AS.
46
47         7.  Comparison of the BGP session type.  Paths learned over an exter‐
48             nal (EBGP) session are preferred over those learned via an inter‐
49             nal (IBGP) session.
50
51         8.  The path with the lowest local weight is selected.
52
53         9.  If “rde route-age evaluate” is set then the oldest path is
54             selected.
55
56         10. The path coming from the neighbor with the lowest BGP ID wins.
57             If the ORIGINATOR_ID attribute is present that value will be used
58             in the comparison instead.
59
60         11. The path with the shortest CLUSTER_LIST attribute is selected.
61             If it is not present then a length of 0 is used in the compari‐
62             son.
63
64         12. The path coming from the peer with the lowest IP address is
65             selected.  IPv4 sessions will be preferred over IPv6 ones.
66
67     Attributes set by filters can be used to tip the decision process to pre‐
68     fer particular paths over others.  This can be achieved by changing the
69     localpref, med, or weight attributes.  AS path prepending or changing the
70     med or origin attribute can be used to influence the routing behaviour on
71     remote systems.
72
73     To have bgpd enabled at boot time, use “rcctl enable bgpd”, which sets
74
75           bgpd_flags=""
76
77     in rc.conf.local(8).
78
79     When bgpd starts up, it reads settings from a configuration file, typi‐
80     cally bgpd.conf(5).  A running bgpd process can be controlled using the
81     bgpctl(8) utility.
82
83     The options are as follows:
84
85     -c          Force bgpd to do carp(4) demotion at startup when the demote
86                 functionality is used.  Normally, bgpd will only do demotion
87                 at startup when the demotion counter for the group in ques‐
88                 tion is already greater than 0.  bgpd will start handling
89                 demotion after all sessions with demotion configured for the
90                 given group have been successfully established.  At system
91                 startup, rc(8) has the demotion counter for the group carp
92                 increased until after bgpd is started, so this option should
93                 not be used in rc.conf(8).
94
95     -D macro=value
96                 Define macro to be set to value on the command line.  Over‐
97                 rides the definition of macro in the configuration file.
98
99     -d          Do not daemonize.  If this option is specified, bgpd will run
100                 in the foreground and log to stderr.
101
102     -f file     Use file as the configuration file, instead of the default
103                 /etc/bgpd.conf.
104
105     -n          Configtest mode.  Only check the configuration file for
106                 validity.
107
108     -v          Produce more verbose output.
109

FILES

111     /etc/bgpd.conf          default bgpd configuration file
112     /run/bgpd/bgpd.sock     default bgpd control socket
113

SEE ALSO

115     bgpd.conf(5), bgpctl(8), bgplg(8), bgplgsh(8)
116

STANDARDS

118     R. Chandra, P. Traina, and T. Li, BGP Communities Attribute, RFC 1997,
119     August 1996.
120
121     A. Heffernan, Protection of BGP Sessions via the TCP MD5 Signature
122     Option, RFC 2385, August 1998.
123
124     P. Marques and F. Dupont, Use of BGP-4 Multiprotocol Extensions for IPv6
125     Inter-Domain Routing, RFC 2545, March 1999.
126
127     E. Chen, Route Refresh Capability for BGP-4, RFC 2918, September 2000.
128
129     G. Huston, NOPEER Community for Border Gateway Protocol (BGP) Route Scope
130     Control, RFC 3765, April 2004.
131
132     Y. Rekhter, T. Li, and S. Hares, A Border Gateway Protocol 4 (BGP-4), RFC
133     4271, January 2006.
134
135     S. Sangli, D. Tappan, and Y. Rekhter, BGP Extended Communities Attribute,
136     RFC 4360, February 2006.
137
138     E. Rosen and Y. Rekhter, BGP/MPLS IP Virtual Private Networks (VPNs), RFC
139     4364, February 2006.
140
141     T. Bates, E. Chen, and R. Chandra, BGP Route Reflection: An Alternative
142     to Full Mesh Internal BGP (IBGP), RFC 4456, April 2006.
143
144     E. Chen and V. Gillet, Subcodes for BGP Cease Notification Message, RFC
145     4486, April 2006.
146
147     T. Bates, R. Chandra, D. Katz, and Y. Rekhter, Multiprotocol Extensions
148     for BGP-4, RFC 4760, January 2007.
149
150     Q. Vohra and E. Chen, BGP Support for Four-octet AS Number Space, RFC
151     4893, May 2007.
152
153     V. Gill, J. Heasley, D. Meyer, P. Savola, and C. Pignatoro, The
154     Generalized TTL Security Mechanism (GTSM), RFC 5082, October 2007.
155
156     J. Scudder and R. Chandra, Capabilities Advertisement with BGP-4, RFC
157     5492, February 2009.
158
159     E. Chen, J. Scudder, P. Mohapatra, and K. Patel, Revised Error Handling
160     for BGP UPDATE Messages, RFC 7606, August 2015.
161
162     L. Blunk, M. Karir, and C. Labovitz, Multi-Threaded Routing Toolkit (MRT)
163     Routing Information Export Format, RFC 6396, October 2011.
164
165     J. Dong, M. Chen, and A. Suryanarayana, Subcodes for BGP Finite State
166     Machine Error, RFC 6608, May 2012.
167
168     W. Kumari, R. Bush, H. Schiller, and K. Patel, Codification of AS 0
169     Processing, RFC 7607, August 2015.
170
171     J. Heitz, J. Snijders, K. Patel, I. Bagdonas, and N. Hilliard, BGP Large
172     Communities Attribute, RFC 8092, February 2017.
173
174     P. Mohapatra, K. Patel, J. Scudder, D. Ward, and R. Bush, BGP Prefix
175     Origin Validation State Extended Community, RFC 8097, March 2017.
176
177     J. Snijders, J. Heitz, and J. Scudder, BGP Administrative Shutdown
178     Communication, RFC 8203, July 2017.
179
180     J. Mauch, J. Snijders, and G. Hankins, Default External BGP (EBGP) Route
181     Propagation Behavior without Policies, RFC 8212, July 2017.
182
183     P. Francois, B. Decraene, C. Pelsser, K. Patel, and C. Filsfils, Graceful
184     BGP Session Shutdown, RFC 8326, March 2018.
185

HISTORY

187     The bgpd program first appeared in OpenBSD 3.5.
188
189BSD                            November 10, 2019                           BSD
Impressum