Problem 14

Question

Here are the switch rules for the multiple-flow-table example in \(2.8 .2\) Learning Switches in OpenFlow: $$\begin{array}{cccc}\text { Table } & \text { match field } & \text { match action } & \text { no-match default } \\ \hline \mathrm{T}_{0} & \text { destaddr } & \text { forward and send to } \mathrm{T}_{1} & \text { flood and send to }\mathrm{T}_{1} \\\\\mathrm{~T}_{1} & \text { srcaddr } & \text { do nothing } & \text { send to controller } \end{array}$$ Give a similar table where the matches are reversed; that is, \(\mathrm{T}_{0}\) matches the srcaddr field and \(\mathrm{T}_{1}\) matches the destaddr field.

Step-by-Step Solution

Verified
Answer
The revised table with swapped match fields is as follows:\[\begin{{array}}{{cccc}}\text{{Table}} & \text{{match field}} & \text{{match action}} & \text{{no-match default}} \ \hline \mathrm{T}_{0} & \text{{srcaddr}} & \text{{forward and send to }} \mathrm{T}_{1} & \text{{flood and send to }} \mathrm{T}_{1} \\mathrm{T}_{1} & \text{{destaddr}} & \text{{do nothing}} & \text{{send to controller}} \end{{array}}\]
1Step 1: Identify the original match fields and actions
Identify the original match fields and their corresponding actions. In Table \(\mathrm{T}_{0}\), the match field is destaddr and its action is to forward and send to \(\mathrm{T}_{1}\). In case of no match, the default is to flood and send to \(\mathrm{T}_{1}\). In Table \(\mathrm{T}_{1}\), the match field is srcaddr and the action is to do nothing. In case of no match, the default action is to send to the controller.
2Step 2: Swap the match fields
Swap the match fields of Table \(\mathrm{T}_{0}\) and Table \(\mathrm{T}_{1}\). This means that Table \(\mathrm{T}_{0}\) will now match the srcaddr and Table \(\mathrm{T}_{1}\) will match the destaddr.
3Step 3: Write the new table
Write the new table with the swapped match fields, while keeping the match actions and no-match defaults the same. The new table should look as follows: \[\begin{{array}}{{cccc}}\text{{Table}} & \text{{match field}} & \text{{match action}} & \text{{no-match default}} \ \hline \mathrm{T}_{0} & \text{{srcaddr}} & \text{{forward and send to }} \mathrm{T}_{1} & \text{{flood and send to }} \mathrm{T}_{1} \\mathrm{T}_{1} & \text{{destaddr}} & \text{{do nothing}} & \text{{send to controller}} \end{{array}}\]

Key Concepts

Learning SwitchesFlow TablesNetwork Packet Routing
Learning Switches
Learning switches play a crucial role in network operations by easing the flow of data packets through a network. At their core, learning switches use *OpenFlow*, a modern protocol that enables the operation of network devices from various manufacturers to be managed centrally from a controller.

Unlike traditional switches, learning switches can adapt to the network traffic dynamically. They learn the network pathways by observing the source and destination addresses of incoming packets, and they make intelligent decisions based on this information. The learned pathways are stored in what we call *flow tables*. This way, a network doesn’t need to be manually configured for each connection, which saves time and reduces errors.

Essentially, a learning switch will learn where a device is located in the network by observing its data packets and then creates a map of address-to-interface, therefore increasing the efficiency of data transmission.
Flow Tables
Flow tables are the heart of an OpenFlow switch. They act like a traffic director, detailing how packets should be handled and forwarded. Each entry in a flow table consists of:
  • A match criterion: This could be a source address, destination address, or even specific packet characteristics.
  • A set of actions: Instructions on what to do with a packet if it matches the criteria. Actions could include forwarding the packet, modifying it, or dropping it.
  • A no-match default: What to do if the packet doesn’t match any criteria, often involving sending the packet to the network controller.
Flow tables give the OpenFlow switch its intelligence, allowing it to dynamically adjust as it learns more about the network. This adaptability is key to modern networks, especially as they scale and become more complex. By utilizing flow tables, the network can efficiently route packets without requiring constant manual intervention.
Network Packet Routing
Network packet routing in OpenFlow networks is performed by intelligently directing packets from their source to their appropriate destination. Using flow tables, switches determine the route that these packets should take across the network.

In traditional routing, when a packet arrives at a switch, it checks the destination address and forwards the packet to its next hop based solely on this address. However, the process in OpenFlow is much more refined. It takes into account both source and destination addresses, along with other criteria, to make routing decisions. This is because flow tables in OpenFlow allow for a detailed mapping of packet-handling rules that take both addresses into account.

If a packet doesn’t match any existing rules in the flow table, the switch can query a central controller. This controller can either instruct the switch on how to route the packet or can install a new rule to directly handle similar packets in the future, optimizing the network further and reducing latency.