Views
PortVirt
From OpenFlow Wiki
Contents |
Overview
PortVirt is a OF proxy software that performs port-virtualization of a single switch. Using code based on the FlowVisor0.4, it allows creating multiple virtual OF switches from a single switch. It ensures that each such virtual switch has a unique datapathid and allows strict port-level separation.
Install
1. Download and compile the right branch of FlowVisor
$ git clone git://gitosis.stanford.edu/openflow.git $ cd openflow $ git checkout -b openflow-1.0 origin/release/1.0.0 $ ./boot.sh; ./configure; make $ cd .. $ git clone git://gitosis.stanford.edu/flowvisor.git $ cd flowvisor $ git checkout -b virtualize-1.0 origin/dev/virtualize-1.0 $ ./boot.sh; ./configure; make
2. Add in the default switch file
$ mkdir flowvisor-conf.d $ echo "Default: 1" > flowvisor-conf.d/default.switch $ echo "ID: 9999" >> flowvisor-conf.d/default.switch
Virtualize
Example setup
Say, you want to virtualize a switch with DPID 00:00:00:23:20:f8:25:9b into 3 virtual switches such that:
- Virtual switch A: Ports 1,2,3,4,5
- Virtual switch B: Ports 6,7,8,9,10
- Virtual switch C: Ports 11,12,13,14,15
Configurations
Add the following lines in the switch files:
$ echo "Id: 1 DatapathId: 00:00:00:23:20:f8:25:9b" > flowvisor-conf.d/switch-original.switch
$ echo "Id: 2 DatapathId: 00:00:00:23:20:f8:25:9b virtualize" > flowvisor-conf.d/switch-A.switch
$ echo "Id: 3 DatapathId: 00:00:00:23:20:f8:25:9b virtualize" > flowvisor-conf.d/switch-B.switch
$ echo "Id: 4 DatapathId: 00:00:00:23:20:f8:25:9b virtualize" > flowvisor-conf.d/switch-C.switch
Add the routing guest and point it to your controller
$ echo "Name: routing ID: 1 Host: tcp:<controller>:<port> AllowedPorts: 1,2,3,4,5 switch-A AllowedPorts: 6,7,8,9,10 switch-B AllowedPorts: 11,12,13,14,15 switch-C FlowSpace: allow:" > flowvisor-conf.d/routing.guest
Run FlowVisor
Run FlowVisor from user mode with the following command.
$ ./flowvisor ptcp:<port>
Notes
- Take care that the ports don't overlap
