GENIRacksHome/OpenGENIRacks/RaspberryPIs: configure_pt1

File configure_pt1, 1.3 KB (added by rrhain@bbn.com, 5 years ago)

Configure Script for 1stt OVS setup - Li Lin

Line 
1# 1. Create Bridges
2sudo ovs-vsctl add-br br1
3sudo ovs-vsctl add-br br2
4sudo ovs-vsctl add-br br3
5
6# 2. Create link from interfaces to bridge
7sudo ovs-vsctl add-port br1 eth1
8sudo ovs-vsctl add-port br2 eth2
9sudo ovs-vsctl add-port br3 eth3
10
11# 3. Connect bridges
12sudo ovs-vsctl add-port br1 patch1_to_2
13sudo ovs-vsctl add-port br2 patch2_to_1
14sudo ovs-vsctl add-port br2 patch2_to_3
15sudo ovs-vsctl add-port br3 patch3_to_2
16
17sudo ovs-vsctl set interface patch1_to_2 type=patch options:peer=patch2_to_1
18sudo ovs-vsctl set interface patch2_to_1 type=patch options:peer=patch1_to_2
19sudo ovs-vsctl set interface patch2_to_3 type=patch options:peer=patch3_to_2
20sudo ovs-vsctl set interface patch3_to_2 type=patch options:peer=patch2_to_3
21
22# 4. Update the IP addresses for br1/2/3
23sudo ifconfig eth1 0 && sudo ifconfig br1 10.10.1.1 netmask 255.255.255.0
24sudo ifconfig eth2 0 && sudo ifconfig br2 10.10.2.1 netmask 255.255.255.0
25sudo ifconfig eth3 0 && sudo ifconfig br3 10.10.3.1 netmask 255.255.255.0
26
27# 5. Connect controller with the bridges
28#sudo ovs-vsctl set-controller br1 tcp:128.89.69.143:6633
29#sudo ovs-vsctl set-controller br2 tcp:128.89.69.143:6633
30#sudo ovs-vsctl set-controller br3 tcp:128.89.69.143:6633
31
32# 6. IMPT: Enable ip forwarding on server pi
33sudo sysctl -w net.ipv4.ip_forward=1
34