1*a001850fSclaudio.\" $OpenBSD: bgpd.8,v 1.24 2007/04/24 08:51:53 claudio Exp $ 29fa69b97Shenning.\" 3050527e1Shenning.\" Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> 49fa69b97Shenning.\" 59fa69b97Shenning.\" Permission to use, copy, modify, and distribute this software for any 69fa69b97Shenning.\" purpose with or without fee is hereby granted, provided that the above 79fa69b97Shenning.\" copyright notice and this permission notice appear in all copies. 89fa69b97Shenning.\" 99fa69b97Shenning.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 109fa69b97Shenning.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 119fa69b97Shenning.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 129fa69b97Shenning.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 139fa69b97Shenning.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 149fa69b97Shenning.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 159fa69b97Shenning.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 169fa69b97Shenning.\" 179fa69b97Shenning.Dd December 22, 2003 189fa69b97Shenning.Dt BGPD 8 199fa69b97Shenning.Os 209fa69b97Shenning.Sh NAME 219fa69b97Shenning.Nm bgpd 229fa69b97Shenning.Nd "Border Gateway Protocol daemon" 239fa69b97Shenning.Sh SYNOPSIS 249fa69b97Shenning.Nm bgpd 259fa69b97Shenning.Bk -words 26cb5bbf48Sjmc.Op Fl cdnv 27907a6a00Sjmc.Oo Xo 28907a6a00Sjmc.Fl D Ar macro Ns = Ns Ar value Oc 29907a6a00Sjmc.Xc 309fa69b97Shenning.Op Fl f Ar file 31ddd56decSjmc.Op Fl r Ar path 32b1cb0a94Sclaudio.Op Fl s Ar path 339fa69b97Shenning.Ek 349fa69b97Shenning.Sh DESCRIPTION 359fa69b97Shenning.Nm 36907a6a00Sjmcis a Border Gateway Protocol 37907a6a00Sjmc.Pq BGP 38907a6a00Sjmcdaemon which manages the network routing tables. 3992c7fe1eSjmcIts main purpose is to exchange information 4092c7fe1eSjmcconcerning 4192c7fe1eSjmc.Qq network reachability 4292c7fe1eSjmcwith other BGP systems. 43907a6a00Sjmc.Nm 44907a6a00Sjmcuses the Border Gateway Protocol, Version 4, 45907a6a00Sjmcas described in RFC 1771. 46907a6a00SjmcPlease refer to that document for more information about BGP. 47907a6a00Sjmc.Pp 48907a6a00Sjmc.Nm 49907a6a00Sjmcis usually started at boot time, and can be enabled by 50907a6a00Sjmcsetting the following in 51907a6a00Sjmc.Pa /etc/rc.conf.local : 52907a6a00Sjmc.Pp 53907a6a00Sjmc.Dl bgpd_flags=\&"\&" 54907a6a00Sjmc.Pp 55907a6a00SjmcSee 56907a6a00Sjmc.Xr rc 8 57907a6a00Sjmcand 58907a6a00Sjmc.Xr rc.conf 8 59907a6a00Sjmcfor more information on the boot process 60907a6a00Sjmcand enabling daemons. 61907a6a00Sjmc.Pp 62907a6a00SjmcWhen 63907a6a00Sjmc.Nm 64907a6a00Sjmcstarts up, it reads settings from a configuration file, 65907a6a00Sjmctypically 66907a6a00Sjmc.Xr bgpd.conf 5 . 67907a6a00SjmcA running 68907a6a00Sjmc.Nm 69907a6a00Sjmcprocess can be controlled using the 70907a6a00Sjmc.Xr bgpctl 8 71907a6a00Sjmcutility. 72907a6a00Sjmc.Pp 739fa69b97ShenningThe options are as follows: 74907a6a00Sjmc.Bl -tag -width "-f fileXXX" 757f5c1560Shenning.It Fl c 767f5c1560ShenningForce 777f5c1560Shenning.Nm 787f5c1560Shenningto do 797f5c1560Shenning.Xr carp 4 80b882c823Shenningdemotion at startup when the 817f5c1560Shenning.Em demote 827f5c1560Shenningfunctionality is used. 837f5c1560ShenningNormally, 847f5c1560Shenning.Nm 85b882c823Shenningwill only do demotion at startup when the demotion counter for the group 86b882c823Shenningin question is already greater than 0. 87b882c823Shenning.Nm 88b882c823Shenningwill start handling demotion after all sessions with demotion configured for 89b882c823Shenningthe given group have been successfully established. 907f5c1560ShenningAt system startup, 917f5c1560Shenning.Xr rc 8 927f5c1560Shenninghas the demotion counter for the group 937f5c1560Shenning.Em carp 947f5c1560Shenningincreased until after 957f5c1560Shenning.Nm 967f5c1560Shenningis started, so this option should 977f5c1560Shenning.Em not 987f5c1560Shenningbe used in 997f5c1560Shenning.Xr rc.conf 8 . 100907a6a00Sjmc.It Fl D Ar macro Ns = Ns Ar value 1019fa69b97ShenningDefine 1029fa69b97Shenning.Ar macro 1039fa69b97Shenningto be set to 1049fa69b97Shenning.Ar value 1059fa69b97Shenningon the command line. 1069fa69b97ShenningOverrides the definition of 1079fa69b97Shenning.Ar macro 1089fa69b97Shenningin the configuration file. 1097528a928Shenning.It Fl d 110907a6a00SjmcDo not daemonize. 111907a6a00SjmcIf this option is specified, 112907a6a00Sjmc.Nm 113907a6a00Sjmcwill run in the foreground and log to 11470bddddaSmcbride.Em stderr . 1159fa69b97Shenning.It Fl f Ar file 116907a6a00SjmcUse 117907a6a00Sjmc.Ar file 118907a6a00Sjmcas the configuration file, 119907a6a00Sjmcinstead of the default 120907a6a00Sjmc.Pa /etc/bgpd.conf . 121ea5db239Shenning.It Fl n 122ea5db239ShenningConfigtest mode. 123907a6a00SjmcOnly check the configuration file for validity. 12431bae58bShenning.It Fl r Ar path 125ddd56decSjmcOpen a second, restricted, control socket that 12631bae58bShenning.Xr bgpctl 8 12731bae58bShenningcan use. 12831bae58bShenningOnly 12931bae58bShenning.Em show 13031bae58bShenningrequests are allowed on this socket. 131b1cb0a94Sclaudio.It Fl s Ar path 1329f8162a8SclaudioUse an alternate location for the default control socket. 1339fa69b97Shenning.It Fl v 1349fa69b97ShenningProduce more verbose output. 1359fa69b97Shenning.El 1369fa69b97Shenning.Sh FILES 1379f8162a8Sclaudio.Bl -tag -width "/var/run/bgpd.sockXXX" -compact 1389fa69b97Shenning.It Pa /etc/bgpd.conf 139907a6a00Sjmcdefault 1409fa69b97Shenning.Nm 141907a6a00Sjmcconfiguration file 1429f8162a8Sclaudio.It Pa /var/run/bgpd.sock 1439f8162a8Sclaudiodefault 1449f8162a8Sclaudio.Nm 1459f8162a8Sclaudiocontrol socket 1469fa69b97Shenning.El 147d783ce62Sjmc.Sh SEE ALSO 1488666bbbfShenning.Xr bgpd.conf 5 , 149afc740faSjmc.Xr bgpctl 8 , 150afc740faSjmc.Xr bgplg 8 , 151afc740faSjmc.Xr bgplgsh 8 15209376f25Sjmc.Rs 15309376f25Sjmc.%R RFC 1771 15409376f25Sjmc.%T "A Border Gateway Protocol 4 (BGP-4)" 15509376f25Sjmc.%D March 1995 15609376f25Sjmc.Re 15709376f25Sjmc.Rs 15809376f25Sjmc.%R RFC 1997 15909376f25Sjmc.%T "BGP Communities Attribute" 16009376f25Sjmc.%D August 1996 16109376f25Sjmc.Re 16209376f25Sjmc.Rs 16309376f25Sjmc.%R RFC 2385 16409376f25Sjmc.%T "Protection of BGP Sessions via the TCP MD5 Signature Option" 16509376f25Sjmc.%D August 1998 16609376f25Sjmc.Re 16709376f25Sjmc.Rs 16809376f25Sjmc.%R RFC 2918 16909376f25Sjmc.%T "Route Refresh Capability for BGP-4" 17009376f25Sjmc.%D September 2000 17109376f25Sjmc.Re 17209376f25Sjmc.Rs 17309376f25Sjmc.%R RFC 3392 17409376f25Sjmc.%T "Capabilities Advertisement with BGP-4" 17509376f25Sjmc.%D January 1999 17609376f25Sjmc.Re 1770cdec1c0Sclaudio.Rs 1780cdec1c0Sclaudio.%R RFC 3765 1790cdec1c0Sclaudio.%T "NOPEER Community for Border Gateway Protocol" 1800cdec1c0Sclaudio.%D April 2004 1810cdec1c0Sclaudio.Re 182c6b0f9fcSclaudio.Rs 183c6b0f9fcSclaudio.%R RFC 4760 184c6b0f9fcSclaudio.%T "Multiprotocol Extensions for BGP-4" 185c6b0f9fcSclaudio.%D January 2007 186c6b0f9fcSclaudio.Re 187*a001850fSclaudio.Rs 188*a001850fSclaudio.%R draft-ietf-idr-as4bytes-13 189*a001850fSclaudio.%T "BGP Support for Four-octet AS Number Space" 190*a001850fSclaudio.%D February 2007 191*a001850fSclaudio.Re 1929fa69b97Shenning.Sh HISTORY 1939fa69b97ShenningThe 1949fa69b97Shenning.Nm 1959fa69b97Shenningprogram first appeared in 1969fa69b97Shenning.Ox 3.5 . 197