-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from natedoot/routing-control-functions
Routing control functions
- Loading branch information
Showing
9 changed files
with
180 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,95 @@ | ||
--- | ||
type: l3leaf | ||
|
||
evpn_multicast: false | ||
underlay_multicast: false | ||
bgp_peer_groups: | ||
evpn_overlay_core: | ||
structured_config: | ||
local_as: 65000 | ||
remove_private_as: | ||
replace_as: true | ||
bfd: false | ||
|
||
underlay_ipv6: false | ||
underlay_rfc5549: false | ||
overlay_mlag_rfc5549: false | ||
overlay_routing_protocol_address_family: ipv4 | ||
csc_router_bgp: | ||
neighbors: | ||
- ip_address: 1.1.4.201 | ||
peer_group: EVPN-OVERLAY-PEERS | ||
remote_as: 65400 | ||
description: D-SPINE1 | ||
- ip_address: 1.1.4.202 | ||
peer_group: EVPN-OVERLAY-PEERS | ||
remote_as: 65400 | ||
description: D-SPINE2 | ||
- ip_address: 1.1.4.203 | ||
peer_group: EVPN-OVERLAY-PEERS | ||
remote_as: 65400 | ||
description: D-SPINE3 | ||
- ip_address: 1.1.4.204 | ||
peer_group: EVPN-OVERLAY-PEERS | ||
remote_as: 65400 | ||
description: D-SPINE4 | ||
address_family_ipv4: | ||
peer_groups: | ||
- name: IPv4-REMOTE-UNDERLAY-PEERS | ||
rcf_out: AS65000_OUT_IPV4() | ||
activate: true | ||
address_family_evpn: | ||
peer_groups: | ||
- name: EVPN-OVERLAY-PEERS | ||
rcf_in: AS65400_IN_EVPN() | ||
rcf_out: AS65400_OUT_EVPN() | ||
- name: EVPN-OVERLAY-CORE | ||
rcf_in: AS65000_IN_EVPN() | ||
rcf_out: AS65000_OUT_EVPN() | ||
|
||
|
||
router_general: | ||
control_functions: | ||
code_units: | ||
- name: evpngw-rcf | ||
content: |- | ||
function PREFIX_ROUTE() { | ||
return evpn.route_type is EVPN_IP_PREFIX; | ||
} | ||
function IMET_ROUTE() { | ||
return evpn.route_type is EVPN_IMET; | ||
} | ||
function FROM_GW_PEER() { | ||
return community has_any {4:4}; | ||
} | ||
function GW_LOOPBACK() { | ||
return prefix match prefix_list_v4 PL-LOOPBACKS-EVPN-OVERLAY; | ||
} | ||
function AS65000_OUT_IPV4() { | ||
if GW_LOOPBACK(){ | ||
return true; | ||
} | ||
return false; | ||
} | ||
function AS65000_OUT_EVPN() { | ||
if IMET_ROUTE() or PREFIX_ROUTE(){ | ||
community add {4:4}; | ||
} | ||
return true; | ||
} | ||
function AS65000_IN_EVPN() { | ||
if (IMET_ROUTE() or PREFIX_ROUTE()) and FROM_GW_PEER() { | ||
return false; | ||
} | ||
return true; | ||
} | ||
function AS65400_OUT_EVPN() { | ||
if PREFIX_ROUTE(){ | ||
community add {4:4}; | ||
} | ||
return true; | ||
} | ||
function AS65400_IN_EVPN() { | ||
if PREFIX_ROUTE() and FROM_GW_PEER() { | ||
return false; | ||
} | ||
return true; | ||
} | ||
EOF | ||
custom_templates: | ||
- evpngw-af-evpn.j2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.