#!/bin/bash


get_interface="perl ./get_interface_map.pl"
net_d=$($get_interface | grep -w net-d[[:blank:]] | awk '{print $3}')
net_b=$($get_interface | grep -w net-b[[:blank:]] | awk '{print $3}')
mgmt=$($get_interface | grep -w mgmt[[:blank:]] | awk '{print $3}')
echo $net_d
echo $net_b
echo $mgmt

#sudo ip addr del 192.168.4.20/24 dev $net_d
#sudo ip addr del 192.168.4.80/24 dev $net_d
#sudo ip addr del 192.168.4.120/24 dev $net_d
#sudo ip addr del 192.168.4.130/24 dev $net_d
#sudo ip addr del 192.168.4.150/24 dev $net_d
#sudo ip addr del 192.168.254.20/24 dev $mgmt
#sudo ip addr del 192.168.254.80/24 dev $mgmt
#sudo ip addr del 192.168.254.120/24 dev $mgmt
#sudo ip addr del 192.168.254.130/24 dev $mgmt
#sudo ip addr del 192.168.254.150/24 dev $mgmt
#sudo ip addr del 192.168.2.20/24 dev $net_b


sudo ip addr add 192.168.4.87/24 dev $net_d
sudo ip addr add 192.168.2.87/24 dev $net_b
sudo ip addr add 192.168.254.87/24 dev $mgmt
