mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-21 17:21:53 +00:00
Implementation of route server.
This commit is contained in:
parent
e16466b379
commit
a92fe60717
@ -62,9 +62,10 @@ a statically configured table.
|
||||
<p>A <em/Routing Daemon/ is in UNIX terminology a non-interactive program running on
|
||||
background which does the dynamic part of Internet routing, that is it communicates
|
||||
with the other routers, calculates routing tables and sends them to the OS kernel
|
||||
which does the actual packet forwarding. There already exist other such routing daemons: routed (RIP only), GateD<HTMLURL URL="http://www.gated.org/">
|
||||
(non-free), Zebra<HTMLURL URL="http://www.zebra.org"> and MRTD<HTMLURL URL="http://www.zcu.cz/ftp/mirrors/mmrz/mrtd">, but their capabilities are limited and
|
||||
they are relatively hard to configure and maintain.
|
||||
which does the actual packet forwarding. There already exist other such routing
|
||||
daemons: routed (RIP only), GateD (non-free), Zebra<HTMLURL URL="http://www.zebra.org">
|
||||
and MRTD<HTMLURL URL="http://sourceforge.net/projects/mrt">, but their capabilities are
|
||||
limited and they are relatively hard to configure and maintain.
|
||||
|
||||
<p>BIRD is an Internet Routing Daemon designed to avoid all of these shortcomings,
|
||||
to support all the routing technology used in the today's Internet or planned to be
|
||||
@ -730,8 +731,8 @@ for each neighbor using the following configuration parameters:
|
||||
<tag>password <m/string/</tag> Use this password for MD5 authentication
|
||||
of BGP sessions. Default: no authentication.
|
||||
|
||||
<tag>rr client</tag> Be a route reflector and treat neighbor as
|
||||
route reflection client. Default: disabled.
|
||||
<tag>rr client</tag> Be a route reflector and treat the neighbor as
|
||||
a route reflection client. Default: disabled.
|
||||
|
||||
<tag>rr cluster id <m/IPv4 address/</tag> Route reflectors use cluster id
|
||||
to avoid route reflection loops. When there is one route reflector in a cluster
|
||||
@ -740,6 +741,15 @@ for each neighbor using the following configuration parameters:
|
||||
use a common cluster id. Clients in a cluster need not known their cluster
|
||||
id and this option is not allowed to them Default: a same as router id.
|
||||
|
||||
<tag>rs client</tag> Be a route server and treat the neighbor
|
||||
as a route server client. A route server is used as a
|
||||
replacement for full mesh EBGP routing in Internet exchange
|
||||
points in a similar way to route reflectors used in IBGP routing.
|
||||
Bird does not implement obsoleted RFC 1863, but uses ad-hoc implementation,
|
||||
which behaves like plain EBGP but reduces modifications to advertised route
|
||||
attributes to be transparent (for example does not prepend its AS number to
|
||||
AS PATH attribute and keep MED attribute). Default: disabled.
|
||||
|
||||
<tag>enable as4 <m/switch/</tag> BGP protocol was designed to use 2B AS numbers
|
||||
and was extended later to allow 4B AS number. BIRD supports 4B AS extension,
|
||||
but by disabling this option it can be persuaded not to advertise it and
|
||||
|
@ -828,7 +828,7 @@ bgp_update_attrs(struct bgp_proto *p, rte *e, ea_list **attrs, struct linpool *p
|
||||
{
|
||||
eattr *a;
|
||||
|
||||
if (!p->is_internal)
|
||||
if (!p->is_internal && !p->rs_client)
|
||||
{
|
||||
bgp_path_prepend(e, attrs, pool, p->local_as);
|
||||
|
||||
|
@ -492,6 +492,8 @@ bgp_start_locked(struct object_lock *lock)
|
||||
p->rr_client = cf->rr_client;
|
||||
}
|
||||
|
||||
p->rs_client = cf->rs_client;
|
||||
|
||||
if (!p->neigh)
|
||||
{
|
||||
log(L_ERR "%s: Invalid next hop %I", p->p.name, p->next_hop);
|
||||
@ -644,6 +646,8 @@ bgp_check(struct bgp_config *c)
|
||||
cf_error("Neighbor AS number out of range");
|
||||
if ((c->local_as != c->remote_as) && (c->rr_client))
|
||||
cf_error("Only internal neighbor can be RR client");
|
||||
if ((c->local_as == c->remote_as) && (c->rs_client))
|
||||
cf_error("Only external neighbor can be RS client");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -28,6 +28,7 @@ struct bgp_config {
|
||||
int enable_as4; /* Enable local support for 4B AS numbers [RFC4893] */
|
||||
u32 rr_cluster_id; /* Route reflector cluster ID, if different from local ID */
|
||||
int rr_client; /* Whether neighbor is RR client of me */
|
||||
int rs_client; /* Whether neighbor is RS client of me */
|
||||
unsigned connect_retry_time;
|
||||
unsigned hold_time, initial_hold_time;
|
||||
unsigned keepalive_time;
|
||||
@ -66,6 +67,7 @@ struct bgp_proto {
|
||||
u32 remote_id; /* BGP identifier of the neighbor */
|
||||
u32 rr_cluster_id; /* Route reflector cluster ID */
|
||||
int rr_client; /* Whether neighbor is RR client of me */
|
||||
int rs_client; /* Whether neighbor is RS client of me */
|
||||
struct bgp_conn *conn; /* Connection we have established */
|
||||
struct bgp_conn outgoing_conn; /* Outgoing connection we're working with */
|
||||
struct bgp_conn incoming_conn; /* Incoming connection we have neither accepted nor rejected yet */
|
||||
|
@ -21,7 +21,7 @@ CF_KEYWORDS(BGP, LOCAL, NEIGHBOR, AS, HOLD, TIME, CONNECT, RETRY, KEEPALIVE,
|
||||
ERROR, START, DELAY, FORGET, WAIT, ENABLE, DISABLE, AFTER,
|
||||
BGP_PATH, BGP_LOCAL_PREF, BGP_MED, BGP_ORIGIN, BGP_NEXT_HOP,
|
||||
BGP_ATOMIC_AGGR, BGP_AGGREGATOR, BGP_COMMUNITY, SOURCE, ADDRESS,
|
||||
PASSWORD, RR, CLIENT, CLUSTER, ID, AS4)
|
||||
PASSWORD, RR, RS, CLIENT, CLUSTER, ID, AS4)
|
||||
|
||||
CF_GRAMMAR
|
||||
|
||||
@ -55,6 +55,7 @@ bgp_proto:
|
||||
}
|
||||
| bgp_proto RR CLUSTER ID expr ';' { BGP_CFG->rr_cluster_id = $5; }
|
||||
| bgp_proto RR CLIENT ';' { BGP_CFG->rr_client = 1; }
|
||||
| bgp_proto RS CLIENT ';' { BGP_CFG->rs_client = 1; }
|
||||
| bgp_proto HOLD TIME expr ';' { BGP_CFG->hold_time = $4; }
|
||||
| bgp_proto STARTUP HOLD TIME expr ';' { BGP_CFG->initial_hold_time = $5; }
|
||||
| bgp_proto CONNECT RETRY TIME expr ';' { BGP_CFG->connect_retry_time = $5; }
|
||||
|
Loading…
Reference in New Issue
Block a user