More Related Content
Similar to OpenFlow in Raspberry Pi (20)
More from Toshiki Tsuboi (13)
OpenFlow in Raspberry Pi
- 10. 参考)LINC-Switch上での設定方法
OFS起動プロンプト上でのコマンド投入例
(linc@LincSwitch)1> {ok, C} = enetconf_client:connect("localhost", [{port, 1830}, {user, “linc"},
{password, "linc"}]).
(linc@LincSwitch)1> linc_ofconfig:get_switch_state(0).
!
(linc@LincSwitch)1> Controller = {controller, [{id, ["Switch0-DefaultController"]},
{'ip-address', ["192.168.0.100"]},
{port, ["6633"]}, {protocol, ["tcp"]}]},
(linc@LincSwitch)1> Config = {'capable-switch', [{xmlns, "urn:onf:of111:config:yang"}],
[{id, ["CapableSwitch0"]}, {'logical-switches',
[{'switch', [{id, ["LogicalSwitch0"]}, {'datapath-id',
["00:00:00:00:00:01:00:00"]},
{enabled, ["true"]}, {controllers, [Controller]}]}]}]}.
!
(linc@LincSwitch)1> {ok, Y} = enetconf_client:edit_config(C, running, {xml, Config}).
!
(linc@LincSwitch)1> linc_ofconfig:get_switch_state(0).
10