Merge "Update network command setup_network.sh"

This commit is contained in:
Zuul 2018-12-20 21:00:22 +00:00 committed by Gerrit Code Review
commit e1754ddda1
1 changed files with 6 additions and 5 deletions

View File

@ -28,11 +28,12 @@ if [[ -r /sys/class/net/${BRIDGE_INTERFACE}1 ]]; then
fi
for i in {1..4}; do
sudo brctl addbr ${BRIDGE_INTERFACE}$i
sudo ip link add ${BRIDGE_INTERFACE}$i type bridge
done
sudo ifconfig ${BRIDGE_INTERFACE}1 $EXTERNAL_IP up
sudo ifconfig ${BRIDGE_INTERFACE}2 up
sudo ifconfig ${BRIDGE_INTERFACE}3 up
sudo ifconfig ${BRIDGE_INTERFACE}4 up
sudo ip addr add $EXTERNAL_IP dev ${BRIDGE_INTERFACE}1
sudo ip link set ${BRIDGE_INTERFACE}1 up
sudo ip link set ${BRIDGE_INTERFACE}2 up
sudo ip link set ${BRIDGE_INTERFACE}3 up
sudo ip link set ${BRIDGE_INTERFACE}4 up
sudo iptables -t nat -A POSTROUTING -s $EXTERNAL_NETWORK -j MASQUERADE