gpt4 book ai didi

network-protocols - OpenFlow Action OUTPUT 有什么作用?

转载 作者:行者123 更新时间:2023-12-04 04:37:55 25 4
gpt4 key购买 nike

当我在阅读 Beacon 的一些源代码时,我被 OPAction_OUTPUT 弄糊涂了。 .
spec1.3 说

Required Action: Output. The Output action forwards a packet to a specified OpenFlow port (see 4.1). OpenFlow switches must support forwarding to physical ports, switch-defined logical ports and the required reserved ports (see 4.5).



但它混淆了两点:
  • 第一,The Output action forwards a *packet* ,但是这个数据包是什么意思?这是否意味着 OpenFlow packet-out包含输出 Action ?或者包含在中的数据包数据字段 OpenFlow packet-out .
  • 其次,下一步是什么?当 OpenFlow Switch 收到包含 OUTPUT 的数据包时,它们会做什么?行动?

  • 让我举个例子:当 OFcontroller 收到一个数据包时, Controller 会做(L2 交换机):
     if dst in self.mac_to_port[dpid]:
    out_port = self.mac_to_port[dpid][dst]
    else:
    out_port = ofproto.OFPP_FLOOD
    actions = [datapath.ofproto_parser.OFPActionOutput(out_port)]
    out = datapath.ofproto_parser.OFPPacketOut(
    datapath=datapath, buffer_id=msg.buffer_id, in_port=msg.in_port,
    actions=actions)
    datapath.send_msg(out) // send out the PacketOut containing output action

    所以,问题是:
  • Action OUTPUT输出什么在这个包出。
  • 当 OFSwitch 在它的端口上接收到这个数据包输出时,它会做什么?

  • 谢谢!

    最佳答案

    邮件列表OpenFlow-spec回答了这个问题。为了完成问题并帮助其他人,我将其发布在这里。归功于西蒙。

    来自西蒙·霍曼:

    An OpenFlow Packet-Out message, which is interpreted as such, would be received over an OpenFlow channel between the switch and a controller. Traffic for the channel does not run through the OpenFlow pipeline (OF1.3.2 section 6.3.1).

    Thus, it would be the packet contained in the data field of the Packet-Out message which is processed by an Output action. This field would be forwarded to the OpenFlow pipeline by the switch after it receives the Packet-Out message via a channel.

    If the Packet-Out message is sent via a channel then it will be decoded by the switch and the data field will be forwarded to the OpenFlow pipleline as described above.

    If the Packet-Out message is not sent via a channel but rather just happens to be a packet that contains data that looks like a Packet-Out message then it will be handled directly by the OpenFlow pipeline without any special processing.

    关于network-protocols - OpenFlow Action OUTPUT 有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19417562/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com