2017-02-07 2 views
0

Ich erzeuge eine proto=150 Verkehr mit Scapy-Tool.Ich möchte eine Flow-Tabelle Eintrag hinzufügen, so dass ein Schalter wird immer senden diese Pkt an den Controller.Fügen Sie einen Flow-Eintrag zu Flow-Tabelle mit Ryu

Ich erzeuge IP-Verkehr mit proto mit scapy 150:

S=IP(proto=150,dst='10.0.0.2',len=100)

Ich bin der Bearbeitung simple_switch.py App in Ryu-Controller.

Ich versuche, Eintrag zu Beginn dieser App mit Tabelle Miss Flow Eintrag hinzufügen, aber wenn ich Flow-Tabelle überprüfen, kann ich nur Tabelle Miss Flow-Eintrag, aber keinen anderen Eintrag, den ich hier hinzufügen möchte.

Was ich tue:

// This is proto 150 which i want always to be sent to controller 

match = parser.OFPMatch(ip_proto=150) 
actions = [parser.OFPActionOutput(ofproto.OFPP_CONTROLLER)] 
self.add_flow(datapath, 2, match, actions) 

//This is Table miss flow entry 

match = parser.OFPMatch() 
actions = [parser.OFPActionOutput(ofproto.OFPP_CONTROLLER,             ofproto.OFPCML_NO_BUFFER)] 
    self.add_flow(datapath, 0, match, actions) 

ich keinen Fehler bekommen, fühle ich mich etwas mit dem Match(ip_proto=150) falsch ist. Bitte helfen Sie mir, wie ich Proto 150 immer zum Controller senden kann.

Vielen Dank.

Ich hoffe, ich bin klar, wenn nicht klar, lassen Sie es mich bitte wissen.

Antwort

Verwandte Themen