Commit 3ce036e7 authored by nanahira's avatar nanahira

format

parent 2e919a0b
...@@ -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
}; };
}; };
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment