Running OVS on Pronto

Pronto started to support Open VSwitch (OVS) since version 1.2. We have received several inquiries about how to test OVS with some OpenFlow controllers, such as NOX.

While every test environment is unique and it might require different configurations in different environment, we want to provide a quick-start guide to give users an easier ramp-up.

Before you start your trial, you need to first decide whether you want to run OVS in standalone mode or you want to run OVS with certain controller.

Standalone OVS

This is easy. Boot up Pronto until you see the following prompt.

………….
File system OK
net.netfilter.nf_conntrack_acct = 1
net.ipv6.conf.all.forwarding = 1
3 Sep 23:26:45 ntpdate[900]: no servers can be used, exiting
System initiating…Please wait…
Please choose which to start: Pica8 XorPlus, OpenFlow, or System shell:
(Will choose default entry if no input in 10 seconds.)
[1] Pica8 XorPlus * default
[2] OpenFlow
[3] Open vSwitch
[4] System shell
[5] Boot menu editor
Enter your choice (1,2,3,4,5):3

Choose 3 at the prompt, and Pronto will launch the standalone OVS for you.

Running OVS with Controllers

Before you start the trial, you need to prepare a couple of things

  • Prepare your controller, such as NOX, on a server (not on Pronto switches)
  • Prepare your Pronto switch by
    • Drop into Linux system shell (because we need to set up the environment)
    • Configure the IP address and gateway of the management port (which talks to the controller)
    • Configure the OVS environment
    • Launch the OVS process

Configure Controller

We assume users can find their controller information from internet. If you don’t know where to start, you can try NOX (http://noxrepo.org/wp/)

Drop Into Linux Shell

This is easy. Boot up Pronto until you see the following prompt.

………….
File system OK
net.netfilter.nf_conntrack_acct = 1
net.ipv6.conf.all.forwarding = 1
3 Sep 23:26:45 ntpdate[900]: no servers can be used, exiting
System initiating…Please wait…
Please choose which to start: Pica8 XorPlus, OpenFlow, or System shell:
(Will choose default entry if no input in 10 seconds.)
[1] Pica8 XorPlus * default
[2] OpenFlow
[3] Open vSwitch
[4] System shell
[5] Boot menu editor
Enter your choice (1,2,3,4,5):4

Choose 4 at the prompt, and Pronto will lead you to Linux shell.

Configure the IP address

You can configure the management IP in two ways, with udhcpc or manually. We recommend udhcpc, if the management port is connected to a network with DHCP server.

# udhcpc      

or configure the IP address manually (the address is just an example)

# ifconfig eth0 10.10.50.53 netmask 255.255.255.0

After the IP address is configured, you need to add the gateway

# route add -net default gw 10.10.50.1

# ifconfig

eth0   Link encap:Ethernet  HWaddr 00:E0:0C:00:00:FD
inet addr:10.10.50.53  Bcast:10.10.50.255  Mask:255.255.255.0
inet6 addr: fe80::2e0:cff:fe00:fd/64 Scope:Link
UP BROADCAST MULTICAST  MTU:1500  Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:60 (60.0 B)  TX bytes:238 (238.0 B)
Base address:0x4000

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING  MTU:16436  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Configure OVS Environment

#cd ovs/bin
#ovsdb-tool create /ovs/ovs-vswitchd.conf.db /ovs/bin/vswitch.ovsschema
ovsdb-tool: I/O error: create: /ovs/ovs-vswitchd.conf.db failed (File exists)
#ovsdb-server /ovs/ovs-vswitchd.conf.db –remote=ptcp:6633:10.10.50.53 &

Then launch the OVS process

#ovs-vswitchd tcp:10.10.50.53:6633 –pidfile=pica8 — &

Now, more tuning.

#ovs-vsctl –db=tcp:10.10.50.53:6633 add-br br0
#ovs-vsctl –db=tcp:10.10.50.53:6633 set bridge br0 datapath_type=pronto
#ovs-vsctl –db=tcp:10.10.50.53:6633 add-port br0 ge-1/1/34 — set Interface ge-1/1/34 type=pronto
#ovs-vsctl –db=tcp:10.10.50.53:6633 add-port br0 ge-1/1/35 — set Interface ge-1/1/35 type=pronto
#ovs-vsctl –db=tcp:10.10.50.53:6633 add-port br0 ge-1/1/36 — set Interface ge-1/1/36 type=pronto

Connect OVS to Controller

#ovs-vsctl –db=tcp:10.10.50.53:6633 set-controller br0 tcp:10.10.50.50:6636

where ‘tcp:10.10.50.50:6636’ is controller address.

Other Useful Commands

Dump flow information of br0 with command:

#ovs-ofctl dump-flows br0

Add a flow into br0 with command:

#ovs-ofctl add-flow br0 in_port=41,actions=output:43

Advertisements

About James Liao
James is a data center architect, focusing on the scalability and operation of data center infrastructure.

Comments are closed.

%d bloggers like this: