Table-miss Flow Entry

Table-miss Flow Entry

Table-miss Flow Entry Rating: 9,3/10 1727 votes

The OpenFlow technical specifications state that if the table-miss flow entry is not present in the switch and there is no rule to send the packet to the controller, then the packet is dropped.

Spoken in the words of the Open Networking Foundation – one of the key concepts to understanding SDN is the separation of control plane and data plane. Typically a network is comprised of many routers and switches, each exchanging table information to build topologies. Each of these network devices has their own individualized control plane for brain-like functions such as route or MAC learning. Each network device also has its own data plane for forwarding packets. The challenge is each device has its own perspective of the network, and the only way you can view that perspective is by connecting to that device via a CLI and issue commands or configurations. The same is applicable for other devices like firewalls, load balancers, not just routers, and switches.

A control plane is the brain of the operations. It typically runs in software and builds the necessary tables for forwarding, such as the RIB or MAC tables. This table is typically sent as a copy down to the forwarding plane and installed in hardware to allow for high throughput forwarding of traffic. These two planes (and usually an additional management plane for things like SSH, SNMP, etc.) are traditionally running on every single network device in a network.

OpenFlow is an open standard for a communications protocol that enables the control plane to break off and interact with the forwarding plane of multiple devices from some central point, decoupling roles for higher functionality and programmability.

Before I go further, it must be noted that:

  1. SDN is not OpenFlow.
  2. SDN is much more than a split control and data plane.
  3. SDN is cool, as is OpenFlow, but they are not the same.
  4. You’re not alone in understanding the vague concept of SDN. Just look at Wikipedia

Application developers typically have no need to worry about underlying hardware when writing applications. The hardware has been abstracted by the operating system. Often times, even the Operating System itself has been abstracted from the hardware via hypervisors or containerization. This layer of abstraction is a relatively new concept in the networking industry, with OpenFlow as a freedom fighter creating an open interface for network abstraction layers.

This abstraction capability could be done with a controller layer. You can manipulate flow tables and flow entries on network devices without directly connecting to the network devices. The application developer can use an API to communicate to the controller, and the controller takes care of the details needed to update the network devices flow tables. The beauty of SDN is in the Application layer. OpenFlow is one (of many) possible means to achieve the abstraction needed for SDN.


Source: https://telsoc.org/ajtde/2015-12-v3-n4/a28

It’s important to note here that OpenFlow does not update configurations on network devices. OpenFlow updates the flow tables of network devices. If packet A needs to get to packet B, OpenFlow logic makes it so. If you need to configure NTP on the network devices, that is not a job for OpenFlow. You will still need to configure settings on devices using some other protocol like SNMP, NETCONF, OVSDB, and so on.

Directly from the OpenFlow Switch Specification document:

“An OpenFlow Logical Switch consists of one or more flow tables and a group table, which perform packet lookups and forwarding, and one or more OpenFlow channels to an external controller (Figure 1). The switch communicates with the controller and the controller manages the switch via the OpenFlow switch protocol.”

Flow Tables

Using the OpenFlow switch protocol, the controller can add, update, and delete flow entries in flow tables, both reactively (in response to packets) and proactively.

Reactive Flow Entries are created when the controller dynamically learns where devices are in the topology and must update the flow tables on those devices to build end-to-end connectivity. For example, since the switches in a pure OpenFlow environment are simply forwarders of traffic, all rational logic must first be dictated and programmed by the controller. So, if a host on switch A needs to talk to a host switch B, messages will be sent to the controller to find out how to get to this host. The controller will learn the host MAC address tables of the switches and how they connect, programming the logic into the flow tables of each switch. This is a reactive flow entry.

Proactive Flow Entries are programmed before traffic arrives. If it’s already known that two devices should or should not communicate, the controller can program these flow entries on the OpenFlow endpoints ahead of time.

Traffic Matching, Pipeline Processing, and Flow Table Navigation

In an OpenFlow network, each OpenFlow switch contains at least 1 flow table and a set of flow entries within that table. These flow entries contain match fields, counters and instructions to apply to matched packets.

Typically, you’ll have more than a single flow table, so it’s important to note that matching starts at the first flow table and may continue to additional flow tables of the pipeline. The packet will first start in table 0 and check those entries based on priority. Highest priority will match first (e.g. 200, then 100, then 1). If the flow needs to continue to another table, goto statement tells the packet to go to the table specified in the instructions.

This pipeline processing will happen in two stages, ingress processing and egress processing.

If a matching entry is found, the instructions associated with the specific flow entry are executed. If no match is found in a flow table, the outcome depends on the configuration of the Table-miss flow entry.

Table-miss flow entry

The Table-miss flow entry is the last in the table, has a priority of 0 and a match of anything. It’s like a catch-all, and the actions to be taken depend on how you configure it. You can forward the packet to the controller over the OpenFlow Channel, or you could drop the packet, or continue with the next flow table.

“OpenFlow ports are the network interfaces for passing packets between OpenFlow processing and the rest of the network. OpenFlow switches connect logically to each other via their OpenFlow ports…”

There are three types of ports that an OpenFlow switch must support: physical ports, logical ports, and reserved ports.

Physical Ports

Physical ports are switch-defined ports that correspond to a hardware interface on the switch. This could mean one-to-one mapping of OpenFlow physical ports to hardware-defined Ethernet interfaces on the switch, butt doesn’t necessarily have to be one-to-one. OpenFlow switches can have physical ports that are actually virtual, and map to some virtual representation of a physical port. This is similar to the way you virtualize hardware network interfaces in compute environments.

Logical Ports

Logical ports are switch-defined ports that do not correspond directly to hardware interfaces on the switch. Examples of these include LAGs, tunnels and loopback interfaces. The only differences between physical ports and logical ports is that a packet associated with a logical port may have an extra pipeline field called Tunnel-ID, and when packets are received on logical ports that require communication to the controller, both the logical port and underlying physical port are reported to the controller.

Reserved Ports

The OpenFlow reserved ports specify generic forwarding actions such as sending to the controller, flooding, or forwarding using non-OpenFlow methods, such as “normal” switch processing.

There are several flavors of required reserved ports: ALL, CONTROLLER, TABLE, IN_PORT, ANY, UNSET, LOCAL. The CONTROLLER port represents the OpenFlow Channel used for communication between the switch and controller.

In hybrid environments, you’ll also see NORMAL and FLOOD ports to allow interaction between the OpenFlow pipeline and the hardware pipeline of the switch.

There are two types of OpenFlow switches: OpenFlow-only, and OpenFlow-hybrid.

OpenFlow-only switches are “dumb switches” having only a data/forwarding plane and no way of making local decisions. All packets are processed by the OpenFlow pipeline, and can not be processed otherwise.

OpenFlow-hybrid switches support both OpenFlow operation and normal Ethernet switching operation. This means you can use traditional L2 Ethernet switching, VLAN isolation, L3 routing, ACLs and QoS processing via the switch’s local control plane while interacting with the OpenFlow pipeline using various classification mechanisms.

You could have a switch with half of its ports using traditional routing and switching, while the other half is configured for OpenFlow. The OpenFlow half would be managed by an OpenFlow controller, and the other half by the local switch control plane. Passing traffic between these pipelines would require the use of a NORMAL or FLOOD reserved port.

OpenFlow Protocol supports 3 message types, each with their own setup of sub-types:

  • Controller-to-switch
  • Asynchronous
  • Symmetric

Controller-to-switch Messages

Controller-to-switch Messages and initiated by the controller and used to directly manage or inspect the switch. These messages include:

  • Features – switch needs to request identity
  • Configuration – set and query configuration parameters
  • Modify-State – also called ‘flow mod’, used to add, delete and modify flow/group entries
  • Read-States – get statistics
  • Packet Outs – controller send message to the switch, either full packet or buffer ID.
  • Barrier – Request or reply messages are used by controller to ensure message dependencies have been met, and receive notification.
  • Role-Request – set the role of its OpenFlow channel
  • Asynchronous-Configuration – set an additional filter on asynchronous message that it wants to receive on OpenFlow Channel

Asynchronous Messages

Table-miss Flow Entry

Asynchronous messages are initiated by the switch and used to update the controller of network events and changes to the switch state. These messages include:

  • Packet-in – transfer the control of a packet to the controller
  • Flow-Removed – inform controller that flow has been removed
  • Port Status – inform controller that switch has gone down
  • Error – notify controller of problems

Symmetric Messages

Symmetric messages are initiated either by the switch or controller and sent without solicitation. These messages include:

  • Hello – introduction or keep-alive messages exchanged between switch and controller
  • Echo – sent from either switch or controller, these verify liveness of connection and used to measure latency or bandwidth
  • Experimenter – a standard way for OpenFlow switches to offer additional functionality within the OpenFlow message type space.

OpenFlow Connection Sequence

  • Switch can initiate the connection to the controller’s IP and default transport port (TCP 6633 pre-OpenFlow 1.3.2, TCP 6653 post), or a user-specified port.
  • Controller can also initiate the connection request, but this isn’t common.
  • TCP or TLS Connection Established
  • Both send an OFPT_HELLO with a populated version field
  • Both calculate the negotiated version to be used
  • If this cannot be agreed upon an OFPT_ERROR message is sent
  • If each support the version, the controller sends an OFPT_FEATURES-REQUEST to gather the Datapath ID of the switch, along with the switch’s capabilities.

We’ll take a look at this process in the section below

Here I am capturing OpenFlow traffic between mininet (OpenFlow Switch) and OpenDaylight (OpenFlow Controller).

  • Mininet is at 192.168.0.11
  • ODL is at 192.168.0.12

First I execute mininet, specifying the use of OpenFlow1.3, and initiate a ping between host h1 and host h2.

The topology generated in mininet looks like this on the OpenDaylight controller:

We can see that host 1 is connected to s1-eth1 and host 2 is connected to s1-eth2. Notice there is a LOCAL management interface, which is the local management plane of the switch used to send traffic directly to the control plane.

The mininet topology can be viewed by looking at the Open vSwitch (OVS) database:

We can see the flows created by dumping flows in mininet:

Using a Wireshark display filter for openflow_v4 (which means OpenFlow 1.3), we can view the packets caught:

Notice that the first packet caught is a HELLO message sent from the switch (192.168.0.11) to controller (192.168.0.12). This is exactly what is expected per the OpenFlow Specification document. This is the initialization of the OpenFlow Channel, which is the datapath for the OpenFlow protocol between the controller and device, which in this case is a mininet switch.

Back to this drawing, we’re seeing the communication between the OpenFlow switch’s OpenFlow Channel and the controller. Also notice this is using the Control Channel, meaning this traffic is using the LOCAL management port of the switch, and not going through the pipeline of the switch itself.

The next message type we see is an OFPT_FEATURES_REQUEST from the controller to the switch

Among other capability attributes, this message is used to find the Datapath Identifier (DPID) of the switch. The DPID uniquely identifies a data path in the OpenFlow topology and is dynamically created by combining the device MAC address in the lower 48 bits, prepended with some 16-bit string to be determined by the implementer.

The switch replies with an OFPT_FEATURES_REPLY message.

n_tables

The OpenFlow Specification states that the n_tables field describes the number of tables supported by the switch, each of which can have a different set of supported match fields, actions and number of entries. This is included in the features reply message, as seen here:

If the controller needs to understand the size, types, and order in which the tables are constructed, the controller sends an OFFMP_TABLE_FEATURES message. The switch must then return these tables in the order in which these packets traverse the tables.

Multipart Request

Multipart messages are used to encode request or reply that could potentially carry are large amounts of data, which may not fit into a single message. Normal messages are limited to 64KB. Multipart messages are encoded in sequence. These types of messages are primarily used to request statistics or state information.

In our packet capture we can see this exchange of information. Looking at the OFPT_MULTIPART_REPLY, OFPMP_DESC packet we can see attributes such as the manufacturer and hardware/software versions.

In the OFPT_MULTIPART_REPLY, OFPMP_PORT_DESC message you’ll see information about the switch ports sent to the controller. Anything from type, to status, to speed is included in this message. In this case, the switch port is still down.

PACKET-IN and PACKET-OUT Messages

PACKET_IN messages are sent from the switch to the controller. I initiated a ping from h1 to h2 in mininet.

Four PACKET_IN messages are seen.

We first see a PACKET_IN message from the switch to the controller because h1 doesn’t yet know how to get to h2. This is and ARP message, encapsulated by OpenFlow over TCP.

The next packet in succession is the ARP reply from h2:

Followed by the ICMP echo

And echo reply

These flows can be seen by looking at the Open vSwitch (OVS) database.

The idle timeout will expire when there are no hits on the flow entry. The flow is then removed. If I were to fire up another connection between these hosts, I would not capture the packets at the controller since the flows are already programmed on the switch.

This is true if I have a single switch in the topology or 50 switches in the topology.

I hope this gives you an idea of some of the basic operations of OpenFlow.

I was inspired to learn more about OpenFlow after attending Networking Field Day 13. NEC presented a couple of super interesting use cases showcasing SDN with OpenFlow for Unified Communications optimization and security threat control in enterprise networks. The NEC ProgrammableFlow Controller is wildly impressive, a perfect example of what dreams may come with OpenFlow. Check out their presentations here:

This article is a small compilation of some notes I took on OpenFlow while cruising through the GNS3 SDN & OpenFlow course by David Bombal. While this is barely scratching the surface of OpenFlow, and especially SDN, I find it valuable to go through the motions and understand what is happening at some fundamental level when discussing technologies like this.

I’ve been playing around with several OpenFlow controllers: OpenDaylight, ONUS, HP VAN, and Floodlight, but the real beauty comes out north of this at that application layer. For now, I’m still in the weeds and having a blast with Mininet and OpenFlow. OpenFlow isn’t the only protocol out there, and many solutions are starting to trend toward BGP as the protocol for software-defined networks. That said, don’t put all your study time in one basket. Exciting times are ahead, so stay sharp and keep relevant!

Q: What versions of OpenFlow does Open vSwitch support?

A: The following table lists the versions of OpenFlow supported by eachversion of Open vSwitch:

Open vSwitchOF1.0OF1.1OF1.2OF1.3OF1.4OF1.5
1.9 and earlieryes
1.10, 1.11yes(*)(*)
2.0, 2.1yes(*)(*)(*)
2.2yes(*)(*)(*)(%)(*)
2.3, 2.4yesyesyesyes(*)(*)
2.5, 2.6, 2.7yesyesyesyes(*)(*)
2.8, 2.9, 2.10, 2.11yesyesyesyesyes(*)
2.12yesyesyesyesyesyes

—Not supported.yes Supported and enabled by default(*) Supported, but missing features, and must be enabled by user.(%) Experimental, unsafe implementation.

In any case, the user may override the default:

  • To enable OpenFlow 1.0, 1.1, 1.2, and 1.3 on bridge br0:

  • To enable OpenFlow 1.0, 1.1, 1.2, 1.3, 1.4, and 1.5 on bridge br0:

  • To enable only OpenFlow 1.0 on bridge br0:

All current versions of ovs-ofctl enable only OpenFlow 1.0 by default. Usethe -O option to enable support for later versions of OpenFlow inovs-ofctl. For example:

(Open vSwitch 2.2 had an experimental implementation of OpenFlow 1.4 thatcould cause crashes. We don’t recommend enabling it.)

OpenFlow Support in Open vSwitch tracks support for OpenFlow 1.1 and later features.

Q: Does Open vSwitch support MPLS?

A: Before version 1.11, Open vSwitch did not support MPLS. That is, theseversions can match on MPLS Ethernet types, but they cannot match, push, orpop MPLS labels, nor can they look past MPLS labels into the encapsulatedpacket.

Open vSwitch versions 1.11, 2.0, and 2.1 have very minimal support forMPLS. With the userspace datapath only, these versions can match, push, orpop a single MPLS label, but they still cannot look past MPLS labels (evenafter popping them) into the encapsulated packet. Kernel datapath supportis unchanged from earlier versions.

Open vSwitch version 2.3 can match, push, or pop a single MPLS label andlook past the MPLS label into the encapsulated packet. Both userspace andkernel datapaths will be supported, but MPLS processing always happens inuserspace either way, so kernel datapath performance will be disappointing.

Open vSwitch version 2.4 can match, push, or pop up to 3 MPLS labels andlook past the MPLS label into the encapsulated packet. It will have kernelsupport for MPLS, yielding improved performance.

Q: I’m getting “error type 45250 code 0”. What’s that?

A: This is a Open vSwitch extension to OpenFlow error codes. Open vSwitchuses this extension when it must report an error to an OpenFlow controllerbut no standard OpenFlow error code is suitable.

Open vSwitch logs the errors that it sends to controllers, so the easiestthing to do is probably to look at the ovs-vswitchd log to find out whatthe error was.

If you want to dissect the extended error message yourself, the format isdocumented in include/openflow/nicira-ext.h in the Open vSwitch sourcedistribution. The extended error codes are documented ininclude/openvswitch/ofp-errors.h.

Q: Some of the traffic that I’d expect my OpenFlow controller to see doesn’tactually appear through the OpenFlow connection, even though I know that it’sgoing through.

A: By default, Open vSwitch assumes that OpenFlow controllers are connected“in-band”, that is, that the controllers are actually part of the networkthat is being controlled. In in-band mode, Open vSwitch sets up special“hidden” flows to make sure that traffic can make it back and forth betweenOVS and the controllers. These hidden flows are higher priority than anyflows that can be set up through OpenFlow, and they are not visible throughnormal OpenFlow flow table dumps.

Usually, the hidden flows are desirable and helpful, but occasionally theycan cause unexpected behavior. You can view the full OpenFlow flow table,including hidden flows, on bridge br0 with the command:

to help you debug. The hidden flows are those with prioritiesgreater than 65535 (the maximum priority that can be set withOpenFlow).

The Documentation/topics/design doc describes the in-band model indetail.

If your controllers are not actually in-band (e.g. they are onlocalhost via 127.0.0.1, or on a separate network), then you shouldconfigure your controllers in “out-of-band” mode. If you have onecontroller on bridge br0, then you can configure out-of-band modeon it with:

Q: Some of the OpenFlow flows that my controller sets up don’t seem to apply tocertain traffic, especially traffic between OVS and the controller itself.

A: See above.

Q: I configured all my controllers for out-of-band control mode but “ovs-appctlbridge/dump-flows” still shows some hidden flows.

A: You probably have a remote manager configured (e.g. with “ovs-vsctlset-manager”). By default, Open vSwitch assumes that managers need in-bandrules set up on every bridge. You can disable these rules on bridge br0with:

This actually disables in-band control entirely for the bridge, as if allthe bridge’s controllers were configured for out-of-band control.

Q: My OpenFlow controller doesn’t see the VLANs that I expect.

A: See answer under “VLANs”, above.

Q: I ran ovs-ofctladd-flowbr0nw_dst=192.168.0.1,actions=drop but I got afunny message like this:

and when I ran ovs-ofctldump-flowsbr0 I saw that my nw_dst match haddisappeared, so that the flow ends up matching every packet.

A: The term “normalization” in the log message means that a flow cannotmatch on an L3 field without saying what L3 protocol is in use. The“ovs-ofctl” command above didn’t specify an L3 protocol, so the L3 fieldmatch was dropped.

In this case, the L3 protocol could be IP or ARP. A correct command foreach possibility is, respectively:

and:

Similarly, a flow cannot match on an L4 field without saying what L4protocol is in use. For example, the flow match tp_src=1234 is, byitself, meaningless and will be ignored. Instead, to match TCP source port1234, write tcp,tp_src=1234, or to match UDP source port 1234, writeudp,tp_src=1234.

Q: How can I figure out the OpenFlow port number for a given port?

A: The OFPT_FEATURES_REQUEST message requests an OpenFlow switch torespond with an OFPT_FEATURES_REPLY that, among other information,includes a mapping between OpenFlow port names and numbers. From a commandprompt, ovs-ofctlshowbr0 makes such a request and prints the responsefor switch br0.

The Interface table in the Open vSwitch database also maps OpenFlow portnames to numbers. To print the OpenFlow port number associated withinterface eth0, run:

You can print the entire mapping with:

but the output mixes together interfaces from all bridges in the database,so it may be confusing if more than one bridge exists.

In the Open vSwitch database, ofport value -1 means that the interfacecould not be created due to an error. (The Open vSwitch log shouldindicate the reason.) ofport value [] (the empty set) means that theinterface hasn’t been created yet. The latter is normally an intermittentcondition (unless ovs-vswitchd is not running).

Q: I added some flows with my controller or with ovs-ofctl, but when I run“ovs-dpctl dump-flows” I don’t see them.

A: ovs-dpctl queries a kernel datapath, not an OpenFlow switch. It won’tdisplay the information that you want. You want to use ovs-ofctldump-flows instead.

Q: It looks like each of the interfaces in my bonded port shows up as anindividual OpenFlow port. Is that right?

A: Yes, Open vSwitch makes individual bond interfaces visible as OpenFlowports, rather than the bond as a whole. The interfaces are treatedtogether as a bond for only a few purposes:

  • Sending a packet to the OFPP_NORMAL port. (When an OpenFlow controlleris not configured, this happens implicitly to every packet.)
  • Mirrors configured for output to a bonded port.

It would make a lot of sense for Open vSwitch to present a bond as a singleOpenFlow port. If you want to contribute an implementation of such afeature, please bring it up on the Open vSwitch development mailing list atdev@openvswitch.org.

Q: I have a sophisticated network setup involving Open vSwitch, VMs or multiplehosts, and other components. The behavior isn’t what I expect. Help!

A: To debug network behavior problems, trace the path of a packet,hop-by-hop, from its origin in one host to a remote host. If that’scorrect, then trace the path of the response packet back to the origin.

The open source tool called plotnetcfg can help to understand therelationship between the networking devices on a single host.

Usually a simple ICMP echo request and reply (ping) packet is goodenough. Start by initiating an ongoing ping from the origin host to aremote host. If you are tracking down a connectivity problem, the “ping”will not display any successful output, but packets are still being sent.(In this case the packets being sent are likely ARP rather than ICMP.)

Tools available for tracing include the following:

  • tcpdump and wireshark for observing hops across network devices,such as Open vSwitch internal devices and physical wires.

  • ovs-appctldpif/dump-flows<br> in Open vSwitch 1.10 and later orovs-dpctldump-flows<br> in earlier versions. These tools allow oneto observe the actions being taken on packets in ongoing flows.

    See ovs-vswitchd(8) for ovs-appctldpif/dump-flows documentation,ovs-dpctl(8) for ovs-dpctldump-flows documentation, and “Why arethere so many different ways to dump flows?” above for some background.

  • ovs-appctlofproto/trace to observe the logic behind how ovs-vswitchdtreats packets. See ovs-vswitchd(8) for documentation. You can out moredetails about a given flow that ovs-dpctldump-flows displays, bycutting and pasting a flow from the output into an ovs-appctlofproto/trace command.

  • SPAN, RSPAN, and ERSPAN features of physical switches, to observe whatgoes on at these physical hops.

    Hara hara mahadeva telugu serial watch online. A mesmerising story of Lord Shiva, the Supreme God, tracing his journey from being an ascetic to a family man after he marries Parvati - a union that shaped the universe! Watch Hara Hara Mahadeva - Kannada Mythology serial on Disney+ Hotstar now. Welcome to this post, you guys. If you guys know about the Tamil and Telugu language and to like to watch any Tamil and Telugu mythologic tv serial, so the best is tv serial Hara Hara Mahadeva serials for you guys. Because this is a mythologic TV serial, but this tv serial is available on youtube in Tamil and Telugu language. Watch Hara Hara Mahadeva Daily Serial Today's Episode. Maa TV's popular daily serial Hara Hara Mahadeva all episodes online. All telugu dubbed Daily Serials online. Fight Night Champion Keygen No Virus more. The Malayalam series telecasts on every Monday to Friday at 10:00 PM IST on Asianet. The series was first telecasted on 26th November 2012 with a huge public response and good TRPs. The Telugu series airs every Monday to Friday at 5:00 PM on MAA TV and is gaining popularity and high. Hara Hara Mahadeva is a mesmerising, visually stunning story of Lord Shiva and his avatars. Witness the Lord as a sansarik in this mythological show. Watch Hara Hara Mahadeva - Telugu Mythology serial on Disney+ Hotstar now.

Starting at the origin of a given packet, observe the packet at each hop inturn. For example, in one plausible scenario, you might:

  1. tcpdump the eth interface through which an ARP egresses a VM,from inside the VM.
  2. tcpdump the vif or tap interface through which the ARPingresses the host machine.
  3. Use ovs-dpctldump-flows to spot the ARP flow and observe the hostinterface through which the ARP egresses the physical machine. You mayneed to use ovs-dpctlshow to interpret the port numbers. If theoutput seems surprising, you can use ovs-appctlofproto/trace toobserve details of how ovs-vswitchd determined the actions in theovs-dpctldump-flows output.
  4. tcpdump the eth interface through which the ARP egresses thephysical machine.
  5. tcpdump the eth interface through which the ARP ingresses thephysical machine, at the remote host that receives the ARP.
  6. Use ovs-dpctldump-flows to spot the ARP flow on the remote hostremote host that receives the ARP and observe the VM vif or tapinterface to which the flow is directed. Again, ovs-dpctlshow andovs-appctlofproto/trace might help.
  7. tcpdump the vif or tap interface to which the ARP isdirected.
  8. tcpdump the eth interface through which the ARP ingresses a VM,from inside the VM.

It is likely that during one of these steps you will figure out theproblem. If not, then follow the ARP reply back to the origin, in reverse.

Q: How do I make a flow drop packets?

A: To drop a packet is to receive it without forwarding it. OpenFlowexplicitly specifies forwarding actions. Thus, a flow with an empty set ofactions does not forward packets anywhere, causing them to be dropped. Youcan specify an empty set of actions with actions= on the ovs-ofctlcommand line. For example:

would cause every packet entering switch br0 to be dropped.

You can write “drop” explicitly if you like. The effect is the same.Thus, the following command also causes every packet entering switch br0 tobe dropped:

drop is not an action, either in OpenFlow or Open vSwitch. Rather, itis only a way to say that there are no actions.

Q: I added a flow to send packets out the ingress port, like this:

but OVS drops the packets instead.

A: Yes, OpenFlow requires a switch to ignore attempts to send a packet outits ingress port. The rationale is that dropping these packets makes itharder to loop the network. Sometimes this behavior can even beconvenient, e.g. it is often the desired behavior in a flow that forwards apacket to several ports (“floods” the packet).

Sometimes one really needs to send a packet out its ingress port(“hairpin”). In this case, output to OFPP_IN_PORT, which in ovs-ofctlsyntax is expressed as just in_port, e.g.:

This also works in some circumstances where the flow doesn’t match on theinput port. For example, if you know that your switch has five portsnumbered 2 through 6, then the following will send every received packetout every port, even its ingress port:

or, equivalently:

Sometimes, in complicated flow tables with multiple levels of resubmitactions, a flow needs to output to a particular port that may or may not bethe ingress port. It’s difficult to take advantage of OFPP_IN_PORT inthis situation. To help, Open vSwitch provides, as an OpenFlow extension,the ability to modify the in_port field. Whatever value is currently inthe in_port field is the port to which outputs will be dropped, as well asthe destination for OFPP_IN_PORT. This means that the following willreliably output to port 2 or to ports 2 through 6, respectively:

If the input port is important, then one may save and restore it on thestack:

Q: My bridge br0 has host 192.168.0.1 on port 1 and host 192.168.0.2 on port 2.I set up flows to forward only traffic destined to the other host and dropother traffic, like this:

But it doesn’t work–I don’t get any connectivity when I do this. Why?

Inkjet: Software: Windows 10: Windows 10 HOME: Windows 10 PRO: 32bit (x86) 64bit (x64) 32bit (x86) 64bit (x64) Roland VersaWorks. Roland bn 20 drivers for mac free.

A: These flows drop the ARP packets that IP hosts use to establish IPconnectivity over Ethernet. To solve the problem, add flows to allow ARPto pass between the hosts:

This issue can manifest other ways, too. The following flows that match onEthernet addresses instead of IP addresses will also drop ARP packets,because ARP requests are broadcast instead of being directed to a specifichost:

The solution already described above will also work in this case. It maybe better to add flows to allow all multicast and broadcast traffic:

Q: My bridge disconnects from my controller on add-port/del-port.

A: Reconfiguring your bridge can change your bridge’s datapath-id becauseOpen vSwitch generates datapath-id from the MAC address of one of itsports. In that case, Open vSwitch disconnects from controllers becausethere’s no graceful way to notify controllers about the change ofdatapath-id.

To avoid the behaviour, you can configure datapath-id manually.:

Q: My controller complains that OVS is not buffering packets.What’s going on?

A: “Packet buffering” is an optional OpenFlow feature, and controllersshould detect how many “buffers” an OpenFlow switch implements. It wasrecently noticed that OVS implementation of the buffering feature was notcompliant to OpenFlow specifications. Rather than fix it and riskcontroller incompatibility, the buffering feature is removed as of OVS 2.7.Controllers are already expected to work properly in cases where the switchcan not buffer packets, but sends full packets in “packet-in” messagesinstead, so this change should not affect existing users. After the changeOVS always sends the buffer_id as 0xffffffff in “packet-in”messages and will send an error response if any other value of this fieldis included in a “packet-out” or a “flow mod” sent by a controller.

Packet buffers have limited usefulness in any case. Table-miss packet-inmessages most commonly pass the first packet in a microflow to the OpenFlowcontroller, which then sets up an OpenFlow flow that handles remainingtraffic in the microflow without further controller intervention. In sucha case, the packet that initiates the microflow is in practice usuallysmall (certainly for TCP), which means that the switch sends the entirepacket to the controller and the buffer only saves a small number of bytesin the reverse direction.

Q: How does OVS divide flows among buckets in an OpenFlow “select” group?

A: In Open vSwitch 2.3 and earlier, Open vSwitch used the destinationEthernet address to choose a bucket in a select group.

Open vSwitch 2.4 and later by default hashes the source and destinationEthernet address, VLAN ID, Ethernet type, IPv4/v6 source and destinationaddress and protocol, and for TCP and SCTP only, the source and destinationports. The hash is “symmetric”, meaning that exchanging source anddestination addresses does not change the bucket selection.

Select groups in Open vSwitch 2.4 and later can be configured to use adifferent hash function, using a Netronome extension to the OpenFlow 1.5+group_mod message. For more information, seeDocumentation/group-selection-method-property.txt in the Open vSwitchsource tree.

Q: An OpenFlow “select” group isn’t dividing packets evenly among the buckets.

A: When a packet passes through a “select” group, Open vSwitch hashes asubset of the fields in the packet, then it maps the hash value to abucket. This means that packets whose hashed fields are the same willalways go to the same bucket[*]. More specifically, if you test with asingle traffic flow, only one bucket will receive any traffic[**].Furthermore, statistics and probability mean that testing with a smallnumber of flows may still yield an uneven distribution.

[*] Unless its bucket has a watch port or group whose liveness changesduring the test.

[**] Unless the hash includes fields that vary within a traffic flow, suchas tcp_flags.

Q: I added a flow to accept packets on VLAN 123 and output them on VLAN 456,like so:

but the packets are actually being output in VLAN 123. Why?

A: OpenFlow actions are executed in the order specified. Thus, the actionsabove first output the packet, then change its VLAN. Since the outputoccurs before changing the VLAN, the change in VLAN will have no visibleeffect.

To solve this and similar problems, order actions so that changes toheaders happen before output, e.g.:

See also the following question.

Q: I added a flow to a redirect packets for TCP port 80 to port 443,like so:

but the packets are getting dropped instead. Why?

A: This set of actions does change the TCP destination port to 443, butthen it does nothing more. It doesn’t, for example, say to continue toanother flow table or to output the packet. Therefore, the packet isdropped.

To solve the problem, add an action that does something with the modifiedpacket. For example:

See also the preceding question.

Q: When using the “ct” action with FTP connections, it doesn’t seem to matterif I set the “alg=ftp” parameter in the action. Is this required?

A: It is advisable to use this option. Some platforms may automaticallydetect and apply ALGs in the “ct” action regardless of the parameters youprovide, however this is not consistent across all implementations. Theovs-ofctl(8)man pages contain further details in the description of the ALG parameter.
  • Open vSwitch FAQ
  • Open vSwitch 2.13.90 documentation
    • Open vSwitch FAQ
      • Using OpenFlow
Table-miss Flow Entry
© 2020