小编Shi*_*tia的帖子

mininet 中的 POX:event.parsed 在 pox 中给出了什么?什么是 parse.next?

class l3_switch在l3_learning.py中, named中有一个方法_handle_PacketIn。现在我明白,此事件是当交换机收到与表中没有对应条目的数据包时联系控制器时的事件。

我不明白的是这里

packet = event.parsed
Run Code Online (Sandbox Code Playgroud)

现在 是什么packet.next意思isinstance(packet.next, ipv4)

def _handle_PacketIn (self, event):
    dpid = event.connection.dpid
    inport = event.port
    packet = event.parsed
    if not packet.parsed:
      log.warning("%i %i ignoring unparsed packet", dpid, inport)
      return

    if dpid not in self.arpTable:
      # New switch -- create an empty table
      self.arpTable[dpid] = {}
      for fake in self.fakeways:
        self.arpTable[dpid][IPAddr(fake)] = Entry(of.OFPP_NONE,
         dpid_to_mac(dpid))

    if packet.type == ethernet.LLDP_TYPE:
      # Ignore LLDP packets
      return

    if isinstance(packet.next, ipv4):
      log.debug("%i %i IP …
Run Code Online (Sandbox Code Playgroud)

python controller pox openflow mininet

4
推荐指数
1
解决办法
3223
查看次数

标签 统计

controller ×1

mininet ×1

openflow ×1

pox ×1

python ×1