diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2022-10-03 20:06:13 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2023-10-04 13:07:28 +0200 |
commit | bcff3ae79acfd938459869ac98db4f83e3d422b6 (patch) | |
tree | eabbe667de33fcf3b077421511d70ee151ba0615 /nest | |
parent | 9ca86ef69cc56cb75e48e6f46bfdbe1b1e3e99b6 (diff) |
L3VPN: BGP/MPLS VPNs using MPLS backbone
The L3VPN protocol implements RFC 4364 BGP/MPLS VPNs using MPLS backbone.
It works similarly to pipe. It connects IP table (one per VRF) with (global)
VPN table. Routes passed from VPN table to IP table are stripped of RD and
filtered by import targets, routes passed in the other direction are extended
with RD, MPLS labels and export targets in extended communities. A separate
MPLS channel is used to announce MPLS routes for the labels.
Diffstat (limited to 'nest')
-rw-r--r-- | nest/protocol.h | 3 | ||||
-rw-r--r-- | nest/route.h | 7 | ||||
-rw-r--r-- | nest/rt-attr.c | 1 |
3 files changed, 8 insertions, 3 deletions
diff --git a/nest/protocol.h b/nest/protocol.h index 81139c33..af2a5d68 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -48,6 +48,7 @@ enum protocol_class { PROTOCOL_DEVICE, PROTOCOL_DIRECT, PROTOCOL_KERNEL, + PROTOCOL_L3VPN, PROTOCOL_OSPF, PROTOCOL_MRT, PROTOCOL_PERF, @@ -105,7 +106,7 @@ void protos_dump_all(void); extern struct protocol proto_device, proto_radv, proto_rip, proto_static, proto_mrt, - proto_ospf, proto_perf, proto_aggregator, + proto_ospf, proto_perf, proto_l3vpn, proto_aggregator, proto_pipe, proto_bgp, proto_bmp, proto_bfd, proto_babel, proto_rpki; /* diff --git a/nest/route.h b/nest/route.h index 694e3c5d..f83a5b33 100644 --- a/nest/route.h +++ b/nest/route.h @@ -477,8 +477,9 @@ typedef struct rta { #define RTS_BABEL 13 /* Babel route */ #define RTS_RPKI 14 /* Route Origin Authorization */ #define RTS_PERF 15 /* Perf checker */ -#define RTS_AGGREGATED 16 /* Aggregated route */ -#define RTS_MAX 17 +#define RTS_L3VPN 16 /* MPLS L3VPN */ +#define RTS_AGGREGATED 17 /* Aggregated route */ +#define RTS_MAX 18 #define RTD_NONE 0 /* Undefined next hop */ #define RTD_UNICAST 1 /* Next hop is neighbor router */ @@ -759,6 +760,8 @@ int rt_flowspec_check(rtable *tab_ip, rtable *tab_flow, const net_addr *n, rta * #define DEF_PREF_RIP 120 /* RIP */ #define DEF_PREF_BGP 100 /* BGP */ #define DEF_PREF_RPKI 100 /* RPKI */ +#define DEF_PREF_L3VPN_IMPORT 80 /* L3VPN import -> lower than BGP */ +#define DEF_PREF_L3VPN_EXPORT 120 /* L3VPN export -> higher than BGP */ #define DEF_PREF_INHERITED 10 /* Routes inherited from other routing daemons */ /* diff --git a/nest/rt-attr.c b/nest/rt-attr.c index 367a08ef..7beb119b 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -76,6 +76,7 @@ const char * const rta_src_names[RTS_MAX] = { [RTS_BABEL] = "Babel", [RTS_RPKI] = "RPKI", [RTS_PERF] = "Perf", + [RTS_L3VPN] = "L3VPN", [RTS_AGGREGATED] = "aggregated", }; |