Bring up vlan trunks

Allow for static configs under /etc/yap/bird_static
This commit is contained in:
root 2018-12-07 00:32:56 -08:00
parent dd48794cbc
commit 40a9a8f0ff
4 changed files with 7 additions and 1 deletions

View File

@ -102,6 +102,7 @@ function start() {
table_id=$(get_table_id $space_id)
# add VLAN
ip link set $VLAN_TRUNK up
ip link add link $VLAN_TRUNK name vl-$space type vlan id $vlan_id
ip addr add $vlan_ip/21 dev vl-$space
ip rule add iif vl-$space lookup $table_id prio 900
@ -250,7 +251,7 @@ function disable_bird_protocols() {
if [[ $bird_version =~ ^2 ]] ; then
pwanbirdc - show protocols| grep -e "^spc${space}_pwr" | cut -d ' ' -f1 | xargs -l pwanbirdc - disable
else
pwanbirdc $space show protocols | grep -e '^pwr' | cut -d ' ' -f1 | xargs -l pwanbirdc pwan disable
pwanbirdc $space show protocols | grep -e '^pwr' | cut -d ' ' -f1 | xargs -l pwanbirdc $space disable
fi
}

View File

@ -22,3 +22,4 @@ protocol kernel {
}
include "/etc/yap/bird/*.conf";
include "/etc/yap/bird_static/*.conf";

View File

@ -43,6 +43,9 @@ ipsec-tools:
/etc/yap/bird:
file.directory
/etc/yap/bird_static:
file.directory
/etc/yap/config:
file.managed:
- source: salt://{{ tpldir }}/config

View File

@ -246,6 +246,7 @@ function start() {
table_id=$(get_table_id $space_id)
# add VLAN
ip link set $VLAN_TRUNK up
ip link add link $VLAN_TRUNK name vl-$space type vlan id $vlan_id
ip addr add $vlan_ip/21 dev vl-$space
ip rule add iif vl-$space lookup $table_id prio 1000