more work on customer link support on edges
This commit is contained in:
parent
2a4150aa41
commit
7468e4fddf
|
@ -98,7 +98,7 @@ case "$1" in
|
|||
|
||||
|
||||
# gathering defined interfaces
|
||||
for if in mgmt mgmtgw ipmigw feth up ibgp gre; do
|
||||
for if in mgmt mgmtgw ipmigw feth up ibgp gre customer; do
|
||||
for i in {1..4}; do #### for now we support/count only to 4 interfaces of each type, we can just raise this to whatever number we want (exeption mgmt)
|
||||
ifname=${if}${i}
|
||||
ifalias=$(dig_txt name.${ifname}.${HOSTNAME}) || true ## still thinking how to do this cleaner
|
||||
|
@ -152,7 +152,7 @@ case "$1" in
|
|||
echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="'${ifmac}'", ATTR{type}=="1", NAME="'${ifname}'"' >>$UDEVCONFIG
|
||||
|
||||
|
||||
if [[ $ifname = up? ]]; then
|
||||
if [[ $ifname = up? ]] || [[ $ifname = customer? ]]; then
|
||||
|
||||
ipv4=$(dig_txt ipv4.$ifname.${HOSTNAME})
|
||||
ipv6=$(dig_txt ipv6.$ifname.${HOSTNAME})
|
||||
|
@ -160,9 +160,13 @@ case "$1" in
|
|||
peerv6=$(dig_txt peerv6.$ifname.${HOSTNAME}) || true ## we dont know if we will always have both available
|
||||
|
||||
|
||||
[ -z $peerv4 ] || FRR_EDGE_NEIGH=" !!! neighbor $peerv4 peer-group eBGPv4\n$FRR_EDGE_NEIGH"
|
||||
[ -z $peerv6 ] || FRR_EDGE_NEIGH=" !!! neighbor $peerv6 peer-group eBGPv6\n$FRR_EDGE_NEIGH"
|
||||
|
||||
if [[ $ifname = up? ]]; then
|
||||
[ -z $peerv4 ] || FRR_EDGE_NEIGH=" !!! neighbor $peerv4 peer-group eBGPv4\n$FRR_EDGE_NEIGH"
|
||||
[ -z $peerv6 ] || FRR_EDGE_NEIGH=" !!! neighbor $peerv6 peer-group eBGPv6\n$FRR_EDGE_NEIGH"
|
||||
elif [[ $ifname = customer? ]]; then
|
||||
[ -z $peerv4 ] || FRR_EDGE_NEIGH=" !!! neighbor $peerv4 peer-group CUSTOMERv4\n$FRR_EDGE_NEIGH"
|
||||
[ -z $peerv6 ] || FRR_EDGE_NEIGH=" !!! neighbor $peerv6 peer-group CUSTOMERv6\n$FRR_EDGE_NEIGH"
|
||||
fi
|
||||
|
||||
cat <<-EOF >>$IFCONFIG
|
||||
auto $ifname
|
||||
|
|
Loading…
Reference in New Issue