+echo "Configuring OpenFlow soft switches......"
+
+ifconfig sw1-eth1 down
+ifconfig sw1-eth1 hw ether 00:00:00:00:01:01
+ifconfig sw1-eth1 up
+
+ifconfig sw2-eth2 down
+ifconfig sw2-eth2 hw ether 00:00:00:00:02:02
+ifconfig sw2-eth2 up
+
+ifconfig sw3-eth4 down
+ifconfig sw3-eth4 hw ether 00:00:00:00:03:04
+ifconfig sw3-eth4 up
+
+ifconfig sw4-eth2 down
+ifconfig sw4-eth2 hw ether 00:00:00:00:04:02
+ifconfig sw4-eth2 up
+
+echo "Configuring hosts......"
+
+ip netns exec fw1 ifconfig fw1-eth0 down
+ip netns exec fw1 ifconfig fw1-eth0 hw ether 00:00:00:00:00:01
+ip netns exec fw1 ifconfig fw1-eth0 192.168.13.2/24
+ip netns exec fw1 ifconfig fw1-eth0 up
+ip netns exec fw1 route add default gw 192.168.13.1
+ip netns exec fw1 arp -s 192.168.13.1 00:00:00:00:01:01
+ip netns exec fw1 echo 1 > /proc/sys/net/ipv4/ip_forward
+
+ip netns exec cache2 ifconfig cache2-eth0 down
+ip netns exec cache2 ifconfig cache2-eth0 hw ether 00:00:00:00:00:02
+ip netns exec cache2 ifconfig cache2-eth0 192.168.14.2/24
+ip netns exec cache2 ifconfig cache2-eth0 up
+ip netns exec cache2 route add default gw 192.168.14.1
+ip netns exec cache2 arp -s 192.168.14.1 00:00:00:00:02:02
+ip netns exec cache2 echo 1 > /proc/sys/net/ipv4/ip_forward
+
+ip netns exec head ifconfig head-eth0 down
+ip netns exec head ifconfig head-eth0 hw ether 00:00:00:00:00:03
+ip netns exec head ifconfig head-eth0 192.168.11.2/24
+ip netns exec head ifconfig head-eth0 up
+ip netns exec head route add default gw 192.168.11.1
+ip netns exec head arp -s 192.168.11.1 00:00:00:00:04:02
+
+ip netns exec branch ifconfig branch-eth0 down
+ip netns exec branch ifconfig branch-eth0 hw ether 00:00:00:00:00:04
+ip netns exec branch ifconfig branch-eth0 192.168.12.2/24
+ip netns exec branch ifconfig branch-eth0 up
+ip netns exec branch route add default gw 192.168.12.1
+ip netns exec branch arp -s 192.168.12.1 00:00:00:00:03:04
+
+echo "Configuring flow entries for topology discovery......"