Changes between Version 12 and Version 13 of HowTo/WriteOFv3Rspecs/Examples


Ignore:
Timestamp:
09/30/11 13:57:18 (8 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowTo/WriteOFv3Rspecs/Examples

    v12 v13  
    227227
    228228
    229 = Rspec to get all traffic for an IP subnet including ARP =
     229== Rspec to get all traffic for an IP subnet including ARP ==
    230230{{{
    231231#!xml
     
    261261</rspec>
    262262}}}
     263
     264= OFv2 to OFv3 conversion examples =
     265
     266== Request port TCP port on a subnet ==
     267
     268=== OF v1 ===
     269{{{
     270#!xml
     271<!-- This rspec will reserve the OpenFlow resources at example.net that are used
     272     for the Aster*x experiment with OFv1
     273-->
     274<resv_rspec type="openflow">
     275  <user affiliation="BBN" email="aster*x@example.net" firstname="Aster*x" lastname="Stanford" password="ast"/>
     276  <project description="Asterix" name="Stanford's Asterix demo"/>
     277  <slice controller_url="tcp:ctrl.example.net:8833" description="The Asterix controller."
     278         name="stanford-asterix"/>
     279  <flowspace>
     280     <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:55"/>
     281    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:56"/>
     282    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:71"/>
     283    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:12:e2:b8:a5:d0+port:20"/>
     284    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:12:e2:b8:a5:d0+port:5"/>
     285    <dl_type from="2048" to="2048"/>
     286    <nw_src from="10.42.111.0" to "10.42.111.255.0" />
     287    <nw_dst from="10.42.111.0" to "10.42.111.255.0" />
     288    <tp_src from="10001" to="10001"/>
     289  </flowspace>
     290
     291  <flowspace>
     292    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:55"/>
     293    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:56"/>
     294    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:71"/>
     295    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:12:e2:b8:a5:d0+port:20"/>
     296    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:12:e2:b8:a5:d0+port:5"/>
     297    <dl_type from="2048" to="2048"/>
     298    <nw_src from="10.42.111.0" to "10.42.111.255.0" />
     299    <nw_dst from="10.42.111.0" to "10.42.111.255.0" />
     300    <tp_src from="10001" to="10001"/>
     301  </flowspace>
     302
     303   <flowspace>
     304     <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:55"/>
     305    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:56"/>
     306    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:71"/>
     307    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:12:e2:b8:a5:d0+port:20"/>
     308    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:12:e2:b8:a5:d0+port:5"/>
     309    <dl_type from="2054" to="2054"/>
     310    <nw_src from="10.42.111.0" to "10.42.111.255.0" />
     311    <nw_dst from="10.42.111.0" to "10.42.111.255.0" />
     312    <tp_src from="10001" to="10001"/>
     313  </flowspace>
     314
     315  <flowspace>
     316    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:55"/>
     317    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:56"/>
     318    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:71"/>
     319    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:12:e2:b8:a5:d0+port:20"/>
     320    <port urn="urn:publicid:IDN+texpedient.example.net:expedient:openflow+switch:06:d6:00:12:e2:b8:a5:d0+port:5"/>
     321    <dl_type from="2054" to="2054"/>
     322    <nw_src from="10.42.111.0" to "10.42.111.255.0" />
     323    <nw_dst from="10.42.111.0" to "10.42.111.255.0" />
     324    <tp_src from="10001" to="10001"/>
     325  </flowspace>
     326</resv_rspec>
     327}}}
     328
     329=== OF v3 ===
     330{{{
     331#!xml
     332<?xml version="1.1" encoding="UTF-8"?>
     333<rspec  xmlns="http://www.protogeni.net/resources/rspec/2"
     334        xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
     335        xmlns:openflow="http://www.geni.net/resources/rspec/ext/openflow/3"
     336        xs:schemaLocation="http://www.protogeni.net/resources/rspec/2
     337              http://www.protogeni.net/resources/rspec/2/request.xsd
     338              http://www.geni.net/resources/rspec/ext/openflow/3
     339              http://www.geni.net/resources/rspec/ext/openflow/3/of-resv.xsd"
     340    type="request">
     341<!-- This rspec will reserve the OpenFlow resources at example.net that are used
     342     for the Aster*x experiment with OFv1
     343-->
     344  <openflow:sliver email="asterx@example.net" description="Asterix" name="Stanford's Asterix demo"/>
     345  <openflow:controller url="tcp:ctrl.example.net:8833" type="primary"/>
     346
     347  <openflow:group name="aster*x">
     348    <openflow:datapath component_id="urn:publicid:IDN+openflow:foam:foam.example.net+datapath:06:d6:00:24:a8:c4:b9:00"
     349         component_manager_id="urn:publicid:IDN+openflow:foam:foam.example.net+authority+am">
     350            <openflow:port num="55"/>
     351            <openflow:port num="56"/>
     352            <openflow:port num="71"/>
     353        </openflow:datapath>
     354        <openflow:datapath component_id="urn:publicid:IDN+openflow:foam:foam.example.net+datapath:06:d6:00:12:e2:b8:a5:d0"
     355             component_manager_id="urn:publicid:IDN+openflow:foam:foam.example.net+authority+am">
     356          <openflow:port num="5"/>
     357          <openflow:port num="20"/>
     358        </openflow:datapath>
     359  </openflow:group>
     360
     361  <openflow:match>
     362    <openflow:use-group name="aster*x" />
     363    <openflow:packet>
     364      <openflow:dl_type value="0x800, 0x806"/>
     365      <openflow:nw_src value="10.42.111.0/24" />
     366      <openflow:nw_dst value="10.42.111.0/24" />
     367      <openflow:tp_src value="10001" />
     368  </openflow:match>
     369
     370  <openflow:match>
     371    <openflow:use-group name="aster*x" />
     372    <openflow:packet>
     373      <openflow:dl_type value="0x800, 0x806"/>
     374      <openflow:nw_src value="10.42.111.0/24" />
     375      <openflow:nw_dst value="10.42.111.0/24" />
     376      <openflow:tp_dst value="10001" />
     377  </openflow:match>
     378</resv_rspec>
     379}}}