EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
internet router role
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ansible-public
internet router role
Commits
3aba3aa0
Commit
3aba3aa0
authored
7 months ago
by
Karl Grube
Browse files
Options
Downloads
Patches
Plain Diff
supporting limited neighbors...
parent
ad3a9a92
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
defaults/main.yml
+2
-0
2 additions, 0 deletions
defaults/main.yml
templates/frr_conf.j2
+36
-0
36 additions, 0 deletions
templates/frr_conf.j2
with
38 additions
and
0 deletions
defaults/main.yml
+
2
−
0
View file @
3aba3aa0
...
...
@@ -6,6 +6,8 @@ allow_default_ipv6: False
firewall4s
:
[]
nat_neighbors
:
[]
limited_firewalls
:
[]
dc_ranges
:
[]
dc4_ranges
:
[]
...
...
This diff is collapsed.
Click to expand it.
templates/frr_conf.j2
+
36
−
0
View file @
3aba3aa0
...
...
@@ -47,6 +47,17 @@ router bgp {{bgp_asn}}
neighbor {{ neighbor }} interface peer-group nat
{% endif %}
{% endfor %}
{% for neighbor in limited_firewalls %}
neighbor {{neighbor.name}} peer-group
neighbor {{neighbor.name}} remote-as external
neighbor {{neighbor.name}} bfd
{% for ip in neighbor.ips|default([]) %}
neighbor {{ ip }} peer-group {{neighbor.name}}
{% endfor %}
{% for interface in neighbor.interfaces|default([]) %}
neighbor {{ interface }} interface peer-group {{neighbor.name}}
{% endfor %}
{% endfor %}
!
address-family ipv4 unicast
{% for range in dc4_ranges %}
...
...
@@ -93,6 +104,15 @@ router bgp {{bgp_asn}}
{% endif %}
{% endfor %}
{% endfor %}
{% for neighbor in limited_firewalls %}
neighbor {{neighbor.name}} activate
{% if neighbor.export_all is defined and neighbor.export_all == True %}
neighbor {{neighbor.name}} prefix-list all out
{% else %}
neighbor {{neighbor.name}} prefix-list {{neighbor.name}}_out out
{% endif %}
neighbor {{neighbor.name}} prefix-list {{neighbor.name}}_in in
{% endfor %}
!
ipv6 prefix-list none seq 10 deny any
{% if allow_default_ipv6 == True %}
...
...
@@ -202,6 +222,22 @@ ip prefix-list my-networks seq {{(loop.index|int)*10+10}} deny any
{% endfor %}
ip prefix-list all seq 10 permit any
ipv6 prefix-list all seq 10 permit any
{% for neighbor in limited_firewalls %}
{% for prefix_out in neighbor.out|default([]) %}
ipv6 prefix-list {{neighbor.name}}_out seq {{(loop.index|int)*10}} permit {{prefix_out}}
{% if loop.last %}
ipv6 prefix-list {{neighbor.name}}_out seq {{(loop.index|int)*10+10}} deny any
{% endif %}
{% endfor %}
{% endfor %}
{% for neighbor in limited_firewalls %}
{% for prefix_in in neighbor.in|default([]) %}
ipv6 prefix-list {{neighbor.name}}_in seq {{(loop.index|int)*10}} permit {{prefix_in}}
{% if loop.last %}
ipv6 prefix-list {{neighbor.name}}_in seq {{(loop.index|int)*10+10}} deny any
{% endif %}
{% endfor %}
{% endfor %}
!
route-map reject_local_origin deny 10
match as-path {{bgp_asn}}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment