Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tun
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
tun
Commits
3ce036e7
Commit
3ce036e7
authored
Mar 24, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format
parent
2e919a0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
55 deletions
+55
-55
ansible/bird.conf.j2
ansible/bird.conf.j2
+55
-55
No files found.
ansible/bird.conf.j2
View file @
3ce036e7
...
@@ -4,44 +4,44 @@ router id {{address}};
...
@@ -4,44 +4,44 @@ router id {{address}};
protocol device {
protocol device {
}
}
protocol direct {
protocol direct {
disabled;
disabled;
ipv4;
ipv4;
ipv6;
ipv6;
}
}
protocol direct {
protocol direct {
ipv4 {
ipv4 {
import all;
import all;
};
};
ipv6;
ipv6;
}
}
protocol kernel {
protocol kernel {
ipv4 {
ipv4 {
export all;
export all;
};
};
kernel table 300;
kernel table 300;
}
}
protocol kernel {
protocol kernel {
ipv6 { export all; };
ipv6 { export all; };
}
}
{% for connection in connections %}
{% for connection in connections %}
{% if connection.protocol != "null" and connection.remoteLocalAddress != address %}
{% if connection.protocol != "null" and connection.remoteLocalAddress != address %}
ipv4 table {{connection.name.replace("-", "_")}};
ipv4 table {{connection.name.replace("-", "_")}};
protocol static {
protocol static {
ipv4 {
ipv4 {
table {{connection.name.replace("-", "_")}};
table {{connection.name.replace("-", "_")}};
};
};
igp table master4;
igp table master4;
route 0.0.0.0/0 recursive {{connection.remoteLocalAddress}};
route 0.0.0.0/0 recursive {{connection.remoteLocalAddress}};
}
}
protocol kernel {
protocol kernel {
ipv4 {
ipv4 {
table {{connection.name.replace("-", "_")}};
table {{connection.name.replace("-", "_")}};
export all;
export all;
};
};
kernel table {{connection.remoteMark}};
kernel table {{connection.remoteMark}};
}
}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
...
@@ -51,31 +51,31 @@ protocol kernel {
...
@@ -51,31 +51,31 @@ protocol kernel {
ipv4 table {{plan.name}};
ipv4 table {{plan.name}};
{% for net in plan.list %}
{% for net in plan.list %}
protocol static {
protocol static {
ipv4 {
ipv4 {
table {{plan.name}};
table {{plan.name}};
};
};
igp table master4;
igp table master4;
route {{net}} recursive {{plan.gatewayAddress}};
route {{net}} recursive {{plan.gatewayAddress}};
}
}
{% endfor %}
{% endfor %}
protocol kernel {
protocol kernel {
ipv4 {
ipv4 {
table {{plan.name}};
table {{plan.name}};
export all;
export all;
};
};
kernel table {{plan.table}};
kernel table {{plan.table}};
}
}
{% endfor %}
{% endfor %}
protocol ospf v2 {
protocol ospf v2 {
ipv4 {
ipv4 {
import all;
import all;
export where source ~ [ RTS_DEVICE, RTS_STATIC ];
export where source ~ [ RTS_DEVICE, RTS_STATIC ];
};
};
area 0 {
area 0 {
networks {
networks {
10.0.0.0/8;
10.0.0.0/8;
};
};
# interface "eth*" {
# interface "eth*" {
# type broadcast; # Detected by default
# type broadcast; # Detected by default
# cost 10; # Interface metric
# cost 10; # Interface metric
...
@@ -83,28 +83,28 @@ protocol ospf v2 {
...
@@ -83,28 +83,28 @@ protocol ospf v2 {
# };
# };
{% for connection in connections %}
{% for connection in connections %}
{% if connection.protocol != "null" and connection.remoteLocalAddress != address %}
{% if connection.protocol != "null" and connection.remoteLocalAddress != address %}
interface "{{connection.name}}" {
interface "{{connection.name}}" {
type ptp;
type ptp;
{% if connection.outbound %}
{% if connection.outbound %}
cost {{connection.metric}};
cost {{connection.metric}};
{% else %}
{% else %}
cost 50000;
cost 50000;
{% endif %}
{% endif %}
hello 5;
hello 5;
};
};
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% for interface in lan_interfaces %}
{% for interface in lan_interfaces %}
interface "{{interface}}" {
interface "{{interface}}" {
type broadcast;
type broadcast;
cost 1;
cost 1;
hello 5;
hello 5;
};
};
{% endfor %}
{% endfor %}
interface "dummy0" {
interface "dummy0" {
stub; # Stub interface, just propagate it
stub; # Stub interface, just propagate it
};
};
};
};
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment