| 14 | |
| 15 | == OpenFlow Trema == |
| 16 | To restart Trema controller as well as the attached switch: |
| 17 | {{{ |
| 18 | 1. kill trema process: kill $(pidof ruby) |
| 19 | 2. delete lock file: rm /opt/trema...../tmp/pid/controller.pid (controller is the name of your controller, in the case of Load Balancing, its `Load_Balancer`) |
| 20 | 3. unlink the switches from controller: ovs-vsctl del-controller br0 |
| 21 | 4. start controller: /opt/trema....../trema run controller.rb (controller is the name of your controller, in the case of Load Balancing, its load_balancer.rb) |
| 22 | 5. link switches to the controller: ovs-vsctl set-controller br0 tcp:127.0.0.1 |
| 23 | (might need to wait for 2 seconds for the switch to connect to the controller, to verify that, print something in the "switch_ready" function so that you can see the output when switch is connected) |
| 24 | }}} |