X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=deploy%2Fmetal3-vm%2Fubuntu_bridge_network_configuration.sh;h=60875cbaa606df39e8c693899988176e81bf996f;hb=e3be88235a3456ea1b7fd34460d21d894ba21871;hp=3f7b8b9aeab07da882e6d5bb260b985c9966a698;hpb=802e1f9ef59d38f337ca291df6bf1fb140ef7404;p=icn.git diff --git a/deploy/metal3-vm/ubuntu_bridge_network_configuration.sh b/deploy/metal3-vm/ubuntu_bridge_network_configuration.sh index 3f7b8b9..60875cb 100755 --- a/deploy/metal3-vm/ubuntu_bridge_network_configuration.sh +++ b/deploy/metal3-vm/ubuntu_bridge_network_configuration.sh @@ -10,24 +10,20 @@ if [ "$MANAGE_PRO_BRIDGE" == "y" ]; then # Adding an IP address in the libvirt definition for this network results in # dnsmasq being run, we don't want that as we have our own dnsmasq, so set # the IP address here - sudo brctl addbr provisioning - # sudo ifconfig provisioning 172.22.0.1 netmask 255.255.255.0 up - # Use ip command. ifconfig commands are deprecated now. + sudo ip link add dev provisioning type bridge sudo ip addr add dev provisioning 172.22.0.1/24 sudo ip link set provisioning up # Need to pass the provision interface for bare metal if [ "$PRO_IF" ]; then - sudo brctl addif provisioning "$PRO_IF" + sudo ip link set dev "$PRO_IF" master provisioning fi fi if [ "$MANAGE_INT_BRIDGE" == "y" ]; then # Create the baremetal bridge if ! [[ $(ip a show baremetal) ]]; then - sudo brctl addbr baremetal - # sudo ifconfig baremetal 192.168.111.1 netmask 255.255.255.0 up - # Use ip command. ifconfig commands are deprecated now. + sudo ip link add dev baremetal type bridge sudo ip addr add dev baremetal 192.168.111.1/24 sudo ip link set baremetal up fi @@ -35,7 +31,7 @@ if [ "$MANAGE_PRO_BRIDGE" == "y" ]; then # Add the internal interface to it if requests, this may also be the interface providing # external access so we need to make sure we maintain dhcp config if its available if [ "$INT_IF" ]; then - sudo brctl addif "$INT_IF" + sudo ip link set dev "$INT_IF" master baremetal fi fi @@ -44,6 +40,6 @@ if [ "$MANAGE_PRO_BRIDGE" == "y" ]; then sudo virsh net-destroy baremetal sudo virsh net-start baremetal if [ "$INT_IF" ]; then #Need to bring UP the NIC after destroying the libvirt network - sudo ifup "$INT_IF" + sudo ip link set dev "$INT_IF" up fi fi