2016-03-24 15 views
1

Ich bin mit Mininet, RYU Controller und Openflow 1.3, eine Topologie zu schaffen, in dem Host h1 verbunden ist h2 mit einem Schalter p0es0 auf folgende Weise zu hosten:Ping nicht in Mininet, RYU - Openflow 1.3

h1 h1-eth0:p0es0-eth3 
h2 h2-eth0:p0es0-eth4 

In meiner Ryu Controller-Anwendung, ich habe die Schnipsel folgenden Codes Regeln auf meinem p0es0 Schalter zu installieren, um h1 von h2 und umgekehrt zu erreichen:

# Install rule to forward packets destined to "10.0.0.2" (h2) via port 3 
    ofproto = sw.ofproto   
    match = sw.ofproto_parser.OFPMatch(eth_type = 0x0800, ipv4_dst="10.0.0.1") 
    action = sw.ofproto_parser.OFPActionOutput(4) 
    inst = [sw.ofproto_parser.OFPInstructionActions(sw.ofproto.OFPIT_APPLY_ACTIONS, [action])] 
    mod = sw.ofproto_parser.OFPFlowMod(datapath=sw, match=match, 
      instructions=inst, cookie=0, command=ofproto.OFPFC_ADD, idle_timeout=0, 
      hard_timeout=0, priority=100, flags=ofproto.OFPFF_SEND_FLOW_REM) 
    sw.send_msg(mod) 


    # Install rule to forward packets destined to "10.0.0.1" (h1) via port 4 
    match = sw.ofproto_parser.OFPMatch(eth_type = 0x0800, ipv4_dst="10.0.0.1") 
    action = sw.ofproto_parser.OFPActionOutput(4) 
    inst = [sw.ofproto_parser.OFPInstructionActions(sw.ofproto.OFPIT_APPLY_ACTIONS, [action])] 
    mod = sw.ofproto_parser.OFPFlowMod(datapath=sw, match=match, 
      instructions=inst, cookie=0, command=ofproto.OFPFC_ADD, idle_timeout=0, 
      hard_timeout=0, priority=100, flags=ofproto.OFPFF_SEND_FLOW_REM) 
    sw.send_msg(mod) 

Mein Dump-Flow-Befehl bestätigt die cor Rect Installation der Regeln im Schalter wie erwartet:

*** p0es0 -------------------------------- ---------------------------------

OFPST_FLOW Antwort (OF1.3) (xid = 0x2):

cookie = 0x0, Dauer = 1103.417s, Tabelle = 0, n_packets = 0, n_bytes = 0, send_flow_rem Priorität = 100, ip, nw_dst = 10.0.0.2 Aktionen = Ausgang: 4

cookie = 0x0, Dauer = 1103.414s, Tabelle = 0, n_Pakete = 0, n_Byte = 0, send_flow_rem Priorität = 100, IP, nw_dst = 10.0.0.1 Aktionen = outp UT: 3


Wenn jedoch I ping h2 von h1 oder umgekehrt versucht, ich Zielhost nicht erreichbar Fehler. Ich versuchte tcpdump auf p0es0-eth3 - Ich sehe nur ARP Request-Pakete.

Fehle ich hier etwas?

Danke.

Antwort

0

Ich lief Mininet ohne die arp-Flagge. Das Hinzufügen der Option arp hat mein Problem behoben.

d.h. Sudo mn --arp --custom fTreeTopo.py --topo ftreetopo --controller = remote, ip = 127.0.0.1