Changes between Version 57 and Version 58 of GEC16Agenda/OpenFlow/Instructions/Execute


Ignore:
Timestamp:
03/21/13 06:22:41 (11 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC16Agenda/OpenFlow/Instructions/Execute

    v57 v58  
    225225    If your controller is working you the packets registering in both terminals that you run tcpdump.
    226226
     227== Useful Tips for writing your controller ==
     228In order to make this first experience of writing controller easier, we wrote some helpful functions that will abstract some of the  particularities of PoX away.
     229These functions are locates at `/local/pox/ext/utils.py`, so while you write your controller consult this file for details.
     230
     231Functions that are implemented include:
     232  * packetIsIP : Test if the packet is IP
     233  * packetIsARP : Test if the packet is ARP
     234  * packetIsRequestARP : Test if this is an ARP Request packet
     235  * packetIsReplyARP : Test if this is an ARP Reply packet
     236  * packetArpDstIp : Test what is the destination IP in an ARP packet
     237  * packetArpSrcIp : Test what is the sources IP in an ARP packet
     238  * packetIsTCP : Test if a packet is TCP
     239  * packetDstIp : Test the destination IP of a packet
     240  * packetSrcIp : Test the source IP of a packet
     241  * packetDstTCPPort : Test the destination TCP port of a packet
     242  * packetSrcTCPPort : Test the source TCP port of a packet
     243  * createOFAction : Create one OpenFlow action
     244  * getFullMatch : get the full match out of a packet
     245  * createFlowMod : create a flow mod
     246  * createArpRequest : Create an Arp Request for  a different destination IP
     247  * createArpReply : Create an Arp Reply for  a different source IP
     248
     249
    227250== Run a port forward Controller ==
    228251Now let's do a slightly more complicated controller. OpenFlow gives you the power to overwrite fields of your packets at the switch, for example the TCP source or destination port and do port forwarding. You can have clients trying to contact a server at port 5000, and the OpenFlow switch can redirect your traffic to a service listening on port 6000.