Suppose a network administrator wants to send the web traffic of one department along a different path.
A router chooses the output port using only the destination IP address, so traffic to the same destination is forwarded the same way no matter where it came from.
This is how the IP forwarding described in the previous post works.
This post looks at
generalized forwarding
, which lets forwarding rules be defined in detail with several header fields, and at
SDN
(Software-Defined Networking), which manages those rules centrally.
A traditional router's forwarding table maps prefixes of destination addresses to output ports.
A router looks at a packet's destination IP address, finds the longest matching prefix, and chooses an output port.
This method is simple and fast, but it is hard to split paths based on the source address or port number.
To change the policy, you must either modify every router or build complex detour configurations across several devices.
In generalized forwarding, a forwarding rule is expressed as a pair of a
match
and an
action
.
The match selects packets based on several header fields (such as the input port, source and destination IP addresses, port numbers, and protocol), and the action defines what to do with those packets.
Match
Action
Description
Destination IP in the 10.0.1.* range
Forward to port 2
Default forwarding
Source IP is 10.0.9.5 and destination port is 80
Drop
Block HTTP requests from a specific host
Destination IP is 10.0.3.7
Rewrite destination IP to 10.0.4.7 and forward to port 3
Header modification
No matching rule
Send to controller
Handle a new flow
Actions can include
drop
,
header field modification
, and
send to the controller
in addition to forwarding.
So the department traffic separation above can be expressed as a single rule: "if the source is in that department's range and the destination is the web server, send it to a different port."
๐
The number of entries in a flow table is limited by the capacity of the switch hardware.
The more finely you split rules, the more entries you need, so match fields should be designed around only the criteria you actually need.
SDN: Separating the data plane and the control plane ๐
A traditional router keeps the
data plane
, which forwards packets, and the
control plane
, which computes routes and builds the forwarding table, inside the same device.
SDN separates the two.
Data plane
: switches and routers forward packets quickly according to their flow tables.
Control plane
: a remote
controller
sees the whole network, computes the rules, and installs them on each device.
Southbound interface
: the channel through which the controller and devices exchange rules. OpenFlow is the representative protocol.
Northbound interface
: the channel between applications that request network policies and the controller.
In the SDN structure, a controller in the control plane at the top installs flow table rules on the switches in the data plane below through the southbound interface
With this structure, when you want to change a policy you only need to edit the controller's rules, rather than configure every device one by one.
Conversely, if the controller stops, the network cannot decide paths for new flows, so in practice the controller is usually deployed redundantly across several machines.
Generalized forwarding expresses forwarding rules as
pairs of matches and actions
rather than a single destination address.
SDN is a structure in which the controller in the control plane computes these rules centrally and the switches in the data plane faithfully execute them.