Changes between Version 7 and Version 8 of HowTo/WriteOFv3Rspecs


Ignore:
Timestamp:
09/30/11 09:54:43 (13 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowTo/WriteOFv3Rspecs

    v7 v8  
    8080}}}
    8181
    82    4. Specify your flowspace. E.g. if you want for the above group to get all traffic that is sourced or destined to the IP subnet 10.1.1.0/24 and uses tcp port 80, then you will need two <openflow:match> tags, one to match the packets that are sourced from that subnet and one to match the packets that are destined to that subnet. Keep in mind that your flowspace is the union of the traffic that is described by each 
     82   4. Specify your flowspace. E.g. if you want for the above group to get all traffic that is sourced or destined to the IP subnet 10.1.1.0/24 and uses tcp port 80, then you will need two <openflow:match> tags, one to match the packets that are sourced from that subnet and one to match the packets that are destined to that subnet. Keep in mind that your flowspace is the union of the traffic that is described by each.
    8383{{{
    8484#!xml
     
    8686   <openflow:use-group name="mygrp" />
    8787   <openflow:packet>
     88     <openflow:dl_type value="0x800" />
    8889     <openflow:nw_src value="10.1.1.0/24" />
     90     <openflow:nw_proto value="6, 17" />
    8991     <openflow:tp_src value="80" />
    9092   <openflow:packet />
     
    9496   <openflow:use-group name="mygrp" />
    9597   <openflow:packet>
     98     <openflow:dl_type value="0x800" />
    9699     <openflow:nw_dst value="10.1.1.0/24" />
     100     <openflow:nw_proto value="6, 17" />
    97101     <openflow:tp_dst value="80" />
    98102   <openflow:packet />
     
    100104}}}
    101105
     106Notice that although we need to match on IP source/destination and on the transport protocol port, we also applied filters to ensure that the packet is an IP packet and that the IP protocol is TCP or UDP. Openflow can filter on any Layer 2, Layer 3 or Layer 4 header field but you would need to match
     107the type on the lower level in order to filter at the higher one, e.g. in order to match on IP fields you need to first ensure that the packet is indeed an IP packet.
    102108
    103109Done! The complete rspec looks like :
     
    136142           <openflow:use-group name="mygrp" />
    137143           <openflow:packet>
     144             <openflow:dl_type value="0x800" />
    138145             <openflow:nw_src value="10.1.1.0/24" />
     146             <openflow:nw_proto value="6, 17" />
    139147             <openflow:tp_src value="80" />
    140148           <openflow:packet />
    141          <openflow:match>
     149      <openflow:match>
    142150
    143          <openflow:match>
    144            <openflow:use-group name="mygrp" />
    145            <openflow:packet>
    146              <openflow:nw_dst value="10.1.1.0/24" />
    147              <openflow:tp_dst value="80" />
     151      <openflow:match>
     152          <openflow:use-group name="mygrp" />
     153          <openflow:packet>
     154              <openflow:dl_type value="0x800" />
     155              <openflow:nw_dst value="10.1.1.0/24" />
     156              <openflow:nw_proto value="6, 17" />
     157              <openflow:tp_dst value="80" />
    148158           <openflow:packet />
    149159         <openflow:match>