Bring up vlan trunks
Allow for static configs under /etc/yap/bird_static
This commit is contained in:
parent
dd48794cbc
commit
40a9a8f0ff
@ -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
|
||||
}
|
||||
|
||||
|
@ -22,3 +22,4 @@ protocol kernel {
|
||||
}
|
||||
|
||||
include "/etc/yap/bird/*.conf";
|
||||
include "/etc/yap/bird_static/*.conf";
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user